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 (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

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

Deutsch
Diese Hack zeigt auf der index.php unter dem username der das letzte posting gemacht hat auch den titel des threads auf dem dieser das reply geschrieben hat!

English
This hack showes the thread title in the "Last Post" col.

Information
[Version nummer] maybe 1.0 beta
[Files to change] index.php and forumhome_lastpostby template

Installation

== in index.php ==
find:
PHP Code:
        // prepare template vars
        
if (!$showforumdescription) {
          
$forum['description']='';
        } 
below that add:
PHP Code:
       $lastposttitle $DB_site->query("SELECT title FROM thread WHERE forumid='$forum[forumid]' ORDER BY lastpost DESC");
       
$lastposttitle $DB_site->fetch_array($lastposttitle);
       
$lastposttitle $lastposttitle[title];
       if (
strlen($lastposttitle) > 20) {
           
$lastposttitle substr($lastposttitle,0,18);
    
$lastposttitle .= "..";
       } 
== in forumhome_lastpostby template ==
find:
PHP Code:
<a href="member.php3?s=$session[sessionhash]&action=getinfo&find=lastposter&forumid=$forum[forumid]"><b>$forum[lastposter]</b></a
und this add:
PHP Code:
<br><a href="showthread.php3?s=$session[sessionhash]&goto=lastpost&forumid=$forum[forumid]"><b>$lastposttitle</b></a></a></smallfont></td
thats all folk

have phun!

Show Your Support

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

Comments
  #2  
Old 07-21-2001, 11:08 AM
ztsky
Guest
 
Posts: n/a
Default

Very very cool!
You have done a difficult thing so easy.
congratulations!
Reply With Quote
  #3  
Old 07-21-2001, 01:58 PM
maverick1236 maverick1236 is offline
 
Join Date: Oct 2001
Location: NY
Posts: 183
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any way I can show the last post title under the last thread title??
TIA!!
Reply With Quote
  #4  
Old 07-21-2001, 03:24 PM
ztsky
Guest
 
Posts: n/a
Default

Works well,but....
BUG~
If i have two sub-forum like b and c in main forum.
Use this hack,If I post a new thread in forum b ,but the lastitle in forum home page is remain the title of the newest thread title in main forum
Reply With Quote
  #5  
Old 07-22-2001, 04:21 PM
somnium
Guest
 
Posts: n/a
Default

i didn't test it with subforums.

perhaps i debug the hack, but i don't know.
Reply With Quote
  #6  
Old 07-22-2001, 04:22 PM
ztsky
Guest
 
Posts: n/a
Default

Quote:
Originally posted by somnium
i didn't test it with subforums.

perhaps i debug the hack, but i don't know.
How to fix it?
I tried ti fix it yestoday,but nothing can do.
Reply With Quote
  #7  
Old 07-22-2001, 06:08 PM
somnium
Guest
 
Posts: n/a
Default

i don't know how to debug but i think there must be an answer!!

you can hack everythin you want!!!
Reply With Quote
  #8  
Old 07-28-2001, 03:31 PM
EXCHANGE's Avatar
EXCHANGE EXCHANGE is offline
 
Join Date: Oct 2001
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I changed the Code a little bit.
The Thread titles now are only displayed to users who can view the forum the last post is in.

PHP Code:
//start get last thread title from forums
        
$lastposttitle $DB_site->query("SELECT title FROM thread WHERE forumid='$forum[forumid]' ORDER BY lastpost DESC");
        
$lastposttitle $DB_site->fetch_array($lastposttitle);
        
$lastposttitle $lastposttitle[title];
        
$has_access=getpermissions($forum[forumid]);
        if (!
$has_access['canview']) {
            
$lastposttitle='';
        }
        else
        {
            if (
strlen($lastposttitle) > 20) {
               
$lastposttitle substr($lastposttitle,0,18);
               
$lastposttitle .= "..";
               }
        }
        
//end get last thread title from forums 
Reply With Quote
  #9  
Old 07-28-2001, 09:33 PM
somnium
Guest
 
Posts: n/a
Default

many thx for that!!!
Reply With Quote
  #10  
Old 07-29-2001, 09:10 AM
EXCHANGE's Avatar
EXCHANGE EXCHANGE is offline
 
Join Date: Oct 2001
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Another thing.
There is a Problem when moving a thread and leave a link in another forum.
So here is another fix:
PHP Code:
        //start get last thread title from forums
        
$lastposttitle $DB_site->query("SELECT iconid,title FROM thread WHERE forumid='$forum[forumid]' AND open!='10' ORDER BY lastpost DESC");
        
$lastposttitle $DB_site->fetch_array($lastposttitle);
        
$threadicon $lastposttitle[iconid];
        
$lastposttitle $lastposttitle[title];

        
$has_access=getpermissions($forum[forumid]);
        if (!
$has_access['canview']) {
            
$lastposttitle='';
        }
        else
        {
            if (
$threadicon 0) {
                
$icon="<img src=\"images/icons/icon$threadicon.gif\">";
                }
            else {
                
$threadicon=1;
                
$icon="<img src=\"images/icons/icon$threadicon.gif\">";
            }
            if (
strlen($lastposttitle) > 20) {
               
$lastposttitle substr($lastposttitle,0,18);
               
$lastposttitle .= "..";
               }
        }
//end get last thread title from forums 
I also included the Thread icons, so change forumhome_lastpostby template to this:

Code:
<table cellpadding="0" cellspacing="0" border="0" width="100%" id="ltlink">
  <tr align="right"> 
    <td nowrap rowspan="2">$icon</td>
    <td nowrap><smallfont><a href="showthread.php?s=$session[sessionhash]&goto=lastpost&forumid=$forum[forumid]"><b>$lastposttitle</b></a></smallfont></td>
    <td nowrap rowspan="2">&nbsp;<a href="showthread.php?s=$session[sessionhash]&goto=lastpost&forumid=$forum[forumid]"><img src="images/lastpost.gif" border="0" alt="Go to last post"></a></td>
  </tr>
  <tr align="right"> 
    <td nowrap><smallfont>$forum[lastpostdate] <font color="#666686">$forum[lastposttime]</font><br>
      von <a href="member.php?s=$session[sessionhash]&action=getinfo&find=lastposter&forumid=$forum[forumid]"><b>$forum[lastposter]</b></a></smallfont></td>
  </tr>
</table>
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 02:15 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.04629 seconds
  • Memory Usage 2,316KB
  • Queries Executed 23 (?)
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
  • (6)bbcode_php
  • (1)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
  • (2)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
  • (3)postbit_onlinestatus
  • (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_imicons
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete