vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Code Requests & Support :: Expand / Collapse Profile Options - View Topic (Page 1 of 2)Page: 1 2
Topic Rating: *****
Printable View
Jedi Slayer
Junior Member
**

[Avatar]
Sith Lord

Posts: 92
Status: Offline
Joined:  
Reputation: 0%  


pmwwwyahoo
Expand / Collapse Profile Options (21st Apr 09 at 2:17pm UTC)
Resolved
Since our site is RPG based we have alot of stats added into the mini profile, that makes each post really long due to all the information there.  Is it possible to code so that it would collapsed and clickable to open if someone wanted to look at it. (or even a rollover)
Dreg[Bot]
Moderator
*****

[Avatar]
Broken

Posts: 415
Status: Offline
Gender: Male
Age: 37
Joined:  

Additional Groups:
Coding Team
***


Reputation: 14%  


pm
Re: Expand / Collapse Profile Options (21st Apr 09 at 2:21pm UTC)
got a forum link? are you using any custom template for the miniprofile ?


Image

Now obsession rules my mind
This commotion makes me blind
Searching out who ever runs
Or has stolen away my life

But i've already said

Don't ever back down
Don't ever turn around
My end has come
So now I come for you....

Jedi Slayer
Junior Member
**

[Avatar]
Sith Lord

Posts: 92
Status: Offline
Joined:  
Reputation: 0%  


pmwwwyahoo
Re: Expand / Collapse Profile Options (21st Apr 09 at 2:36pm UTC)
Sorry about that

http://swlounge.virtualforums.co.uk/

Not currently using any mini profile hacks, just using the additional profile options, the are curently 18 editable fields but only becasue I have not populated them all which cold end up being as many as  30-35
Nick
Very Senior Member
*****

[Avatar]

Posts: 3,012
Status: Offline
Gender: Male
Location: vForums
Age: 34
Joined:  
Reputation: 62%  


pmwww
Re: Expand / Collapse Profile Options (21st Apr 09 at 5:06pm UTC)
If you want it to stay closed then someone is going to have to edit my code:


Code:
 
  1. <script type="text/javascript">
  2.  
  3. var rowVisible = true;
  4.  
  5. function toggleDisplay(tbl) {
  6. var tblRows = tbl.rows;
  7. for (i = 0; i < tblRows.length; i++) {
  8. if (tblRows[i].className != "headerRow") {
  9. tblRows[i].style.display = (rowVisible) ? "none" : "";
  10. }
  11. }
  12. rowVisible = !rowVisible;
  13. }
  14.  
  15. </script>
  16.  
  17. <table id="theTable"  align="center">
  18. <tr class="headerRow">
  19. <th class="title1" width=700></th>  
  20. <tr>
  21. <td class=window2>
  22. -----CONTENT HERE-------
  23. </td>
  24. </tr>
  25. </table>
  26.  
  27. <input type="button" value="Open/Close" onclick="toggleDisplay(document.getElementById('theTable'))" />
  28. </center>
  29.  
 


I don't know much JS, but I do know this much.
Jedi Slayer
Junior Member
**

[Avatar]
Sith Lord

Posts: 92
Status: Offline
Joined:  
Reputation: 0%  


pmwwwyahoo
Re: Expand / Collapse Profile Options (21st Apr 09 at 10:00pm UTC)
does that go in my forum template area, how can i capture just the addtioanl profile options, I looked ofr that but did not see it.
Nick
Very Senior Member
*****

[Avatar]

Posts: 3,012
Status: Offline
Gender: Male
Location: vForums
Age: 34
Joined:  
Reputation: 62%  


pmwww
Re: Expand / Collapse Profile Options (23rd Apr 09 at 4:08am UTC)
Are you using the default template?
Jedi Slayer
Junior Member
**

[Avatar]
Sith Lord

Posts: 92
Status: Offline
Joined:  
Reputation: 0%  


pmwwwyahoo
Re: Expand / Collapse Profile Options (24th Apr 09 at 3:09pm UTC)
I have not made any changes to it, I have my template set with my skin.
Nick
Very Senior Member
*****

[Avatar]

Posts: 3,012
Status: Offline
Gender: Male
Location: vForums
Age: 34
Joined:  
Reputation: 62%  


pmwww
Re: Expand / Collapse Profile Options (24th Apr 09 at 4:29pm UTC)
Alright, I can set it up for you. Just give me some time.
Jedi Slayer
Junior Member
**

[Avatar]
Sith Lord

Posts: 92
Status: Offline
Joined:  
Reputation: 0%  


pmwwwyahoo
Re: Expand / Collapse Profile Options (24th Apr 09 at 4:50pm UTC)
Your awesome thank you very much for your assistance!
Nick
Very Senior Member
*****

[Avatar]

Posts: 3,012
Status: Offline
Gender: Male
Location: vForums
Age: 34
Joined:  
Reputation: 62%  


pmwww
Re: Expand / Collapse Profile Options (24th Apr 09 at 4:51pm UTC)
Your welcome. I have actually gotten it, but I am having a bit of trouble with it in FireFox 3.0.9 at the moment, not sure about IE yet.

edit:

I have tested it in IE7 and it does not work at all. I will have to get help on this.\

edit 2:

If anyone want's to help me out with this, they are more than welcome to!

Code:
 
  1. <center>
  2. <script type="text/javascript">
  3. var rowVisible = false;
  4. function toggleDisplay(tbl) {
  5. var tblRows = tbl.rows;
  6. for (i = 0; i < tblRows.length; i++) {
  7. if (tblRows.className != "headerRow") {
  8. tblRows.style.display = (rowVisible) ? "none" : "table-row";
  9. }
  10. }
  11. alert(tblRows.length);
  12. rowVisible = !rowVisible;
  13. }
  14. </script>
  15. <style type="text/css">
  16. table#theTable tr {
  17. display:none;
  18. }
  19. table#theTable tr.headerRow {
  20. display:table-row;
  21. }
  22. </style>
  23. <table id="theTable" border=1>
  24. <tr class="headerRow">
  25. <tr>
  26. <td>----CONTENT HERE----</td>
  27. </tr>
  28. </table>
  29. <input type="button" value="Open/Close" onclick="toggleDisplay(document.getElementById('theTable'))" />
  30. </center>
 




Now the code works, but a pop up shows up when clicking the button and shows a number 2 on it.

This:
Image

And the code does not work in IE at all.
dog199200
Guest
Re: Expand / Collapse Profile Options (26th Apr 09 at 12:35am UTC)
{Tongue Out} if that one doesn't work then i have a perfectly working one you can use, but you have to edit the mini-profile template and add something to the global header of your forum

to see it in action here: http://digimondynamics.vforums.co.uk/action/view_profile/user/admin

you just need to click where it says Digimon Data to view the info
Nick
Very Senior Member
*****

[Avatar]

Posts: 3,012
Status: Offline
Gender: Male
Location: vForums
Age: 34
Joined:  
Reputation: 62%  


pmwww
Re: Expand / Collapse Profile Options (26th Apr 09 at 4:12am UTC)
Posted By dog199200 on 26th Apr 09 at 12:35am
 
{Tongue Out} if that one doesn't work then i have a perfectly working one you can use, but you have to edit the mini-profile template and add something to the global header of your forum

to see it in action here: http://digimondynamics.vforums.co.uk/action/view_profile/user/admin

you just need to click where it says Digimon Data to view the info

Well you should have told me about that. >_> lol.

I may know of a source that can help me with this. They helped me out before, with a code, and I am sure they can help me out with this. {Tongue Out}
dog199200
Guest
Re: Expand / Collapse Profile Options (26th Apr 09 at 4:59am UTC)
dude you never asked {Tongue Out} i was just waiting for the right time to tell you i already have a drop down code, if you want we can talk more baout it in a Pm, mean while we don't need to high jack this thread
Dreg[Bot]
Moderator
*****

[Avatar]
Broken

Posts: 415
Status: Offline
Gender: Male
Age: 37
Joined:  

Additional Groups:
Coding Team
***


Reputation: 14%  


pm
Re: Expand / Collapse Profile Options (26th Apr 09 at 10:18am UTC)
ermmm

why not just replace

Code:
 
  1. {additional_info}  
 






with

Code:
 
  1. <div style="height:15px;overflow-y:auto;" onclick="this.style.cssText=''"><a>View +</a><br/>{additional_info}</div>
 


im sure similar could be done using classnames for show/hide.


Image

Now obsession rules my mind
This commotion makes me blind
Searching out who ever runs
Or has stolen away my life

But i've already said

Don't ever back down
Don't ever turn around
My end has come
So now I come for you....

Jedi Slayer
Junior Member
**

[Avatar]
Sith Lord

Posts: 92
Status: Offline
Joined:  
Reputation: 0%  


pmwwwyahoo
Re: Expand / Collapse Profile Options (26th Apr 09 at 10:30pm UTC)
So what I want to do is what you have going on on the Digimon site there, since mine tends to be very long, so if one of the codes would work I would appreciate it.

Thanks
 Printable View
Page: 1 2

All times are GMT+0 :: The current time is 2:26pm
Page generated in 0.5765 seconds
This Forum is Powered By vForums (v2.4)
Create a Forum for Free | Find Forums