vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Last post on forum home, working version (https://vborg.vbsupport.ru/showthread.php?t=28561)

Scott MacVicar 09-23-2001 09:47 AM

change
$forum[lasttitle]

to

<a href="showthread.php?s=$session[sessionhash]&goto=lastpost&forumid=$forum[forumid]">$forum[lasttitle]</a>

within the "forumhome_lastpostby" template

and didn't you forums use to be UBB?

bbqfan 09-23-2001 09:56 AM

i have posted the new code of similar hack:
http://www.vbulletin.com/forum/show...&threadid=28489

maybe it interests you... :)

Alien 09-23-2001 10:10 AM

PPN: Any way to get that to link to the BEGINNING of that particular topic, since the -> arrow already goes to the last *post*?

This possible too?

...and yes, formally UBB.

Scott MacVicar 09-23-2001 10:40 AM

ok open showthread.php and above

PHP Code:

if ($goto=="nextnewest") {
  
$thread verifyid("thread",$threadid,1,1); 

add

PHP 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;
  }


now change the bit i told you to to
PHP Code:

<a href="showthread.php?s=$session[sessionhash]&goto=newthread&forumid=$forum[forumid]">$forum[lasttitle]</a

sorry it took so long to reply, i thought vBulletin would have had a way to do this, but it didn't so i wrote one.

Alien 09-23-2001 10:51 AM

Thanks so much!

Hey, what sorta resource difference does it take to run this new link, as opposed to doing it the previous way without the extra query above?

I have over 35 forums.. Want to keep things snappy. :)

Scott MacVicar 09-23-2001 10:53 AM

none, you are still running one query if you use the current vBulletin equivalent or the one i posted. It should have no adverse effect on the forums.

Alien 09-23-2001 10:58 AM

Kick ass. :)

Final question (yeah right lol):

Occasionally there is a topic with a quote in it like:

What are "Private Messages"?

For the quotes above, it would only show &quot;

Any way around that? I know it's filtering out junk, was just wondering if it was possible to get quotes back (but only if it does not introduce a security problem.

Thanks again!

Scott MacVicar 09-23-2001 11:49 AM

i just posted the topic identical to what you used, make sure in index.php that
PHP Code:

          $forum['lasttitle']=unhtmlspecialchars($forum['lasttitle']); 

was added when you were pasting information. Either that or I have missed something else out in the hack, which i hope i haven't.

cyrus 09-23-2001 11:59 AM

[QUOTE]first thing to do is to run this mysql query :P
ALTER TABLE `forum` ADD `lasttitle` VARCHAR(100) NOT NULL AFTER `lastposter`

floleb7 09-23-2001 01:59 PM

in phpmyadmin


All times are GMT. The time now is 10:39 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.01206 seconds
  • Memory Usage 1,747KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete