The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Hide/Show Profile in Messages

+5
Darren1
ankillien
exterminator
blindbat1457
mehmoodriaz123
9 posters

Page 1 of 2 1, 2  Next

Go down

Hide/Show Profile in Messages Empty Hide/Show Profile in Messages

Post by mehmoodriaz123 October 5th 2010, 4:19 am

what srcipt should we use for hide/show profile in messages .. like one here on one of the forumotion forum

Hide/Show Profile in Messages Prof10
avatar
mehmoodriaz123
Forumember

Male Posts : 98
Reputation : 0
Language : english
Location : in the heart of forumotions

Back to top Go down

Hide/Show Profile in Messages Empty Re: Hide/Show Profile in Messages

Post by blindbat1457 October 5th 2010, 10:10 pm

JS code. I can't give it out because it is Emilio's so ask him.
blindbat1457
blindbat1457
Forumember

Male Posts : 667
Reputation : 6
Language : English
Location : Santa Clarita, CA

Back to top Go down

Hide/Show Profile in Messages Empty Re: Hide/Show Profile in Messages

Post by mehmoodriaz123 October 6th 2010, 7:11 am

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
avatar
mehmoodriaz123
Forumember

Male Posts : 98
Reputation : 0
Language : english
Location : in the heart of forumotions

Back to top Go down

Hide/Show Profile in Messages Empty Re: Hide/Show Profile in Messages

Post by exterminator October 6th 2010, 7:57 am

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>
exterminator
exterminator
Forumember

Male Posts : 106
Reputation : 4
Language : English, Japanese, Vietnamese, HTML, Javascript, C, C++, C#, VB.Net
Location : Hochiminh City - Vietnam

Back to top Go down

Hide/Show Profile in Messages Empty Re: Hide/Show Profile in Messages

Post by Guest October 6th 2010, 8:31 am

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.
avatar
Guest
Guest


Back to top Go down

Hide/Show Profile in Messages Empty Re: Hide/Show Profile in Messages

Post by ankillien October 6th 2010, 8:37 am

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
ankillien
Energetic

Posts : 5198
Reputation : 129
Language : English, XHTML, CSS, JS, PHP, SQL

Back to top Go down

Hide/Show Profile in Messages Empty Re: Hide/Show Profile in Messages

Post by exterminator October 6th 2010, 10:41 am

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
exterminator
Forumember

Male Posts : 106
Reputation : 4
Language : English, Japanese, Vietnamese, HTML, Javascript, C, C++, C#, VB.Net
Location : Hochiminh City - Vietnam

Back to top Go down

Hide/Show Profile in Messages Empty Re: Hide/Show Profile in Messages

Post by Darren1 October 6th 2010, 10:59 am

Darren1
Darren1
Helper
Helper

Male Posts : 11853
Reputation : 566
Language : English

Back to top Go down

Hide/Show Profile in Messages Empty Re: Hide/Show Profile in Messages

Post by mehmoodriaz123 October 6th 2010, 4:40 pm

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
Hide/Show Profile in Messages 110

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

Hide/Show Profile in Messages 210


what could be the problem. need further assistance
avatar
mehmoodriaz123
Forumember

Male Posts : 98
Reputation : 0
Language : english
Location : in the heart of forumotions

Back to top Go down

Hide/Show Profile in Messages Empty Re: Hide/Show Profile in Messages

Post by Yakko! October 6th 2010, 4:52 pm

i tryed it!
it's ok!
Yakko!
Yakko!
Forumember

Male Posts : 661
Reputation : -5
Language : Italian, english, Français

Back to top Go down

Hide/Show Profile in Messages Empty Re: Hide/Show Profile in Messages

Post by exterminator October 6th 2010, 5:09 pm

Maybe you missing somecode when copying. Just do it again clearly and slowly.
exterminator
exterminator
Forumember

Male Posts : 106
Reputation : 4
Language : English, Japanese, Vietnamese, HTML, Javascript, C, C++, C#, VB.Net
Location : Hochiminh City - Vietnam

