Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
First post on every page of thread. Details »»
First post on every page of thread.
Version: 1.0.1, by vBintense vBintense is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.5.3 Rating:
Released: 08-04-2005 Last Update: 08-08-2005 Installs: 351
DB Changes Uses Plugins
 
No support by the author.

I had a use for it, so I thought I would share it.

Requires no file edits (Thanks Kirby!).
Adds no quarys when viewing threads

This is something like here on vbulletin.org , it allows you to select forums where the first post of the thread is shown thru out the thread.

It uses stock template looks now , if someone wishes to make a template and share it feel free.

I will offer support as I can.

Ps. If you install this hack please click the install :nervous:

Templates for first post:
https://vborg.vbsupport.ru/showpost....&postcount=124
https://vborg.vbsupport.ru/showpost....&postcount=161

Show Your Support

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

Comments
  #22  
Old 08-06-2005, 02:43 AM
vBintense's Avatar
vBintense vBintense is offline
 
Join Date: May 2005
Location: Omnipresent
Posts: 233
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
No, sir, it isn't bad at all. But no file edits are even better.
Yes, I agree but no added quary owns all
Reply With Quote
  #23  
Old 08-06-2005, 02:44 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did you really think I wouldn't be ready for this? LOL

But no added query and no file eidt is the best!
Reply With Quote
  #24  
Old 08-06-2005, 02:46 AM
vBintense's Avatar
vBintense vBintense is offline
 
Join Date: May 2005
Location: Omnipresent
Posts: 233
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[high]* vBintense kicks boofo out of my thread until he clicks intall !!!
[/high]

I did look though , I may be blind but I could not find a way not to edit the file
Reply With Quote
  #25  
Old 08-06-2005, 02:51 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

And there may ne no way around it. But if there is a way, Kirby is the one who will find it.

[high]* Boofo will install when the file edit gets taken care of or Kirby can't find a way to do it. [/high]
Reply With Quote
  #26  
Old 08-06-2005, 03:10 AM
vBintense's Avatar
vBintense vBintense is offline
 
Join Date: May 2005
Location: Omnipresent
Posts: 233
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[high]* vBintense looks for the all knowing Kirby to point him into this thread [/high]
Reply With Quote
  #27  
Old 08-06-2005, 03:27 AM
Logikos Logikos is offline
 
Join Date: Jan 2003
Posts: 2,924
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[high]* Logikos clicks install because I will use this later. File edit or not [/high]
Reply With Quote
  #28  
Old 08-06-2005, 06:14 AM
chanhlinh chanhlinh is offline
 
Join Date: Feb 2005
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks a lot! You're my Hero
Reply With Quote
  #29  
Old 08-06-2005, 02:10 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Guess what, I hate File Edits

Hook: showthread_query
PHP Code:
if ($forum['showfirstpost'])
{
    
$hook_query_where .= " OR post.postid = $thread[firstpostid]";

This does show the first Post on all Pages. However, if it has attachments they will only be shown on the first Page.
Don't think there is a way to get this working too without a File Edit, but i'll take a further look.
Reply With Quote
  #30  
Old 08-06-2005, 02:13 PM
Logikos Logikos is offline
 
Join Date: Jan 2003
Posts: 2,924
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by KirbyDE
Guess what, I hate File Edits

Hook: showthread_query
PHP Code:
if ($forum['showfirstpost'])
{
    
$hook_query_where .= " OR post.postid = $thread[firstpostid]";

KirbyDE to the rescue!!!!!!one

damm, almost
Reply With Quote
  #31  
Old 08-06-2005, 02:45 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

After looking over the Code for a while, I found a solution that also works for Attachments

Hook: showthread_post_start
PHP Code:
if ($forum['showfirstpost'] AND $threadedmode == AND $thread['attach'])
{
    
// Backup
    
$thread['hasattach'] = $thread['attach'];
    unset(
$thread['attach']);

Hook: showthread_query
PHP Code:
if ($forum['showfirstpost'])
{
    
$ids .= ",$thread[firstpostid]";
    
$postids "post.postid IN (0" $ids ")"
    if (
$thread['hasattach'])
    {
        
$attachments $db->query_read("
            SELECT dateline, thumbnail_dateline, filename, filesize, visible, attachmentid, counter,
                postid, IF(thumbnail_filesize > 0, 1, 0) AS hasthumbnail, thumbnail_filesize,
                attachmenttype.thumbnail AS build_thumbnail, attachmenttype.newwindow
            FROM " 
TABLE_PREFIX "attachment
            LEFT JOIN " 
TABLE_PREFIX "attachmenttype AS attachmenttype USING (extension)
            WHERE postid IN (-1" 
$ids ")
            ORDER BY attachmentid
        "
);
        
$postattach = array();
        while (
$attachment $db->fetch_array($attachments))
        {
            if (!
$attachment['build_thumbnail'])
            {
                
$attachment['hasthumbnail'] = false;
            }
            
$postattach["$attachment[postid]"]["$attachment[attachmentid]"] = $attachment;
        }      
        
// Restore
        
$thread['attach'] = $thread['hasattach'];
        unset(
$thread['hasattach']);
    }

What it does:
By unsetting $thread['attach'] in showthread_post_start, the original $attachments query will not be executed.
Then the Plugin on showthread_query runs this Query - with the Postid for the First Post and then restores the original Value for further processing.
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 10:14 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07118 seconds
  • Memory Usage 2,330KB
  • Queries Executed 25 (?)
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
  • (4)bbcode_php
  • (2)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
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete