[pLog-svn] future-posts explanation?
Tsz Ming WONG
tszming at gmail.com
Wed Sep 5 09:46:56 EDT 2007
so funny...I am also looking at this issue yesterday.
you are right that correct implementing `future_post` features is different
from the current implementation, i.e. future_post_in_calendar
at least, you need to protect the future post if user don't want to display.
besides, you might also need to take care of the RSS, personally I believe
RSS shouldn't allow future post anyway?
On 9/4/07, Jon Daley <plogworld at jon.limedaley.com> wrote:
>
> Hrm. I don't think it is working. I define working as when I set
> future_posts to true, I expected to see it on the main page. Perhaps it
> should *only* show up in the calendar, and since I am not using a
> calendar, future_posts doesn't do anything?
>
> If I type in the URL to the future post directly, it is visible no
> matter what the future_post setting is. I'd expect it to be inaccessible
> if future_posts is set to 0.
>
> If I type in the URL to the whole month, I do see the future
> article only when the future_posts is set.
>
> The below queries are what happen (in getBlogArticles) when viewing the
> main page, since date == -1, the max timestamp is always set regardless of
> the future_posts setting.
>
> SELECT a.id as id, a.id, a.date,
> a.user_id,a.blog_id ,a.status,a.properties, a.num_reads, a.slug, 1 AS
> relevance, a.num_comments AS num_comments, a.num_nonspam_comments AS
> num_nonspam_comments, a.num_trackbacks AS num_trackbacks,
> a.num_nonspam_trackbacks AS num_nonspam_trackbacks, a.global_category_id
> AS global_category_id, a.in_summary_page AS in_summary_page,
> a.modification_date AS modification_date
>
> FROM plog_articles a, plog_articles_categories c,
> plog_article_categories_link l
>
> WHERE a.blog_id = 1 AND
> c.id = l.category_id AND
> a.id = l.article_id AND
> c.in_main_page = 1 AND
> a.status = '1' AND
> a.date <= '20070904063616'
>
> GROUP BY a.id
>
> ORDER BY a.date DESC LIMIT 0, 15
>
>
>
> SELECT a.id as id, a.id, a.date, a.user_id,a.blog_id,a.status,a.properties,
> a.num_reads, a.slug, 1 AS
> relevance, a.num_comments AS num_comments, a.num_nonspam_comments AS
> num_nonspam_comments, a.num_trackbacks AS num_trackbacks,
> a.num_nonspam_trackbacks AS num_nonspam_trackbacks, a.global_category_id
> AS global_category_id, a.in_summary_page AS in_summary_page,
> a.modification_date AS modification_date
>
> FROM plog_articles a, plog_articles_categories c,
> plog_article_categories_link l
>
> WHERE a.blog_id = 1 AND
> c.id = l.category_id AND
> a.id = l.article_id AND
> c.in_main_page = 1 AND
> a.status = '1' AND
> a.date <= '20070904063616'
>
> GROUP BY a.id
>
> ORDER BY a.date DESC LIMIT 10;
>
>
> On Tue, 4 Sep 2007, Jon Daley wrote:
>
> > I am using it a bit more in an API way, so I wouldn't be too
> > surprised if "regular" people aren't seeing it. I'll play around with
> it
> > some more. (commenting out the this->_date part works for me for now)
> >
> > On Tue, 4 Sep 2007, Oscar Renalias wrote:
> >
> >> I have to say that I don't remember, but I think that this has also
> >> been working fine so far... (at least no one reported an issue with
> >> this)
> >>
> >> On 9/4/07, Jon Daley <plogworld at jon.limedaley.com > wrote:
> >>> This code seems to be wrong, but I see that it hasn't been
> changed
> >>> in forever.
> >>>
> >>> scenario: show_future_posts_in_calendar is set to 1.
> >>>
> >>> If no date is set in the request, then the maxDate is set, so then
> future
> >>> articles won't be shown.
> >>>
> >>> If the date is set in the request, then the maxDate is not set, and
> the
> >>> query succeeds.
> >>>
> >>> Is this the desired behavior?
> >>>
> >>> class/action/defaultaction.class.php::
> >>> if(($blogSettings->getValue('show_future_posts_in_calendar')) &&
> >>> ($this->_date > -1)){
> >>> // if posts in the future are to be shown, we shouldn't set a
> maximum date
> >>> $todayTimestamp = 0;
> >>> }
> >>>
> >>>
> >>>
> >>> I would have expected the this->_date to not be taken into account
> when
> >>> deciding whether to show future posts or not.
> >>> _______________________________________________
> >>> pLog-svn mailing list
> >>> pLog-svn at devel.lifetype.net
> >>> http://limedaley.com/mailman/listinfo/plog-svn
> >>>
> >> _______________________________________________
> >> pLog-svn mailing list
> >> pLog-svn at devel.lifetype.net
> >> http://limedaley.com/mailman/listinfo/plog-svn
> >>
> >
> > --
> > Jon Daley
> > http://jon.limedaley.com/
> >
> > Atheism is a non-prophet organization
> > _______________________________________________
> > pLog-svn mailing list
> > pLog-svn at devel.lifetype.net
> > http://limedaley.com/mailman/listinfo/plog-svn
> >
>
> --
> Jon Daley
> http://jon.limedaley.com/
>
> This is a test of the Emergency Broadcast System.
> If this had been an actual emergency,
> do you really think we'd stick around to tell you?
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://limedaley.com/mailman/listinfo/plog-svn
>
--
Best Regards,
tszming
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://limedaley.com/pipermail/plog-svn/attachments/20070905/ea2f6e30/attachment.htm
More information about the pLog-svn
mailing list