CuteNews

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> [FAQ] Having Pinned/Important posts, AKA sticky topics
Flexer
post Jul 3 2004, 08:43 AM
Post #1


Administrator
***

Group: Members
Posts: 640
Joined: 2-July 04
From: London, UK
Member No.: 1



If you want to have important posts that will allways stay at the top of all other news, here is a quick tip to do it.
  • Make new category called important
  • Create new template called important and edit it so news look different (eg. with bold title)
  • Use similar code for including your important and normal news:
    CODE
    <b>Important News</b>
    <?PHP
    //here will be shown your important news
    $category = "IMPORTANT_CAT_ID";
    $template = "important";
    include("path/to/show_news.php");
    ?>
    <br/>
    <b>Normal News</b>
    <?PHP
    //here will be shown all other news
    $category = "NORMAL_CAT_ID";
    include("path/to/show_news.php");
    ?>
Now when you want to have a pinned news, just move it to important category and it will be shown at the top.


--------------------
Squeeze every drop of cuteness out of your news!
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

 



RSS Lo-Fi Version Time is now: 18th May 2013 - 06:51 PM