Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons

Reply
 
Thread Tools
First post on all pages Details »»
First post on all pages
Version: 1.2, by ry215 ry215 is offline
Developer Last Online: May 2022 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 4.0.x Rating:
Released: 03-27-2010 Last Update: 04-18-2010 Installs: 406
Uses Plugins Template Edits Auto-Templates
 
No support by the author.

Info:
The 1st message of the thread will stay at top all the time even while you are checking other messages related to this subject.

Installation:
-Import XML file (as product): AdminCP > Plugin System > Manage Products > [Add/Import Product]
Fixed: cache template (product-firstonallpages(3).xml)

Updated: version 1.2 (product-firstonallpages(3).xml)
  • Added: Custom First Post Template option

Updated: version 1.1 (product-firstonallpages(2).xml)
  • Added: Enable/Disable option
  • Added: List forums do not use first post on all pages option

Download Now

File Type: xml product-firstonallpages.xml (1.3 KB, 356 views)
File Type: xml product-firstonallpages(2).xml (2.7 KB, 193 views)
File Type: xml product-firstonallpages(3).xml (4.0 KB, 1838 views)

Screenshots

File Type: jpg pages1.jpg (66.1 KB, 0 views)
File Type: jpg pages2.jpg (65.2 KB, 0 views)
File Type: png fpoap.png (30.8 KB, 0 views)

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
Filgga

Comments
  #62  
Old 04-27-2010, 01:33 PM
ArtakEVN's Avatar
ArtakEVN ArtakEVN is offline
 
