This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Invision Power Board any1?

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
i
ipbegg
Voice
Posts: 11
Joined: Sun Jun 14, 2009 7:44 am

Invision Power Board any1?

Post by ipbegg »

Hi,wondering if anyone could help me here :? :roll: i need a script that will show on the channel after typing !user [and here nickname of some user] stats like posts, group when he joined also link to the profile etc....

I am on using IPB 2.3.6 8)
Last edited by ipbegg on Tue Aug 11, 2009 9:00 am, edited 1 time in total.
User avatar
tomekk
Master
Posts: 255
Joined: Fri Nov 28, 2008 11:35 am
Location: Oswiecim / Poland
Contact:

Post by tomekk »

I have similar scripts.
I wrote it for my friends clan forum (IPB 2.3.3), they are based on two files, one TCL (eggdrop side) and one PHP (IPB side).

PHP script is an external script which is getting information directly from the forum database.

You have to copy this PHP script to one of your dirs and later supply some config data like database host/user/pass, database name, and ipb table suffix.

PHP script is for MySQL.

example, php output (if user exists):
diabolic //user name
3 //user ID
13 May 2002 //joined date
1414 //posts
Clan Members //group name
http://myaddress.com/ipb/index.php?showuser=3 //link to profile
Later, TCL script is getting this data via internet.

It possible to make one script, for example when eggdrop is on the same server which mysql is. (mysql package for TCL)
i
ipbegg
Voice
Posts: 11
Joined: Sun Jun 14, 2009 7:44 am

Post by ipbegg »

well what should i do :? could ya up the script? =]
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

There is a way to do this all in tcl without involving any php at all. No login required. No passwords. Instead the script uses a series of traversals (2 to be exact) to arrive at the correct username. This makes it able to work on forums which you may not have admin access on.

I've basically taken a script I wrote 3 or so years ago to parse info from my buddies forum and spam it onto irc. I've added your forum as the default now for the script and have tested it on a few other invision power board forums and most of them seem to work exactly as they should. Make sure to read the config, if encodings are off or you want automatic encoding then make sure you read about those options.
<speechles> !forum b
<sp33chy> Forum-Name-Here for b-real (Wiek nieznany lat/P³eæ nie zosta³a ustawiona) in Pocz±tkuj±cy | Do³±czy³: pi±, 24 lut 06 | Czas lokalny: pi±, 19 cze 2009 - 07:07 | Ostatnio widziany: czwartek, 16 kwiecieñ 2009 - 22:14 | Po³o¿enie nieznane | 1 postów (0 postów na dzieñ) | Wy¶wietleñ profilu: 37 @ http://www.invisionboard.pl/index.php?showuser=1125

<speechles> !forum msb
<sp33chy> Forum-Name-Here for Msb (22 lat/Mê¿czyzna) in #emerge system user | Do³±czy³: czw, 01 wrz 05 | Czas lokalny: pi±, 19 cze 2009 - 07:06 | Ostatnio widziany: Wczoraj | Jelenia Góra | 3 831 postów (2,76 postów na dzieñ) | Wy¶wietleñ profilu: 6 683 @ http://www.invisionboard.pl/index.php?showuser=1

Code: Select all

    # set this to the command character you want to use for the binds
    variable command_char "!"

    # set these to your preferred binds ("one two three etc")
    variable binds "forum f"

    # if you want to allow users to search via /msg, enable this
    variable private_messages 1

    # Enter the EXACT URL of the forum search page leaving the name field empty
    variable forumsearch "http://www.invisionboard.pl/index.php?act=members&name_box=begins&name="

    # Enter the EXACT URL of the forum showuser page again, leaving field empty
    variable forumuser "http://www.invisionboard.pl/index.php?showuser="

    # Enter the name of your forum below
    variable myforum "Forum-Name-Here"
 
    # Set your output here you have a few variables to use
    # %forum_name% = not read from page, this is display only
    # %forum_url% = the url to the member page 
    # The rest are read from the page....
    # %forum_nick% %forum_age% %forum_gender% %forum_member%
    # %forum_date% %forum_time% %forum_seen% %forum_location%
    # %forum_posts% %forum_profile%
    variable output "\002%forum_name%\002 for %forum_nick% \(%forum_age%/%forum_gender%) in %forum_member% | %forum_date% | %forum_time% | %forum_seen% | %forum_location% | %forum_posts% | %forum_profile% @ %forum_url%"

    # would you like to render output in charset detected?
    # 0 is no, 1 and up is yes
    variable renderchar 0

    # would you like to force charset encoding? to enable this
    # the option above MUST be zero to 0
    variable mycharset "iso8859-2"

    # ** this is not an optional setting, if a string is too long to send, it won't be sent! **
    # It should be set to the max amount of characters that will be received in a public
    #   message by your IRC server.  If you find you aren't receiving results, try lowering this.
    variable split_length 440

    # number of minute(s) to ignore flooders, 0 to disable flood protection
    variable ignore 1

    # how many requests in how many seconds is considered flooding?
    # by default, this allows 3 queries in 10 seconds, the 4th being ignored
    #   and ignoring the flooder for 'variable ignore' minutes
    variable flood 4:10
