vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Customizing members post count ? (https://vborg.vbsupport.ru/showthread.php?t=206200)

TimberFloorAu 02-22-2009 06:58 AM

Customizing members post count ?
 
I have asked this before with no luck.

We have certain members who do not wish their post count to be publically displayed.

What code would we need to enable a user to hide/enable their post count.

Ste

I imagine an if condition and new userprofile field checkbox be required to customize:

$vbphrase[posts]: $post[posts]

Lynne 02-22-2009 03:55 PM

Make a new profile field which is a Yes or No for whether they want their post count shown. Then find each place on the site where the post count is shown (at least in the postbit templates and on the profile.php page) and put a condition around the postcount based on their new profile field.

There is an article on using profile fields in the postbit which will probably help.

TimberFloorAu 02-22-2009 06:48 PM

Thats the bit I am struggling with tho, is how does the conditional know if yes should display and no should not, as neither have a value other than one is a 3 letter string the other 2 letter string.

Example ( i am old school programming ) so apologies.

<if condition="$post['field22']"="no" then echo [$vbphrase[posts]: $post[posts] ] else "foo" >

Now the above is just a silly concept, if the conditional was a value that was to be echoed, i could fathom it out, but because the yes or the no, have no value, I am getting confused.

Ste

Lynne 02-22-2009 08:20 PM

HTML Code:

<if condition="$post['field22'] == 'Yes'">
$vbphrase[posts]: $post[posts]
</if>

make sure one of answers to field22 is "Yes"

You might want to look through the vbulletin manual, like this page - Template Conditionals

TimberFloorAu 02-22-2009 08:29 PM

Quote:

Originally Posted by Lynne (Post 1751747)
HTML Code:

<if condition="$post['field22'] == 'Yes'">
$vbphrase[posts]: $post[posts]
</if>

make sure one of answers to field22 is "Yes"

You might want to look through the vbulletin manual, like this page - Template Conditionals


Are you married cos your wonderful :up:

Bugger it stuffed up the post display lol.

< back to the drawing board


All times are GMT. The time now is 04:26 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.01793 seconds
  • Memory Usage 1,719KB
  • 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
  • (2)bbcode_html_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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