Recent Topics

1 Aug 14, 2007 02:01    

My b2evolution Version: 1.9.x

Is there a way to change the placement and words for the "Read More" in the post section?

For example, rather than this:

bottles have other obvious advantages – it is a lighter weight container, which makes it easy to transport and no more worries about bottle breakage.

[u]Read More![/u] (which is centered in the post)

I want this:

bottles have other obvious advantages – it is a lighter weight container, which makes it easy to transport and no more worries about bottle breakage. [u]Read the full story here. [/u]

2 Aug 14, 2007 02:48

In the file /inc/MODEL/items/_item.class.php find, at approx line 1146 the following:


		if( $more_link_text == '#' )
		{ // TRANS: this is the default text for the extended post "more" link
			$more_link_text = T_('Read more!').' »';
		}

		if( $more_anchor == '#' )
		{ // TRANS: this is the default text displayed once the more link has been activated
			$more_anchor = '['.T_('More:').']';
		}

		if( $before_more == '#' )
			$before_more = '<p class="bMore">';

		if( $after_more == '#' )
			$after_more = '</p>';

and change the P's to spans... That will keep bMore 'inline' instead of 'block' and will still allow you to add a style to it if you want... I think you'll need to make sure that you add the !M link on the same line as the text you want it to follow to prevent auto-P (if you use it) from forcing it into a new paragraph. You can change the "Read More" to be whatever you want in the top line...

jj.

3 Aug 14, 2007 03:34

thanks jibberjab! I got it to work - well almost. I changed the P's to spans, and I've added the !M link on the same line where I want it to display but its still forcing it into a new paragraph.

Also, if I want to make the font smaller, I assume I can find this in the skin style.css? If so what's the name of the definition?

Thanks for your help.

4 Aug 14, 2007 03:53

Ok, wait, you changed these:


      if( $before_more == '#' )
         $before_more = '<p class="bMore">';

      if( $after_more == '#' )
         $after_more = '</p>';

to:


      if( $before_more == '#' )
         $before_more = '<span class="bMore">';

      if( $after_more == '#' )
         $after_more = '</span>';

and it's still putting them in a P tag?

To answer your second question, you're looking for the style that looks like so...

.bMore { styles listed here.... }

jj.

5 Aug 14, 2007 04:21

jibberjab wrote:

Ok, wait, you changed these:


      if( $before_more == '#' )
         $before_more = '<p class="bMore">';

      if( $after_more == '#' )
         $after_more = '</p>';

to:


      if( $before_more == '#' )
         $before_more = '<span class="bMore">';

      if( $after_more == '#' )
         $after_more = '</span>';

and it's still putting them in a P tag?

To answer your second question, you're looking for the style that looks like so...

.bMore { styles listed here.... }

jj.

Yup, my code looks exactly like yours:

		if( $before_more == '#' )
			$before_more = '<span class="bMore">';

		if( $after_more == '#' )
			$after_more = '</span>';

The post contents look like this:
it is a lighter weight container, which makes it easy to transport and no more worries about bottle breakage <!--more-->

yet, the post looks like this:

it is a lighter weight container, which makes it easy to transport and no more worries about bottle breakage

=> continue reading

...found the BMore class, thanks.

6 Aug 14, 2007 07:21

its still forcing a P tag...

so rather than continuing the <More!> tag on the same line, it places it in a new paragraph below the post :(

7 Aug 14, 2007 08:29

You shouldn't need to hack the item class, you can do this from your skins _main.php

			<?php $Item->content( '#', '#', '#', '#', '<span class="foo">', '</span>' ); ?>

¥

8 Aug 15, 2007 03:39

for some reason, its still dropping the "Read More" to a new paragraph. AHH!! WTF?

9 Feb 21, 2008 19:50

try whith it:

if( $before_more == '#' )
	$before_more = '<em>';
				
if( $after_more == '#' )
	$after_more = '</em><br><br>';

10 Feb 21, 2008 20:05

Try switching "auto p" off in the text renderers list beside the posting box.

11 Nov 22, 2008 06:45

removing the Auto P does solve the issue but introduces others.

Are there any new ways for 2.4.5 to handle the single line for the bMore text line?

I'm working on a new skin and the bmore is making me a bit crazy especially since I don't what I'll break by removing the "Auto P"


Form is loading...