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 05-23-2007, 11:07 PM
troybtj troybtj is offline
 
Join Date: Apr 2007
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Ranks & Titles by custom profile field values?

The website I am running is run by donations for a game.

I'd like to add to parts to the postbit_legacy area, based on fields, if it the built in rank/title can't be changed to look at a value other than postcount.

Here are the exact details:

For one parameter (custom field), it would be how much they have donated to the site, and would get dollar sign "stars" in their postbit based on the number in the custom field (which is edited by admin only)

Second parameter (custom field) would be the same thing, except with a different icon for amount of game participation and forum help they have given, along with adding an additional custom title. (again, edited by admin only). We all know postcount != forum help

Both of these fields would be a numeric value to calculate the rank, or "bracket" the title (1-100=blah, 101-500=argh, etc).

I guess the base question is if I use the above post for a template, is there a way I can eval the value (numerically) of the custom field to decide which icon to display?

I do not understand the functionality of "condition" on "If Condition=xxx" or how to evaluate/compare numercal fields in "proper vB"

All help would be appreciated! I am familiar with PHP, but don't want to make any changes that would hurt the upgrade process, so am looking for an official method first.
Reply With Quote
  #2  
Old 05-25-2007, 02:04 AM
troybtj troybtj is offline
 
Join Date: Apr 2007
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anybody?

Maybe a link to a devel guide that would show how to perform functions on custom field values? I would like to do this using proper vb function calls, instead of storming in with PHP and queries.
Reply With Quote
  #3  
Old 05-27-2007, 03:53 AM
troybtj troybtj is offline
 
Join Date: Apr 2007
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Bump for long weekend...

I'll settle for the code to determine if the value of a profile field is > 10,000 (numeric)
Reply With Quote
  #4  
Old 05-27-2007, 07:36 AM
007's Avatar
007 007 is offline
 
Join Date: Jan 2003
Location: United States
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As far as I know the only way to do this is to manually change the field to INTIGER in the database. It would be nice if there was a way to create numeric custom fields for storing data such as this by default but there is no such option.
Reply With Quote
  #5  
Old 05-27-2007, 09:03 AM
troybtj troybtj is offline
 
Join Date: Apr 2007
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

A hack around this by creating 20 custom secondary usergroups for rank only (no permissions), then checking off the boxes, and adding them to custom ranks, display always, posts 0... Then check off manually the users that fit those "rank only" usergroups.

Would that be too sloppy? How would the "stack ranks" behave. Has anybody tried this method before?
Reply With Quote
  #6  
Old 05-29-2007, 05:40 AM
troybtj troybtj is offline
 
Join Date: Apr 2007
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Willing to pay for coding. I have no problems changing a profile field to integer.

I am a unix and database admin, so the step by step can be snipped.

However, I am currently on 3.6.5 and waiting a few weeks to make sure all bugs are ironed out in 3.6.7 PL1 (x?) *I have installed the security plugin in 3.6.5

so solution needs to be as a plugin, but assume profile field is integer, then I need only code utilizing plugins.

Adding that many usergroups to display for 1,000 users, when only 20 have "The Rank" seems a bit server intensive for me. Looking for lightweight solution.
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 07:19 AM.


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.03795 seconds
  • Memory Usage 2,199KB
  • Queries Executed 13 (?)
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
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)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_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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete