Forums / Addon Sideboxes / Twitter sidebox Cached

Twitter sidebox Cached

Views: 35,596

Results 61 to 71 of 71
12 Apr 2013, 9:21 AM
#61
paulm avatar

paulm

Totally Zenned

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

Twitter sidebox Cached

Hi patsky, sorry for the late reply and thanks for posting you fix.

My guess is that your character set is set to UTF-8 i.s.o. utf-8, or maybe a different encoding is being used which can't be converted to iso. If the problem lies in the fact that the script does not account for a UTF-8 versus utf-8 setting this should solve the problem:

Change:

 if (!(CHARSET == 'utf-8')) { 
  // convert UTF-8 to ISO-8859-1
    $text = iconv('UTF-8', 'ISO-8859-1//TRANSLIT//IGNORE', $text);
  }

to

 if (!([B]strtolower([/B]CHARSET[B])[/B] == 'utf-8')) { 
  // convert UTF-8 to ISO-8859-1
    $text = iconv('UTF-8', 'ISO-8859-1//TRANSLIT//IGNORE', $text);
  }

If the problem is related to the use of an incompatible character set you might get problems when using special characters in your tweets (like ö or é).

25 Apr 2013, 6:31 PM
#62
landron avatar

landron

New Zenner

Join Date:
Dec 2011
Posts:
23
Plugin Contributions:
0

Re: Twitter sidebox Cached

Hi, I just installed this and it doesn't post tweets. When clicking either "now" link, it looks for twitter.com/OnlineWineSale/statuses/1 and Twitter says "sorry, that page doesn't exist!" OnlineWineSale is my Twitter ID. Any help is appreciated

25 Apr 2013, 11:14 PM
#63
paulm avatar

paulm

Totally Zenned

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

Re: Twitter sidebox Cached

Hi Landron,

I assume you somehow installed an old version, the links don't look like "twitter.com/OnlineWineSale/statuses/" in the latest version. Also the problem appears to be solved, so I guess the cache simply needed a refresh.

12 Jun 2013, 8:08 AM
#64
mattzcm avatar

mattzcm

New Zenner

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

Re: Twitter sidebox Cached

Hi all,

Looks like some changes are going to be required:

The Twitter REST API v1 is no longer active. Please migrate to API v1.1. https://dev.twitter.com/docs/api/1.1/overview

12 Jun 2013, 8:57 AM
#65
paulm avatar

paulm

Totally Zenned

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

Re: Twitter sidebox Cached

Thanks for the update, I didn't know that (as I don't follow the Twitter API development). It looks like, with the 1.1 API, authentication is required even to simply get status updates :wacko:

I don't think I will get to implementing the 1.1 API soon. Twitter is not that important to me and I've got other things on my mind right now (although this often does not prevent me from doing low level priority things anyway...)

19 Jun 2013, 8:17 PM
#66
jsweb avatar

jsweb

Zen Follower

Join Date:
Jul 2005
Location:
UK and Ireland
Posts:
392
Plugin Contributions:
0

Re: Twitter sidebox Cached

@MattZCM -- Thanks for sharing that. I was at a miss to why Twitter stopped working on a clients hosted account. I was even looking at server level to see if a firewall was blocking it..

Let's hope that Mr Paulm finds some spare time to update it ;)

Regards

The JSWeb Team
Providing Zen Cart Hosting, Design and Support services to help your business succeed online!
JSWeb | UK / Ireland ZenCart Design and Hosting Specialists

20 Jun 2013, 9:31 AM
#67
paulm avatar

paulm

Totally Zenned

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

Re: Twitter sidebox Cached

Meanwhile, if you don't want to remove the box yet, it might be wise to suspend the cache refresh:

define('TWITTER_BOX_CACHED_CACHE_DURATION', 60*60*24*365*1000);

(includes/extra_configures/twitter_cached_sidebox.php)

This should prevent any unsuccessful calls to the Twitter api (for about 1000 years, so maybe there will be a solution before the next try...) and keep your error log clean.

27 Jun 2013, 4:09 PM
#68
robertgriffinit avatar

robertgriffinit

New Zenner

Join Date:
Jan 2011
Posts:
5
Plugin Contributions:
0

Re: Twitter sidebox Cached

Until the Twitter sidebox Cached plugin is updated by the developer to be compatible with Twitter's API 1.1, you could embed a Twitter timeline into your Zen Cart website (this is what Twitter recommends). More info here: https://dev.twitter.com/docs/embedded-timelines

Potentially, you could create a custom sidebox featuring an embedded timeline. Instructions for making a custom sidebox here: http://www.zen-cart.com/wiki/index.php/Making_a_Custom_Sidebox

2 Jul 2013, 1:46 AM
#69
wakeleymb avatar

wakeleymb

New Zenner

Join Date:
Sep 2011
Location:
Sydney, Australia
Posts:
48
Plugin Contributions:
0

Re: Twitter sidebox Cached

god damn it! i liked the twitter cached!! i implemented the other twitter sidebox on here, but i dont like to look of it and kinda lazy to spruce it up.. am thinking of the twitter timeline on their dev. page.. has anyone implemented this yet? i'd like to see how it looks. you know its kinda hard to change something you're used to and like. :-)

wakeleymb.com.au

21 Jul 2015, 7:39 AM
#70
otaraia avatar

otaraia

New Zenner

Join Date:
Mar 2006
Posts:
4
Plugin Contributions:
0

Re: Twitter sidebox Cached

robertgriffinit:

Until the Twitter sidebox Cached plugin is updated by the developer to be compatible with Twitter's API 1.1, you could embed a Twitter timeline into your Zen Cart website (this is what Twitter recommends). More info here: https://dev.twitter.com/docs/embedded-timelines

Potentially, you could create a custom sidebox featuring an embedded timeline. Instructions for making a custom sidebox here: http://www.zen-cart.com/wiki/index.php/Making_a_Custom_Sidebox

I tweaked my twitter_sidebox_defines.php on 1.5.4 for the new API and it seems to work ok......

<?php /** * twitter sidebox definitions * * @package templateSystem * @copyright 2010 GetZenned.nl based on Kuroi blank sidebox * @copyright Portions Copyright 2003-2007 Zen Cart Development Team * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: twitter_sidebox_defines.php 2010-04-17 eentje $ */ define('BOX_HEADING_TWITTER_SIDEBOX', 'Tweets'); define('TEXT_TWITTER_SIDEBOX', '<div id="twitter_div"> <h2 class="sidebar-title">Twitter Updates</h2> <ul id="twitter_update_list"></ul> <a class="twitter-timeline" href="https://twitter.com/YOUR_ACCOUNT" data-widget-id="623389480532094976">Tweets by @YOUR_ACCOUNT</a> </div> <script>window.twttr = (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0], t = window.twttr || {}; if (d.getElementById(id)) return t; js = d.createElement(s); js.id = id; js.src = "https://platform.twitter.com/widgets.js"; fjs.parentNode.insertBefore(js, fjs); t._e = []; t.ready = function(f) { t._e.push(f); }; return t; }(document, "script", "twitter-wjs"));</script>');
25 Aug 2015, 8:46 AM
#71
mohamed0100 avatar

mohamed0100

New Zenner

Join Date:
Aug 2015
Location:
egypt
Posts:
2
Plugin Contributions:
0

Re: Twitter sidebox Cached

thx fot sharing:happy: