Jump to content

Spoiler Function in blog and BBcode thumbnail question


zenin

Recommended Posts

Hi. I would like to include a spoiler function in my blog and id like to know if there is any way to do it simple. I use MyBloggie from mywebland.com. And yes i tried to get help there but i never get any answer in the forums over there.

And i also would like to know if there is any way to make the bbcode thumbnails smaller. Thx in advance
Link to comment
Share on other sites

Could you specify what you mean for my first question? Iam an absolute newbie to php so you have to take it from the start :P i know that i have to have some knowledge in javascript also. To be perfectly clear on what i want: I want a bbcode [spoiler]hiddent text[/spoiler] like code. where you have to press on a Show test button so the hidden text gets visible.
Link to comment
Share on other sites

This is the code I use for my spoiler function on http://stlegacyalliance.com

[code]<div style="margin:20px; margin-top:5px"> <div class="smallfont" style="margin-bottom:2px"><b>Spoiler</b>: <input type="button" value="Show" style="width:45px;font-size:10px;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 class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;"> <div style="display: none;"> Earth is in the sol system. </div> </div> </div>[/code]
Link to comment
Share on other sites

Sorry redbullmarky but I wish to have a button that a visitor can press so the testarea expands and show the hidden text. I see that this has nothing to do with php but i thought that maybe i have to edit my bbcode file to make an spoiler function. And the bbcode is in php.

Thx smc...in wich file did you place this code?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.