Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-22-2006, 04:27 PM
Ohiosweetheart Ohiosweetheart is offline
 
Join Date: Dec 2005
Location: N.E. Ohio
Posts: 2,291
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Postbit/postbit Legacy

if you have more than one style on your forum, is it possible to use the horizontal postbit on one and the legacy on the other?
Or do you have to use the same for all?

anyone?
Reply With Quote
  #2  
Old 03-22-2006, 05:46 PM
The Chief's Avatar
The Chief The Chief is offline
 
Join Date: Aug 2005
Location: Montreal
Posts: 1,037
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nah, i think its one or the other for all styles...
Reply With Quote
  #3  
Old 03-22-2006, 07:38 PM
Ohiosweetheart Ohiosweetheart is offline
 
Join Date: Dec 2005
Location: N.E. Ohio
Posts: 2,291
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

actually, someone pm'd me with this fix:

Because the postbit is determined at global level, it can't be changed by the user without a hack, alas - there is another way to do this. Read on...

1 - create your two styles
2 - on style 1 edit and make the postbit template the same as the postbit_legacy template
3 - on style 2 edit and make the postbit_legacy template the same as the postbit template

... and then because in each individual style the postbit and postbit_legacy templates are the same, regardless of which one you selected in the AdminCP as the default, the one will be postbit layout and the other postbit_legacy.
Reply With Quote
  #4  
Old 03-22-2006, 08:57 PM
natralis natralis is offline
 
Join Date: Mar 2002
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry for this question but where abouts in the admincp can you select which to use as the deafult?
Reply With Quote
  #5  
Old 03-22-2006, 09:38 PM
Ohiosweetheart Ohiosweetheart is offline
 
Join Date: Dec 2005
Location: N.E. Ohio
Posts: 2,291
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no sorries needed hun. Go to
vBulletin Options >>> Styles and Language Settings >>> Use Legacy (Vertical) Postbit Template
You'll find that near the bottom, choose yes or no
Reply With Quote
  #6  
Old 03-24-2006, 02:37 PM
|oR|Greg |oR|Greg is offline
 
Join Date: May 2003
Location: AMACNY.COM
Posts: 418
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What if you put an if statement inside the template to determine the style used, then use the appropriate code, so you'd have both the code for the regular, and the legacy inside one template.

If styleid = 5 then use postbit code

else

use postbit_legacy code

This way you could also have more then 2 postbit styles as well, make your own, it would all be dependent on the ifs and elses...

Update:

I tested it, and it works. I made a second style, since I use the postbit_legacy, I copied the postbit code into the legacy template above it, and wrapped it with an if statement. Actually now that I think about it, you don't need the else with the postbit_legacy code since the if statement will always work as long as you supply the correct styleid.
Reply With Quote
  #7  
Old 03-24-2006, 04:07 PM
Ohiosweetheart Ohiosweetheart is offline
 
Join Date: Dec 2005
Location: N.E. Ohio
Posts: 2,291
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by |oR|Greg
What if you put an if statement inside the template to determine the style used, then use the appropriate code, so you'd have both the code for the regular, and the legacy inside one template.

If styleid = 5 then use postbit code

else

use postbit_legacy code

This way you could also have more then 2 postbit styles as well, make your own, it would all be dependent on the ifs and elses...

Update:

I tested it, and it works. I made a second style, since I use the postbit_legacy, I copied the postbit code into the legacy template above it, and wrapped it with an if statement. Actually now that I think about it, you don't need the else with the postbit_legacy code since the if statement will always work as long as you supply the correct styleid.
oh wow that's awesome Greg! Problem is, I don't know how to create an if statement. Would you be willing to pm me the code that you placed into the template?

thanks hun!
Reply With Quote
  #8  
Old 03-24-2006, 04:52 PM
|oR|Greg |oR|Greg is offline
 
Join Date: May 2003
Location: AMACNY.COM
Posts: 418
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Actually now that I think about it, you don't need the IF statement. Duh.

Here's what you do, in the style that you want to use the different postbit, all you do is copy the code from that postbit, into the one your board uses, that's it.

Example:

Forums use postbit_legacy
Therefore, DefaultStyle uses postbit_legacy
However, NewStyle needs to use postbit, but since the Forums are set to use the legacy template, you can't.

All you do is go into the NewStyles postbit template, copy all the code, and paste it into NewStyles postbit_legacy template. Done

How to:

AdminCP>Styles & Templates>Template Manager>(Choose the style you want to edit)Expand Templates> Postbit Templates>

Now, you've got postbit, and postbit_legacy.

If your board uses postbit but you want this style to use postbit_legacy, go into the postbit_legacy, copy it's code, and paste into the postbit template.

If your board uses postbit_legacy but you want this style to use postbit, go into the postbit, copy it's code, and paste into the postbit_legacy template.
Reply With Quote
  #9  
Old 03-26-2006, 03:55 PM
Talisman's Avatar
Talisman Talisman is offline
 
Join Date: Aug 2002
Location: USA/West Coast
Posts: 371
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great question... thanks for asking this and posting how to accomplish it. That's a nice way to customize multiple styles exactly how you want them to look.

Hadn't thought of doing this until now... so I'm real happy to find this.

Cheers ... :bunny:
Reply With Quote
Reply


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 06:29 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.03726 seconds
  • Memory Usage 2,238KB
  • Queries Executed 13 (?)
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
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)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_postinfo_query
  • fetch_postinfo
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete