1 spectrum Aug 22, 2006 01:40
3 cslepage Aug 25, 2006 02:29
What tells
<!--more-->
to appear as
=> Read more!
in 1.8?
4 stk Aug 25, 2006 04:26
cslepage,
Good question.
The answer lies in the function that EdB linked to. If you look at the [url=http://doc.b2evolution.net/HEAD/__filesource/fsource_evocore--__blogsincMODELitems_item.class.php.html#a813]/inc/MODEL/items/_item.class.php[/url] source file, starting on line 814, you'll find the "guts" of that function (where it's DEFINED).
Basically, you feed it the parameters [url=http://doc.b2evolution.net/HEAD/__filesource/fsource_evocore--__blogsincMODELitems_item.class.php.html#a814](lines 815-824)[/url] in your _main.php file, where the "content()" function (which is the function that displays a post) is called.
The function does a number of things, but one of them is searching the post content for the <!--more--> comment [url=http://doc.b2evolution.net/HEAD/__filesource/fsource_evocore--__blogsincMODELitems_item.class.php.html#a886](line 887)[/url]. Basically, what happens on that line is that IF <!--more--> is contained in the post, it "explodes" the post (separates it) into 2 halves.
The IF conditional statement on [url=http://doc.b2evolution.net/HEAD/__filesource/fsource_evocore--__blogsincMODELitems_item.class.php.html#a888](line 889)[/url] is used ONLY when there IS a <!--more--> comment and the $content_parts are greater than a value of 1.
The bits inside that conditional [url=http://doc.b2evolution.net/HEAD/__filesource/fsource_evocore--__blogsincMODELitems_item.class.php.html#a888](lines 889-919)[/url] do various things, depending on if the visitor has already clicked the more link (so it displays the 2nd half of the post, after the <!--more-->) ... whether the teaser is to be stripped or kept when displaying the 2nd half ... if more than one <!--more--> is used in a post (more than 2 halves) ... or [url=http://doc.b2evolution.net/HEAD/__filesource/fsource_evocore--__blogsincMODELitems_item.class.php.html#a911](lastly - lines 912-918)[/url] it spits out the <a> link that shows up looking like the (default) "=> Read More!" that you were asking about.
:D
Does this help?
5 topanga Aug 25, 2006 08:42
This is the end user documentation
http://manual.b2evolution.net/Change_the_read_more_icon
We realy can't make it more simple than that..
6 cslepage Aug 25, 2006 11:56
I thank you both. Strangely, after finding this thread, I searched the "docs" and could not find this article, but now there it is. Very helpful, and I appreciate your efforts.
Just to note, in my skin I use in 1.8.1-RC (www.comiclist.com), here is where I found the "content" line:
<div class="bItem_CS">
<?php
$Item->content();
link_pages("<br />Pages: ","<br />","number");
?>
</div>
It's the only place I could find it, and it's right above where the links and trackbacks would go, so I believe this is what I need to change.
EDIT: Actually, if I use any of the suggestions in the doc, my blog won't load at all. I will play with this more tonight.
7 nealo Oct 04, 2006 23:35
Hmmm ... none of these suggestions are working for me either. I'm getting this error:
Parse error: syntax error, unexpected ')' in /usr/local/4admin/apache/vhosts/autodogmatic.com/httpdocs/skins/090706/_main.php on line 145
I can't seem to figure out what's wrong, but I'm just copying and pasting from either the manual or the comments here
8 balupton Oct 05, 2006 02:30
Try the examples now.
Just for anyone who cares for why they wern't working before is that the wiki's formatting syntax was causing the code to display incorrectly, for wiki writers, wrap your code in PRE tags.
9 nealo Oct 05, 2006 03:07
Balupton - whatever you did worked like a charm. Thanks a bunch!
http://doc.b2evolution.net/HEAD/evocore/Item.html#methodcontent talks about the content() function, which you'll find used in your skin's _main.php file. You can feed it parameters to control how the 'read more' link is displayed. For example:
That would mean your visitor would see "foo" where the read more link shows up, then "bar" where they left off when they get the permalink page. I'm pretty sure you can use an image link where I used 'foo' above. Full URL for the image of course!