egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Invision Power Board any1?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
ipbegg
Voice


Joined: 14 Jun 2009
Posts: 11

PostPosted: Wed Jun 17, 2009 10:11 pm    Post subject: Invision Power Board any1? Reply with quote

Hi,wondering if anyone could help me here Confused Rolling Eyes 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 Cool


Last edited by ipbegg on Tue Aug 11, 2009 9:00 am; edited 1 time in total
Back to top
View user's profile Send private message
tomekk
Master


Joined: 28 Nov 2008
Posts: 255
Location: Oswiecim / Poland

PostPosted: Thu Jun 18, 2009 5:27 pm    Post subject: Reply with quote

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):
Quote:

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)
Back to top
View user's profile Send private message Visit poster's website
ipbegg
Voice


Joined: 14 Jun 2009
Posts: 11

PostPosted: Thu Jun 18, 2009 8:24 pm    Post subject: Reply with quote

well what should i do Confused could ya up the script? =]
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Thu Jun 18, 2009 10:38 pm    Post subject: Reply with quote

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.
Quote:
<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:
    # 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. Wink

Incith:Forum v1.0

Have a fun Razz
_________________
speechles' eggdrop tcl archive
Back to top
View user's profile Send private message
ipbegg
Voice


Joined: 14 Jun 2009
Posts: 11

PostPosted: Fri Jun 19, 2009 8:54 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Fire-Fox
Master


Joined: 23 Sep 2006
Posts: 270
Location: /dev/null

PostPosted: Fri Jun 19, 2009 2:12 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message MSN Messenger
ipbegg
Voice


Joined: 14 Jun 2009
Posts: 11

PostPosted: Fri Jun 19, 2009 3:23 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
Fire-Fox
Master


Joined: 23 Sep 2006
Posts: 270
Location: /dev/null

PostPosted: Fri Jun 19, 2009 3:34 pm    Post subject: Reply with quote

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

for phpbb forum Smile

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

Scripts: Relay | Store Text | TvMaze
Back to top
View user's profile Send private message MSN Messenger
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Fri Jun 19, 2009 7:30 pm    Post subject: Reply with quote

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.
_________________
speechles' eggdrop tcl archive
Back to top
View user's profile Send private message
Fire-Fox
Master


Joined: 23 Sep 2006
Posts: 270
Location: /dev/null

PostPosted: Fri Jun 19, 2009 7:35 pm    Post subject: Reply with quote

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

Scripts: Relay | Store Text | TvMaze
Back to top
View user's profile Send private message MSN Messenger
ipbegg
Voice


Joined: 14 Jun 2009
Posts: 11

PostPosted: Fri Jun 19, 2009 8:12 pm    Post subject: Reply with quote

hey, the message has been sent via PM. Wink
Back to top
View user's profile Send private message
Anahel
Halfop


Joined: 03 Jul 2009
Posts: 48
Location: Dom!

PostPosted: Fri Jul 03, 2009 6:25 pm    Post subject: Reply with quote

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

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


but:

Code:
<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
Back to top
View user's profile Send private message
ipbegg
Voice


Joined: 14 Jun 2009
Posts: 11

PostPosted: Sat Jul 04, 2009 11:07 am    Post subject: Reply with quote

Anahel, where could i download this script? Shocked ohh i didnt noticed its Incith:Forum v1.0 nvm then. Embarassed
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Sat Jul 04, 2009 2:07 pm    Post subject: Reply with quote

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

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


but:

Code:
<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:
      # fetch the html
      set html [fetch_html $input 1]}


To this:
Code:
      # 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.
_________________
speechles' eggdrop tcl archive
Back to top
View user's profile Send private message
ipbegg
Voice


Joined: 14 Jun 2009
Posts: 11

PostPosted: Sat Jul 04, 2009 2:21 pm    Post subject: Reply with quote

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


Have a nice weekend mate!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber