Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
Hide certain articles

 
Reply to topic    Forum Index » Help View previous topic
View next topic
Hide certain articles
Author Message
razvan



Joined: 19 Jul 2008
Posts: 3

Post Hide certain articles Reply with quote
i want to know if there is a way to hide certain news/articles from the main page (show_news.php) but so it can still be (accesable/display) trough (a link/or other module) somewere else on the site. i tried with categories but i did not get far. Laughing so any ideeas ?

______________
website title
______________


show_news.php

______________

hidden article
text
______________

_________________
no signature for now.
Sat Jul 19, 2008 1:03 pm View user's profile Send private message
Guest








Please login to hide the ads.

hanulbada



Joined: 17 Jul 2008
Posts: 6

Post Reply with quote
Yeah like you tried the only way I can think of is by using categories. What I think you're asking for is pretty much a way to choose what content gets to be in the front page, and what goes on other pages which you would have to specify- in short, categories. You might just need to use them a little more creatively.

Sorry that I can't be of much help otherwise. :\
Sun Jul 20, 2008 4:37 am View user's profile Send private message
razvan



Joined: 19 Jul 2008
Posts: 3

Post Reply with quote
ok i searched the site a little more and found a temp solution. i really wanted a non script solution but since one isn't available i'm just gonna use FI-DD's posted here.
the thing is that ill make a copy of the "show_news.php" file 3 times, each with a different name for a certain category(s). i did not test it yet, i hope that it won't have any bugs since all the "show_news.php" files will be included in the same page. on first view, nothing can go wrong, each page should execute it's script and only after display the result....right ? Very Happy


Quote:
In inc/show.news.php find this:

Code:
foreach ($query as $bg => $row){



add below:
Code:
 if($row['category'] == 'ID' and $exclude) continue;



Change your include code to this:
Code:
 $exclude = true;
include('show_news.php');
$exclude = false;




PS: i really hope in the future versions of cutenews they put a publishing option in the news. save the articles but not publish them. a visible/hidden option. smething like that.
besides that excellent work with the script, i really enjoy working with it. keep up the great work. Smile

_________________
no signature for now.
Sun Jul 20, 2008 7:55 am View user's profile Send private message
Torstein



Joined: 03 Aug 2006
Posts: 96

Post Reply with quote
You can put the post date as some date that hasn't been yet.

Another way to do this is to make a category "Frontpage" and only using that category to decide what goes on the front page and what doesn't. (You'll obviously have to include only the frontpage category in your CNR include code.)

To remove items who isn't in the frontpage category from your RSS file, just modify the include code which resides within rss.php.
Sun Jul 20, 2008 2:40 pm View user's profile Send private message
razvan



Joined: 19 Jul 2008
Posts: 3

Post Reply with quote
i understand what you said Torstein, but that's just a method to avoid the problem. it's not a permanent solution. that's why i asked that in the future versions of cutenewsru, to be implemented an option to publish or save articles/news. they would all be in the same category just some visible on the show_news.php and some would be visible only of the user includes them to another page using the category's. it's not something that needs hours of coding, someone with minor understanding of php could do it, but it's really useful for the normal CMS user.

so if you guys still have any other ideas please post them. any help is welcome

_________________
no signature for now.
Mon Jul 21, 2008 12:54 am View user's profile Send private message
scottdallas



Joined: 04 May 2006
Posts: 1843
Location: US

Post Reply with quote
I've thought of a way! Just use the new xfield sorting method and you should be able to make options for something like 'Draft' and 'Published'

Is that what you're looking for?

_________________
www.scottdizzle.com uses cnr Smile
last update: 07-22-08: 8:30 pm
Tue Jul 22, 2008 1:11 am View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:    
Reply to topic    Forum Index » Help All times are GMT + 1 Hour
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum



Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Music Lyrics.