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 06-23-2008, 02:37 AM
Antiblank Antiblank is offline
 
Join Date: May 2005
Location: PDX
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Creating a block (not a tab) on the profile page?

Currently in my 3.6 build I have extra blocks created in my users profiles. One in particular is a music player for their music. It only shows up if the field is entered (by me) on their profile.

My current code is:
Code:
<!-- Music Player Begin -->
<if condition="$post[field30]">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> 
        <tr class="tcat"> 
         <td align="center">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="450" height="247" id="mp3player" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="mp3player.swf?xml=music/$userinfo[field30]/config.xml" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="mp3player.swf?xml=music/$userinfo[field30]/config.xml" quality="high" bgcolor="#ffffff" width="335" height="247" name="mp3player" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
                    </td>

        </tr> 
     </table> 
     <p></if> 
<!-- Music Player End -->

Is there any easy to follow directions for taking this code and making a conditional block on the right hand side of the users profile. Such as the albums, mini stats, etc blocks? I've seen a post about creating new tabs but I only need this data from the field to show up in a side block, not a tab, but I still want my tabs to work as they do.
Reply With Quote
  #2  
Old 06-23-2008, 02:54 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Add it in it's own fieldset under the General stats tab or one of the others.
Reply With Quote
  #3  
Old 06-23-2008, 09:46 AM
Antiblank Antiblank is offline
 
Join Date: May 2005
Location: PDX
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok maybe I'm not following along here but I'm talking about having the block show up in the right hand side, not in the tabs.

I attached the screenshot to show what I mean. I'm looking to make a block above the Mini Stats block. It will contain a standard block of code, as I showed in my first post, and then the $userinfo[field30] is filled from a profile field. Also I have my current one surrounded by the <if condition="$post[field30]"> </if> so the block doesn't appear unless there is data in that field. I figured this out for 3.6 but all these tabs/blocks for 3.7 I just don't follow. I see articles talking about adding new tabs but I don't need a tab, I really just need this to be a block with custom data all by itself above the Mini Stats.

So if I'm not following what you are saying I'm more then happy to get some clarity. Thanks.
Attached Images
File Type: jpg layout.jpg (39.3 KB, 0 views)
Reply With Quote
  #4  
Old 06-24-2008, 12:15 AM
Antiblank Antiblank is offline
 
Join Date: May 2005
Location: PDX
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok so I figured out how to create a conditional block in the right hand side, but one thing I can't do is get the block to process code. It does a direct output of the profile field but won't parse it.

For example if there was an image code in that profile field, either:
Code:
[IMG ]http://mysite.com/img.jpg[ /IMG]
spaces added to allow the tag to show
or

Code:
<img src="http://mysite.com/img.jpg">
I've seen other mods that add the youtube blocks, google ads, etc, how are they enabling code to be processed?


The simple test block I created in the template: memberinfo_blocks_test contains this
Code:
<!-- test block -->
<if condition="$userinfo[field23]">
<div id="test" class="tborder content_block">
<h4 class="thead block_title">
<span class="block_name">Test Data</span>
</h4>
<div class="alt2 block_row block_footer">
$userinfo[field23]
</div>
</div>
</if>
<!-- / test block -->

So how do I make vBulletin process either html or bbcode contained inside of $userinfo[field23] ?
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 01:41 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.03616 seconds
  • Memory Usage 2,213KB
  • Queries Executed 14 (?)
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
  • (4)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (1)postbit_attachment
  • (4)postbit_onlinestatus
  • (4)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
  • postbit_attachment
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete