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 01-05-2011 06:21 PM

Yea, I keep meaning to make that part of the instructions. Thanks Anti.

@ Anti - I am planning to go down the list of requests tonight.

BTW, I just tried the online status option on my forum and it is working. I turned it on and a bunch of them lite up for the users online. If you have edited the _userbits template, you may want to copy it (backup) and revert it back to the original.

The column width is easy though. Open the _userbits template, after you revert it back, and change all the <td> to <td width="10%"> or whatever percentage you want.

Antidepresiv 01-05-2011 08:43 PM

I don't have that width anywhere.. :/ Here is my userbits template :


Code:

<vb:if condition="$showbits == 1">
        <tr>
                <td>
                        <vb:if condition="$show[avatarcol]">
                                <vb:if condition="$show['avatar']">
                                        <img class="avatar" src="{vb:raw avatarurl}" alt="{vb:rawphrase xs_avatar, {vb:raw userinfo.username}}" />
                                <vb:else />
                                        <img class="avatar" src="images/misc/avatar.png" alt="{vb:rawphrase no_avatar_specified}" />
                                </vb:if>
                        </vb:if>
                        <a href="member.php?{vb:raw session.sessionurl}u={vb:raw userinfo.userid}-{vb:raw userinfo.username}">{vb:raw userinfo.musername}</a>
                        <vb:if condition="$show[onlinestatuscol]">{vb:raw userinfo.onlinestatus}</vb:if>
                </td>
                <vb:if condition="$show[field1st] AND exec_switch_bg()"><td>{vb:var userinfo.{vb:var columns[column1]}}</td></vb:if>
                <vb:if condition="$show[field2nd] AND exec_switch_bg()"><td>{vb:var userinfo.{vb:var columns[column2]}}</td></vb:if>
                <vb:if condition="$show[field3rd] AND exec_switch_bg()"><td>{vb:var userinfo.{vb:var columns[column3]}}</td></vb:if>
                <vb:if condition="$show[field4th] AND exec_switch_bg()"><td>{vb:var userinfo.{vb:var columns[column4]}}</td></vb:if>
                <vb:if condition="$show[field5th] AND exec_switch_bg()"><td>{vb:var userinfo.{vb:var columns[column5]}}</td></vb:if>
                <vb:if condition="$show[field6th] AND exec_switch_bg()"><td>{vb:var userinfo.{vb:var columns[column6]}}</td></vb:if>
                <vb:if condition="$show[field7th] AND exec_switch_bg()"><td>{vb:var userinfo.{vb:var columns[column7]}}</td></vb:if>
                <vb:if condition="$show[field8th] AND exec_switch_bg()"><td>{vb:var userinfo.{vb:var columns[column8]}}</td></vb:if>
                <vb:if condition="$show[datejoinedcol] AND exec_switch_bg()"><td>{vb:raw userinfo.datejoined}</td></vb:if>
                <vb:if condition="$show[lastactivecol] AND exec_switch_bg()"><td>{vb:raw userinfo.lastactive}</td></vb:if>
                <vb:if condition="$show[profilepiccol] AND exec_switch_bg()"><td>{vb:raw userinfo.profilepic}</td></vb:if>

        </tr>
</vb:if>

Thanks again..

Best Regards,
Antidepresiv

Sarcoth 01-05-2011 09:21 PM

@ Anti - Yea, that looks like the default one. I don't see anything wrong with it in regards to the online status. Mine works perfectly. To get the width set, you need to change all the <td> to <td width="10%"> and you'll have them all the same width.

Sarcoth 01-06-2011 01:12 AM

Quote:

Originally Posted by Barteh (Post 2134940)
Bit like this:

Code:

          CoD4 CoD5 CoD7 BFBC2 etc etc
Member  1  ?    ?    ?    ?
Member  2  ?    ?    ?    ?
Member  3  ?    ?    ?    ?
...
Member 40  ?    ?    ?    ?

User input field per category (i.e. game) would be a pulldown menu or a set of radio buttons, either simply with the same colour codes or descriptive texts like this:

Are you active in this game?

Yes
Occasionally
Rarely
Don't own it

I'm not entirely sure how to properly do the conversion bit from text values to images. Maybe the last value should be simply 'no' so the options can simply be variables translating to image names (occasionally.jpg -> dark green pip for example). But at my first attempts I mostly just broke the script :)

Alright, I got this working. Here is how to set it up.

Go to the AdminCP -> User Profile Fields -> Add New User Profile Field
Select Single-Selection Menu
Put whatever you want in most of the fields, but you'll need to use the following for Options:
Quote:

Yes
Occasionally
Rarely
Not Owned
You can change the Options to other words, but you will need to update the template code (listed below). Also, do not use special characters (like single or double quotes).

Next, edit the showroster_userbits template by adjusting one of the field column's. My example will be using the column8 one.

Look for:

HTML Code:

<vb:if condition="$show[field8th] AND exec_switch_bg()"><td>{vb:var userinfo.{vb:var columns[column8]}}</td></vb:if>

