expressodev / twitter_search

Twitter Search 2 plugin for ExpressionEngine 2.x
15 stars 2 forks source link

Relative Date display #2

Closed rkfoster closed 12 years ago

rkfoster commented 13 years ago

Greetings,

I've just installed your plugin on an Expression Engine site I'm working on and it seems to work quite well. One thing I've noticed though is that the relative_date is the same for all entries no matter how many tweets I list. In this case "4 days, 13 hours, 56 minutes". Am I misunderstanding the tag syntax or is this a possible bug? This web server is in Australia so the server time may be an issue here, there is a 2 hour difference if I use the Twitter widget to compare the two tweet listings.

Thanks for a great plugin.

rkfoster commented 13 years ago

Also, in case this is effecting the parse, I'm using the tag inside of an exp:channel:entries tag pair.

amacneil commented 12 years ago

Hi Bob

Sorry I just noticed this issue. Yes in this case the channel:entries tag is probably eating your {relative_date} variable before twitter search has a chance to replace it. A quick fix would be to put the twitter search code inside an embedded template.

In future we would need to support some form of variable prefix to solve this problem properly.

amacneil commented 12 years ago

I have added a var_prefix="" parameter which will allow you to avoid these naming clashes in future.