1 yaeyae Aug 31, 2004 10:05
3 isaac Aug 31, 2004 19:08
You can do this now, but it's a bit freaky. Here's how.
1. In your skin's _main.php, near the top, add this:
<?php $more=1; ?>
(If that doesn't work, try it in the stub file or in index.php.)
2. In the skin's _main.php, where the content is called, do this:
<div class="bPost">
<?$Item->content( '#' , 1, '',
'<a id="opener' . $Item->ID . '" class="opener">Read More!</a> <div class="openclose" id="openclose' . #Item->ID . '">', '', '', 'htmlbody', 0, false); ?>
</div><!-- end of the "more" container div -->
</div><!-- end of the "bPost" div -->
Now, you've got XHTML like this:
<div class="bPost">Teaser Teaser Teaser Teaser Teaser Teaser
<a class="opener" id="opener123">Read More</a>
<div class="openclose" id="openclose123">More text More text More text More text More text More text More text More text More text More text More text More text
</div>
</div>
No matter whether "more" is set in the URL or not.
3. The fun part: JavaScript!
You've got to create or find a function that will loop through the elements on your page and add functions to show/hide the openclose DIVs whenever the corresponding A tag is clicked. (Basically, add an onClick event to the A elements, which finds and shows/hides the corresponding DIV by the ID. Contact me if you want my help creating such a function. I don't have time to do it, but I can help.)
When it comes to putting XHTML and JavaScript in the browser, there's very little that b2evo can't do!
4 champak Nov 06, 2005 23:47
I hope this will be an option in the settings rather than a standard. I personally prefer it going to the next page.
it is on the planning, there are others too who asked for it.
don't know when it will be released (even if it will be concluded in the next relase)
Our dev team is very short handed at the moment, so, if you can provide code, be our guest ! (and take contact with Fran?ois - fplanque)