vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Postbit/postbit Legacy (https://vborg.vbsupport.ru/showthread.php?t=111108)

Ohiosweetheart 03-22-2006 04:27 PM

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?

The Chief 03-22-2006 05:46 PM

nah, i think its one or the other for all styles...

Ohiosweetheart 03-22-2006 07:38 PM

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.

natralis 03-22-2006 08:57 PM

Sorry for this question but where abouts in the admincp can you select which to use as the deafult?

Ohiosweetheart 03-22-2006 09:38 PM

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

|oR|Greg 03-24-2006 02:37 PM

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.

Ohiosweetheart 03-24-2006 04:07 PM

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!

|oR|Greg 03-24-2006 04:52 PM

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.

Talisman 03-26-2006 03:55 PM

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:


All times are GMT. The time now is 07:27 AM.

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.01113 seconds
  • Memory Usage 1,733KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete