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 News displaying on two categories
ColonelYaffle
Posted on 22 Mar 2012, 21:15:29

Access: Member
Total Posts: 6
Joined: 2012-03-22

Hi,

I have just started using this and have encountered a problem that I can't work out how to fix. I've posted a test article and created categories that I need. The article is ment to display in one category which I've called "index" (the category is named index). However, it seems to be displaying in two two places yet it's only set to index.

Is there something I'm doing wrong, and do you need any more information?

#3800
Chris
Posted on 22 Mar 2012, 22:00:28

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

Can you show me the code you're using to display your articles?

#3802
ColonelYaffle
Posted on 23 Mar 2012, 06:36:28

Access: Member
Total Posts: 6
Joined: 2012-03-22

Chris wrote at 2012-03-22 22:00:28

Can you show me the code you're using to display your articles?

I believe you mean this?:

<div id="content">
        <?php
        $cat[] = 'about';
    include 'news/index.php';
    ?>
            </div>
#3803
Last edited by ColonelYaffle at 2012-03-23 06:37:13 Reason: -
Chris
Posted on 23 Mar 2012, 09:33:25

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

Are you sure you haven't accidentally assigned an article to multiple categories?. Another possible reason may be this, take the following code

<?php
$cat[] = "about";
include 'news/index.php';
?>

Will display all articles assigned to the about category unless there are no articles assigned to it, in that case it will display all news articles instead. Perhaps this is what's happening?

#3805
ColonelYaffle
Posted on 23 Mar 2012, 15:21:20

Access: Member
Total Posts: 6
Joined: 2012-03-22

I definitely haven't assigned an article to multiple categories.

Then I tried making a test article and putting it in the about page, because you said that could be the issue. However, after selecting the "about" category, it's put it into the guides section and not the about section. What I mean is, it's in http://www.example.com/guides.php and not http://www.example.com/about.html.

Is this because the about page is not php?

Hopefully some of that information above can help you understand this problem.

#3808
Chris
Posted on 23 Mar 2012, 16:03:41

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

The naming of the files isn't important, all that matters is the code you're using. Can you show me the code you're using for both the guides.php file and the about.html file?

#3809
ColonelYaffle
Posted on 23 Mar 2012, 16:41:33

Access: Member
Total Posts: 6
Joined: 2012-03-22

<div id="content">
                <?php
                $cat[] = 'guides';
                include 'news/index.php';

That's the code in the guides part.

I don't have any PHP in the about.html section. o.o

I presume that's one of the problems, lol.

#3810
Chris
Posted on 23 Mar 2012, 16:47:08

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

Without seeing the site for myself I can't really figure this out. You said an article is showing in 2 places even though it's assigned to the about category. What are the 2 places it's showing?

#3811
ColonelYaffle
Posted on 23 Mar 2012, 17:05:14

Access: Member
Total Posts: 6
Joined: 2012-03-22

Chris wrote at 2012-03-23 16:47:08

Without seeing the site for myself I can't really figure this out. You said an article is showing in 2 places even though it's assigned to the about category. What are the 2 places it's showing?

Alright I'll explain.

I'm using test.php - which will be my index, I'm just testing php with it atm. So basically test.php is my index. I'm also using guides.php as my second test. Just said that so you know.

Ok. It's showing in two places, it's showing in the guides and test section. However, in the www.example.com/news/admin.php, the article category is set to index (index is test.php). The problem I have is that it's showing in the Guides.php AND test.php pages, and not just the test.php. :s

Hope I explained well enough.

#3812
ColonelYaffle
Posted on 23 Mar 2012, 18:41:16

Access: Member
Total Posts: 6
Joined: 2012-03-22

Fixed the issue!

Didn't know that if no articles were assigned to it, it'd show on all pages. Thanks for the help.

#3813
Network-13.com © 2013