It is incredibly simple...you need only edit one file and one template! It can be done in a couple minutes!
###Features###
- Shows the thread name of the last active post on the front page
- Shows the lastpost.gif icon for the theme you're using, instead of either A, using a clear (invisible) image, or using the default lastpost.gif image for the lastpost icon
- If the subject is long enough to start stretching the field on the index page, it'll show a shrinked version (i.e. "I need help with version.....).
My server is php 4.0.4pl1 and MySql3.22.32
My vbb is 2.2.1
When i use this line
PHP Code:
$forums=$DB_site->query('SELECT forum.*, CASE WHEN icon.iconpath IS NULL THEN \'\' ELSE icon.iconpath END as icon, thread.title as thtitle FROM forum left outer join thread on thread.forumid = forum.forumid and thread.lastpost >= (forum.lastpost-30) LEFT OUTER JOIN icon ON icon.iconid=thread.iconid WHERE displayorder<>0 AND active=1 ORDER BY parentid,displayorder');
generate a Database error,like this
PHP Code:
Database error in vBulletin 2.2.1:
Invalid SQL: SELECT forum.*, CASE WHEN icon.iconpath IS NULL THEN '' ELSE icon.iconpath END as icon, thread.title as thtitle FROM forum left outer join thread on thread.forumid = forum.forumid and thread.lastpost >= (forum.lastpost-30) LEFT OUTER JOIN icon ON icon.iconid=thread.iconid WHERE displayorder<>0 AND active=1 ORDER BY parentid,displayorder
mysql error: You have an error in your SQL syntax near 'icon.iconpath IS NULL THEN '' ELSE icon.iconpath END as icon, thread.title as th' at line 1
When i use this line
PHP Code:
$forums=$DB_site->query('SELECT forum.*, CASE WHEN icon.iconpath IS NULL THEN '' ELSE icon.iconpath END as icon, thread.title as thtitle FROM forum left outer join thread on thread.forumid = forum.forumid and thread.lastpost >= (forum.lastpost-30) LEFT OUTER JOIN icon ON icon.iconid=thread.iconid WHERE displayorder<>0 AND active=1 ORDER BY parentid,displayorder');
generate a error,info is
Parse error: parse error in /home/vb/index.php on line 92
Who can help me?
<i>Make sure</i> you didn't overwrite any other code besides the one you were suppose to edit. If that doesn't work, then I can't help you. It has worked perfectly on all other boards.
//Forum info
$forums=$DB_site->query('SELECT * FROM forum WHERE displayorder<>0 AND active=1 ORDER BY parentid,displayorder');
replace it with:
//Forum info
$forums=$DB_site->query('SELECT forum.*, CASE WHEN icon.iconpath IS NULL THEN \'\' ELSE icon.iconpath END as icon, thread.title as thtitle FROM forum left outer join thread on thread.forumid = forum.forumid and thread.lastpost >= (forum.lastpost-30) LEFT OUTER JOIN icon ON icon.iconid=thread.iconid WHERE displayorder<>0 AND active=1 ORDER BY parentid,displayorder');