vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Creating a block (not a tab) on the profile page? (https://vborg.vbsupport.ru/showthread.php?t=183277)

Antiblank 06-23-2008 02:37 AM

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.

Boofo 06-23-2008 02:54 AM

Add it in it's own fieldset under the General stats tab or one of the others.

Antiblank 06-23-2008 09:46 AM

1 Attachment(s)
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.

Antiblank 06-24-2008 12:15 AM

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] ?


All times are GMT. The time now is 01:34 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.01048 seconds
  • Memory Usage 1,721KB
  • 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
  • (4)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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