The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Can this be done?
|
#2
|
||||
|
||||
On which page?
|
#3
|
||||
|
||||
More specifically, on the member profile pages in custom and normal fields which are not required and are not filled in by the user.
|
#4
|
||||
|
||||
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> 3) In member.php find Code:
eval("\$customfields .= \"".gettemplate("getinfo_customfields")."\";"); } Code:
if ($userinfo[field2]!="") { eval("\$userinfo[location] .= \"".gettemplate("getinfo_location")."\";"); } else { $userinfo[location=""; } |
#5
|
||||
|
||||
Seems easy enough! I'll try that out tomorrow when I'm awake. This should be a new feature for 2.1 ! No doubt...
|
#6
|
||||
|
||||
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?
|
#7
|
||||
|
||||
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]=""; } All they should contain is (example): Code:
Posts: $post[posts]<br> |
#8
|
||||
|
||||
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".
|
#9
|
||||
|
||||
Thank you Boofo
Satan |
#10
|
||||
|
||||
You're welcome there, Chris.
Quote:
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|