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 Empty category
muri
Posted on 14 Feb 2012, 11:41:47

Access: Member
Total Posts: 3
Joined: 2012-02-14

I'm integrating N13 on a multilanguage site. I have a different category for each language (ENnews, DEnews etc). My problem is that when a category is empty (=no news for that language) it is automatically populated with other languages news. Is it possible to have an empty category (no news displayed)?

Thank you

#3711
Chris
Posted on 17 Feb 2012, 18:33:47

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Not really possible unfortunately without making a few changes to the script. If I have some time this weekend I'll see about making the modification that will make this work.

#3730
muri
Posted on 17 Feb 2012, 18:54:11

Access: Member
Total Posts: 3
Joined: 2012-02-14

Thank you Chris, this would be great. I tried many workarounds but none was satisfying for my problem. I have found some other threads about this so I think that it could be useful for other people too.

#3732
Last edited by muri at 2012-02-17 18:55:57 Reason: error
Chris
Posted on 20 Feb 2012, 01:44:43

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

If you edit index.php, around line 405~ you'll see this line of code

if($f){ $f = "AND id IN ($f)"; }

If you replace it with this

if($f){ $f = "AND id IN ($f)"; }else{ $f = "AND id IN (-1)"; }

If you do an include and specify a category that doesn't have any articles assigned to it then nothing will be shown instead of all articles.

#3741
muri
Posted on 20 Feb 2012, 17:10:25

Access: Member
Total Posts: 3
Joined: 2012-02-14

Great! Works like a charm, thank you Chris. Will this be included in future releases or will I have to include the modification once upgraded?

#3742
Last edited by muri at 2012-02-20 17:11:16 Reason: misspelling
Chris
Posted on 21 Feb 2012, 03:03:40

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

I'll see about including it in the next update. I'll try make it configurable so that you can decide if you want the system to work like this.

#3743
Network-13.com © 2013