Page 1 of 1

See More Text

Posted: 10 Jul 2010, 21:49
by Jaymie1989
Hey All,

Im after a BBCode that when a long piece of text is written it will hide some of the text and have a text like See more to read the rest of what is written.

Im not to sure how to explain it.

Example:

blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah (see more)<Is a link to see the rest.

So something like a script for it.

Re: See More Text

Posted: 11 Jul 2010, 09:08
by KukY13
I'll do it.
I'll post again when I write the code.

Re: See More Text

Posted: 11 Jul 2010, 14:09
by KukY13
Almost forgot on this one...
This should do the job:

Code: Select all

[shorten]{TEXT}[/shorten]

Code: Select all

<script type="text/javascript">
var t="{TEXT}"
var ts=t.substring(0,25)+'...'
document.write('<div>'+ts+'<a href="" onmousedown="this.parentNode.innerHTML=t">Show</a></div>')
</script>

Re: See More Text

Posted: 11 Jul 2010, 14:23
by Steve
Doesnt work displays no text at all in the post when you use the [shorten][/shorten] bbcode tags.Needs some work ;)

Re: See More Text

Posted: 11 Jul 2010, 14:32
by KukY13
It works for me like it should be...
It should display at least some text.
I'm now working on making able multiple tags in a single post...

Re: See More Text

Posted: 11 Jul 2010, 20:47
by Steve
Demo?

Re: See More Text

Posted: 11 Jul 2010, 20:56
by KukY13
Coming!!!
Really, I just tested it as pure HTML, not as BBCode... :oops:

Re: See More Text

Posted: 11 Jul 2010, 21:01
by KukY13
Here:http://kuky.99k.org/forums/viewtopic.ph ... 94#testing
It works! Only for single use... :roll:
Also a BBCode of mine I'll post here...

Re: See More Text

Posted: 11 Jul 2010, 21:45
by Steve
............ and the new bbcode for show more text?

Re: See More Text

Posted: 11 Jul 2010, 21:56
by KukY13
Steve© » 11 Jul 2010, 21:45 wrote:............ and the new bbcode for show more text?
It is there.

I give up on version that can be used multiple times in a same page... :coffee: