How do you display which category a news item was posted in? Like {category} or [category]?? I really want this but I can't find it. If you anyone knows what I can add to the script to get this or if it's already available but I'm totally missing it that'll be cool :)
Hi Matt, nice name. Lol.
I've been wondering the same thing myself, among other questions.
To what I've seen after trying out a few options, I don't think there is such a thing in the news system.
I would assume it wouldn't be the most difficult of things to add into the system from your end, but I don't have the time to figure it out at the moment.
Would be nice if there was, I'll agree.
Thought I'd at least give you a reply to your question :).
Access: Admin
Total Posts: 1395
Joined: 2006-05-19
Hi Matt,
Unfortunately there is no set date for the next realease as I've quite a few other things going on at the moment so I've had to put N-13 News on hold for a while.
As for displaying the category that shouldn't be that difficult to do, infact I'll update this post later on today with some modifications you can do to add that functionality.
Access: Admin
Total Posts: 1395
Joined: 2006-05-19
Hey Matt,
if you open 'index.php' around line 477~ you should see the following code
Code:
$template2 = $template;
$template2 = str_replace("{title}",$row[title],$template2);
$usehtml = getresult("SELECT $newsaccess.usehtml FROM $newsusers LEFT JOIN $newsaccess ON $newsusers.access = $newsaccess.uid WHERE $newsusers.uid = '$row[author]'");
directly below that if you add the following code
Code:
if($row['catid'] !== "0"){
$catname = getresult("SELECT name FROM $newscats WHERE id = '$row[catid]'");
$template2 = str_replace("{category}",$catname,$template2);
}else{
$template2 = str_replace("{category}","",$template2);
}
then all you need to do is edit the template you're currently using and add {category} somewhere into it, this 'should' work.
I've added the ability to select Multiple categories in the next version of the script (can see that here). So using the {category} tag will probably be changed in the next version.