Recent Topics

1 Mar 09, 2005 00:39    

I don't want to get rid of the "Read More" arrow (or if I did, I already know how) so I don't want to be told "Use the *&@$%^ Search!" for that simple solution. I have a little more complex (at least I think it is) problem.

I've embedded my blog inside of my main index page, and I've tweaked it enough that it looks pretty decent at the moment. I've figured out how to import the old CSS styles that I needed and have one big CSS file. My problem is that I don't want a Link outline around the "Read More" arrow.

The output, after the PHP has already done it's thing, is the following:

<p class="bMore"><a href="http://lexnaturalis.net/index.php/2005/03/07/p36#more36">

I want it to say

<p class="bMore"><a href="http://lexnaturalis.net/index.php/2005/03/07/p36#more36" class="whatever">

I found _functions_bposts.php and thought that file had what I wanted, but I couldn't find how to edit the actual output. If anyone could help me (or tell me that it's impossible) I'd appreciate it. It's probably something silly that I just overlooked, but I thought I'd drop a line here and see if anyone else knew before I looked at all the PHP files one at a time.

3 Mar 09, 2005 00:59

I have already read that specific thread. I need to know where the actual definition of the $Item->Content() function is because I want to modify the actual output of the script. The entire <a href=...> section is hardcoded somewhere and I can't find where to change that. I can change the stuff between the <a href=...> and </a> tags, but not what's in the actual <a href=...> tag.

4 Mar 09, 2005 01:15

I found, in _functions_bposts.php the following code:

if ($dispmore)
		{	// Viewer has already asked for more
			if( !empty($more_anchor) ) $output .= $before_more_link;
			$output .= '<a id="more'.$id.'" name="more'.$id.'"></a>'.$more_anchor;
			if( !empty($more_anchor) ) $output .= $after_more_link;
			$output .= $content[1];
		}
		else
		{ // We are offering to read more
			$more_link = gen_permalink( $file, $id, 'id', 'single', 1 );
			$output .= $before_more_link.'<a href="'.$more_link.'#more'.$id.'">'.$more_link_text.'</a>'.$after_more_link;
		}

I thought if I replaced

$output .= $before_more_link.'<a href="'.$more_link.'#more'.$id.'">'.$more_link_text.'</a>'.$after_more_link;

with something like this

$output .= $before_more_link.'<a href="'.$more_link.'#more'.$id.'".'class="whatever"'>'.$more_link_text.'</a>'.$after_more_link;

that it would output what I wanted, but it didn't do anything. I could have just made a PHP error, or I could be barking up the wrong tree. At any rate, help is still needed.

5 Mar 09, 2005 02:20

I found it. It seems _class_item.php overrides the other file. At any rate, for those that want to know how to change the code, I replaced

	{ // We are offering to read more
				$output = $content_parts[0];
				$output .= $before_more .
'<a href="'.$this->gen_permalink( 'pid', $more_file ).'#more'.$this->ID.'">'.$more_link_text.'</a>' .$after_more;
			}

with this

{ // We are offering to read more
				$output = $content_parts[0];
				$output .= $before_more .'<a href="'.$this->gen_permalink( 'pid', $more_file ).'#more'.$this->ID.'" class="more"'.'">'.$more_link_text.'</a>' .$after_more;
}

and it worked fine.

6 Mar 09, 2005 02:41

Doesn't matter if you like hearing about search or not, SEARCH a little bit! Like, maybe start with the user manual. http://b2evolution.net/man/2005/02/25/how_to_get_rid_of_the_gread_more covers altering the content function via your skin instead of hacking, which has has a noticably lower probability of surviving upgrades than your skin does.

Search is your friend. The User Manual is your best friend.

7 Mar 09, 2005 02:46

Well, at the time I did not believe that to help me. I later found out that the error was actually in my CSS. The manual wasn't going to help me with what I thought I needed to do, because I read about the function and couldn't figure out how to add a class to the link itself without hacking the code. Too bad I forgot it was already contained within a class that I could use.

8 May 06, 2005 01:23

Is there a way to put the permalink behind the "read more" link because of the nicer url?

9 Mar 29, 2006 03:58

Is there a way to get rid of the paragraph that the Read More automatically creates? I tried deleting the code the following in _class_item.php but with no success.

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

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


Form is loading...