Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
  #1  
Old 08-26-2001, 01:27 AM
tpearl5's Avatar
tpearl5 tpearl5 is offline
 
Join Date: Nov 2001
Location: PA
Posts: 1,014
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can this be done?
Reply With Quote
  #2  
Old 08-26-2001, 01:59 AM
tubedogg's Avatar
tubedogg tubedogg is offline
 
Join Date: Oct 2001
Location: Medina, OH
Posts: 785
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

On which page?
Reply With Quote
  #3  
Old 08-26-2001, 02:06 AM
tpearl5's Avatar
tpearl5 tpearl5 is offline
 
Join Date: Nov 2001
Location: PA
Posts: 1,014
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

More specifically, on the member profile pages in custom and normal fields which are not required and are not filled in by the user.
Reply With Quote
  #4  
Old 08-26-2001, 02:32 AM
tubedogg's Avatar
tubedogg tubedogg is offline
 
Join Date: Oct 2001
Location: Medina, OH
Posts: 785
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yep, it's possible. You'll have to create templates for each that you want to show/not show and copy out the info from the getinfo template for that row and add a bit to member.php.

For example, if I don't want Location to show if it's empty, I'd do the following:
1) Create a new template called getinfo_location with the following in it:
Code:
<tr>
	<td bgcolor="{firstaltcolor}"><normalfont><b>Location:</b></normalfont></td>
	<td bgcolor="{firstaltcolor}"><normalfont>$userinfo[field2]</normalfont></td>
</tr>
2) If this field was already in the getinfo template (this was a slightly bad example cause it's a custom field that falls under the guise of $customfields in the getinfo template) I'd remove the whole row from the template and replace it with $userinfo[location] - but in this case we just need to add $userinfo[location] somewhere in the getinfo template.
3) In member.php find
Code:
    eval("\$customfields .= \"".gettemplate("getinfo_customfields")."\";");

  }
and add right after it
Code:
if ($userinfo[field2]!="") {
eval("\$userinfo[location] .= \"".gettemplate("getinfo_location")."\";");
} else {
  $userinfo[location="";
}
Just repeat for any other things you want to display/not display.
Reply With Quote
  #5  
Old 08-26-2001, 02:42 AM
tpearl5's Avatar
tpearl5 tpearl5 is offline
 
Join Date: Nov 2001
Location: PA
Posts: 1,014
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Seems easy enough! I'll try that out tomorrow when I'm awake. This should be a new feature for 2.1 ! No doubt...
Reply With Quote
  #6  
Old 12-29-2001, 02:21 PM
Weasel's Avatar
Weasel Weasel is offline
 
Join Date: Dec 2001
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's not easy, in fact thats the most hacked-up slackjaw thing i ever saw. Isn't there a way that will work for ALL fields?
Reply With Quote
  #7  
Old 08-31-2002, 04:35 PM
Tim Wheatley's Avatar
Tim Wheatley Tim Wheatley is offline
 
Join Date: Nov 2001
Location: England
Posts: 489
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is what I've put in my functions.php:

Code:
if ($post[field2]!="") {
eval("\$post[field2] = \"".gettemplate("postbit_location")."\";");
		} else {
			$post[field2]="";
		}

	if ($post[joindate]!="") {
eval("\$post[joindate] = \"".gettemplate("postbit_registered")."\";");
		} else {
			$post[joindate]="";
		}

if ($post[posts]!="" and $post[posts]!="0") {
			eval("\$post[posts] = \"".gettemplate("postbit_posts")."\";");
		} else {
			$post[posts]="";
		}
Then make three new templates, postbit_location, postbit_posts and postbit_registered.

All they should contain is (example):
Code:
Posts: $post[posts]<br>
What all the above does it makes the stats within postbit invisible when someone hasn't made any posts, hasn't filled in a location, or is a guest (so of course hasn't filled any of the info in).
Reply With Quote
  #8  
Old 08-31-2002, 06:17 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There's a hack out just for the customfields not showing up in the profile page if they are empty. It is by AFTERLAB and the hack is called "Hide Unentered Fields".
Reply With Quote
  #9  
Old 08-31-2002, 06:43 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you Boofo

Satan
Reply With Quote
  #10  
Old 08-31-2002, 07:11 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You're welcome there, Chris.

Quote:
Originally posted by hellsatan
Thank you Boofo

Satan
Reply With Quote
Reply

Thread Tools
Display Modes

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 08:50 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.04861 seconds
  • Memory Usage 2,244KB
  • Queries Executed 11 (?)
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
  • (5)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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