Mod :: Display the name of Category above Ranking

Various mods to change or add features.

Mod :: Display the name of Category above Ranking

Postby Basti » 2008-12-28 06:20 pm

What this Mod do:
- When a category is selected on your toplist, the name of the category will be displayed for example in h1 h2 or h3 Tags, which is good for Seo and the browsing experience of your Visitors.

See Demo here: http://www.anachrony.net/
Select a Category and you will see it.

To apply this Mod do the following:

In sources/misc/skin.php find
Code: Select all
// Build the multiple pages menu


Add before
Code: Select all
// Cat Display
$TMPL['cat_info'] = '';
$current_cat = (isset($FORM['cat']) and (isset($FORM['cat']) and !empty($FORM['cat']) ) ) ? $FORM['cat'] : $LNG['main_all'];


    if ($current_cat == $LNG['main_all']) {
      $TMPL['cat_info'] .= "Place some Intro text here which is display on the front page";
    }
    else {

////

$result = $DB->query("SELECT category FROM {$CONF['sql_prefix']}_categories WHERE category = \"{$current_cat}\"", __FILE__, __LINE__);
while (list($category) = $DB->fetch_array($result)) {

if("$category" == "$current_cat") {
      $TMPL['cat_info'] .= "Category: {$current_cat}";
}

}

///
    }


Change the following in the above Code to your desired Text which will display when no category is selected
Code: Select all
Place some Intro text here which is display on the front page


Add this somewhere in wrapper.html, its best to place in h3 tags above the ranking tables
Code: Select all
<h3>{$cat_info}</h3>
Basti
Advanced Member
 
Posts: 1619
Joined: 2004-06-20 06:17 pm
Location: Germany

Re: Mod :: Display the name of Category above Ranking

Postby Basti » 2009-05-07 06:51 pm

This Mod has been Updated with an important Security Fix.
If you previously installed this mod, please apply the skin.php changes once again.

Thank you
Basti
Advanced Member
 
Posts: 1619
Joined: 2004-06-20 06:17 pm
Location: Germany

Re: Mod :: Display the name of Category above Ranking

Postby Neox » 2009-10-10 05:42 am

WoooW Your Top100 Website Is So Nice!

Damn Please Can I Have A Copy?
I Will Add You At Friends And Premium Member :cry:
Neox
Newbie
 
Posts: 2
Joined: 2009-10-08 11:01 am

Re: Mod :: Display the name of Category above Ranking

Postby Basti » 2009-10-10 09:35 am

Its not anymore my site. sold it :P
but i doubt the new owner share since he paid much for it
Basti
Advanced Member
 
Posts: 1619
Joined: 2004-06-20 06:17 pm
Location: Germany

Re: Mod :: Display the name of Category above Ranking

Postby Neox » 2009-10-10 12:12 pm

But but :(
Please I really need a good script (like your, wtf is the best)

I will do a new skin (so will not be problems with the copyright)
If you want to talk please add:
y_grek2000@yahoo.com

I have a good offer for you ^.^
Neox
Newbie
 
Posts: 2
Joined: 2009-10-08 11:01 am

Re: Mod :: Display the name of Category above Ranking

Postby Basti » 2009-10-23 07:42 am

cool, thx for the update :) finally some more contirbution here hehe

will update first post soon
Basti
Advanced Member
 
Posts: 1619
Joined: 2004-06-20 06:17 pm
Location: Germany

Re: Mod :: Display the name of Category above Ranking

Postby Basti » 2009-10-27 06:33 am

Ofc another way, but is supposed to display the all sites text everywhere else where no cat is to have some text there as well


p.s damn spamming taking the overhand on this forum again lol, cant keep up deleting it :P
Basti
Advanced Member
 
Posts: 1619
Joined: 2004-06-20 06:17 pm
Location: Germany

Re: Mod :: Display the name of Category above Ranking

Postby buttlerkid » 2012-02-27 08:31 pm

What if I created a new COLUMN called "description"( see on the picture ) , and I'd like to display the description below the CATEGORY TITLE as we displayed it with this mod ?

How can I do this?

Thanks!
You do not have the required permissions to view the files attached to this post.
buttlerkid
Newbie
 
Posts: 3
Joined: 2012-02-16 08:39 am


Return to Mods

Who is online

Users browsing this forum: No registered users and 2 guests

cron