The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
First post on all pages Details »» | |||||||||||||||||||||||||||||||||||||
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)
Updated: version 1.1 (product-firstonallpages(2).xml)
Download Now
Screenshots
Supporters / CoAuthors Show Your Support
|
2 благодарности(ей) от: | ||
Filgga |
Comments |
#62
|
||||
|
||||
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. |
#63
|
|||
|
|||
it not my mod, it your template
you can edit it |
#64
|
|||
|
|||
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> |
#65
|
|||
|
|||
i will try it, now busy T_T
|
#66
|
|||
|
|||
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? |
#67
|
|||
|
|||
Quote:
* 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 |
#68
|
||||
|
||||
Someone mentioned that they use this in 3.8 - where is it for that please?
RY - Tagged for future use - Thank You. |
#69
|
|||
|
|||
niceee +!
|
#70
|
|||
|
|||
good for all version 4xxx
|
#71
|
|||
|
|||
Is it also possible to have this enabled for only 1 category (example; news section on a forum)
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|