Hi again everyone,
I'm trying to figure out how to hide empty profile/viewtopic fields. If a user doesn't enter their location in their profile, the field "location" still shows. I'm trying to get the "location" field to disappear from profiles if a user didn't enter their location. The same thing goes for viewtopic. A blank space is in place of an empty location field. How would I go about removing these fields if the user didn't enter anything into them?
Thanks!
Hide Empty Fields
Subject: Re: Hide Empty Fields
Just mentioning this again.
This will help to keep forums looking neater and more professional looking. I know what I need are some SWITCH tags, but I just don't know the necessary code.
This will help to keep forums looking neater and more professional looking. I know what I need are some SWITCH tags, but I just don't know the necessary code.
Subject: Re: Hide Empty Fields
I stand to be corrected, but it wouldn't be practical. :(
Apart from a huge re-write of the .php files with if and else arguments that query the Db to see if the entry has been filled in, it would also have to be programmed with new Block-Vars to return different template options.
That would mean new vars for every field that the user has a choice of filling in or not. :(
Then they would have to be applied to all of the templates that are available to the user <-- Begin Not Filled In Here etc. and <-- Begin Filled In Here etc, so that the correct templates are shown.
Then one would have to start re-writing the .tpl tables to accommodate the switches, and that itself would be a nightmare. :P
It gets worse - What if the User doesn't fill something in, and the option block disappears - How does one go back and fill it in then ?
It's more than a few switches, it's a huge rewrite. :shock:
Edit: And templates with left, right and multiple fields, it would be impossible to accommodate all options that may or may not be included, and hold the whole thing together. ;)
Apart from a huge re-write of the .php files with if and else arguments that query the Db to see if the entry has been filled in, it would also have to be programmed with new Block-Vars to return different template options.
That would mean new vars for every field that the user has a choice of filling in or not. :(
Then they would have to be applied to all of the templates that are available to the user <-- Begin Not Filled In Here etc. and <-- Begin Filled In Here etc, so that the correct templates are shown.
Then one would have to start re-writing the .tpl tables to accommodate the switches, and that itself would be a nightmare. :P
It gets worse - What if the User doesn't fill something in, and the option block disappears - How does one go back and fill it in then ?
It's more than a few switches, it's a huge rewrite. :shock:
Edit: And templates with left, right and multiple fields, it would be impossible to accommodate all options that may or may not be included, and hold the whole thing together. ;)
Subject: Re: Hide Empty Fields
I understand what you mean, but I think it's more practical than you think. What is the use of an empty profile field? It sits there taking up space in the already cluttered profile page. Any subtraction to the profile page is a plus.
You can't tell me this doesn't look sloppy, unorganized, and completely unprofessional.
Wouldn't you rather your viewtopic look something like this? Notice how I filled out all my profile information, therefore, everything under my avatar looks nice and neat because my profile is complete.
I'm not really sure if you understand what I mean. The empty fields are always there when editing your profile. If you fill out the "Location" field, it will show your location on viewtopic. If you don't fill out the "Location" field, the whole field won't be shown on viewtopic, but the empty "Location" field is still viewable and empty when editing your profile. It becomes invisible and erases any mention of a location field. You can always go back and edit your profile to include your location if you wish to. There was a mod like this for phpBB2, I just can't remember the title or who the author was.
To be honest, this should have been taken care of in the first release of IP. IP is brilliantly packed with most every useful modification you can think of, so why not include something as small as this? It was easily possible and 'do-able' with a vanilla copy of phpBB2. The profile page is jam packed with information, so why not make it easier on your older user's eyes and brains and simplify the page a little?
/opinion.
Lopalong wrote: [View Post]
I understand what you mean, but I think it's more practical than you think. What is the use of an empty profile field? It sits there taking up space in the already cluttered profile page. Any subtraction to the profile page is a plus.
You can't tell me this doesn't look sloppy, unorganized, and completely unprofessional.
Spoiler: [ Show ]
Wouldn't you rather your viewtopic look something like this? Notice how I filled out all my profile information, therefore, everything under my avatar looks nice and neat because my profile is complete.
Spoiler: [ Show ]
Lopalong wrote: [View Post]
I'm not really sure if you understand what I mean. The empty fields are always there when editing your profile. If you fill out the "Location" field, it will show your location on viewtopic. If you don't fill out the "Location" field, the whole field won't be shown on viewtopic, but the empty "Location" field is still viewable and empty when editing your profile. It becomes invisible and erases any mention of a location field. You can always go back and edit your profile to include your location if you wish to. There was a mod like this for phpBB2, I just can't remember the title or who the author was.
To be honest, this should have been taken care of in the first release of IP. IP is brilliantly packed with most every useful modification you can think of, so why not include something as small as this? It was easily possible and 'do-able' with a vanilla copy of phpBB2. The profile page is jam packed with information, so why not make it easier on your older user's eyes and brains and simplify the page a little?
/opinion.
Subject: Re: Hide Empty Fields
Hehe!
I did beat it up with the wrong train of thought on what you were trying to achieve. The pic made all the difference. :P
Try this:
Open viewtopic_body.tpl
Find:
Replace with:
You will probably have to add class="?" to the <p strings to control the text size etc.
I did beat it up with the wrong train of thought on what you were trying to achieve. The pic made all the difference. :P
Try this:
Open viewtopic_body.tpl
Find:
Spoiler: [ Show ]
Replace with:
Spoiler: [ Show ]
You will probably have to add class="?" to the <p strings to control the text size etc.
Subject: Re: Hide Empty Fields
That worked perfectly! Another idea would be to remove empty fields from the profile...any suggestions?
Thanks again Lopalong.
Thanks again Lopalong.
Subject: Re: Hide Empty Fields
You're welcome. ;)
I trust you mean this profile template? h**p://***.icyphoenix.com/profile.php?mode=viewprofile&u=3295
That's what I was mislead into answering in my first post as it invloves Db Queries something like:
if user_hobies==('') etc DO THIS ->
else DO THIS INSTEAD ->>> etc, etc, .php files - templates and God knows what else?
Now I'm out of here, because that one is out of my depth. :P
Chaotic wrote: [View Post]
You're welcome. ;)
I trust you mean this profile template? h**p://***.icyphoenix.com/profile.php?mode=viewprofile&u=3295
That's what I was mislead into answering in my first post as it invloves Db Queries something like:
if user_hobies==('') etc DO THIS ->
else DO THIS INSTEAD ->>> etc, etc, .php files - templates and God knows what else?
Now I'm out of here, because that one is out of my depth. :P
Subject: Re: Hide Empty Fields
You're welcome too! :mrgreen:
It only has one drawback, and that is if one wants to centre the text, then it has to be done "block-wise" with margins and fixed width; and it could end up looking pretty U.G.L.Y with any line that is just a little bit too long and wraps. :(
Me I like it centered as in the pic. :P
KugeLSichA wrote: [View Post]
You're welcome too! :mrgreen:
It only has one drawback, and that is if one wants to centre the text, then it has to be done "block-wise" with margins and fixed width; and it could end up looking pretty U.G.L.Y with any line that is just a little bit too long and wraps. :(
Me I like it centered as in the pic. :P
Subject: Re: Hide Empty Fields
I like how you have all the messenger icons under the avatar, but with our Xbox Live Gamercards and the Medal Mod under our avatars, it would look more crowded than it already is...LOL.
I do have some users that are putting whole sentences in their Location field. It looks terrible. Is there a way to limit how much text can be added to the Location field? I think a city and state would be sufficient.
I do have some users that are putting whole sentences in their Location field. It looks terrible. Is there a way to limit how much text can be added to the Location field? I think a city and state would be sufficient.
Subject: Re: Hide Empty Fields
Why not remove the field from viewtopic, as the same info is generated by hovering over the user's Flag?
Chaotic wrote: [View Post]
Why not remove the field from viewtopic, as the same info is generated by hovering over the user's Flag?
Page 1 of 1
You cannot post new topicsYou cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events
This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by Icy Phoenix based on phpBB
Generation Time: 1.0483s (PHP: 2% SQL: 98%)
SQL queries: 12 - Debug Off - GZIP Enabled