Page 1 of 1

Related Links Plugin

Posted: Tue Nov 30, 2010 9:00 am
by danst0
Hi,

I am using the related links plugin, now I wanted to adapt the style of the printout to my layout template (change the headline from h4 to em).
There is a plugin_relatedlinks.tpl file provided to make those changes, but the changes do not have an effect on the output. No matter where I place the file (leave it in the plugin or copy it to my template folder).

Am I doing something wrong?

Daniel

Re: Related Links Plugin

Posted: Tue Nov 30, 2010 12:50 pm
by yellowled
danst0 wrote:(change the headline from h4 to em)
If you want to adapt the style, change the style of that particular h4 using CSS. Changing the markup from an h4 to an em neither makes sense nor is it accessible or good for your search engine ranking.

YL

Re: Related Links Plugin

Posted: Tue Nov 30, 2010 2:41 pm
by danst0
Ok, thanks! Accessing it via CSS works (why shouldn't it).
But isn't it logically wrong to have the headline in this plugin as an h4. Since the headline of the entry is already h4 everything below it should be h5, ...?

edit: I now played around with it and I still want to change the headline from "Related Links:" to "Related".
According to the tpl for the plugin this string is pulled from the language file (tpl: $plugin_relatedentries_html_intro -> php: 'plugin_relatedentries_html_intro' => PLUGIN_EVENT_RELATEDLINKS_LIST)
But... No matter where I change it directly in the tpl of the plugin or in the language file, nothing happens! Is there a serendipity cache I did not consider?

Daniel

Re: Related Links Plugin

Posted: Tue Nov 30, 2010 4:21 pm
by yellowled
danst0 wrote:But isn't it logically wrong to have the headline in this plugin as an h4. Since the headline of the entry is already h4 everything below it should be h5, ...?
It is not always that easy to have a correct heading hierachy in a Blog/CMS environment, especially if you consider that people use different templates. (Although you're probably right technically.) For example: entry titles usually are an h4 in S9y -- in my blog, they're an h1. :)
danst0 wrote:But... No matter where I change it directly in the tpl of the plugin or in the language file, nothing happens! Is there a serendipity cache I did not consider?
Try deleting the .tpl.php files in templates_c/. However, you are aware that these changes will be overwritten in case the plugin is updated, right?

YL

Re: Related Links Plugin

Posted: Wed Dec 01, 2010 7:03 am
by danst0
It still does not work, even with the template_c files deleted.
Ok, here is how the plugin (seems to) read(s) the file:

Code: Select all

$tfile = serendipity_getTemplateFile('plugin_relatedlinks.tpl', 'serendipityPath');
                    if (!$tfile) {
                        $tfile = dirname(__FILE__) . '/plugin_relatedlinks.tpl';
                    }
And this is how the file plugin_relatedlinks.tpl (in the plugins directory) looks right now:

Code: Select all

<h6 class="serendipity_relatedlinks serendipity_title">{$plugin_relatedentries_html_intro}:</h6>
<div class="serendipity_entry serendipity_relatedlinks">
    <ul id="serendipity_relatedlinks_list">
    {foreach from=$plugin_relatedentries_links item="links"}
    	<li><a href="{$links.url}" title="{$links.title}">{$links.title}</a></li>
    {/foreach}
    </ul>
</div>
But in my page source I still get:

Code: Select all

<h4> class="serendipity_relatedlinks serendipity_title">Related Links</h4>
<div class="serendipity_entry serendipity_relatedlinks">
    <ul id="serendipity_relatedlinks_list">
        	<li>...
How is that even possible? I searched my whole ftp directory and did not find any other file called plugin_relatedlinks.tpl, the text also does not seem to be created on the fly. I just checked, the plugin also works when I just rename the plugin_relatedlinks.tpl file

Browser caches are off as well.

Re: Related Links Plugin

Posted: Wed Dec 01, 2010 11:48 am
by yellowled
danst0 wrote:And this is how the file plugin_relatedlinks.tpl (in the plugins directory)
You can put a copy of that file into your template directory and edit this copy to your liking. That way, it won't be overwritten in case of an update to the plugin or S9y.

YL

Re: Related Links Plugin

Posted: Fri Dec 03, 2010 6:03 pm
by danst0