Back to top Go down

Hide/Show Profile in Messages Empty Re: Hide/Show Profile in Messages

Post by TGC HARDC0RE October 6th 2010, 5:34 pm

it works but. it would look better with a javascript to scroll it when you view it
TGC HARDC0RE
TGC HARDC0RE
Forumember

Posts : 192
Reputation : 1
Language : english

Back to top Go down

Hide/Show Profile in Messages Empty Re: Hide/Show Profile in Messages

Post by Guest October 6th 2010, 6:12 pm

exterminator wrote:
Dion wrote:The innerText javascript property is only valid with Internet Explorer.
Just try before you say without thinking :| I'm sure it work with FF, Chrome, Safari, Opera too
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.

http://stackoverflow.com/questions/1359469/innertext-works-in-ie-but-not-in-firefox
avatar
Guest
Guest


Back to top Go down

Hide/Show Profile in Messages Empty Re: Hide/Show Profile in Messages

Post by Guest October 6th 2010, 6:19 pm

ankillien wrote:
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?
That's all it would require. Other than the proper code. Very Happy
avatar
Guest
Guest


Back to top Go down

Hide/Show Profile in Messages Empty Re: Hide/Show Profile in Messages

Post by mehmoodriaz123 October 6th 2010, 6:31 pm

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
avatar
mehmoodriaz123
Forumember

Male Posts : 98
Reputation : 0
Language : english
Location : in the heart of forumotions

Back to top Go down

Hide/Show Profile in Messages Empty Re: Hide/Show Profile in Messages

Post by exterminator October 6th 2010, 7:11 pm

Just try my demo here : http://khoahoctunhien.2forum.biz/html-h55.htm

I've tested all browser, it's just fine at all.
exterminator
exterminator
Forumember

Male Posts : 106
Reputation : 4
Language : English, Japanese, Vietnamese, HTML, Javascript, C, C++, C#, VB.Net
Location : Hochiminh City - Vietnam

Back to top Go down

Hide/Show Profile in Messages Empty Re: Hide/Show Profile in Messages

Post by mehmoodriaz123 October 6th 2010, 7:22 pm

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 ...........................
avatar
mehmoodriaz123
Forumember

Male Posts : 98
Reputation : 0
Language : english
Location : in the heart of forumotions

Back to top Go down

Hide/Show Profile in Messages Empty Re: Hide/Show Profile in Messages

Post by exterminator October 6th 2010, 8:10 pm

I used the same code. Just view source to see.
exterminator
exterminator
Forumember

Male Posts : 106
Reputation : 4
Language : English, Japanese, Vietnamese, HTML, Javascript, C, C++, C#, VB.Net
Location : Hochiminh City - Vietnam

Back to top Go down

Hide/Show Profile in Messages Empty Re: Hide/Show Profile in Messages

Post by Darren1 October 7th 2010, 1:50 am




This is soooooooo much more simple, and is exactly how we have it here on the Englsih Support Forum (Same with French and Romanian)




Mr. Green Mr. Green
Darren1
Darren1
Helper
Helper

Male Posts : 11853
Reputation : 566
Language : English

Back to top Go down

Hide/Show Profile in Messages Empty Re: Hide/Show Profile in Messages

Post by mehmoodriaz123 October 7th 2010, 5:12 pm

Darren1 wrote:



This is soooooooo much more simple, and is exactly how we have it here on the Englsih Support Forum (Same with French and Romanian)




Mr. Green Mr. Green

i felt it not so simple to achieve by this code what i want
avatar
mehmoodriaz123
Forumember

Male Posts : 98
Reputation : 0
Language : english
Location : in the heart of forumotions

Back to top Go down

Hide/Show Profile in Messages Empty Re: Hide/Show Profile in Messages

Post by Yakko! October 7th 2010, 9:28 pm

i can't do it"
where should i put the code?
Yakko!
Yakko!
Forumember

Male Posts : 661
Reputation : -5
Language : Italian, english, Français

Back to top Go down

Hide/Show Profile in Messages Empty Re: Hide/Show Profile in Messages

Post by TGC HARDC0RE October 7th 2010, 11:41 pm

Yakko! wrote:i can't do it"
where should i put the code?
adminpanel >> display >> templates >> general >> view topic_body.


look here: https://help.forumotion.com/script-code-problems-f43/hide-show-profile-in-messages-t79110.htm#511176
TGC HARDC0RE
TGC HARDC0RE
Forumember

Posts : 192
Reputation : 1
Language : english

Back to top Go down

Hide/Show Profile in Messages Empty Re: Hide/Show Profile in Messages

Post by Darren1 October 8th 2010, 12:24 am

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
Darren1
Darren1
Helper
Helper

Male Posts : 11853
Reputation : 566
Language : English

Back to top Go down

Hide/Show Profile in Messages Empty Re: Hide/Show Profile in Messages

Post by exterminator October 8th 2010, 7:24 am

OK, if it didn't work, try to replace with these code :

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
exterminator
Forumember

Male Posts : 106
Reputation : 4
Language : English, Japanese, Vietnamese, HTML, Javascript, C, C++, C#, VB.Net
Location : Hochiminh City - Vietnam

Back to top Go down

Hide/Show Profile in Messages Empty Re: Hide/Show Profile in Messages

Post by Yakko! October 8th 2010, 2:03 pm

TGC HARDC0RE wrote:
Yakko! wrote:i can't do it"
where should i put the code?
adminpanel >> display >> templates >> general >> view topic_body.


look here: https://help.forumotion.com/script-code-problems-f43/hide-show-profile-in-messages-t79110.htm#511176

yes...
but after/before what?
Yakko!
Yakko!
Forumember

Male Posts : 661
Reputation : -5
Language : Italian, english, Français

Back to top Go down

Hide/Show Profile in Messages Empty Re: Hide/Show Profile in Messages

Post by exterminator October 8th 2010, 2:34 pm

Yakko! wrote:
TGC HARDC0RE wrote:
Yakko! wrote:i can't do it"
where should i put the code?
adminpanel >> display >> templates >> general >> view topic_body.


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
exterminator
Forumember

Male Posts : 106
Reputation : 4
Language : English, Japanese, Vietnamese, HTML, Javascript, C, C++, C#, VB.Net
Location : Hochiminh City - Vietnam

Back to top Go down

Hide/Show Profile in Messages Empty thanks

Post by mehmoodriaz123 October 8th 2010, 3:59 pm

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]

Hide/Show Profile in Messages Show10


2. Can we have text instead of button ..
avatar
mehmoodriaz123
Forumember

Male Posts : 98
Reputation : 0
Language : english
Location : in the heart of forumotions

Back to top Go down

Hide/Show Profile in Messages Empty Re: Hide/Show Profile in Messages

Post by exterminator October 8th 2010, 7:36 pm

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.
exterminator
exterminator
Forumember

Male Posts : 106
Reputation : 4
Language : English, Japanese, Vietnamese, HTML, Javascript, C, C++, C#, VB.Net
Location : Hochiminh City - Vietnam

Back to top Go down

Hide/Show Profile in Messages Empty Re: Hide/Show Profile in Messages

Post by mehmoodriaz123 October 9th 2010, 4:16 am

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>
avatar
mehmoodriaz123
Forumember

Male Posts : 98
Reputation : 0
Language : english
Location : in the heart of forumotions

Back to top Go down

Hide/Show Profile in Messages Empty Re: Hide/Show Profile in Messages

Post by exterminator October 9th 2010, 5:16 am

Check above these code again. Maybe it's about your code, not mine.

Or just post your viewtopic_body here.
exterminator
exterminator
Forumember

Male Posts : 106
Reputation : 4
Language : English, Japanese, Vietnamese, HTML, Javascript, C, C++, C#, VB.Net
Location : Hochiminh City - Vietnam

Back to top Go down

Page 1 of 2 1, 2  Next

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum