[pLog-svn] bad behavior diff
Mark Wu
markplace at gmail.com
Tue Sep 5 20:24:43 GMT 2006
Smarty {dynamic} does not work for lifetype plugins or other lifetype
home-made variables ... :'(
Mark
> -----Original Message-----
> From: plog-svn-bounces at devel.lifetype.net
> [mailto:plog-svn-bounces at devel.lifetype.net] On Behalf Of Jon Daley
> Sent: Wednesday, September 06, 2006 4:19 AM
> To: plog-svn at devel.lifetype.net
> Subject: RE: [pLog-svn] bad behavior diff
>
> Ah, I see. Maybe it needs to be in a php file that
> doesn't run through smarty? Or smarty is told to not cache
> it? Maybe the {dynamic} tag would work here?
>
> On Wed, 6 Sep 2006, Mark Wu wrote:
> > Mmm.... I don't think put it into a separate .js file
> works. Because
> > this javascript code is dynamic generateed by two php value
> > $cookie_name and $cookie_value.
> >
> > Mark
> >
> >> -----Original Message-----
> >> From: plog-svn-bounces at devel.lifetype.net
> >> [mailto:plog-svn-bounces at devel.lifetype.net] On Behalf Of Jon Daley
> >> Sent: Wednesday, September 06, 2006 4:07 AM
> >> To: plog-svn at devel.lifetype.net
> >> Subject: Re: [pLog-svn] bad behavior diff
> >>
> >> So, all we have to do is to include the javascript in a
> separate
> >> .js file? Can we include it directly in the plugins directory? I
> >> don't think any other file is served directly from there, so maybe
> >> that is a bad idea. I guess you could put it in the root,
> but that
> >> is sort of annoying.
> >> I don't think you want to have it in every template dir.
> >> Maybe putting it in /js would be the best?
> >>
> >> On Sun, 3 Sep 2006, Paul Westbrook wrote:
> >>
> >>> Hello,
> >>> I think that this problem is cause because the javascript is
> >>> generated by php. So the first time that a page is
> looked at, the
> >>> generated javascript will have the ip address of the
> requestor. If
> >>> that page is cached, the ip address for the first requestor will
> >>> remain in the javascript of the cached page.
> >>>
> >>> I have seen cases where when I look at the source for my
> >> page, which
> >>> has the javascript inserted into my template, the ip
> >> address embedded
> >>> is for a different ip address. For example, I am
> accessing my blog
> >>> from ip address 24.23.206.54, but when I just accessed my
> blog, and
> >>> looked at the source, I
> >>> see:
> >>>
> >>> myElement.value = '1157327472 217.235.113.132';
> >>>
> >>> Since the javascript is not generated for every request, the
> >>> calculation for the amount of time from a page load to a
> >> comment submission, will not work.
> >>>
> >>> --Paul
> >>>
> >>>
> >>> On Sep 3, 2006, at 10:22 AM, Mark Wu wrote:
> >>>
> >>>> Hi Jon:
> >>>>
> >>>> Do you insert javascript as I suggest in readme.txt ?
> >>>>
> >>>> Because I never has this problem in my installation.
> >>>>
> >>>> Nark
> >>>>
> >>>>> -----Original Message-----
> >>>>> From: plog-svn-bounces at devel.lifetype.net
> >>>>> [mailto:plog-svn-bounces at devel.lifetype.net] On Behalf Of
> >> Jon Daley
> >>>>> Sent: Wednesday, August 30, 2006 12:44 AM
> >>>>> To: LifeType SVN
> >>>>> Subject: [pLog-svn] bad behavior diff
> >>>>>
> >>>>> Mark - I thought you might want to see this diff, and since the
> >>>>> plugin/svn email hook isn't working, I will manually do it:
> >>>>>
> >>>>> plog/plugins/badbehavior/bad-behavior>svn diff -r3900
> post.inc.php
> >>>>> Index: post.inc.php
> >>>>>
> >> ===================================================================
> >>>>> --- post.inc.php (revision 3900)
> >>>>> +++ post.inc.php (working copy)
> >>>>> @@ -37,8 +37,10 @@
> >>>>> // if ($screener + 5 > time())
> >>>>> // return "408d7e72";
> >>>>> // Posting too slow? 48 hr
> >>>>> - if ($screener + 172800 < time())
> >>>>> - return "b40c8ddc";
> >>>>> + // LifeType mod by jondaley: since pages can be
> >> cached, the
> >>>>> + // cookie might not be updated
> >>>>> + // and this can get tripped incorrectly
> >>>>> +// if ($screener + 172800 < time())
> >>>>> +// return "b40c8ddc";
> >>>>>
> >>>>>
> >>>>>
> >>>>> I am not entirely sure how it happened - ie. why my
> mother-in-law
> >>>>> didn't get a new copy of the page when she came back
> >> apparently more
> >>>>> than 48 hours her prior viewing, and then hit the
> "search" button.
> >>>>>
> >>>>> Maybe the cookie isn't getting set when the page is cached?
> >>>>> It is javascript, so that part shouldn't ever be cached, right?
> >>>>>
> >>>>> _______________________________________________
> >>>>> pLog-svn mailing list
> >>>>> pLog-svn at devel.lifetype.net
> >>>>> http://devel.lifetype.net/mailman/listinfo/plog-svn
> >>>>
> >>>> _______________________________________________
> >>>> pLog-svn mailing list
> >>>> pLog-svn at devel.lifetype.net
> >>>> http://devel.lifetype.net/mailman/listinfo/plog-svn
> >>>>
> >>>
> >>> --
> >>> Paul Westbrook
> >>> paul at westbrooks.org
> >>> <http://www.westbrooks.org>
> >>>
> >>>
> >>> _______________________________________________
> >>> pLog-svn mailing list
> >>> pLog-svn at devel.lifetype.net
> >>> http://devel.lifetype.net/mailman/listinfo/plog-svn
> >>
> >> --
> >> Jon Daley
> >> http://jon.limedaley.com/
> >>
> >> An ego trip is something that never gets you anywhere.
> >> -- Suzan Wiener
> >> _______________________________________________
> >> pLog-svn mailing list
> >> pLog-svn at devel.lifetype.net
> >> http://devel.lifetype.net/mailman/listinfo/plog-svn
> >
> > _______________________________________________
> > pLog-svn mailing list
> > pLog-svn at devel.lifetype.net
> > http://devel.lifetype.net/mailman/listinfo/plog-svn
> >
>
> --
> Jon Daley
> http://jon.limedaley.com/
>
> Quoting: the act of repeating erroneously the words of another.
> -- Ambrose Bierce
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://devel.lifetype.net/mailman/listinfo/plog-svn
More information about the pLog-svn
mailing list