Replace with:

HTML Code:

<vb:if condition="$show[field8th] AND exec_switch_bg()">
        <td>
                <vb:if condition="$userinfo['field42'] == 'Yes'"><img class="avatar" src="images/misc/active1.png" alt="Yes" /></vb:if>
                <vb:if condition="$userinfo['field42'] == 'Occasionally'"><img class="avatar" src="images/misc/active2.png" alt="Occasionally" /></vb:if>
                <vb:if condition="$userinfo['field42'] == 'Rarely'"><img class="avatar" src="images/misc/active3.png" alt="Rarely" /></vb:if>
                <vb:if condition="$userinfo['field42'] == 'Not Owned'"><img class="avatar" src="images/misc/active4.png" alt="Not Owned" /></vb:if>
        </td>
</vb:if>

Obviously, you can change the active#.png files with any any image files you want to use.

Good luck!

Sarcoth 01-06-2011 07:24 PM

Hey folks. My school starts up again on Monday so I'm planning to head back into hiatus. I've also decided to stop taking requests for modifications, sorry. Guess I'm just tired of doing things for free. I may come back now and then to release updates, but no promises. I will gladly fix things if found broken, but I'm very happy with where this mod is at now.

If you have helped me with code in the past or have made a donation or I use one of your mods on my site, just send me a PM if you need anything. To the rest, just post your questions here, I will come back to answer them occasionally. There also may be others willing to help with code updates.

Finally, I am planning to release another mod very soon. I think it will be a great add-on for this mod and can also be used solo. I'll make another post here once it is released.

Take care!

Trek 01-06-2011 09:06 PM

Quote:

Originally Posted by Sarcoth (Post 2145072)
Finally, I am planning to release another mod very soon. I think it will be a great add-on for this mod and can also be used solo. I'll make another post here once it is released.
Take care!

If this has anything to do with game/member management... you know you can count me in! Let me know if you need some testing done!

Barteh 01-09-2011 08:06 PM

Quote:

Originally Posted by Sarcoth (Post 2144686)
Alright, I got this working. Here is how to set it up.

I'm still poking at the layout and settings on my test forum (specifically where in the user settings to let these custom fields show up, I also have a computer specs mod and I want to visually separate these fields), but images work exactly as advertised, thanks :)

I've also swapped the column titles for icons. Edit the showroster_header template, find:
Code:

<vb:if condition="$show[field1st]"><th class="showroster_columnhead">{vb:var columns.title1}</th></vb:if>
<vb:if condition="$show[field2nd]"><th class="showroster_columnhead">{vb:var columns.title2}</th></vb:if>

(etc)

Replace with:
Code:

<vb:if condition="$show[field1st]"><th class="showroster_columnhead"><img src="images/misc/showroster/{vb:var columns.title1}.png" ALT="{vb:var columns.title1}"></th></vb:if>
<vb:if condition="$show[field2nd]"><th class="showroster_columnhead"><img src="images/misc/showroster/{vb:var columns.title2}.png" ALT="{vb:var columns.title2}"></th></vb:if>

As for column titles, the filesystem restrictions apply (no : " etc, also no '), example below. Images are placeholders, hence a couple missing.

https://vborg.vbsupport.ru/external/2011/01/25.png

ShawnV 01-09-2011 09:30 PM

Quote:

Originally Posted by Sarcoth (Post 2145072)
Hey folks. My school starts up again on Monday so I'm planning to head back into hiatus.

Thanks Sarcoth, roster is working fine. I noticed you guys are also doing RIFT, what server and faction?

Sarcoth 01-10-2011 09:13 PM

Quote:

Originally Posted by ShawnV (Post 2146667)
Thanks Sarcoth, roster is working fine. I noticed you guys are also doing RIFT, what server and faction?

Yea, we are going to be moving over to that fully. The beta has been a blast. Right now we are on Wolfsbane and going Guardians. That has been the voted upon faction for release, but nothing is definite till we start. :)

BTW, I am going to do some extra code for setting up my guild in RIFT. The new roster I am going to have will have columns for Class and Role. Class will be Cleric, Mage, Rogue, and Warrior. Role will be: Control, DPS, Healer, and Tank. The extra code will be for using the Statistic addon for the roster (it shows how many of each group are there). Basically, I will have each class separated on the Stats and then down by their row and the count. Check my roster for what I mean. If you look at my roster, you'll see that it does not do the stats correctly because all the counts are going to the first column. I'll eventually fix that. Since everyone can have 3 souls, it is kind of pointless going that route.

If you are interested in it when I'm done, send me a PM.

Sarcoth 01-10-2011 09:17 PM

@ Barteh - Were you actually asking a question there? I'm sorry if you were. Otherwise, I am glad it is working. :)


All times are GMT. The time now is 10:18 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.01556 seconds
  • Memory Usage 1,772KB
  • 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
  • (2)bbcode_html_printable
  • (6)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