vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Show Thread Enhancements - Users choose to see either Postbit or Postbit Legacy (https://vborg.vbsupport.ru/showthread.php?t=250423)

dvsDave 09-12-2010 10:00 PM

Users choose to see either Postbit or Postbit Legacy
 
1 Attachment(s)
1. Create profile field that had the option of "Horizontal" or "Vertical" with one of them being being the first option, it's a required field, first option is default with no blank.

NOTE: set as default whichever is your current settings.

2. Note what the fieldID is in the profile field controlpanel

3a. (If your postbit is defaultly horizontal, do this, otherwise skip to step 3.b )
Open your postbit, at the top copy this:

Code:

<vb:if condition="$bbuserinfo[fieldx] != 'Vertical'">

3b. (If your postbit is defaultly vertical, do this)
Open your postbit, at the top copy this:

Code:

<vb:if condition="$bbuserinfo[fieldx] == 'Horizontal'">

4. At the end of the postbit, copy this:
Code:

<vb:else />

5. Then copy the entire contents of your postbit_legacy template after that.

6. The after you've posted the entire postbit_legacy template, copy this:
Code:

</vb:if>

7. Make sure your admincp settings in Styles & Languages is set to NOT use the Legacy Postbit, and it will be good to go!

dvsDave 09-13-2010 04:00 PM

Reserved for Future Use.

nero9 09-14-2010 03:37 PM

any ss ?

dvsDave 09-14-2010 06:35 PM

Updated with Screenshots

LoveStream 09-15-2010 04:13 AM

Thank you. and I see your good hack.

But, I also have been seek the exactly what I desired but not same with that you made.

I think your way is more useful to switch for user easily, but if we want to force a specific foum with his child one to change the layout, the way of each forum based option to on/off would give more adjustable. :)

Indeed that is I needed to mine.

dvsDave 09-15-2010 12:16 PM

Quote:

Originally Posted by LoveStream (Post 2098472)
Thank you. and I see your good hack.

But, I also have been seek the exactly what I desired but not same with that you made.

I think your way is more useful to switch for user easily, but if we want to force a specific foum with his child one to change the layout, the way of each forum based option to on/off would give more adjustable. :)

Indeed that is I needed to mine.

This hack relies on the power of vb4 Template Conditionals.

In your case, if you want certain forums to have postbit or postbit legacy, your code would be thus:

1) Find the forum ID of each forum that you want in the postbit (horizontal) layout, write them down.

2) Replace Step 3 (a & b) with this:

Code:

<vb:if condition="in_array($forum['forumid'], array(x,y,z))">
(Replace x,y,z with the forum ID's you want in the horizontal layout, everything else will be in the postbit_legacy layout.)

3) follow the rest of the instructions above.

lubbie 09-15-2010 07:40 PM

Hi. Nice Addon.
I got a question to it. What will happen if i already changed the Style of my postbit_legacy? Will that have any effect like... "destroying" the look etc....

dvsDave 09-15-2010 07:53 PM

Nope, you just copy the entire code from the postbit_legacy template and paste it where the instructions tell you to. So any custom code will transfer. I'm not so sure if mods that use the postbit_legacy hooks work, would love if someone could get a definite answer for me on that.

asd_ra7la 09-19-2010 09:50 AM

Thank you my frend

BoostinEuros 10-11-2010 04:56 AM

I am a bit confused, I am trying to do this mod but I cannot find
PHP Code:

<vb:if condition="$bbuserinfo[fieldx] != 'Vertical'"

in my postbit....or anything similar. I am using 4.0.3 if that helps.


All times are GMT. The time now is 02:52 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.02025 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