Join Date: Jan 2010
Location: Toronto
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There is one more bug. My fistpost template name is "postbit_first". Content of this template is copied from "postbit" template (I'm using legacy). There is free space on firs post on first page. Please see attached images.

P.S. I find, that this is the vbulletin's bug.
Attached Images
File Type: jpg 01.jpg (89.6 KB, 0 views)
File Type: jpg 02.jpg (122.3 KB, 0 views)
Reply With Quote
  #63  
Old 04-29-2010, 03:20 PM
ry215 ry215 is offline
 
Join Date: Apr 2006
Location: Paraguay
Posts: 508
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it not my mod, it your template
you can edit it
Reply With Quote
  #64  
Old 05-05-2010, 07:59 PM
Ronya Ronya is offline
 
Join Date: Jun 2006
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great Mod Thank you
But can you make radio button on "Administrative" dropdown menu to enable it for different thread. Idea is to enable not all treads in some forum but just some threads.

i used mod like this on 3.6
Table "Thread" has field named showfirstpost

anyway you can see it on that code:
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>

<product productid="firstpostonall" active="1">
    <title>First Post on every pages 1.0.4</title>
    <description>This will allow you to show the first post on every page of a thread. (Eng. version)</description>
    <version>1.0.4</version>
    <codes>
        <code version="1.0.4">
            <installcode><![CDATA[$db->hide_errors();
$db->query_write("ALTER TABLE `". TABLE_PREFIX ."thread` ADD `showfirstpost` INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL");
$db->show_errors();]]></installcode>
            <uninstallcode><![CDATA[$db->hide_errors();
$db->query_write("ALTER TABLE `". TABLE_PREFIX ."thread` DROP `showfirstpost`");
$db->show_errors();]]></uninstallcode>
        </code>
    </codes>
    <templates>
    </templates>
    <plugins>
        <plugin active="1">
            <title>First Post on every pages - postbit display complete</title>
            <hookname>postbit_display_complete</hookname>
            <phpcode><![CDATA[if ($this->thread['showfirstpost']=='1' AND $post['postid']==$this->thread['firstpostid'])
{
   if ($vbulletin->options['legacypostbit']=='1')
   {
    $this->templatename = 'postbit_legacy';
   }
   else
   {
    $this->templatename = 'postbit';
   }
}
$show['firstpostonall'] = true;]]></phpcode>
        </plugin>
        <plugin active="1">
            <title>First Post on every pages - showthread postbit create</title>
            <hookname>showthread_postbit_create</hookname>
            <phpcode><![CDATA[if ($thread['showfirstpost'] AND $vbulletin->GPC['pagenumber'] > 1) 
{ 
    if ($post['postid'] == $thread['firstpostid']) 
    { 
        $counter--; 
        $post['postcount'] = '1'; 
    } 
    else 
    { 
        $post['postcount']--; 
    } 
}]]></phpcode>
        </plugin>
        <plugin active="1">
            <title>First Post on every pages - showthread post start</title>
            <hookname>showthread_post_start</hookname>
            <phpcode><![CDATA[if ($thread['showfirstpost']=='1' AND $threadedmode == 0 AND $thread['attach']) 
{ 
    $thread['hasattach'] = $thread['attach']; 
    unset($thread['attach']); 
}]]></phpcode>
        </plugin>
        <plugin active="1">
            <title>First Post on every pages - showthread query</title>
            <hookname>showthread_query</hookname>
            <phpcode><![CDATA[if ($thread['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;
        }      
        $thread['attach'] = $thread['hasattach'];
        unset($thread['hasattach']);
    }
}]]></phpcode>
        </plugin>
        <plugin active="1">
            <title>First Post on every pages - action switch</title>
            <hookname>threadmanage_action_switch</hookname>
            <phpcode><![CDATA[if ($_REQUEST['do'] == 'stickpost')
{
    $handled_do = true;
    if (!$threadinfo['threadid'])
    {
        eval(standard_error(fetch_error('invalidid', $vbphrase['thread'], $vbulletin->options['contactuslink'])));
    }
}]]></phpcode>
        </plugin>
        <plugin active="1">
            <title>First Post on every pages - main</title>
            <hookname>threadmanage_start</hookname>
            <phpcode><![CDATA[// ##### start stick/unstick post mod by YaR & kerk ######
if ($_POST['do'] == 'stickpost')
{
    if (($threadinfo['isdeleted'] AND !can_moderate($threadinfo['forumid'], 'candeleteposts')) OR (!$threadinfo['visible'] AND !can_moderate($threadinfo['forumid'], 'canmoderateposts')))
    {
        if (can_moderate($threadinfo['forumid']))
        {
            print_no_permission();
        }
        else
        {
            eval(standard_error(fetch_error('invalidid', $idname, $vbulletin->options['contactuslink'])));
        }
    }

    if (!can_moderate($threadinfo['forumid'], 'canmanagethreads'))
    {
        print_no_permission();
    }

    verify_forum_password($foruminfo['forumid'], $foruminfo['password']);

  $is_sticked    = $threadinfo['showfirstpost'];

    if ($threadinfo['showfirstpost'])
    {
        $db->query_write("UPDATE ".TABLE_PREFIX."thread SET showfirstpost = 0 WHERE  threadid = ". $threadinfo['threadid'] );
        $action = " Done: \"First Post Sticked\"";
    }
    else
    {
        $db->query_write("UPDATE ".TABLE_PREFIX."thread SET showfirstpost = 1 WHERE  threadid = ". $threadinfo['threadid'] );
        $action = " Done: \"First Post Unsticked\"";
    }

    $vbulletin->url = 'showthread.php?goto=newpost&' . $vbulletin->session->vars['sessionurl'] . "t=$threadid";
    eval(print_standard_redirect('redirect_sticky', true, true));
}
// ##### end stick/unstick post mod by YaR & kerk ######]]></phpcode>
        </plugin>
    </plugins>
    <phrases>
        <phrasetype name="Show Thread" fieldname="showthread">
            <phrase name="stick_post"><![CDATA[Stick First Post.]]></phrase>
            <phrase name="unstick_post"><![CDATA[Unstick First Post.]]></phrase>
        </phrasetype>
        <phrasetype name="Front-End Redirect Messages" fieldname="frontredirect">
            <phrase name="stickyp"><![CDATA[$action]]></phrase>
        </phrasetype>
    </phrases>
    <options>
    </options>
</product>
Reply With Quote
  #65  
Old 05-06-2010, 07:28 AM
ry215 ry215 is offline
 
Join Date: Apr 2006
Location: Paraguay
Posts: 508
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i will try it, now busy T_T
Reply With Quote
  #66  
Old 05-08-2010, 01:37 AM
J6488EEA8E90 J6488EEA8E90 is offline
 
Join Date: May 2009
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Think this mod could be useful in some threads.
If you are using this mod, how do you find it and does it keep the thread better on course/topic?
Reply With Quote
  #67  
Old 05-08-2010, 01:44 AM
ry215 ry215 is offline
 
Join Date: Apr 2006
Location: Paraguay
Posts: 508
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by J6488EEA8E90 View Post
Think this mod could be useful in some threads.
If you are using this mod, how do you find it and does it keep the thread better on course/topic?
Updated: version 1.2 (product-firstonallpages(3).xml)

* Added: Custom First Post Template option


Updated: version 1.1 (product-firstonallpages(2).xml)

* Added: Enable/Disable option
* Added: List forums do not use first post on all pages option
Reply With Quote
  #68  
Old 05-10-2010, 01:08 PM
Welshy2008's Avatar
Welshy2008 Welshy2008 is offline
 
Join Date: Jul 2008
Location: UK
Posts: 904
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Someone mentioned that they use this in 3.8 - where is it for that please?

RY - Tagged for future use - Thank You.
Reply With Quote
  #69  
Old 05-11-2010, 05:45 AM
murekhalir murekhalir is offline
 
Join Date: Oct 2006
Posts: 254
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

niceee +!
Reply With Quote
  #70  
Old 05-18-2010, 02:02 AM
ry215 ry215 is offline
 
Join Date: Apr 2006
Location: Paraguay
Posts: 508
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

good for all version 4xxx
Reply With Quote
  #71  
Old 05-19-2010, 05:35 PM
Medina Medina is offline
 
Join Date: Oct 2006
Location: the Netherlands
Posts: 181
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it also possible to have this enabled for only 1 category (example; news section on a forum)
Reply With Quote
Reply

Thread Tools

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 05:41 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.05040 seconds
  • Memory Usage 2,341KB
  • Queries Executed 27 (?)
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
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (8)postbit_attachment
  • (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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete