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

Reply
 
Thread Tools Display Modes
  #1  
Old 04-09-2008, 07:05 PM
legionofangels's Avatar
legionofangels legionofangels is offline
 
Join Date: Mar 2007
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Accept Style Code

Hello,

I am curious what the code is to force a section of code to accept the style information from the style chooser.

It's in a ton of the add on's here. For example the Quick Register, the Radio/TV Add On, Inferno Shoutbox.

Where basically if I change the style in my style chooser, it will change the layout of them as well.

I need the code so I can force a non-vb add on script that I'm going to put on a vb custom page, so that it does the same thing.

I hope you understand, if not, I'll show pictures.

Thanks in advance,

Legion
Reply With Quote
  #2  
Old 04-09-2008, 07:46 PM
MoT3rror MoT3rror is offline
 
Join Date: Mar 2007
Posts: 423
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If I am understanding you correctly you want to set a style ID no matter what the user style is.
This is the code I found in the class_core.php to set the style of the user.
PHP Code:
vB_Session::set('styleid'1); 
1 being the id of the style.

If that doesn't work you will probably find your answer somewhere in forumdisplay.php or showthread.php.
Reply With Quote
  #3  
Old 04-09-2008, 08:15 PM
legionofangels's Avatar
legionofangels legionofangels is offline
 
Join Date: Mar 2007
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks.

That might be it, but it seems like it's specifying the style.

I don't want to specify necessarily.

If I have a custom forum page such as this:

http://www.legionofangels.net/forum/loalinks.php

and you hit the style chooser on the bottom of the page, you can change the display of the box on the page.

See this:

http://img.photobucket.com/albums/v3...66/test2-3.jpg

I need the code for how to force a code/script/product to change if a user changes there style ID.
Reply With Quote
  #4  
Old 04-09-2008, 08:43 PM
MoT3rror MoT3rror is offline
 
Join Date: Mar 2007
Posts: 423
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
<if condition="$bbuserinfo[styleid] == 1">
code to only show only on style id 1
<else />
<if condtion="$bbuserinfo[styleid] == 2">
code to show show only on style id 2
</if>
</if>
Reply With Quote
  #5  
Old 04-09-2008, 08:45 PM
legionofangels's Avatar
legionofangels legionofangels is offline
 
Join Date: Mar 2007
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You rule!

Do I have to do that for all my style id's, the separate "if it's this, show this". Or does that code cover all of them?

I'm guessing do it for each of my style id's.
Reply With Quote
  #6  
Old 04-09-2008, 08:48 PM
MoT3rror MoT3rror is offline
 
Join Date: Mar 2007
Posts: 423
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No you have to keep adding more if you have more style ids but you can use a else to cover many styles.
Code:
<if condition="$bbuserinfo[styleid] == 1">
code to only show only on style id 1
<else />
<if condtion="$bbuserinfo[styleid] == 2">
code to show show only on style id 2
<else />
use on any style except 1 or 2
</if>
</if>
Reply With Quote
  #7  
Old 04-09-2008, 08:49 PM
legionofangels's Avatar
legionofangels legionofangels is offline
 
Join Date: Mar 2007
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'd give you rep or thanks if I could.

Very much appreciated!!!

(( 1 last thing and I got all my stuff ))

sweet!!
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 09:00 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.04368 seconds
  • Memory Usage 2,215KB
  • 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
  • (2)bbcode_code
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete