vBulletin Modifications

Last threads on irc

Welcome to vBHackers.com! - vBHackers Updates:

Go Back   vBulletin Modifications > General vBulletin Section > General vBulletin Support

Reply
 
LinkBack Thread Tools
Old 05-17-2006, 02:18 PM   #1
Charter Member
Join Date: Jul 2004
GunVorKinG is on a distinguished road

Default Last threads on irc

For the life of me i can't figure out what is wrong with this.
The idea is that i want when somebody on IRC do !posts they get back 5 of the last threads that were posted on the forum.
It seems everything works fine exept it doesnt show me the threads. It's just blank.
Here is a .img:


The .tcl file looks like this:
You must first be a registered member to view any code.
The php file looks like this:
You must first be a registered member to view any code.

I should tell you that i used a hack by matiske as ground, think it was last releases on irc or something.

If anyone could help me with this id be very happy.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 05-17-2006, 02:43 PM   #2
Niels
Support Staff
Niels's Avatar
Join Date: Jun 2004
Real Name: Niels
Location: NL
Niels is on a distinguished road

Default

I would suggest you to make the .php file atleast part of vbulletin with it's db fucntions. That would be nicer.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-17-2006, 04:05 PM   #3
Coder
Idan's Avatar
Join Date: Feb 2005
Real Name: Idan
Location: Israel
Idan is on a distinguished road

Default

do few simple debug steps that will allow you to locate this one:
1. load the php file into browser's url line & check the output is indeed there & that there isn't any mysql query error, db connect error, or might even return blank page at all. in any situtation that match one of the things i've mentioned try to check your query directly with phpmyadmin or similar...
2. though i guess if there was any problem, it were on php side, if all is ok, dcc your eggdrop & look for any errors might shown upon bind, check .binds to see it's there & triggered. sometimes using stuff like blowfish could avoid it being triggered, etc.

anyway, that should do the trick, as the tcl looks ok @ first glace.
hope this helps.
__________________
Idan / vBHackers.com
vBSEO 3.1 GOLD Released vB Blogs Compatible | Non-Encrypted | Branding Removal Option | Sitemaps 2.1 | Language Packs

Crawlability Network: vBulletin SEO | vBulletin Hackers




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-17-2006, 07:06 PM   #4
Charter Member
Join Date: Jul 2004
GunVorKinG is on a distinguished road

Default

Quote:
Originally Posted by MadDog
do few simple debug steps that will allow you to locate this one:
1. load the php file into browser's url line & check the output is indeed there & that there isn't any mysql query error, db connect error, or might even return blank page at all. in any situtation that match one of the things i've mentioned try to check your query directly with phpmyadmin or similar...
2. though i guess if there was any problem, it were on php side, if all is ok, dcc your eggdrop & look for any errors might shown upon bind, check .binds to see it's there & triggered. sometimes using stuff like blowfish could avoid it being triggered, etc.

anyway, that should do the trick, as the tcl looks ok @ first glace.
hope this helps.
Thanks for the comprohensive answer.

Indeed you were right, I loaded the php file in to my browser and all it showed was a blank page. When I tried the query in phpmyadmin it got back error 1064.
So its established that it is the php file that is the error for this modification.

Gonna look into this more tomorrow, if you got any suggestions, feel free to post them




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-18-2006, 03:26 AM   #5
Charter Member
Join Date: Jul 2004
GunVorKinG is on a distinguished road

Default

Okey, i changed the query some and now it gets 5 threads in the db. This is when i run the query in the phpmyadmin. Weird part is it doesnt show the last threads, shows very old threads lol. This is the query i ran:
You must first be a registered member to view any code.
And the web browser shows blank still. The whole php now looks like this instead:
You must first be a registered member to view any code.
EDIT:
Changed the query again, and got the right threads
You must first be a registered member to view any code.
Now i just gotta get the info to be fetch from the db with that php file.

Last edited by GunVorKinG; 05-18-2006 at 03:58 AM.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-18-2006, 03:30 AM   #6
Coder
Idan's Avatar
Join Date: Feb 2005
Real Name: Idan
Location: Israel
Idan is on a distinguished road

Default

try maybe instead of "mysql_fetch_object" to use "mysql_fetch_array" & output data with lastpost["lastpost"].
worth a try ;)

EDIT: if php now works (not return blank) plz. ignore this reply, cause this reply was made before i saw your reply. (look @ next reply)

Last edited by Idan; 05-18-2006 at 03:34 AM.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-18-2006, 03:32 AM   #7
Coder
Idan's Avatar
Join Date: Feb 2005
Real Name: Idan
Location: Israel
Idan is on a distinguished road

Default

to get last thread don't sort by title.
try to sort by "threadid" maybe or post date.
You must first be a registered member to view any code.
EDIT: looking now @ your fixed php file.
now you don't have any while loop inside code, so it will output only 1 result.
and there isn't any connection between var $query to $thread
so add while like before, or if u don't want any & want just 1 result use this:
You must first be a registered member to view any code.

Last edited by Idan; 05-18-2006 at 03:40 AM.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-18-2006, 04:14 AM   #8
Charter Member
Join Date: Jul 2004
GunVorKinG is on a distinguished road

Default

Quote:
Originally Posted by MadDog
to get last thread don't sort by title.
try to sort by "threadid" maybe or post date.
You must first be a registered member to view any code.
EDIT: looking now @ your fixed php file.
now you don't have any while loop inside code, so it will output only 1 result.
and there isn't any connection between var $query to $thread
so add while like before, or if u don't want any & want just 1 result use this:
You must first be a registered member to view any code.

Okey, i changed to that code snippet instead, the page is still blank.
In the phpmyadmin its shows all good. Will look into this further




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-18-2006, 04:32 AM   #9
Coder
Idan's Avatar
Join Date: Feb 2005
Real Name: Idan
Location: Israel
Idan is on a distinguished road

Default

you still use mysql_fetch_object or changed that to mysql_fetch_array ??

please repost your current php, i'll try to look @ it again & help you with that one tonight when i'm back from university (in case it won't be solved by then)




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-18-2006, 04:50 AM   #10
Charter Member
Join Date: Jul 2004
GunVorKinG is on a distinguished road

Default

Okey, fixed the php file. It fetches the info from the db and it showes in the browser.
Seems the .tcl file isnt correct for the moment.
Will check.

EDIT:
Wiie! Now it works :p
Thanks for all the help MadDog, I really appreciate it.

For the ones who want this, heres the complete modification:

.tcl file:
You must first be a registered member to view any code.
the php file:
You must first be a registered member to view any code.
Should maybe add that this is for vb 3.0.9

Last edited by GunVorKinG; 05-18-2006 at 05:12 AM.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Latest Threads IN Marquee Developer vBulletin 3.5 / 3.6 Hack Releases 29 03-14-2008 07:37 PM
MY Best Threads Developer vBulletin 3.5 / 3.6 Hack Releases 19 03-10-2008 12:10 AM
New Threads since last visit Snatch vBulletin Modification Requests 0 01-17-2006 02:18 PM


All times are GMT -3. The time now is 03:18 AM.


SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc. (Patent Pending)