| Anime Oasis Reborn | |||||||||||||||||||||||
![]() | |||||||||||||||||||||||
Sitely
Resources
Layout Templates
Tutorials
Graphics
Premade Layouts
Neopets Graphics
Manga Reviews
Network
Siblings
Affiliates
Link Exchange
Credits/Disclaimer
|
Categories in CuteNews
Yes, categories, the one thing that makes a site able to be entirly organized by cutenews. It's also the one thing which confuses a lot of people, now we are going to learn how to master categories and gain a better understanding of how they work and how to use them to manage our sites. First, make sure you have cutenews open and are logged in (and you are the admin). Now we should first create a category, Options - > Edit categories. You should see the 'Add category' form on the page now. It consists of the name you want it, an icon (which is optional) and who can access this category. What do I mean by Access though? This is the member level thats allowed to add to this category, for example, you can have only the admin add content to the "updates" category, You are also allowed to pick Editors and Admin, or simply everyone. Now, I'll say I am going to create a category named "Updates." I add the name to the name textarea and I am going to leave the Icon url alone (though you can have one if you want). I also will only allow admins to add content. ![]() Next I hit add category, once its added look at the bottom of the page, you will notice there is an area which lists the categories and their information and also allowing you to edit or delete, if you made a mistake its easy to fix. All we need to know from this is the ID number of the category, seeing how mine was the first one, its ID is 1 (one). But what do we do with this? How am I supposed to add it to my page? Well next we learn the code. You may want some PHP knowledge to work with this.
<?PHP $Template = "Beauty"; // This is the name of the template, they template in this code I am using is being told to use the template which I have named beauty. $number = "1"; // This tells it how many posts per page to show, if I wanted it to show 5 posts this would be 5. $category = "1"; // Remember how we needed to know the ID number of our category? Well this is where we put it. I had mine as category ID 1 (one) so therefore its a 1, if it was category 2 I would make this a 2. include("cutenews/show_news.php"); // This is the place its extracting the news from. Cute news I have in my main directory (folder). If I was using a file which was in a folder other then the main directory (folder) and I had to go up a file I would add ../ every time i had a folder to move up. Confused? here is an example: Say I have a folder called...new and a folder in that I had category, and my page was in the category folder. main directory - > new - > category the include would look like this: include("../../cutenews/show_news.php"); Now we have our code set up and just save the page, now lets put something in this category. Go to Add news Write out your post which you want to add, once you are done, notice that under the title there is a drop down box (or check boxes) with the names of your categories you have. Select the category which you want it in and save it.Test the page to make sure it works, any questions feel free to Contact me // Back |
||||||||||||||||||||||