Forums / Addon Sideboxes / Twitter sidebox Cached

Twitter sidebox Cached

Views: 35,596

Results 21 to 40 of 71
28 Jan 2012, 9:25 AM
#21
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,780
Plugin Contributions:
2

Twitter sidebox Cached

And thank you for such a great mod paulm! :clap:

12 Feb 2012, 6:19 PM
#22
gavwright avatar

gavwright

New Zenner

Join Date:
Jul 2010
Posts:
30
Plugin Contributions:
0

Re: Twitter sidebox Cached

Hi,
I've recently completed a fresh installation of Zen Cart 1.5 that I'm busy customising and I've now installed the Twitter cached sidebox. It works a treat - but the heading display is incorrect on all pages apart from Home and Home :: Music CDs :: First Test Product. Instead of displaying 'Tweets', the header displays maybe 'Who's OnlineTweets' or 'TestimonialsTweets', depending, apparently, on the heading of the Sidebox that's just above it. Can't figure out why this should be or what would cause it. Any help, please?

It's on a test site, enterprise.terrassl.net/~simplyth/
I'm using ZenFlavor's Premium 9a template
I'm adjusting colours, sideboxes, etc. to suit my own needs.
I've looked in the FAQs but haven't managed to dig anything up.

TIA,
Gavin

14 Feb 2012, 11:49 AM
#23
gavwright avatar

gavwright

New Zenner

Join Date:
Jul 2010
Posts:
30
Plugin Contributions:
0

Re: Twitter sidebox Cached

OK, I've now 'got round' the header text display problem. I had disabled the display of the tweety bird image, which was obviously acting as some sort of a placeholder. I've now reinstated it as a transparent png and all is well.

Another problem is, though - the filtering of '@' is too aggressive. It doesn't just filter '@' in position 1 - it filters it anywhere. How do I change this, please, so the code only filters tweets sent directly to one user...but it still allows tweets that mention a user?

Thanks.

15 Feb 2012, 9:18 PM
#24
paulm avatar

paulm

Totally Zenned

Join Date:
Nov 2003
Posts:
1,878
Plugin Contributions:
5

Re: Twitter sidebox Cached

gavwright:

the filtering of '@' is too aggressive. It doesn't just filter '@' in position 1 - it filters it anywhere. How do I change this, please, so the code only filters tweets sent directly to one user...but it still allows tweets that mention a user?

Can you try the following:

