Back to categorie Index link in article

You have a suggestion for a future version of phpMyFAQ? Then post it here!

Moderator: Thorsten

Post Reply
nowayjose
Posts: 6
Joined: Tue Jul 05, 2005 9:40 am

Back to categorie Index link in article

Post by nowayjose »

I made a simple mod to the display of the article:

It now shows a "back to category index" link on top of the article-page.
If anyone is interested I will post the changes here.
Thorsten
Posts: 15729
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

it would be cool if you can post your patch here.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
nowayjose
Posts: 6
Joined: Tue Jul 05, 2005 9:40 am

Post by nowayjose »

Mod for V1.5 rc5:

Artikel.php:
Around line 62 find this line:

Code: Select all

$writePrintMsg          = '<a href="#" onclick="javascript:window.print();">'.$PMF_LANG["msgPrintArticle"].'</a>';
ADD this line before:

Code: Select all

$writeBack					    = '<a href="'.$_SERVER['PHP_SELF'].'?'.$sids.'action=show&cat='.$currentCategory.'">'.$PMF_LANG['msgBack'].'</a>';
Around line 102, you'll find:

Code: Select all

"writeThema" => stripslashes(getThema($id, $lang)),
Add after this line:

Code: Select all

"writeBack" => $writeBack,
Artikel.tpl:
line 1:

Code: Select all

<h2 id="article_category">{writeRubrik}</h2>
add this line directly after:

Code: Select all

<div style="float:right;">{writeBack}</div>
language_en.php, our your own language add following line:

Code: Select all

$PMF_LANG["msgBack"] = "<< Category Index";
That should do the trick, let me know if you run into any problems.
Hope this is helpful to some people.
Post Reply