Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by Scott MacVicar Scott MacVicar is offline
Developer Last Online: Mar 2016 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 09-20-2001 Last Update: Never Installs: 85
 
No support by the author.

I had tried a version suggested by someone else instead of my own and well, all it did was send the load average up by about 10 times what it was.

This version inserts the last title into the forum database when it is updating the last post name and time. There is no difference in loading time as everything is called normally by vBulletin.

This works on 2.0.x and 2.2.x

Updated at 11:34 GMT on 28th September 2002

Thanks to floren for the latest update.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #232  
Old 08-27-2002, 01:41 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Bingo on the syntax error. I don't remember the exact query. It was when I ran the Update Thread Counters in the Admin CP that I got it. Also, like I said above. Every so often, when I click on the link to the last post title, it gives me an errorid (no thread identified error) and if I open Edit thread for that thread and click save without doing anything else, it fixes it.
Reply With Quote
  #233  
Old 08-27-2002, 05:57 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Scott, I've got an update to my problem here. This is the error I just got when I clicked on the link on the forum home to a new thread.

Quote:
No thread specified. If you followed a valid link, please notify the Webmaster
When I went in to the thread, there was only the first post in it (the new thread post). I did a test message (so there are 2 posts now in the thread) and when I went back to the forumhome and clicked on the link again, this time it worked and took me to the first post. I then erased the second message (the test message) and now there is only the original post left in it. When I clicked on the link in the forumhome, it works fine again. It must have something to do with there only being one post in the thread or something. I'm just guessing here. Any ideas on this one?

Do you think you can do a small update to fix this and the apostrophe problems before the updated version for 2.2.7 comes out? I'm still using 2.2.5 and will be at least until version 3 comes out.
Reply With Quote
  #234  
Old 08-31-2002, 07:34 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Scott, here is the db error I just got after clicking on the last post in one of the forums on the forumhome. Is there a way to fix it?

Quote:
Database error in vBulletin 2.2.5:

Invalid SQL: SELECT threadid FROM post WHERE username='Boofo's Babe' AND dateline='1030675088'
mysql error: You have an error in your SQL syntax near 's Babe' AND dateline='1030675088'' at line 1

mysql error number: 1064

Date: Saturday 31st of August 2002 09:28:05 PM
Script: http://www.bearfacts2.com/forum/foru...ead&forumid=23
Referer: http://www.bearfacts2.com/forum/index.php?s=
Reply With Quote
  #235  
Old 08-31-2002, 07:39 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Boofo
Scott, here is the db error I just got after clicking on the last post in one of the forums on the forumhome. Is there a way to fix it?
I don't know what query this is as I don't have the hack installed, but you need to addslashes to the username:

PHP Code:
username='".addslashes($username)."' 
$username is the part of the query that has the username it in, not sure what it is for this hack
Reply With Quote
  #236  
Old 08-31-2002, 09:16 PM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is this with another hack Boofo because i dont have a link to goto=newthread in my showthread.php, though the addslashes it what is missing from the query.
Reply With Quote
  #237  
Old 09-01-2002, 01:49 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think I fixed it but I'm not sure if I did it right.

Here's the code I started out with:

Code:
// goto newest thread
if ($goto=="newthread") {
  if (isset($forumid) and $forumid!=0) {
    $foruminfo=verifyid("forum",$forumid,1,1);
    $forumid=$foruminfo['forumid'];
    $lastthread=$DB_site->fetch_array($DB_site->query("SELECT threadid FROM post WHERE username='$foruminfo[lastposter]' AND dateline='$foruminfo[lastpost]'"));
    header("Location: showthread.php?s=$session[sessionhash]&threadid=$lastthread[threadid]");
    exit;
  }
}
And heres' what I changed it to:

Code:
// goto newest thread
if ($goto=="newthread") {
  if (isset($forumid) and $forumid!=0) {
    $foruminfo=verifyid("forum",$forumid,1,1);
    $forumid=$foruminfo['forumid'];
    $lastthread=$DB_site->fetch_array($DB_site->query("SELECT threadid FROM post WHERE username='".addslashes($foruminfo[lastposter])."' AND dateline='$foruminfo[lastpost]'"));
    header("Location: showthread.php?s=$session[sessionhash]&threadid=$lastthread[threadid]");
    exit;
  }
}
Also, I'm getting this error sometimes when I click on a last post on forumhome link. For some reason, when that happens, it isn't passing the threadid to the &threadid line. Any idea what could be causing that?

Quote:
No thread specified. If you followed a valid link, please notify the Webmaster
Reply With Quote
  #238  
Old 09-02-2002, 06:51 PM
Baptizer Baptizer is offline
 
Join Date: Nov 2001
Posts: 96
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm...
it seems as though this doesnt work for version 2.2.7.....
the section that involves:

PHP Code:
look for
        if (
$lastpost!=$currentlastpost) {
                
$lastpostquery=",lastpost='$lastpost',lastposter='".addslashes($lastposter)."'";
        } else {
                
$lastpostquery="";
        }

change to

        
if ($lastpost!=$currentlastpost) {
                
$lastpostquery=",lastpost='$lastpost',lastposter='".addslashes($lastposter)."',lasttitle='".addslashes($lasttitle)."'";
        } else {
                
$lastpostquery="";
        } 
is not in 2.2.7...can smoeone help me? am i wasting my time?
Reply With Quote
  #239  
Old 09-02-2002, 09:27 PM
N9ne N9ne is offline
 
Join Date: Feb 2002
Posts: 1,495
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Has anyone confirmed that this works flawlessly on 2.2.7?
Reply With Quote
  #240  
Old 09-02-2002, 09:47 PM
Baptizer Baptizer is offline
 
Join Date: Nov 2001
Posts: 96
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I compared the file from 2.2.6 to 2.2.7, and the code i mentioned is not in 2.2.7. I am thinking of going ahead with it anyhow, i really cannot live without the last post not showing up on the front forum page.....

I am guessing you havnt tried it yet?
Reply With Quote
  #241  
Old 09-03-2002, 12:22 AM
Baptizer Baptizer is offline
 
Join Date: Nov 2001
Posts: 96
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think i might have got this working on 2.2.7.

How do i right justify the LAST TOPIC in the LAST POST column? mine are being centered, and my box is big!
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 03:04 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05895 seconds
  • Memory Usage 2,322KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (2)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete