Recent Topics

1 Dec 13, 2007 09:22    

hi i am intending to use the show/hide content plugin with the tictac_b skin.

i would like to hack it in a way, that the show/hide function starts only after line 5 or so of a post. That way readers can see the beginning of a long post and short posts are not hidden.
Hope my speak is clear enough :-/ :-/ .
how can i do that???
I am flash/actionscript programmer but not much of a php guy, so clear instructions would be greatly appreciated.
thanks a lot

cris

2 Dec 15, 2007 16:54

I haven't tried that plugin, but just skimming in my brain tells me what you want would be difficult to do. Here is the explanation (and hopefully bumping this up a bit will get others who CAN help to notice):

b2evolution treats the post content as a very specific part of a post. There are many aspects of a post, with the content being but one of them. I GUESS that the "show/hide" plugin allows you to show posts on demand. I GUESS that actually means "show or hide the post content" on demand. What you seek is to break into the actual post content and render only part of it before hiding the rest.

b2evolution has a method where part of a post is 'hidden', but it's not like you can expose parts when you are on a multi-post page. Using the "read more" (or !M button on your quick tags tool bar when posting) effectively hides part of the content when the visitor is on a multipost page. Clicking the "read more" link takes you to a single-post page where you get to see the entire post. With me so far? In order to enable a few lines of the post to show before "hiding" the rest requires that the post content be broken during server processing after the appropriate number of lines, then hiding the rest.

The problem I see is that what you seek is to break the post content AFTER creation into a portion that is always visible and a portion that is optionally visible. I have no doubt it can be done, but wow it would be tricky to pull off.

Is the basic "read more" feature not suitable for you? Do you absolutely need to have a feature after the fact?

BTW when I do a post with "read more" I normally write the entire post, then decide where I want my "read more" link to appear. This method does NOT allow for seeing the entire post on a multipost page, but I felt it appropriate to point out and ask about this option in reply to your question.

I hope it helps you. If it doesn't I hope someone is moved to provide what you seek. If it doesn't I hope the "read more" feature serves your needs enough that you don't feel 'let down' by what this software can do.

PS: flash is cool! I wish I knew how to do stuff with it :( I've seen some stuff done with flash that is amazingly cool. Sadly, I've no idea how ANY of it happens. But dig this: php is nothing more than a very simple logic structure. "if this then that" ya know? Flash can make sweet pr0n, so flash is way cooler than php!

3 Dec 17, 2007 15:41

EdB, couldn't he just do a ob_start, ob_get_contents, ob_end_clean, and with the contents, wrap the stuff after the 5th line (so after the 5th \n) with the appropriate css class or whatever, say in a div...

I will be updating this plugin with all my rest soon, so will look into this more then.


Form is loading...