vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Profile Enhancements - Customizable Roster (https://vborg.vbsupport.ru/showthread.php?t=235326)

Sarcoth 09-10-2010 11:36 AM

Quote:

Originally Posted by Foxtrotelite (Post 2095907)
<td class="$bgclass" nowrap="nowrap" align="center"><if condition="($user[field27] == '')">$user[field30]<else /><a href="http://steamcommunity.com/id/$user[field27]">$user[field30]</a></if></td>

field27 being the Steam ID number
field30 being Steam Profile ID

The above code is what you posted previously (on page 2 or 3 of the topic). I just changed the field numbers to reflect my forum. Can you update this to work for the newest VB version please?

Thanks in advance!

Code:

<vb:if condition="$show[field8th] AND exec_switch_bg()"><td><vb:if condition="$userinfo[field27] == ''">{vb:var userinfo.field30}<vb:else /><a href="http://steamcommunity.com/id/{vb:var userinfo.field27}">{vb:var userinfo.field30}</a></vb:if></td></vb:if>
That should do it. The change is done in the showroster_userbits template. You'll need to pick one of the columns already there. I chose the field8th for testing. Make sure you also rename the column in the Showroster Settings page.

Sarcoth 09-10-2010 11:41 AM

Quote:

Originally Posted by betts02 (Post 2095929)
What i need is to add the xbox gamer card to the roster via our members filling in a profile field

I have this in my signature area with this code :

Code:

<vb:if condition="$post['field5']"><tr><td class="vbmenu_option">
<iframe src="http://gamercard.xbox.com/{vb:raw post.field5}.card" scrolling="no" frameBorder="0" height="140" ></iframe></td></tr></vb:if>

I want to know how to get this shown in the roster
What file and where ?

Also if possible, I have our members enter a URL of their choice via a profile field

This shows up in the roster, But i want it to be clickable

How and where would i do this also

If possible a full explanation of where and what to edit

many thanks in advance

This is very similar to the one I just did for Foxtrot. The template to edit is showroster_userbits. I need some more info though. What field#'s are you using and please give me some sample data so I can do the testing. Or, if you like, I can do it on your site. PM me if you want me to do it manually. Otherwise, post the data I requested here.

Foxtrotelite 09-10-2010 04:27 PM

Thanks for the help Sarcoth! The code worked. I got the links part working, but I am having one minor issue. I must be overlooking something. When I use the code, it offesets my columns.
My steam id is in column 4 via the showroster settings. Here is a piece of what i have in the userbits template.
Code:

columns[column3]}}</td></vb:if>
        <vb:if condition="$show[field4th] AND exec_switch_bg()"><td><vb:if condition="$userinfo[field30] == ''">{vb:var userinfo.field27}<vb:else /><a href="http://steamcommunity.com/profiles/{vb:var userinfo.field30}">{vb:var userinfo.field27}</a></vb:if></td></vb:if>
        <vb:if condition="$show[field4th]"><td nowrap="nowrap" align="center" width="13%">{vb:var userinfo.{vb:var
columns[column4]}}</td></vb:if>

I think the to conditions need to be combined in some way. If I change the 2nd condition's field to an unused one, say field8th, then my roster page doesnt add an extra field 4 column so it doesn't offset the roster alignment. Doing that makes my column settings for field 4 not work obviously.. so i end up with a big column and non centered text.

Sarcoth 09-10-2010 04:37 PM

Quote:

Originally Posted by Foxtrotelite (Post 2096316)
Thanks for the help Sarcoth! The code worked. I got the links part working, but I am having one minor issue. I must be overlooking something. When I use the code, it offesets my columns.
My steam id is in column 4 via the showroster settings. Here is a piece of what i have in the userbits template.
Code:

columns[column3]}}</td></vb:if>
        <vb:if condition="$show[field4th] AND exec_switch_bg()"><td><vb:if condition="$userinfo[field30] == ''">{vb:var userinfo.field27}<vb:else /><a href="http://steamcommunity.com/profiles/{vb:var userinfo.field30}">{vb:var userinfo.field27}</a></vb:if></td></vb:if>
        <vb:if condition="$show[field4th]"><td nowrap="nowrap" align="center" width="13%">{vb:var userinfo.{vb:var
columns[column4]}}</td></vb:if>


You want to remove the 2nd $show[field4th] line completely. You can only have one. If you are using it for something else, then you need to remove one of the other columns instead. The code I gave is a replacement for one column.

Foxtrotelite 09-10-2010 04:51 PM

When I tried removing it I got this error:
Quote:

adding child to non-existent node!
This code seemed to make everything work fine:
Code:

columns[column3]}}</td></vb:if>
        <vb:if condition="$show[field4th] AND exec_switch_bg()"><td nowrap="nowrap" align="center" width="13%"><vb:if condition="$userinfo[field30] == ''">{vb:var userinfo.field27}<vb:else /><a href="http://steamcommunity.com/profiles/{vb:var userinfo.field30}">{vb:var userinfo.field27}</a></vb:if></td></vb:if>
        <vb:if condition="$show[field9th]">{vb:var userinfo.{vb:var
columns[column4]}}</td></vb:if>

I moved around the align code and stuff.. but i still had to leave the 2nd if condition there.

Thanks again for all the help and the quick replies!

edit: actually i still had to use an unused field in the 2nd if statement to prevent any extra junk from appearing the roster. Can that code be cleaned up? I guess I am doing something wrong

betts02 09-10-2010 05:14 PM

How is the group settings done ?

What is it for and how do you use it ?

Cheers

Sarcoth 09-10-2010 05:25 PM

Quote:

Originally Posted by Foxtrotelite (Post 2096321)
When I tried removing it I got this error:

This code seemed to make everything work fine:
Code:

columns[column3]}}</td></vb:if>
        <vb:if condition="$show[field4th] AND exec_switch_bg()"><td nowrap="nowrap" align="center" width="13%"><vb:if condition="$userinfo[field30] == ''">{vb:var userinfo.field27}<vb:else /><a href="http://steamcommunity.com/profiles/{vb:var userinfo.field30}">{vb:var userinfo.field27}</a></vb:if></td></vb:if>
        <vb:if condition="$show[field9th]">{vb:var userinfo.{vb:var
columns[column4]}}</td></vb:if>

I moved around the align code and stuff.. but i still had to leave the 2nd if condition there.

Thanks again for all the help and the quick replies!

edit: actually i still had to use an unused field in the 2nd if statement to prevent any extra junk from appearing the roster. Can that code be cleaned up? I guess I am doing something wrong

Not sure what the problem was, but glad you got it working. Enjoy.

Sarcoth 09-10-2010 05:28 PM

Quote:

Originally Posted by betts02 (Post 2096330)
How is the group settings done ?

What is it for and how do you use it ?

Cheers

Group settings are for keeping track of certain fields. Go to the Preview link at the top of this mod. The bottom of my roster gives an example of how I use the group settings. Not sure it would be a use for you betts; from what I saw of your site. It only works with fields that allow the users to choose one selection from a dropdown basically.

jlevi 09-11-2010 03:42 PM

I cannot seem to get this working - i just get a blank page with the roster title and no members show up? I've tried changing the settings and nothing seems to work.

Many thanks in advance

Sarcoth 09-11-2010 05:21 PM

Quote:

Originally Posted by jlevi (Post 2096765)
I cannot seem to get this working - i just get a blank page with the roster title and no members show up? I've tried changing the settings and nothing seems to work.

Many thanks in advance

I think I'm just going to release another version next week with the filter off by default. Please read the FAQ.


All times are GMT. The time now is 02:23 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.01417 seconds
  • Memory Usage 1,757KB
  • 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
  • (6)bbcode_code_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (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