Read More to image

Find help with FlatPress plugins, report a plugin bug, request or present new plugins.
Post Reply
dart
Posts: 26
Joined: Sun May 30, 2021 4:46 pm

Read More to image

Post by dart » Sat Nov 20, 2021 9:29 pm

I would like to change the [Read More...] output to an 'image png'.
Any advice before I make the attempt ?

I think this is where the change should go...

line 71 - readmore.php

Code: Select all

if (($q && $q->single) || isset($fp_params ['entry'])) {
		$string = str_replace('[more]', "<a id=\"readmore-{$fp_params['entry']}\"></a>", $string);

User avatar
Arvid
FlatPress Coder
Posts: 270
Joined: Sat Jan 26, 2019 7:40 pm
Contact:

Re: Read More to image

Post by Arvid » Sun Nov 28, 2021 12:50 pm

Hi,

to change the output to an image gerenally, simply edit line 39 of fp-plugins/readmore/plugin.readmore.php to this:

Code: Select all

$readmoreString = '<img src="path/to/your/image.png" title="' . $lang ['plugin'] ['readmore'] ['readmore'] . '" alt="' . $lang ['plugin'] ['readmore'] ['readmore'] . '" />';

The alt and title attribute hold the "read more" phrase in your selected language, so it is shown on mouseover (title) and if the image cannot be loaded (alt).

Be sure to backup the file before changing anything, so you can go back anytime if something goes wrong.

All the best,
Arvid

dart
Posts: 26
Joined: Sun May 30, 2021 4:46 pm

Re: Read More to image

Post by dart » Sun Nov 28, 2021 3:00 pm

Thanks Arvid ! :D
It gives the posts a whole new look.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest