Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 11-03-2007, 11:01 PM
Jubei Jubei is offline
 
Join Date: Oct 2006
Location: United Kingdom
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 11-04-2007, 01:16 PM
Gray Matter Gray Matter is offline
 
Join Date: May 2005
Posts: 260
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 11-04-2007, 01:45 PM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think he wants PMs using the postbit template and threads using the postbit_legacy template.
Reply With Quote
  #4  
Old 11-04-2007, 03:44 PM
Jubei Jubei is offline
 
Join Date: Oct 2006
Location: United Kingdom
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

^ What he said.
Reply With Quote
  #5  
Old 11-04-2007, 04:29 PM
Gray Matter Gray Matter is offline
 
Join Date: May 2005
Posts: 260
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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']">
Reply With Quote
  #6  
Old 11-04-2007, 08:06 PM
Freesteyelz's Avatar
Freesteyelz Freesteyelz is offline
 
Join Date: Jan 2006
Posts: 1,552
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 11-09-2007, 01:52 AM
bitHacker bitHacker is offline
 
Join Date: Sep 2005
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have asked the same question a while back, this one solved it very nice :-)

anyway to make it with no edit of templates ?
Reply With Quote
  #8  
Old 11-09-2007, 01:59 AM
Freesteyelz's Avatar
Freesteyelz Freesteyelz is offline
 
Join Date: Jan 2006
Posts: 1,552
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I haven't seen a plugin or PHP file edit (yet).
Reply With Quote
  #9  
Old 11-09-2007, 02:10 AM
bitHacker bitHacker is offline
 
Join Date: Sep 2005
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 ?
Reply With Quote
  #10  
Old 02-12-2009, 05:55 PM
Cristi_XP's Avatar
Cristi_XP Cristi_XP is offline
 
Join Date: Dec 2006
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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" />'
Reply With Quote
Reply

Thread Tools
Display Modes

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:12 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.06972 seconds
  • Memory Usage 2,249KB
  • Queries Executed 11 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (5)bbcode_code
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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