Hide/Show Profile in Messages Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

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.
+5
Darren1
ankillien
exterminator
blindbat1457
mehmoodriaz123
9 posters

    Hide/Show Profile in Messages

    avatar
    mehmoodriaz123
    Forumember


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

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


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

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


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

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


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

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


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


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

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


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

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


    Male Posts : 11853
    Reputation : 566
    Language : English

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

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

    avatar
    mehmoodriaz123
    Forumember


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

    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
    Yakko!
    Yakko!
    Forumember


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

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


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

    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.
    TGC HARDC0RE
    TGC HARDC0RE
    Forumember


    Posts : 192
    Reputation : 1
    Language : english

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


    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


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


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

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


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

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


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

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


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

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


    Male Posts : 11853
    Reputation : 566
    Language : English

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


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

    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
    Yakko!
    Yakko!
    Forumember


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

    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?
    TGC HARDC0RE
    TGC HARDC0RE
    Forumember


    Posts : 192
    Reputation : 1
    Language : english

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


    Male Posts : 11853
    Reputation : 566
    Language : English

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


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

    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
    Yakko!
    Yakko!
    Forumember


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

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


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

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


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

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


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

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


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

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


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

    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.