PDA

View Full Version : Last thread on main page


inetd
03-16-2002, 10:00 PM
This hack was requsted by me :) here (https://vborg.vbsupport.ru/showthread.php?s=&threadid=36055).

It displays last thread on main page yours vB.

jrwap
03-17-2002, 07:27 PM
Download doesn't seem to work.

-JRW

inetd
03-17-2002, 07:31 PM
Try once again. At me with download it hack everything is all right.

fonzerelli_79
03-17-2002, 08:52 PM
demo please

nuno
03-17-2002, 09:04 PM
heh just checking
will this show last thread title with private forums?

Floris
03-18-2002, 09:09 AM
Screenshot ?

inetd
03-18-2002, 11:43 AM
Demo you will find on http://boltalka.com.ua , and screenshot is attached in this message.

pHAZE_1
04-17-2002, 08:20 PM
Add $last_thread in forumhome template (in that place where it should be output last thread).

wtf does that mean? where do i put it exactly

Austin Dea
04-17-2002, 09:04 PM
Wherever you want it to show up.

pHAZE_1
04-18-2002, 02:31 AM
well i want it in the same place as the screen shot ^. where would i put the $last_thread

Austin Dea
04-18-2002, 02:50 AM
Find:
Welcome to our newest member, <a href="member.php?s=$session[sessionhash]&action=getinfo&userid=$newuserid">$newusername</a>

Put after it:
<br>
$last_thread

pHAZE_1
04-23-2002, 04:05 AM
does not work

Chris M
04-23-2002, 05:50 PM
Yes it does...

I dont like it though...

Nice Hack and all, but at our forums, it updates every 2 seconds, so it is never accurate enough...

Satan

BigJohnson
05-18-2002, 03:39 AM
It works instead of $last_thread put $lastthread in your forumhome. Stop saying it works because it doesnt. Not until you make thiese changes. Start helping out guys and stop htinking your all that.

Damascus
05-31-2002, 01:24 PM
lol, and thats coming from a guy named BigJohnson.

Till
06-07-2002, 09:39 PM
This hack is coded a little inefficiently. I suggest that instead of of SELECTing everything ("*"), you select only the necessary items or columns/fields from the database. Also, doing a count() on a certain field with an INDEX is a lot faster than a count(*).

No offense please, didn't mean to bash you or your coding skills, but it's what I noticed since vBulletin tends to "rape" our server already and this hack is quite nice, and I don't want the hack to add to the load. ;)

Hellburn
06-17-2002, 10:10 AM
This Hack doesn't do work by me i become follow error:

Parse error: parse error, expecting `']'' in /is/htdocs/15766/www.xxxxxxx.com/vb/index.php(43) : eval()'d code on line 5

thx for a fix

P.S. I use vB 2.6

inetd
06-17-2002, 04:17 PM
Hellburn, please check code when you put in index.php.

Hellburn
06-17-2002, 04:22 PM
The code is :

$forums=$DB_site->query('SELECT forum.*, thread.title AS threadtitle FROM forum LEFT JOIN thread ON (thread.forumid=forum.forumid AND thread.lastpost=forum.lastpost) WHERE displayorder<>0 AND active=1 ORDER BY parentid,displayorder');

and:

// dates
if ($forum['lastpost']>0) {
// title lenght (change it to suit your forum)
$titlelenght='32';
$forum['titleextra']='';
if (strlen($forum['threadtitle'])>$titlelenght) {
$forum['titleextra']='[...]';
}
$forum['threadtitle']=substr($forum['threadtitle'],0,$titlelenght);

inetd
06-17-2002, 04:28 PM
This code not from my hack!
Please read first post of this thread.

si@smscworld
07-23-2002, 07:59 PM
can't het the $lastthread in the right place on the forumhome template.

Can someone tell me how to do it please

Thanks

si@smscworld
07-23-2002, 09:34 PM
anyone?

inetd
07-23-2002, 11:47 PM
si@smscworld, sorry, but my main page different from default vb page. You can place $lastthread anywhere in forumhome template. Please see post #11 (https://vborg.vbsupport.ru/showthread.php?postid=241894#post241894).

si@smscworld
07-24-2002, 07:05 AM
that only shows one last thread on the homepage, I want it where its on every Forum, like yours.

I want it where you have time of the thread, last thread's name and posted by who.

Need your help guys

inetd
07-24-2002, 04:56 PM
si@smscworld, you need use other hack! :)
see Last post on forum home, working version (https://vborg.vbsupport.ru/showthread.php?s=&threadid=28561) hack by PPN.