Jedi Slayer Junior Member
Sith Lord Posts: 92 Status: Offline Joined:
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
Broken Posts: 415 Status: Offline Gender: Male Age: 37 Joined:
Additional Groups: Coding Team
pmYesh im sneaky! | 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 ? | |
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
Sith Lord Posts: 92 Status: Offline Joined:
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
Posts: 3,012 Status: Offline Gender: Male Location: vForums Age: 34 Joined:
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: - <script type="text/javascript">
-
- var rowVisible = true;
-
- function toggleDisplay(tbl) {
- var tblRows = tbl.rows;
- for (i = 0; i < tblRows.length; i++) {
- if (tblRows[i].className != "headerRow") {
- tblRows[i].style.display = (rowVisible) ? "none" : "";
- }
- }
- rowVisible = !rowVisible;
- }
-
- </script>
-
- <table id="theTable" align="center">
- <tr class="headerRow">
- <th class="title1" width=700></th>
- <tr>
- <td class=window2>
- -----CONTENT HERE-------
- </td>
- </tr>
- </table>
-
- <input type="button" value="Open/Close" onclick="toggleDisplay(document.getElementById('theTable'))" />
- </center>
-
I don't know much JS, but I do know this much. | |
|
Jedi Slayer Junior Member
Sith Lord Posts: 92 Status: Offline Joined:
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
Posts: 3,012 Status: Offline Gender: Male Location: vForums Age: 34 Joined:
pmwww | Re: Expand / Collapse Profile Options (23rd Apr 09 at 4:08am UTC) | | Are you using the default template? | |
|
Jedi Slayer Junior Member
Sith Lord Posts: 92 Status: Offline Joined:
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
Posts: 3,012 Status: Offline Gender: Male Location: vForums Age: 34 Joined:
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
Sith Lord Posts: 92 Status: Offline Joined:
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
Posts: 3,012 Status: Offline Gender: Male Location: vForums Age: 34 Joined:
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: - <center>
- <script type="text/javascript">
- var rowVisible = false;
- function toggleDisplay(tbl) {
- var tblRows = tbl.rows;
- for (i = 0; i < tblRows.length; i++) {
- if (tblRows.className != "headerRow") {
- tblRows.style.display = (rowVisible) ? "none" : "table-row";
- }
- }
- alert(tblRows.length);
- rowVisible = !rowVisible;
- }
- </script>
- <style type="text/css">
- table#theTable tr {
- display:none;
- }
- table#theTable tr.headerRow {
- display:table-row;
- }
- </style>
- <table id="theTable" border=1>
- <tr class="headerRow">
- <tr>
- <td>----CONTENT HERE----</td>
- </tr>
- </table>
- <input type="button" value="Open/Close" onclick="toggleDisplay(document.getElementById('theTable'))" />
- </center>
Now the code works, but a pop up shows up when clicking the button and shows a number 2 on it. This: And the code does not work in IE at all. | |
|
dog199200 Guest | Re: Expand / Collapse Profile Options (26th Apr 09 at 12:35am UTC) | | 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
Posts: 3,012 Status: Offline Gender: Male Location: vForums Age: 34 Joined:
pmwww | Re: Expand / Collapse Profile Options (26th Apr 09 at 4:12am UTC) | | 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. | |
|
dog199200 Guest | Re: Expand / Collapse Profile Options (26th Apr 09 at 4:59am UTC) | | dude you never asked 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
Broken Posts: 415 Status: Offline Gender: Male Age: 37 Joined:
Additional Groups: Coding Team
pmYesh im sneaky! | Re: Expand / Collapse Profile Options (26th Apr 09 at 10:18am UTC) | | ermmm why not just replace
Code: - {additional_info}
with
Code: - <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. | |
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
Sith Lord Posts: 92 Status: Offline Joined:
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 | |
|