future date articles must be visible too

Need some help with the script?

Postby D72 » Tue Apr 10, 2007 8:17 pm

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: Select all
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.
User avatar
D72
 
Posts: 336
Joined: Thu Feb 22, 2007 12:05 am
Location: NL

Postby FI-DD » Tue Apr 10, 2007 8:38 pm

Play around with 86400 until the gig shows as long as you want it to show.
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby D72 » Tue Apr 10, 2007 10:31 pm

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.
User avatar
D72
 
Posts: 336
Joined: Thu Feb 22, 2007 12:05 am
Location: NL

Postby FI-DD » Tue Apr 10, 2007 11:08 pm

It stands for seconds. 86400 seconds is exactly 1 day.
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby D72 » Tue Apr 10, 2007 11:17 pm

why didnt i knew that?

Isn't it something we had learned at school :)

Thanks, now this value suddenly makes more sense :roll:
User avatar
D72
 
Posts: 336
Joined: Thu Feb 22, 2007 12:05 am
Location: NL

Postby dezza » Wed Apr 11, 2007 12:41 pm

This is exactly what I'd been needing! Thanks :D
dezza
 
Posts: 13
Joined: Wed Apr 11, 2007 2:29 am

Postby samiro » Fri Feb 19, 2010 12:37 pm

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
User avatar
samiro
 
Posts: 103
Joined: Sun Apr 20, 2008 1:52 pm
Location: IL

Postby DarkSlim » Fri Feb 19, 2010 12:59 pm

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 :)
User avatar
DarkSlim
 
Posts: 298
Joined: Thu Aug 06, 2009 4:18 pm
Location: IL

Postby D72 » Fri Feb 19, 2010 1:02 pm

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: Select all
$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.
User avatar
D72
 
Posts: 336
Joined: Thu Feb 22, 2007 12:05 am
Location: NL

Postby samiro » Fri Feb 19, 2010 2:02 pm

i need to make these changes:? http://forums.cutenewsru.com/future-dat ... .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
User avatar
samiro
 
Posts: 103
Joined: Sun Apr 20, 2008 1:52 pm
Location: IL

Postby samiro » Wed Mar 03, 2010 11:55 am

please !!!
User avatar
samiro
 
Posts: 103
Joined: Sun Apr 20, 2008 1:52 pm
Location: IL

Postby D72 » Wed Mar 03, 2010 12:24 pm

Of course you still see the future dates with this include because you have set schedule = true
Code: Select all
<?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: Select all
<?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: Select all
<?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: Select all
<?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
User avatar
D72
 
Posts: 336
Joined: Thu Feb 22, 2007 12:05 am
Location: NL

Postby samiro » Wed Mar 03, 2010 12:31 pm

no no
i dont want to combine...

i just dont want visitors (gests) to see future news at all...
what i have to use ?
User avatar
samiro
 
Posts: 103
Joined: Sun Apr 20, 2008 1:52 pm
Location: IL

Postby D72 » Wed Mar 03, 2010 12:33 pm

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
User avatar
D72
 
Posts: 336
Joined: Thu Feb 22, 2007 12:05 am
Location: NL

Postby samiro » Wed Mar 03, 2010 12:40 pm

what you say here
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: Select all
<?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/e ... 3/444.html

this shul up at 4/3/10
tomorow. but i can see it !!!!!
User avatar
samiro
 
Posts: 103
Joined: Sun Apr 20, 2008 1:52 pm
Location: IL

PreviousNext

Return to Help



Who is online

Users browsing this forum: No registered users and 1 guest

cron