This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
316
Off-topic / jQuery: .on() instead of .live()
« on February 3rd, 2013, 03:30 PM »
This is my .live() script I need to update because it's deprecated:
http://jsfiddle.net/wtz5f/1/
This is my tentative to use .on() for the same behavior (but nothing happens..):
http://jsfiddle.net/PjQ3N/1/
What's wrong with the latter example? :)
http://jsfiddle.net/wtz5f/1/
This is my tentative to use .on() for the same behavior (but nothing happens..):
http://jsfiddle.net/PjQ3N/1/
What's wrong with the latter example? :)
317
Features: Forward thinking / Re: jQuery support
« on February 3rd, 2013, 02:20 PM »
à propos, I use this plugin, Galleriffic. I run the jQuery Migrate Plugin and I noticed that it uses .attr too (if you do a search you can find 12 references),
Should I change those to .prop or can I leave them there? :)
Should I change those to .prop or can I leave them there? :)
318
Off-topic / Re: Interesting concept
« on February 2nd, 2013, 08:25 PM »
Uhm nice! But.. isn't this achievable with google search filters too?
319
Off-topic / Should I add a cache to this script?
« on February 2nd, 2013, 01:49 PM »
I have this script that authenticates with Twitter API 1.1 and retrieves the last 6 tweets from my timeline.
Code: [Select]
Should I add a cache mechanism? That maybe stores in a file the JSON fetched and updates it only if it's older than X minutes. Without caching does this impact much on server load?
<?php
function buildBaseString($baseURI, $method, $params)
{
$r = array();
ksort($params);
foreach($params as $key=>$value){
$r[] = "$key=" . rawurlencode($value);
}
return $method."&" . rawurlencode($baseURI) . '&' . rawurlencode(implode('&', $r)); //return complete base string
}
function buildAuthorizationHeader($oauth)
{
$r = 'Authorization: OAuth ';
$values = array();
foreach($oauth as $key=>$value)
$values[] = "$key=\"" . rawurlencode($value) . "\"";
$r .= implode(', ', $values);
return $r;
}
$url = "https://api.twitter.com/1.1/statuses/user_timeline.json";
$oauth_access_token = "INSERIRE TOKEN";
$oauth_access_token_secret = "INSERIRE TOKEN";
$consumer_key = "INSERIRE KEY";
$consumer_secret = "INSERIRE KEY";
$oauth = array( 'oauth_consumer_key' => $consumer_key,
'oauth_nonce' => time(),
'oauth_signature_method' => 'HMAC-SHA1',
'oauth_token' => $oauth_access_token,
'oauth_timestamp' => time(),
'count' => 6,
'oauth_version' => '1.0');
$base_info = buildBaseString($url, 'GET', $oauth);
$composite_key = rawurlencode($consumer_secret) . '&' . rawurlencode($oauth_access_token_secret);
$oauth_signature = base64_encode(hash_hmac('sha1', $base_info, $composite_key, true));
$oauth['oauth_signature'] = $oauth_signature;
$header = array(buildAuthorizationHeader($oauth), 'Expect:');
$options = array( CURLOPT_HTTPHEADER => $header,
CURLOPT_HEADER => false,
CURLOPT_URL => $url . '?count=6',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_SSL_VERIFYPEER => false);
$feed = curl_init();
curl_setopt_array($feed, $options);
$json = curl_exec($feed);
curl_close($feed);
$twitter_data = json_decode($json);
echo "<ul style='color:#6E6E6E'>";
foreach ($twitter_data as $tweet)
{
if (!empty($tweet)) {
$text = $tweet->text;
$text_in_tooltip = str_replace('"', '', $text); // replace " to avoid conflicts with title="" opening tags
$id = $tweet->id;
$time = strftime('%d %B', strtotime($tweet->created_at));
$username = $tweet->user->name;
}
echo '<li><span title="'; echo $text_in_tooltip; echo '">'; echo $text . "</span><br>
<a href=\"http://twitter.com/"; echo $username ; echo '/status/'; echo $id ; echo '"><small>'; echo $time; echo ' </small></a> -
<a href="http://twitter.com/intent/tweet?in_reply_to='; echo $id; echo '"><small>rispondi</small></a> -
<a href="http://twitter.com/intent/retweet?tweet_id='; echo $id; echo '"><small>retweet</small></a> -
<a href="http://twitter.com/intent/favorite?tweet_id='; echo $id; echo '"><small>preferito</small></a></li>';
}
echo '</ul>';
?>
Should I add a cache mechanism? That maybe stores in a file the JSON fetched and updates it only if it's older than X minutes. Without caching does this impact much on server load?
320
Features: Forward thinking / Re: jQuery support
« on February 1st, 2013, 06:01 PM »
I'd say go with 2.0. You'll have to do the switch sooner or later. Because of plugin authors and the thousands of topics that will be open by people complaining Wedge to not have the latest jQuery. We choose not to adopt "Class A/B" browsers because of complaining users, an old jQuery version would be another complain indeed.. :P
321
The Pub / Re: Remove flash dependency from AeMe?
« on January 30th, 2013, 06:40 PM »
80% of videos on the Internet are h264
http://a2mac.org/2012/01/80-of-internet-video-encoded-in-h-264/
http://a2mac.org/2012/01/80-of-internet-video-encoded-in-h-264/
322
The Pub / Re: Remove flash dependency from AeMe?
« on January 30th, 2013, 04:26 PM »
H264 is indeed the standard, not WebM
323
The Pub / Re: Remove flash dependency from AeMe?
« on January 29th, 2013, 07:17 PM »
They dont deserve Wedge. Isn't it only for real men (and women)? Why not also browsers? :P
324
The Pub / Re: Remove flash dependency from AeMe?
« on January 29th, 2013, 07:09 PM »
What about Wedge to grant a "Class A" and "Class B" support to browsers? Class A have all the latest goodness of html5, class b don't have video player, mass uploading, etc. Not our fault if users don't upgrade or browser vendors are lazy/have of stupid ideas about codec support.
325
Archived fixes / Re: Input boxes not working in Chrome
« on January 29th, 2013, 04:26 PM »
Maybe opening a ticket on their trac would help :)
326
Archived fixes / Re: Plugin execution
« on January 25th, 2013, 11:56 AM »
I refreshed 6 times, nothing :P
327
Archived fixes / Re: Plugin execution
« on January 25th, 2013, 11:22 AM »
I'm sorry I can't reproduce this.. I tried with different skins, different topics/boards but I always see the rev..
328
Plugins / Re: Plugin server
« on January 23rd, 2013, 07:45 PM »
We could also have wedge.org/plugins and /plugins is on a separate server (at least with nginx that's possible)..
330
Archived fixes / Re: Add plugin doesn't work
« on January 21st, 2013, 11:05 AM »
Just great!! :))