Hide/Show Profile in Messages
+5
Darren1
ankillien
exterminator
blindbat1457
mehmoodriaz123
9 posters
Page 1 of 2
Page 1 of 2 • 1, 2
Hide/Show Profile in Messages
what srcipt should we use for hide/show profile in messages .. like one here on one of the forumotion forum


mehmoodriaz123- Forumember
-
Posts : 98
Reputation : 0
Language : english
Location : in the heart of forumotions
Re: Hide/Show Profile in Messages
JS code. I can't give it out because it is Emilio's so ask him.
blindbat1457- Forumember
-
Posts : 667
Reputation : 6
Language : English
Location : Santa Clarita, CA
Re: Hide/Show Profile in Messages
blindbat1457 wrote:JS code. I can't give it out because it is Emilio's so ask him.
atleast you can pm me the code. the more u spread the more u learn
mehmoodriaz123- Forumember
-
Posts : 98
Reputation : 0
Language : english
Location : in the heart of forumotions
Re: Hide/Show Profile in Messages
Go to viewtopic_body, try to find :
And replace all with :
- 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>
exterminator- Forumember
-
Posts : 106
Reputation : 4
Language : English, Japanese, Vietnamese, HTML, Javascript, C, C++, C#, VB.Net
Location : Hochiminh City - Vietnam
Re: Hide/Show Profile in Messages
The innerText javascript property is only valid with Internet Explorer.
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.
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.
Guest- Guest
Re: Hide/Show Profile in Messages
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.
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?
ankillien- Energetic
- Posts : 5198
Reputation : 129
Language : English, XHTML, CSS, JS, PHP, SQL
Re: Hide/Show Profile in Messages
Dion wrote:The innerText javascript property is only valid with Internet Explorer.
Say what???
Just try before you say without thinking :| I'm sure it work with FF, Chrome, Safari, Opera too
exterminator- Forumember
-
Posts : 106
Reputation : 4
Language : English, Japanese, Vietnamese, HTML, Javascript, C, C++, C#, VB.Net
Location : Hochiminh City - Vietnam
Re: Hide/Show Profile in Messages
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>
I did the same as per your suggestion , but there is a problem
after inserting the code

but when clicking on show profile , it does not show anything..

what could be the problem. need further assistance
mehmoodriaz123- Forumember
-
Posts : 98
Reputation : 0
Language : english
Location : in the heart of forumotions
Re: Hide/Show Profile in Messages
i tryed it!
it's ok!
it's ok!
Yakko!- Forumember
-
Posts : 661
Reputation : -5
Language : Italian, english, Français
Re: Hide/Show Profile in Messages
Maybe you missing somecode when copying. Just do it again clearly and slowly.
exterminator- Forumember
-
Posts : 106
Reputation : 4
Language : English, Japanese, Vietnamese, HTML, Javascript, C, C++, C#, VB.Net
Location : Hochiminh City - Vietnam
Re: Hide/Show Profile in Messages
it works but. it would look better with a javascript to scroll it when you view it
TGC HARDC0RE- Forumember
- Posts : 192
Reputation : 1
Language : english
Re: Hide/Show Profile in Messages
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.
http://stackoverflow.com/questions/1359469/innertext-works-in-ie-but-not-in-firefox
Guest- Guest
Re: Hide/Show Profile in Messages
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.

Guest- Guest
Re: Hide/Show Profile in Messages
exterminator wrote:Maybe you missing somecode when copying. Just do it again clearly and slowly.
sorry ! i have not done any mistake by copying this code and the code is properly replaced same as advised .. but as is said here that the code does not work with firefox, yes my default browser is firefox but i tried it on other pc with internet explorer , same problem nothing is shown..
is there any script which will work on all browsers..
thanks for further help in advance
mehmoodriaz123- Forumember
-
Posts : 98
Reputation : 0
Language : english
Location : in the heart of forumotions
Re: Hide/Show Profile in Messages
Just try my demo here : http://khoahoctunhien.2forum.biz/html-h55.htm
I've tested all browser, it's just fine at all.
I've tested all browser, it's just fine at all.
exterminator- Forumember
-
Posts : 106
Reputation : 4
Language : English, Japanese, Vietnamese, HTML, Javascript, C, C++, C#, VB.Net
Location : Hochiminh City - Vietnam
Re: Hide/Show Profile in Messages
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.
where is the code ...........................
mehmoodriaz123- Forumember
-
Posts : 98
Reputation : 0
Language : english
Location : in the heart of forumotions
Re: Hide/Show Profile in Messages
I used the same code. Just view source to see.
exterminator- Forumember
-
Posts : 106
Reputation : 4
Language : English, Japanese, Vietnamese, HTML, Javascript, C, C++, C#, VB.Net
Location : Hochiminh City - Vietnam
Re: Hide/Show Profile in Messages
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)


Darren1- Helper
-
Posts : 11853
Reputation : 566
Language : English
Re: Hide/Show Profile in Messages
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)
![]()
![]()
i felt it not so simple to achieve by this code what i want
mehmoodriaz123- Forumember
-
Posts : 98
Reputation : 0
Language : english
Location : in the heart of forumotions
Re: Hide/Show Profile in Messages
i can't do it"
where should i put the code?
where should i put the code?
Yakko!- Forumember
-
Posts : 661
Reputation : -5
Language : Italian, english, Français
Re: Hide/Show Profile in Messages
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
TGC HARDC0RE- Forumember
- Posts : 192
Reputation : 1
Language : english
Re: Hide/Show Profile in Messages
TGC, Yakko has phpbb3, he can't edit templates!
The tutorial for all versions (with simple scripts!) will work!
https://help.forumotion.com/script-code-problems-f43/hide-show-profile-in-messages-t79110.htm#511176
The tutorial for all versions (with simple scripts!) will work!
https://help.forumotion.com/script-code-problems-f43/hide-show-profile-in-messages-t79110.htm#511176
Darren1- Helper
-
Posts : 11853
Reputation : 566
Language : English
Re: Hide/Show Profile in Messages
OK, if it didn't work, try to replace with these code :
I've tested with all browser, it's OK.
Here the demo : http://khoahoctunhien.2forum.biz/html-h57.htm
P/s : not for phpbb3
- 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>
I've tested with all browser, it's OK.
Here the demo : http://khoahoctunhien.2forum.biz/html-h57.htm
P/s : not for phpbb3
exterminator- Forumember
-
Posts : 106
Reputation : 4
Language : English, Japanese, Vietnamese, HTML, Javascript, C, C++, C#, VB.Net
Location : Hochiminh City - Vietnam
Re: Hide/Show Profile in Messages
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?
Yakko!- Forumember
-
Posts : 661
Reputation : -5
Language : Italian, english, Français
Re: Hide/Show Profile in Messages
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?
When you in viewtopic_body, try to find these code :
- Code:
<!-- BEGIN profile_field -->
{postrow.displayed.profile_field.LABEL} {postrow.displayed.profile_field.CONTENT}{postrow.displayed.profile_field.SEPARATOR}
<!-- END profile_field -->
and replace with :
- 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>
exterminator- Forumember
-
Posts : 106
Reputation : 4
Language : English, Japanese, Vietnamese, HTML, Javascript, C, C++, C#, VB.Net
Location : Hochiminh City - Vietnam
thanks
Thanks exterminator this code works perfectly .. but two more questions are requested to solve please ..
1. how to get rid of the arrow before the button [ i have encircled it with red]

2. Can we have text instead of button ..
1. how to get rid of the arrow before the button [ i have encircled it with red]

2. Can we have text instead of button ..
mehmoodriaz123- Forumember
-
Posts : 98
Reputation : 0
Language : english
Location : in the heart of forumotions
Re: Hide/Show Profile in Messages
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.
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.
exterminator- Forumember
-
Posts : 106
Reputation : 4
Language : English, Japanese, Vietnamese, HTML, Javascript, C, C++, C#, VB.Net
Location : Hochiminh City - Vietnam
Re: Hide/Show Profile in Messages
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.
same code which you have shown here.. no other codes have been used
- 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>
mehmoodriaz123- Forumember
-
Posts : 98
Reputation : 0
Language : english
Location : in the heart of forumotions
Re: Hide/Show Profile in Messages
Check above these code again. Maybe it's about your code, not mine.
Or just post your viewtopic_body here.
Or just post your viewtopic_body here.
exterminator- Forumember
-
Posts : 106
Reputation : 4
Language : English, Japanese, Vietnamese, HTML, Javascript, C, C++, C#, VB.Net
Location : Hochiminh City - Vietnam
Page 1 of 2 • 1, 2

» Show hide profile
» How its Show / Hide Profile Like This
» Show/hide profile
» Show & Hide parts of profile
» Show/Hide Profile detail
» How its Show / Hide Profile Like This
» Show/hide profile
» Show & Hide parts of profile
» Show/Hide Profile detail
Page 1 of 2
Permissions in this forum:
You cannot reply to topics in this forum