View Full Version : Forums kept as Postbit Legacy, but PMs displayed as original Postbit
Jubei
11-03-2007, 11:01 PM
Can someone provide details so PMs are read in vertical postbit, whereas the forums are left as postbit legacy?
Thanks.
Gray Matter
11-04-2007, 01:16 PM
Vertical postbit is the same as postbit_legacy.
If you want legacy, make sure that the appropriate option is enabled in your vBulletin Options, and make sure that you haven't accidentally altered the postbit_legacy template so that it would cause an error.
Opserty
11-04-2007, 01:45 PM
I think he wants PMs using the postbit template and threads using the postbit_legacy template.
Jubei
11-04-2007, 03:44 PM
^ What he said. :D
Gray Matter
11-04-2007, 04:29 PM
In that case, copy and paste the contents of your postbit template into the postbit_legacy template, but before the actual postbit_legacy content begins. Then, wrap this conditional around the postbit content:
<if condition="$post['forwardlink']">
Freesteyelz
11-04-2007, 08:06 PM
Another option...
If you're going the conditional route then I would do the following:
1. Create a new template called "postbit_pm".
2. Copy contents of postbit template to postbit_pm.
3. Add postbit_pm to cache_templates hook in plugin:
Product: vBulletin
Hook: cache_templates
Name: Postbit PM Cache Templates
Execution Order: 5
Plugin PHP code:
if (THIS_SCRIPT == "showthread")
{
global $globaltemplates;
$globaltemplates[] = 'postbit_pm';
}
Plugin Active: Yes
Save
4. Add postbit_pm to postbit_display_complete hook in plugin:
Product: vBulletin
Hook: postbit_display_complete
Name: Postbit PM Postbit Display Complete
Execution Order: 5
Plugin PHP code:
eval('$postbit_pm = "' . fetch_template('postbit_pm') . '";');
Plugin Active: Yes
Save
5. In template postbit at the top add after "$template_hook[postbit_start]"
<if condition="THIS_SCRIPT == 'private'">
$postbit_pm
<else />
6. In same template at the bottom but just above "$template_hook[postbit_end]" add:
</if>
Six steps here but you'll have your own postbit template for private messages. :)
Edited: Some corrections.
bitHacker
11-09-2007, 01:52 AM
I have asked the same question (https://vborg.vbsupport.ru/showthread.php?t=158327) a while back, this one solved it very nice :-)
anyway to make it with no edit of templates ?
Freesteyelz
11-09-2007, 01:59 AM
I haven't seen a plugin or PHP file edit (yet).
bitHacker
11-09-2007, 02:10 AM
what I mean is that you wrote in step 5:
5. In template postbit at the top add after "$template_hook[postbit_start]"
can this be done automatically ?
Cristi_XP
02-12-2009, 05:55 PM
sorry for reopening this thread... i-ve managed not to show my ads in PM ,but i use a plugin that puts on the closed threads a picture that the thread is closed,and it still apears in PM.
Product: vBulletin
Hook: postbit_display_complete
Name:
Execution Order: 5
Plugin PHP code:
if (($thread['open'] == 0) && ($thread['firstpostid'] == $this->post['postid']))
$this->post['message'] .= '<br /><img src="'.$stylevar['imgdir_misc'].'/closed.gif" boder=0 class="inlineimg" title="Anunt inchis" alt="Thread inchis" />';
Lynne
02-12-2009, 06:08 PM
add in AND (THIS_SCRIPT != 'private')
Cristi_XP
02-15-2009, 03:38 PM
add in where...sorry :|
Lynne
02-15-2009, 04:33 PM
into your condition in your plugin that you posted.
Cristi_XP
02-15-2009, 04:53 PM
thank you :D
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.