Not quite sure what encoding polish should be encoded as. That forum sends the reply back in iso8859-1, but on some sites I see it encoded as iso8859-2. So you have control over how this is handled, complete control.

Let me know if you have any problems with it. This should display the information you requested. ;)

Incith:Forum v1.0

Have a fun :P
i
ipbegg
Voice
Posts: 11
Joined: Sun Jun 14, 2009 7:44 am

Post by ipbegg »

what a great post, I'll check it out and I'll let you know guys..asap :wink:

cheers
Last edited by ipbegg on Tue Aug 11, 2009 9:01 am, edited 2 times in total.
User avatar
Fire-Fox
Master
Posts: 299
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

Post by Fire-Fox »

How will it look if it's phpbb forum ?

like this or:

# Enter the EXACT URL of the forum search page leaving the name field empty
variable forumsearch "http://support-forum.dk/search.php"

# Enter the EXACT URL of the forum showuser page again, leaving field empty
variable forumuser "http://support-forum.dk/profile.php?mode=viewprofile&u="
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
i
ipbegg
Voice
Posts: 11
Joined: Sun Jun 14, 2009 7:44 am

Post by ipbegg »

21:17:00 <me> !f Pensive
21:17:02 <BOT> Cannot complete your search request, "Pensive" not found.

dcc:

[21:23] Tcl error [incith::forum::private_message]: can't read "forum_nick": no such variable


What seems to be the problem?
User avatar
Fire-Fox
Master
Posts: 299
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

Post by Fire-Fox »

Maybe you need to change the variable, according to your site, lets say

for phpbb forum :)

i would try to change forum_nick to username in the tcl script :)
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

ipbegg wrote:21:17:00 <me> !f Pensive
21:17:02 <BOT> Cannot complete your search request, "Pensive" not found.

dcc:

[21:23] Tcl error [incith::forum::private_message]: can't read "forum_nick": no such variable


What seems to be the problem?
What version of ipb? Better yet send me the name of the site/url of the forum you'd like it to work with via private message through this forum. I can fix the regular expressions (regexps) which do the scraping/parsing and get them working for your site as well. The script itself is merely proof of concept that a php/tcl handshake isn't entirely necessary to get the information you desire. It can be done in pure tcl if "guest" access to the search/user php pages are allowed.
User avatar
Fire-Fox
Master
Posts: 299
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

Post by Fire-Fox »

Can you help me to?
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
i
ipbegg
Voice
Posts: 11
Joined: Sun Jun 14, 2009 7:44 am

Post by ipbegg »

hey, the message has been sent via PM. :wink:
User avatar
Anahel
Halfop
Posts: 48
Joined: Fri Jul 03, 2009 6:18 pm
Location: Dom!

Post by Anahel »

is it possibe to change the script to work with Upercase characters? becasue :

Code: Select all

<@mlody> !u v Z
<~Nekomimi> Cannot complete your search request, "v Z" not found.
but:

Code: Select all

<tomek> !u v z
<~Nekomimi> Ookamireunion for v Z (Wiek Nieznany lat/Miejsce zamieszkania nieznane) in Newbie | Dołączył: 09.3.09 | Lokalny Czas: 04.7.2009, 00:06 | Ostatnio Widziany: Dziś, 23:00 | Płeć Nie Ustawiona | 5 wypowiedzi (0.04 na dzień) | Wyświetleń Profilu: 13 @ http://forum.ookamireunion.pl/index.php?showuser=43
i
ipbegg
Voice
Posts: 11
Joined: Sun Jun 14, 2009 7:44 am

Post by ipbegg »

Anahel, where could i download this script? :shock: ohh i didnt noticed its Incith:Forum v1.0 nvm then. :oops:
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

Anahel wrote:is it possibe to change the script to work with Upercase characters? becasue :

Code: Select all

<@mlody> !u v Z
<~Nekomimi> Cannot complete your search request, "v Z" not found.
but:

Code: Select all

<tomek> !u v z
<~Nekomimi> Ookamireunion for v Z (Wiek Nieznany lat/Miejsce zamieszkania nieznane) in Newbie | Dołączył: 09.3.09 | Lokalny Czas: 04.7.2009, 00:06 | Ostatnio Widziany: Dziś, 23:00 | Płeć Nie Ustawiona | 5 wypowiedzi (0.04 na dzień) | Wyświetleń Profilu: 13 @ http://forum.ookamireunion.pl/index.php?showuser=43
Change:

Code: Select all

      # fetch the html
      set html [fetch_html $input 1]}
To this:

Code: Select all

      # fetch the html
      set html [fetch_html [string tolower $input] 1]
@ipbegg, I will correct the script to work with more invision power board versions shortly. This will allow it to scrape information from those forums as well.
i
ipbegg
Voice
Posts: 11
Joined: Sun Jun 14, 2009 7:44 am

Post by ipbegg »

Wow man i thought u forgot about me! I'm so looking froward.


Have a nice weekend mate!
Post Reply