![Hide/Show Profile in Messages Prof10](https://i.servimg.com/u/f22/13/22/20/45/prof10.jpg)
This is a Hitskin.com skin preview
Install the skin • Return to the skin page
This is a Hitskin.com skin preview
Install the skin • Return to the skin page
blindbat1457 wrote:JS code. I can't give it out because it is Emilio's so ask him.
<!-- BEGIN profile_field -->
{postrow.displayed.profile_field.LABEL} {postrow.displayed.profile_field.CONTENT}{postrow.displayed.profile_field.SEPARATOR}
<!-- END profile_field -->
<div align="center">
<input type=button value="Show profile" style='width:200px;margin:0px;padding:0px;' onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = 'Hide profile'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show profile'; }"/>
</div>
<div style="min-height: 0px; background-color: #FFFFFF;">
<div style="display: none" align="center">
<!-- BEGIN profile_field -->
{postrow.displayed.profile_field.LABEL} {postrow.displayed.profile_field.CONTENT}{postrow.displayed.profile_field.SEPARATOR}
<!-- END profile_field -->
</div>
</div>
Dion wrote:This is incredibly simple to do with templates, and honestly not all that difficult do to on phpBB3 and Invision boards. Just wrap the profile info in a DIV, put the show/hide text in a div immediately above the profile info DIV, then set an onclick on the show/hide text DIV to toggle the profile info DIV display between block and none.
Dion wrote:The innerText javascript property is only valid with Internet Explorer.
exterminator wrote:Go to viewtopic_body, try to find :
- Code:
<!-- BEGIN profile_field -->
{postrow.displayed.profile_field.LABEL} {postrow.displayed.profile_field.CONTENT}{postrow.displayed.profile_field.SEPARATOR}
<!-- END profile_field -->
And replace all with :
- Code:
<div align="center">
<input type=button value="Show profile" style='width:200px;margin:0px;padding:0px;' onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = 'Hide profile'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show profile'; }"/>
</div>
<div style="min-height: 0px; background-color: #FFFFFF;">
<div style="display: none" align="center">
<!-- BEGIN profile_field -->
{postrow.displayed.profile_field.LABEL} {postrow.displayed.profile_field.CONTENT}{postrow.displayed.profile_field.SEPARATOR}
<!-- END profile_field -->
</div>
</div>
And I'm sure it won't work with Firefox, and works but is buggy and unreliable in Opera and Chrome. Google is your friend. Use it. Here's one link I found in about five seconds, and in it you'll find a great workaround (using jQuery) to the innerText compatibility issue.exterminator wrote:Just try before you say without thinking :| I'm sure it work with FF, Chrome, Safari, Opera tooDion wrote:The innerText javascript property is only valid with Internet Explorer.
That's all it would require. Other than the proper code.ankillien wrote:I've done it on Emilio's forum using template editing but never tried it on phpBB3 or Invsion. Would it require anything more that just loading a javascript in site description?Dion wrote:This is incredibly simple to do with templates, and honestly not all that difficult do to on phpBB3 and Invision boards. Just wrap the profile info in a DIV, put the show/hide text in a div immediately above the profile info DIV, then set an onclick on the show/hide text DIV to toggle the profile info DIV display between block and none.
exterminator wrote:Maybe you missing somecode when copying. Just do it again clearly and slowly.
exterminator wrote:Just try my demo here : http://khoahoctunhien.2forum.biz/html-h55.htm
I've tested all browser, it's just fine at all.
Darren1 wrote:Hi,
How about this?
=> https://help.forumotion.com/tricks-tips-f32/show-hide-widgets-script-t78898.htm#509241
Darren1 wrote:Darren1 wrote:Hi,
How about this?
=> https://help.forumotion.com/tricks-tips-f32/show-hide-widgets-script-t78898.htm#509241
This is soooooooo much more simple, and is exactly how we have it here on the Englsih Support Forum (Same with French and Romanian)
![]()
![]()
adminpanel >> display >> templates >> general >> view topic_body.Yakko! wrote:i can't do it"
where should i put the code?
<center>
<div style="margin:20px; margin-top:5px">
<div style="font: 12px Verdana, Geneva, Lucida, 'Lucida Grande'; margin-bottom:2px">
<input type="button" value="Hiện" style="width:120px;font-size:15px;margin:0px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }" />
</div>
<div style="min-height: 0px; background-color: #EDE8E0; margin: 0px; padding: 0px; border: 0px inset;">
<div style="display: none;">
<!-- BEGIN profile_field -->
{postrow.displayed.profile_field.LABEL} {postrow.displayed.profile_field.CONTENT}{postrow.displayed.profile_field.SEPARATOR}
<!-- END profile_field -->
</div>
</div>
</div>
</center>
TGC HARDC0RE wrote:adminpanel >> display >> templates >> general >> view topic_body.Yakko! wrote:i can't do it"
where should i put the code?
look here: https://help.forumotion.com/script-code-problems-f43/hide-show-profile-in-messages-t79110.htm#511176
Yakko! wrote:TGC HARDC0RE wrote:adminpanel >> display >> templates >> general >> view topic_body.Yakko! wrote:i can't do it"
where should i put the code?
look here: https://help.forumotion.com/script-code-problems-f43/hide-show-profile-in-messages-t79110.htm#511176
yes...
but after/before what?
<!-- BEGIN profile_field -->
{postrow.displayed.profile_field.LABEL} {postrow.displayed.profile_field.CONTENT}{postrow.displayed.profile_field.SEPARATOR}
<!-- END profile_field -->
<center>
<div style="margin:20px; margin-top:5px">
<div style="font: 12px Verdana, Geneva, Lucida, 'Lucida Grande'; margin-bottom:2px">
<input type="button" value="Hiện" style="width:120px;font-size:15px;margin:0px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }" />
</div>
<div style="min-height: 0px; background-color: #EDE8E0; margin: 0px; padding: 0px; border: 0px inset;">
<div style="display: none;">
<!-- BEGIN profile_field -->
{postrow.displayed.profile_field.LABEL} {postrow.displayed.profile_field.CONTENT}{postrow.displayed.profile_field.SEPARATOR}
<!-- END profile_field -->
</div>
</div>
</div>
</center>
exterminator wrote:Glad it work for you!
Maybe you have copied excessive some code. Just check above the code which you have placed in. Or you can show code here, i will help if i can.
<center>
<div style="margin:20px; margin-top:5px">
<div style="font: 12px Verdana, Geneva, Lucida, 'Lucida Grande'; margin-bottom:2px">
<input type="button" value="Hiện" style="width:120px;font-size:15px;margin:0px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }" />
</div>
<div style="min-height: 0px; background-color: #EDE8E0; margin: 0px; padding: 0px; border: 0px inset;">
<div style="display: none;">
<!-- BEGIN profile_field -->
{postrow.displayed.profile_field.LABEL} {postrow.displayed.profile_field.CONTENT}{postrow.displayed.profile_field.SEPARATOR}
<!-- END profile_field -->
</div>
</div>
</div>
</center>