Page 1 of 1

Links Related To Category

Posted: Sun Aug 05, 2007 1:11 pm
by Lothar
I want to add links to another site for each category.

When one or more entries of the same category are displayed this link (with some explainig text) should be displayed ahead the entries (like the related tags cloud).

When entries of different categories are displayed then the "category related link" should be displayed ahead an entry, if the previous entry is related to another category.
(I hope understand what I mean.)

I tried the relatedlinks plugin. But this deals with links related to entries. These I can use too for another purpose.

By the way: which wiki system (based on PHP) do you suggest?

Re: Links Related To Category

Posted: Mon Aug 06, 2007 10:36 am
by garvinhicking
Hi!

For that you must use custom smarty syntax in your entries.tpl file.

You need to check the $category_info array for which category you currently have selected, and then add custom HTML to the file to link to other sites.

There is no plugin for this, because I wouldn't know how you would "connect" categories to other sites, and this is more a template thing than a plugin thing.
By the way: which wiki system (based on PHP) do you suggest?
Actually I can't recommend any. I dislike mediaWiki because of its "non-ease-of-use", and I can't recommend our coWiki because it's not developed any more.

Regards,
GArvin

Posted: Mon Aug 06, 2007 11:55 am
by Lothar
Till now I am not familiar with smarty syntax. Could you please help me with some code?

May be I should explain in more detail what I want.
My categories represent modules of an application. This application as an extra homepage http://www.TelMarkt.de/. When somebody clicks on a category a link to the site on this homepage should be displayed. E.g. clicking on category "Reiseplanung" the link text "To see all the functions of this module click here" will forward (in a new tab/window) to http://www.telmarkt.de/reiseplanung/reiseplanung.html

I think this could be an extension to the realted tags plugin. In the configuration you need the decision between category related and entry related and you need input for the text. And in entries.tpl it should be an addition if / then / else.
However, I am not in the position to give you tipps.
Actually I can't recommend any. I dislike mediaWiki because of its "non-ease-of-use", and I can't recommend our coWiki because it's not developed any more.
What do you think about phpWiki?

Posted: Mon Aug 06, 2007 12:12 pm
by garvinhicking
Hi!
Lothar wrote:Till now I am not familiar with smarty syntax. Could you please help me with some code?
General Smarty documentation is availabe at http://smarty.php.net/.

Something like this in your index.tpl template at the desired place:

Code: Select all

{if $category_info.categoryid == 1}
<div>Beschreibung von Kategorie 1</div>
{elseif $category_info.categoryid == 2}
<div>Beschreibung von Kategorie 2</div>
{elseif $category_info.categoryid == 3}
<div>Beschreibung von Kategorie 3</div>
Alternativel you can display what you entered in the description of your category:

Code: Select all

<div>{$category_info.category_description}</div>
I think this could be an extension to the realted tags plugin.
Not really, it would be something completely different, both technically and semantically. I don't see how these two functions could be combined.
What do you think about phpWiki?
Sorry, never used/tried that one :(

Regards,
Garvin

Posted: Sun Sep 09, 2007 12:53 am
by tinitron
I am also looking for this. I would like to add some extra information about each category which will be displayed ontop of the articles in the category view. Maybe you call the plugin "extended categories" or something like that.

On my blog vfxboutique.com I have created categories for nearly every movie and company mentioned in the articles. So I really would like to show my readers some extra information about the company and a link to its website if they click on the category to see all related articles. A HTML Nugget displayed ontop of it can already be enough.

There is no way doing this hardcoded with smarty or something else because there are so many categories. This would only be an additional db entry for each category.

Please think about doing this as a plugin once more!

Posted: Mon Sep 10, 2007 12:32 pm
by garvinhicking
Hi tinitron!

Sure. Did you read what I posted above? It contains a solution that does not require raw HTML in the templates, only using the category description. :-D

Best regards,
Garvin