vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Forums kept as Postbit Legacy, but PMs displayed as original Postbit (https://vborg.vbsupport.ru/showthread.php?t=161859)

Jubei 11-03-2007 11:01 PM

Forums kept as Postbit Legacy, but PMs displayed as original Postbit
 
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:

Code:

<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:

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:

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]"

Code:

<if condition="THIS_SCRIPT == 'private'">
  $postbit_pm
  <else />


6. In same template at the bottom but just above "$template_hook[postbit_end]" add:

Code:

</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 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:
Quote:

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:
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" />'



All times are GMT. The time now is 09:57 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.02334 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete