Re: 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:
Code:
if (!(CHARSET == 'utf-8')) {
// convert UTF-8 to ISO-8859-1
$text = iconv('UTF-8', 'ISO-8859-1//TRANSLIT//IGNORE', $text);
}
to
Code:
if (!(strtolower(CHARSET) == '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 é).
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
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.
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
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...)
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
Re: Twitter sidebox Cached
Meanwhile, if you don't want to remove the box yet, it might be wise to suspend the cache refresh:
Code:
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.
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.p...Custom_Sidebox
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. :-)
Re: Twitter sidebox Cached
Quote:
Originally Posted by
robertgriffinit
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>');