Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Solved [How To?] Hide table in member profile?
#1
Not Solved
So I have a how to question on hiding specific tables in member profiles with php conditions? I have the plugin php and template conditionals , and I am looking to hide empty tables in member profile areas. For example, if a member just signed up, then the "groups" table in profile should be hidden. If a user has 0 awards, then the "awards" table should be hidden.

Example image:
https://i.gyazo.com/012513b4a197994d07bd...3ba4e5.png <- these tables should be hidden if there is nothing to show.

Can anyone point me to the right direction to get this done? Or would this require further plugin/global php modifications instead of through templates?
Reply
#2
Not Solved
see this reply related to empty profile fields. perhaps you can extend it to your requirement.
Reply
#3
Not Solved
(03-26-2020, 07:06 AM).m. Wrote: see this reply related to empty profile fields. perhaps you can extend it to your requirement.

Don't think this guide helps much as Groups/Awards and some other sections aren't profile fields, but are plugins (aside from groups of course, but still isn't a custom profile field).

EDIT: For groups, I tried something like the code below, but was not success:
<if $memprofile['usergroup'] != 2 then>&nbsp;<else><table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}">........</table></if>
Reply
#4
Not Solved
Hi,


I'd change the style of the DIV (or DIVs) you wanna show/hide. Something like:
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" <if CONDITION_TO_MAKE_IT_INVISIBLE then> style="visibility: hidden;"</if>>........</table>
I don't answer questions about localhost forums or forums without URL, I'm not a seer.  Cool
Reply
#5
Not Solved
(03-26-2020, 06:59 AM)makpaolo Wrote: (...)

Or would this require further plugin/global php modifications instead of through templates?

Seems to me it's the proper way. "php and template conditionals" may have its inability in some template/HTML output circumstance, well just a guess.
Worth a try.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)