vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   How can this be accomplished? Postbit (https://vborg.vbsupport.ru/showthread.php?t=202450)

smooth-c 01-20-2009 11:44 AM

How can this be accomplished? Postbit
 
Hey guys, I have recently created my own little modification to my postbit where the member chooses their favourite album by an artist upon registering / in their usercp and it displays the album cover in the postbit.

http://img514.imageshack.us/img514/1042/minehiskc7.png

Using this code;

HTML Code:

<div>
<if condition="$post['field5']">
        <img src="images/albumimg/$post[field5].png" alt="$post[field5]" border="0" />
</if>
</div>

Now, when I done this I removed my arcade trophy postbit code, which is

HTML Code:

<div class="smallfont">$post[crowns]$post[champtext]</div>
There are some of my users who prefer to keep the arcade postbit rather than the album image, is it possible to allow users to choose which "mod" they'd like to show via userprofile field? and if so, how?

Thanks for reading! Hope someone can help :)

Greg

Lynne 01-20-2009 02:14 PM

Create another profile field "Would you like to show your album instead of your arcade trophies" (or whatever > Yes or No, then get the field number (fieldX) and do something like:
HTML Code:

<if condition="$post['fieldX'] == 'Yes'">
album code
<else />
trophy code
</if>



All times are GMT. The time now is 08:08 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.01468 seconds
  • Memory Usage 1,710KB
  • 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
  • (3)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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