Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Author Topic: [AddOn]link back to category  (Read 1440 times)

mosh

  • Hero Member
  • *****
  • Karma: 77
  • Posts: 510
  • Awesome day :)
    • cms-zen
[AddOn]link back to category
« on: January 21, 2008, 08:10:07 pm »

hey all :)
while in full article view, will display link back to category,
use where ever you need it on your index.php

in snews.php file:
INSERT THIS LINE INTO --// LANGUAGE VARIABLES -- (english lang).
Code: [Select]
$l['bktocat'] = 'Back to Category';

OR
INSERT THIS LINE INTO --// LANGUAGE VARIABLES -- (hebrew lang).
Code: [Select]
$l['bktocat'] = 'חזרה לקטגוריה';

this may be located any where (index.php, snews.php, included in external file).
Code: [Select]
# FUNCTION BACK2CAT
function back2cat(){
$olink = '<a href="'.db('website');
$catlink = get_id('category');
$arlink = get_id('article');
if ($catlink != '' && $arlink != ''){
echo $olink.$catlink.'">'.l('bktocat').'</a>';
}}

use this on your index.php
Code: [Select]
<span><?php back2cat(); ?></span>


awesome day  8)