Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by SNA (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 03-17-2001 Last Update: Never Installs: 0
 
No support by the author.

Its like the UBB look, it shows the last post icon and title for each forum instead of just the username , time and date on the forum front page (index.php) in the LAST POST column.

I can post it if nobody has released it

SNA

Show Your Support

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

Comments
  #2  
Old 03-18-2001, 12:05 AM
Guest
 
Posts: n/a
Default

Reply With Quote
  #3  
Old 03-18-2001, 12:20 AM
Guest
 
Posts: n/a
Default

Ill take that as a 'what the hell are you talking about'

heres what i mean
Attached Files
File Type: (21.4 KB, 149 views)
Reply With Quote
  #4  
Old 03-18-2001, 01:01 AM
Guest
 
Posts: n/a
Default

im sorry, but that seems compleatly useless!
(hey 100 posts)
Reply With Quote
  #5  
Old 03-18-2001, 05:44 AM
Guest
 
Posts: n/a
Default

This is a function my members have been using on my ubb and I would love to have a hack for VB that does it!

Where is it at?
Reply With Quote
  #6  
Old 03-18-2001, 09:26 AM
Guest
 
Posts: n/a
Default

You can do it by editing the templates.
Its easy to do.
Reply With Quote
  #7  
Old 03-18-2001, 12:41 PM
Guest
 
Posts: n/a
Default

You have to hack the templates yes but you need to write code to get the latest title and icon in each forum.

If you can do it without writing a function please let me know.

I can post the hack on how I did it you guys want.
Reply With Quote
  #8  
Old 03-18-2001, 01:08 PM
Guest
 
Posts: n/a
Default

Thank you SNA

I would love to try your hack on my board. waiting ..
Reply With Quote
  #9  
Old 03-18-2001, 01:33 PM
Guest
 
Posts: n/a
Default

EDITED >> 3-18-2001 11:07 AM Central Time
Fixed the Select Statement to take in consideration if the thread was moved or not by looking for open='1'.



Add this code to the bottom of admin/functions.php before ?>


PHP Code:
function active_topic($theforumid)
{
global 
$DB_site;

$activeresult $DB_site->query("SELECT thread.title,thread.iconid,icon.iconpath FROM thread LEFT JOIN icon ON thread.iconid=icon.iconid WHERE forumid='$theforumid' AND open='1' ORDER BY lastpost DESC LIMIT 1");
$activeresults $DB_site->fetch_array($activeresult);

return(
$activeresults);



Add this code to index.php

PHP Code:
    $lastposthome active_topic($forum[forumid]);
    
$lastposthome[title] = substr($lastposthome[title],0,40) . "...";
    if(
$lastposthome[iconpath]){
    } else {
    
$lastposthome[iconpath] = "images/icons/icon1.gif";
    } 
after

PHP Code:
if ($forum['lastpost']>0) {
          
$forum['lastpostdate']=vbdate($dateformat,$forum['lastpost']);
          
$forum['lastposttime']=vbdate($timeformat,$forum['lastpost']); 
now add this code to forumdisplay.php

PHP Code:
    $lastposthome active_topic($forum[forumid]);
    
$lastposthome[title] = substr($lastposthome[title],0,40) . "...";
    if(
$lastposthome[iconpath]){
    } else {
    
$lastposthome[iconpath] = "images/icons/icon1.gif";
    } 
after

PHP Code:
        if ($forum['lastpost']>0) {
          
$forum['lastpostdate']=vbdate($dateformat,$forum['lastpost']);
          
$forum['lastposttime']=vbdate($timeformat,$forum['lastpost']); 


Now to get it to show up on you board.


Edit the 'forumhome' template.


replace it with this

Code:
<img  src="$lastposthome[iconpath]" border=0> 
&nbsp;<a href="showthread.php?s=$session[sessionhash]&goto=lastpost&forumid=$forum[forumid]"><smallfont>$lastposthome[title]</smallfont></a>
<smallfont>(by <a href="member.php?s=$session[sessionhash]&action=getinfo&find=lastposter&forumid=$forum[forumid]">$forum[lastposter]</a>)</smallfont>
<br>
<smallfont>$forum[lastpostdate]</smallfont> <smallfont COLOR="#6c6081">$forum[lastposttime]</smallfont>

There you go...

Again, I am new to PHP/MySQL and right now I know how to make things work. Whether its efficient or not, thats another story, im getting there

PM me if you have any problems.
Reply With Quote
  #10  
Old 03-19-2001, 11:02 AM
Guest
 
Posts: n/a
Default

LittleBird. Did it work?
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 11:21 PM.


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.04290 seconds
  • Memory Usage 2,303KB
  • Queries Executed 24 (?)
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
  • (1)bbcode_code
  • (5)bbcode_php
  • (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
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (1)postbit_attachment
  • (10)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
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete