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)
got a forum link? are you using any custom template for the miniprofile ?
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
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.
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.
Are you using the default template?
I have not made any changes to it, I have my template set with my skin.
Alright, I can set it up for you. Just give me some time.
Your awesome thank you very much for your assistance!
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.
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/use r/admin
you just need to click where it says Digimon Data to view the info
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/use r/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.
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
ermmm
why not just replace
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.
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
Dregond Rahl's might work, but I'm not for sure, but here is my code:
Mini-Profile Template Fragment:Code:
- <table width=130 id="border" class="border" cellpadding="1" cellspacing="1" border=0>
- <tbody>
- <tr>
- <th onclick="moo(this);" align="center" class="title1">*DATE AREA'S NAME HERE*</th>
- </tr>
- <tr class='mp_hide'>
- <td class="window1">
- {additional_info}
- </td>
- </tr>
- </tbody>
- </table>
With the part above, just find where it says "{additional_info}" in your Mini-Profile Template and replace it with the code above.
Global Footer Code Fragment:Code:
- <style>
- .mp_hide {
- display:none;
- }
- </style>
- <script>
- function moo(s){
- if(s.parentNode.nextSibling.className == 'mp_show'){
- s.parentNode.nextSibling.className = 'mp_hide' } else { s.parentNode.nextSibling.className = 'mp_show';
- }
- }
- </script>
And then to add the toggle effect, just copy the javascript fragment right above this and paste it anywhere within your global footer.
so I do not know if i did this right because it does not seem to be working, I put the code in my footer as is, deleted the additional profile option and added the code. T
This is what my mini profile looks like now
Edit: I thought I might have misunderstood and was suppose to delete everything after additional profile options, but that did not work either.
Code:
- <font size="2">
- <center>
- {display_name}
- <br />
- {rank}
- {if:warning}<br />{warning}{/if:warning}
- {if:custom_title}<br />{custom_title}<br />{/if:custom_title}
- </center>
- {if:avatar}<center><br />{avatar}</center>{/if:avatar}
- {if:personal_text}<center><br />{personal_text}</center>{/if:personal_text}
- <br />
- Posts: {posts}
- <br />
- {if:online}
- Status: <b>Online</b>
- {/if:online}
- {ifnot:online}
- Status: Offline
- {/ifnot:online}
- {if:gender}<br />Gender: {gender}{/if:gender}
- {if:location}<br />Location: {location}{/if:location}
- <br />
- Joined: {joined}
- <br />
- {if:contact}
- <br /><center>{contact}</center>
- {/if:contact}
- <table width=130 id="border" class="border" cellpadding="1" cellspacing="1" border=0>
- <tbody>
- <tr>
- <th onclick="moo(this);" align="center" class="title1">My Character Stats</th>
- </tr>
- <tr class='mp_hide'>
- <td class="window1">
- {additional_info}
- </td>
- </tr>
- </tbody>
- </table>
- <br />
- <table cellpadding="0" cellspacing="0">
- <tr>
- <td colspan="2"><font size="2">Reputation: {reputation} </font></td>
- </tr>
- <tr>
- <td rowspan="2">
- <div style="clear: both;">
- {foreach:reputation}
- <div style="height: 8px; width: 8px; background-color: #009900; float: left; margin: 3px;"></div>
- {/foreach:reputation}
- {foreach:negative_reputation}
- <div style="height: 8px; width: 8px; background-color: #CC0000; float: left; margin: 3px;"></div>
- {/foreach:negative_reputation}
- <br style="clear: both;">
- </div>
- </td>
- <td align="center"><font size="1">{reputation_give}</font></td>
- </tr>
- <tr>
- <td align="center"><font size="1">{reputation_take}</font></td>
- </tr>
- </table>
- </font>
http://swlounge.virtualforums.co.uk/action/view_profile/user /admin
well it seems to be working to me, but i also dont got a clue what it looke dliek before, but the dropdown works, just click the rpg stats image and it works