Change this (in tpl_twitter_cached_sidebox.php line 19):

      if ( TWITTER_BOX_CACHED_FILTER == '' || (strpos ($twitterText, TWITTER_BOX_CACHED_FILTER) === FALSE) ){

To this:

      if ( TWITTER_BOX_CACHED_FILTER == '' || (strpos ($twitterText, TWITTER_BOX_CACHED_FILTER) !== 0) ){

And let me know if it works?

15 Feb 2012, 10:45 PM
#25
gavwright avatar

gavwright

New Zenner

Join Date:
Jul 2010
Posts:
30
Plugin Contributions:
0

Re: Twitter sidebox Cached

Splendid, sir - absolutely splendid! Works like a dream.

Thank you very much for that - it helps to keep the website feed more professional :-)

Gavin

5 Jun 2012, 12:51 AM
#26
lolwaut avatar

lolwaut

Zen Follower

Join Date:
Dec 2010
Posts:
142
Plugin Contributions:
0

Re: Twitter sidebox Cached

This is more of a CSS question, but how do I get the font-size of the links in the sidebox smaller (like the links that say how long ago the tweet was posted)? I've messed around in styles_twiiter_cached_sidebox.css without any luck.

Thanks!

13 Jun 2012, 5:51 PM
#27
lolwaut avatar

lolwaut

Zen Follower

Join Date:
Dec 2010
Posts:
142
Plugin Contributions:
0

Re: Twitter sidebox Cached

Hello,

I've been running this add-on (latest version) for about a week now. It can be seen at my site: http://tinyurl.com/3uttrvu

The problem is, about 50% of the time the twitter sidebox does not display any tweets. Nothing is displayed in the sidebox except the "follow us" button. Sometimes it works perfectly while other times it doesnt, its really a tossup. When it displays nothing, it can sometimes be fixed by manually refreshing the twitter cache through domain.com/$refresh_twitter_cache but that doesn't work all the time either. I shouldn't have to be doing that all the time anyway.

Does anybody have any suggestions on how to get this to work better for me? Perhaps some settings need to be adjusted or something?

Any help is appreciated. Thanks!

15 Jun 2012, 10:24 AM
#28
paulm avatar

paulm

Totally Zenned

Join Date:
Nov 2003
Posts:
1,878
Plugin Contributions:
5

Re: Twitter sidebox Cached

lolwaut:

The problem is, about 50% of the time the twitter sidebox does not display any tweets. Nothing is displayed in the sidebox except the "follow us" button. Sometimes it works perfectly while other times it doesnt, its really a tossup.I am not sure, but it seems that the twitter service is regularly down and responds with invalid xml then, maybe this problem is related (of course when the service is down the the cache should be used by the application, EDIT: but it might pick up the invalid xml and even cache that).

Do you have any errors in your php error log related to the twitter sidebox?

18 Jun 2012, 8:20 PM
#29
lolwaut avatar

lolwaut

Zen Follower

Join Date:
Dec 2010
Posts:
142
Plugin Contributions:
0

Re: Twitter sidebox Cached

paulm:

I am not sure, but it seems that the twitter service is regularly down and responds with invalid xml then, maybe this problem is related (of course when the service is down the the cache should be used by the application, EDIT: but it might pick up the invalid xml and even cache that).

Do you have any errors in your php error log related to the twitter sidebox?

There are no php error logs related to the twitter sidebox. However, I did take a look at twitter_cache.xml. When the sidebox displays nothing, this is what the XML file looks like:

<hash><error>Rate limit exceeded. Clients may not make more than 150 requests per hour.</error><request>/statuses/user_timeline/fredssupply.xml?count=25</request></hash>

Why am I exceeding the rate limit? I thought that was the whole point of having the cache.... please advise and thank you for your help.

18 Jun 2012, 8:31 PM
#30
lolwaut avatar

lolwaut

Zen Follower

Join Date:
Dec 2010
Posts:
142
Plugin Contributions:
0

Re: Twitter sidebox Cached

lolwaut:

Why am I exceeding the rate limit? I thought that was the whole point of having the cache.... please advise and thank you for your help.

By the way, my website is currently low traffic, with less than 100 hits per day. And my Twitter account is brand new with a total of 5 tweets and 5 followers. I barely have used it. So, I doubt this is a traffic-related issue.

19 Jun 2012, 1:07 PM
#31
paulm avatar

paulm

Totally Zenned

Join Date:
Nov 2003
Posts:
1,878
Plugin Contributions:
5

Re: Twitter sidebox Cached

lolwaut:

There are no php error logs related to the twitter sidebox. However, I did take a look at twitter_cache.xml. When the sidebox displays nothing, this is what the XML file looks like:

<hash><error>Rate limit exceeded. Clients may not make more than 150 requests per hour.</error><request>/statuses/user_timeline/fredssupply.xml?count=25</request></hash>

> 
> Why am I exceeding the rate limit? I thought that was the whole point of having the cache.... please advise and thank you for your help.
Are you using the version from this thread? (1.10) Of the one from the downloads section? (1.03)
19 Jun 2012, 6:47 PM
#32
lolwaut avatar

lolwaut

Zen Follower

Join Date:
Dec 2010
Posts:
142
Plugin Contributions:
0

Re: Twitter sidebox Cached

paulm:

Are you using the version from this thread? (1.10) Of the one from the downloads section? (1.03)

I am using 1.10.

21 Jun 2012, 3:49 AM
#33
lolwaut avatar

lolwaut

Zen Follower

Join Date:
Dec 2010
Posts:
142
Plugin Contributions:
0

Re: Twitter sidebox Cached

lolwaut:

I am using 1.10.

I've tried the 1.03 version too and have the same problem :(

21 Jun 2012, 9:25 PM
#34
elijah avatar

elijah

New Zenner

Join Date:
Jul 2006
Posts:
33
Plugin Contributions:
0

Re: Twitter sidebox Cached

Thank you for all your work, it's running great. It also cleared up an SSL issue I was having with a different sidebox. Cheers!

24 Jun 2012, 2:20 AM
#35
lolwaut avatar

lolwaut

Zen Follower

Join Date:
Dec 2010
Posts:
142
Plugin Contributions:
0

Re: Twitter sidebox Cached

paulm:

Are you using the version from this thread? (1.10) Of the one from the downloads section? (1.03)

If nobody else is experiencing this issue, I have to assume its something with my setup. I have an idea for a workaround...

Is there a way to change the setting of how often it tries to update the Twitter cache? If I could change it so it rarely tries to update the cache or only updates when I do a manual update through ?refresh_twitter_cache that would be ideal. I don't have a problem manually updating it whenever I post a new tweet since I don't tweet that often anyway.

Is this possible?

29 Jun 2012, 9:59 PM
#36
lolwaut avatar

lolwaut

Zen Follower

Join Date:
Dec 2010
Posts:
142
Plugin Contributions:
0

Re: Twitter sidebox Cached

lolwaut:

If nobody else is experiencing this issue, I have to assume its something with my setup. I have an idea for a workaround...

Is there a way to change the setting of how often it tries to update the Twitter cache? If I could change it so it rarely tries to update the cache or only updates when I do a manual update through ?refresh_twitter_cache that would be ideal. I don't have a problem manually updating it whenever I post a new tweet since I don't tweet that often anyway.

Is this possible?

Anyone?

11 Oct 2012, 4:11 AM
#37
soki avatar

soki

New Zenner

Join Date:
Apr 2008
Location:
Athens
Posts:
85
Plugin Contributions:
0

Re: Twitter sidebox Cached

Module stopped working yesterday! Iam the only one?

11 Oct 2012, 5:28 PM
#38
paulm avatar

paulm

Totally Zenned

Join Date:
Nov 2003
Posts:
1,878
Plugin Contributions:
5

Re: Twitter sidebox Cached

soki:

Module stopped working yesterday! Iam the only one?Stopped here too :ohmy:

The cache file shows:

<?xml version="1.0" encoding="UTF-8"?>
<errors>
  <error code="34">Sorry, that page does not exist</error>
</errors>

Maybe Twitter changed the url/api ?

13 Oct 2012, 2:02 AM
#39
soki avatar

soki

New Zenner

Join Date:
Apr 2008
Location:
Athens
Posts:
85
Plugin Contributions:
0

Re: Twitter sidebox Cached

OK I found the solution!

In includes/extra_configures/twitter_cached_sidebox.php

change in line 29 the url from ```
// Twitter Status url
define('TWITTER_BOX_CACHED_URL', sprintf("http://twitter.com/statuses/user_timeline/%s.xml?count=%d", TWITTER_BOX_CACHED_USER, (int)TWITTER_BOX_CACHED_COUNT));


to this ```
// Twitter Status url
define('TWITTER_BOX_CACHED_URL', sprintf("http://api.twitter.com/1/statuses/user_timeline/%s.xml?count=%d", TWITTER_BOX_CACHED_USER, (int)TWITTER_BOX_CACHED_COUNT));

and will work again :)

13 Oct 2012, 9:42 AM
#40
paulm avatar

paulm

Totally Zenned

Join Date:
Nov 2003
Posts:
1,878
Plugin Contributions:
5

Re: Twitter sidebox Cached

Great! Thanks soki!

Applied the change, refreshed the cache, and it works again :clap: