Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
future date articles must be visible too
Goto page Previous  1, 2, 3, 4  Next
 
Reply to topic    Forum Index » Help View previous topic
View next topic
future date articles must be visible too
Author Message
D72



Joined: 22 Feb 2007
Posts: 321
Location: NL

Post Reply with quote
Hi FIDD

I saw that topic before but i thought it didnt match my problem.

I tried the options in that praticular topic and the only code that shows some changes are the last one that you gave.

Code:
if($schedule){

  $where[] = 'date > '.(time() + $config_date_adjust * 60 - 86400);

}

else{

  $where[] = 'date < '.(time() + $config_date_adjust * 60);

}

$schedule = false;


But after a browser refresh suddenly an article with the date 9th April 2007 (yesterday) appears.

So that one didnt workled properly for me.



I found myself a different way to keep the articles active on the 'Agenda' page.

If i add an article with the date of tomorrow, i set the time 1 minute before midnight.

After that time the article moves to the 'Archive'. It works this way, but i rather want to have it without setting the time by hand.
Tue Apr 10, 2007 8:17 pm View user's profile Send private message
Guest








Please login to hide the ads.

FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2973
Location: Germany

Post Reply with quote
Play around with 86400 until the gig shows as long as you want it to show.
Tue Apr 10, 2007 8:38 pm View user's profile Send private message
D72



Joined: 22 Feb 2007
Posts: 321
Location: NL

Post Reply with quote
Oooh ok, i didn't knew that i could play with that.

I thought it was a hard code for something... that i don't know...

Ok, i'll try to change that. Thanks!



Were is it stands for exactly... the '86400'

I mean, does it stands for minutes, hours of something?

Just trying to understand everything here to let my Cutenews.ru knowledge grow.
Tue Apr 10, 2007 10:31 pm View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2973
Location: Germany

Post Reply with quote
It stands for seconds. 86400 seconds is exactly 1 day.
Tue Apr 10, 2007 11:08 pm View user's profile Send private message
D72



Joined: 22 Feb 2007
Posts: 321
Location: NL

Post Reply with quote
why didnt i knew that?

Isn't it something we had learned at school Smile

Thanks, now this value suddenly makes more sense Rolling Eyes
Tue Apr 10, 2007 11:17 pm View user's profile Send private message
dezza



Joined: 11 Apr 2007
Posts: 13

Post Reply with quote
This is exactly what I'd been needing! Thanks Very Happy
Wed Apr 11, 2007 12:41 pm View user's profile Send private message
samiro



Joined: 20 Apr 2008
Posts: 93
Location: IL

Post Reply with quote
I hope that Google will translate what I write, well enough.

I have exactly the opposite problem - I've been looking for someone to help me with this.
What you describe here is exactly what I did not want.
On my system, when I wrote up a future date article - I always can see the article (and also the visitors)
It happens when I use in the code, several categories, eg 2,3,4,5
If I present only one category, or use "ALL" so I have no problem.
Future articles are not displaied

I was told that because I'm logged as Admin - and that's why I see the articles - but that's not true.


Help - Please I am desperate.
Thanks

_________________
www.Bwoman.co.il
Fri Feb 19, 2010 12:37 pm View user's profile Send private message Visit poster's website
DarkSlim



Joined: 06 Aug 2009
Posts: 286
Location: IL

Post Reply with quote
samiro wrote:
I hope that Google will translate what I write, well enough.

I have exactly the opposite problem - I've been looking for someone to help me with this.
What you describe here is exactly what I did not want.
On my system, when I wrote up a future date article - I always can see the article (and also the visitors)
It happens when I use in the code, several categories, eg 2,3,4,5
If I present only one category, or use "ALL" so I have no problem.
Future articles are not displaied

I was told that because I'm logged as Admin - and that's why I see the articles - but that's not true.


Help - Please I am desperate.
Thanks


Hmm I see, when I'll have the time I'll also look into this
see if I can find anything, also I will check in my site
if it shows too Smile

_________________
Portfolio: www.Yaniv.tk

Some of my Plugins and Mods and more in the CuteNewsRU Index!

Donations Accepted, Thank you
Fri Feb 19, 2010 12:59 pm View user's profile Send private message Visit poster's website
D72



Joined: 22 Feb 2007
Posts: 321
Location: NL

Post Reply with quote
If you follow these instruction it should work out of the box.
The change you have to make is in the file show.news.php
I use it allways with every websites when i need to use future dates.
And add this in your include code:
Code:
$schedule = true;

Though you can't use future dates combined with regular dates.
It's one or another. Or you have to use more than one include codes.
One for future dates and the other one for regular dates.
And allways be aware that you have givin a future date.
Fri Feb 19, 2010 1:02 pm View user's profile Send private message
samiro



Joined: 20 Apr 2008
Posts: 93
Location: IL

Post Reply with quote
i need to make these changes:? http://forums.cutenewsru.com/future-date-articles-must-be-visible-too-t1243.html#7088

i try this:

<?PHP
$number= '5';
$static = 'true';
$category = '1,2,3,4,5,6,7,9,10,11,12,13,14,15,16,18,19,20,21,22,23,24,25,26,27,28';
$template = 'Header';
$schedule = true;
include("/hsphere/local/home/samiro/bwoman.co.il/articles/news/show_news.php");
?>

i still can see article that i set to 10/10/2010

_________________
www.Bwoman.co.il
Fri Feb 19, 2010 2:02 pm View user's profile Send private message Visit poster's website
samiro



Joined: 20 Apr 2008
Posts: 93
Location: IL

Post Reply with quote
please !!!

_________________
www.Bwoman.co.il
Wed Mar 03, 2010 11:55 am View user's profile Send private message Visit poster's website
D72



Joined: 22 Feb 2007
Posts: 321
Location: NL

Post Reply with quote
Of course you still see the future dates with this include because you have set schedule = true
Code:
<?PHP
$number= '5';
$static = 'true';
$category = '1,2,3,4,5,6,7,9,10,11,12,13,14,15,16,18,19,20,21,22,23,24,25,26,27,28';
$template = 'Header';
$schedule = true;
include("/hsphere/local/home/samiro/bwoman.co.il/articles/news/show_news.php");
?>

If you don't want to see future dates, use this include
Code:
<?PHP
$number= '5';
$static = 'true';
$category = '1,2,3,4,5,6,7,9,10,11,12,13,14,15,16,18,19,20,21,22,23,24,25,26,27,28';
$template = 'Header';
$schedule = false;
include("/hsphere/local/home/samiro/bwoman.co.il/articles/news/show_news.php");
?>

If category 8 and category 17 has those future dates you can use two include codes
One for the regular news without future dates and one for your news with future dates

categories with future dates
Code:
<?PHP
$number= '5';
$static = 'true';
$category = '1,2,3,4,5,6,7,9,10,11,12,13,14,15,16,18,19,20,21,22,23,24,25,26,27,28';
$template = 'Header';
$schedule = false;
include("/hsphere/local/home/samiro/bwoman.co.il/articles/news/show_news.php");
?>


categories without future dates
Code:
<?PHP
$number= '5';
$static = 'true';
$category = '8,17';
$template = 'Header';
$schedule = true;
include("/hsphere/local/home/samiro/bwoman.co.il/articles/news/show_news.php");
?>


Just try it your self.
It is working because you're still seeing the future dates like you said.
So you must add some other include to seperate the future dates from you regular news.
It's not possible to combine those two
Wed Mar 03, 2010 12:24 pm View user's profile Send private message
samiro



Joined: 20 Apr 2008
Posts: 93
Location: IL

Post Reply with quote
no no
i dont want to combine...

i just dont want visitors (gests) to see future news at all...
what i have to use ?

_________________
www.Bwoman.co.il
Wed Mar 03, 2010 12:31 pm View user's profile Send private message Visit poster's website
D72



Joined: 22 Feb 2007
Posts: 321
Location: NL

Post Reply with quote
Well just set you include to:
schedule = false

* Edit
CutenewsRU is by default not showing future dates.
If you just use CNR, give an article a future date. Then it will not be visible on the website.
Untill the date has reached. If you gave an article a date like 10.10.2010 CNR will hide the article and appears at 10.10.2010
That is how CNR is working straight out of the box
Wed Mar 03, 2010 12:33 pm View user's profile Send private message
samiro



Joined: 20 Apr 2008
Posts: 93
Location: IL

Post Reply with quote
what you say here
Quote:
CutenewsRU is by default not showing future dates.
If you just use CNR, give an article a future date. Then it will not be visible on the website.
Untill the date has reached. If you gave an article a date like 10.10.2010 CNR will hide the article and appears at 10.10.2010
That is how CNR is working straight out of the box

is what i want
now i add this:
Code:
<?PHP
$number= '5';
$static = 'true';
$category = '1,2,3,4,5,6,7,9,10,11,12,13,14,15,16,18,19,20,21,22,23,24,25,26,27,28';
$template = 'Header';
$schedule = false;
include("/hsphere/local/home/samiro/bwoman.co.il/articles/news/show_news.php");
?>


and i still can see the post - as gest...
see here: http://www.bwoman.co.il/articles/news/ex/index.php/2010/03/03/444.html

this shul up at 4/3/10
tomorow. but i can see it !!!!!

_________________
www.Bwoman.co.il
Wed Mar 03, 2010 12:40 pm View user's profile Send private message Visit poster's website
Display posts from previous:    
Reply to topic    Forum Index » Help All times are GMT + 1 Hour
Goto page Previous  1, 2, 3, 4  Next
Page 2 of 4

 
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.