Home N-13 News Forums Help Search
RegisterForgot password?
How to add image to post necklacesdiscou
Known bugs - 4.0.3 necklacesdiscou

Latest N-13 News 4.0.3

What is N-13 News?
Where can I get help?
Known bugs

Forums Help & Support Categories
1 2
Mattycat
Posted on 24 Jul 2008, 14:32:53

Access: Member
Total Posts: 42
Joined: 2008-06-25

Hey,

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 :)

Thanks,


Matthew
#296
Mattycat
Posted on 25 Jul 2008, 09:46:47

Access: Member
Total Posts: 42
Joined: 2008-06-25

Please can someone help?
#297
Mattycat
Posted on 31 Jul 2008, 03:04:52

Access: Member
Total Posts: 42
Joined: 2008-06-25

Is there even such a feature?

It would be nice if someone would reply...


Matt
#300
Mattrjh
Posted on 31 Jul 2008, 15:46:58

Access: Member
Total Posts: 3
Joined: 2008-07-31

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 :).
#302
Last edited by Mattrjh at 2008-07-31 15:48:42 Reason:
Mattycat
Posted on 01 Aug 2008, 11:32:05

Access: Member
Total Posts: 42
Joined: 2008-06-25

Hey Matt!

You've got one wicked name! Haha yeah if I knew some PHP I'd try and add the feature myself. I emailed Chris but he never emailed me back.

Thanks for the reply though!


Matt
#304
Mattrjh
Posted on 06 Aug 2008, 13:14:08

Access: Member
Total Posts: 3
Joined: 2008-07-31

Spoke with Chris a few days ago whilst fixing an error I had found. He informed me multiple categories is in line for the next release.
#307
Mattycat
Posted on 07 Aug 2008, 02:04:00

Access: Member
Total Posts: 42
Joined: 2008-06-25

Cool, how long until the next release is available if you know?
#308
Chris
Posted on 07 Aug 2008, 11:25:49

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.
#312
Mattycat
Posted on 11 Aug 2008, 11:17:43

Access: Member
Total Posts: 42
Joined: 2008-06-25

Hi there Chris,

That would be great! I've just came back online today so any help will be greatly appreciated!

Thanks,


Matt
#331
Chris
Posted on 11 Aug 2008, 14:09:19

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.
#332
1 2
Network-13.com © 2013