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.
496
Plugins / Re: Light URL Plugin Maybe?
« on April 21st, 2012, 12:23 AM »
STAR are you a karma guy or something similar..? :P
497
Off-topic / Re: Extract images with a certain tag from Instagram
« on April 20th, 2012, 09:15 PM »If you're talking about one a day or thereabouts, there's really no need to be fetching any more frequently than perhaps once every 12 hours, or if you're really bothered, 1 to 6 hours.
I can't tell you whether using your account vs tags would be better. Which better describes what you want to show?
498
Off-topic / Re: Extract images with a certain tag from Instagram
« on April 20th, 2012, 08:48 PM »So you're fetching tags from Instagram... how often are items posted from Instagram that fit your tags?
What's a good timing..?
And what if I was extracting photos only from MY recent photos (only photos by the user_id xxx) instead of tags (i.e. there are no other images to "discard", every photo in the provided stream has to be shown)? Would this be better? :)
499
Off-topic / Re: Extract images with a certain tag from Instagram
« on April 20th, 2012, 08:40 PM »
Do you think that 500 seconds (8 minutes) is a time too short and will impact on the server..?
I don't think it is.. also because the file cached is smaller than 10kb..
I don't think it is.. also because the file cached is smaller than 10kb..
500
Off-topic / Re: Extract images with a certain tag from Instagram
« on April 20th, 2012, 06:53 PM »
Is there a sense to have 60*60 instead of simply 3600? :o
501
Off-topic / Re: Extract images with a certain tag from Instagram
« on April 20th, 2012, 06:40 PM »502
Off-topic / Re: Extract images with a certain tag from Instagram
« on April 20th, 2012, 06:12 PM »
Ok, another problem.. :P
Instagram created_time timestamp is GMT (I presume.. :P).. I need to get the italian timezone..
So I changed this:
Code: [Select]
to:
Code: [Select]
But I get:
Warning: gmstrftime() expects at most 2 parameters, 3 given
Instagram created_time timestamp is GMT (I presume.. :P).. I need to get the italian timezone..
So I changed this:
'.htmlentities(strftime('%e %B %Y alle %R', $value->caption->created_time)).'to:
'.htmlentities(gmstrftime('%e %B %Y alle %R',time()+3600,$value->caption->created_time)).'But I get:
Warning: gmstrftime() expects at most 2 parameters, 3 given
503
Off-topic / Re: Extract images with a certain tag from Instagram
« on April 20th, 2012, 02:32 PM »
This code works, is it also correct? :)
'.htmlentities($value->caption->text, ENT_QUOTES, "UTF-8").'
'.htmlentities($value->caption->text, ENT_QUOTES, "UTF-8").'
504
Off-topic / Re: Extract images with a certain tag from Instagram
« on April 20th, 2012, 02:20 PM »
Reasonable. :)
I "applied" htmlentities to my decoded data: '.htmlentities($value->caption->text).'
The downside is that accents are broken, example: ì becomes Ã~
Page char-set is UTF-8. I thought it would have handled accented chars properly...!
I "applied" htmlentities to my decoded data: '.htmlentities($value->caption->text).'
The downside is that accents are broken, example: ì becomes Ã~
Page char-set is UTF-8. I thought it would have handled accented chars properly...!
505
Off-topic / Re: Extract images with a certain tag from Instagram
« on April 20th, 2012, 02:52 AM »
Clear. :)
And about..:Quote from MultiformeIngegno on April 20th, 2012, 02:14 AM
And about..:
would it be faster (and better) to use file_get_contents or wp_remote_get (a WP function that uses the HTTP GET method..)?
506
Off-topic / Re: Extract images with a certain tag from Instagram
« on April 20th, 2012, 02:48 AM »
Oh! Clear now. :)
Am I wrong or the line $date = $tweets['created_at']; is useless (because then I decode the date directly from the JSON)..? It confused me a bit... I thought I needed to change that too but then I realized I don't need that... Right?
Am I wrong or the line $date = $tweets['created_at']; is useless (because then I decode the date directly from the JSON)..? It confused me a bit... I thought I needed to change that too but then I realized I don't need that... Right?
507
Off-topic / Re: Extract images with a certain tag from Instagram
« on April 20th, 2012, 02:34 AM » <?php
setlocale(LC_TIME, 'it_IT');
$json = wp_remote_get("http://twitter.com/status/user_timeline/lorenzoraffio.json?count=6", true);
$decode = json_decode($json['body'], true);
echo "
<ul style='color:#6E6E6E'>";
$count = count($decode); //counting the number of status
$date = $tweets['created_at']; // created date
for($i=0;$i<$count;$i++){ echo '
<li>'.$decode[$i]['text'].'<br><a href='; echo '"http://twitter.com/#!/'.$decode[0][user][name].'/status/'.$decode[$i][id].'"><small>'. date('j F',strftime($decode[$i]['created_at'])) ."</small></a> - <a href='http://twitter.com/intent/tweet?in_reply_to=".$decode[$i][id]."'><small>rispondi</small></a> - <a href='http://twitter.com/intent/retweet?tweet_id=".$decode[$i][id]."'><small>retweet</small></a> - <a href='http://twitter.com/intent/favorite?tweet_id=".$decode[$i][id]."'><small>preferito</small></a></li>";} echo "
</ul>
";
?>
Warning: date() expects parameter 2 to be long :blush:
I'm doing it wrong.. right? :P
508
Off-topic / Re: Extract images with a certain tag from Instagram
« on April 20th, 2012, 02:14 AM »
Uhm.. dates are still in english..
Code: [Select]
And another question.. would it be faster (and better) to use file_get_contents or wp_remote_get (a WP function that uses the HTTP GET method..)? :)
<?php
setlocale(LC_TIME, 'it_IT');
$json = wp_remote_get("http://twitter.com/status/user_timeline/lorenzoraffio.json?count=6", true);
$decode = json_decode($json['body'], true);
echo "
<ul style='color:#6E6E6E'>";
$count = count($decode); //counting the number of status
$date = $tweets['created_at']; // created date
for($i=0;$i<$count;$i++){ echo '
<li>'.$decode[$i]['text'].'<br><a href='; echo '"http://twitter.com/#!/'.$decode[0][user][name].'/status/'.$decode[$i][id].'"><small>'. date('j F',strtotime($decode[$i]['created_at'])) ."</small></a> - <a href='http://twitter.com/intent/tweet?in_reply_to=".$decode[$i][id]."'><small>rispondi</small></a> - <a href='http://twitter.com/intent/retweet?tweet_id=".$decode[$i][id]."'><small>retweet</small></a> - <a href='http://twitter.com/intent/favorite?tweet_id=".$decode[$i][id]."'><small>preferito</small></a></li>";} echo "
</ul>
";
?>
And another question.. would it be faster (and better) to use file_get_contents or wp_remote_get (a WP function that uses the HTTP GET method..)? :)
509
Off-topic / Re: Extract images with a certain tag from Instagram
« on April 20th, 2012, 02:00 AM »How come I never heard about Amstamgram before they got gobbled up by Facebook? :P
Okay.. now that I managed to get it working I.. have another question. :P
I'm using this code to create a list of tweets from my Twitter account:
<?php
$json = wp_remote_get("http://twitter.com/status/user_timeline/lorenzoraffio.json?count=6", true);
$decode = json_decode($json['body'], true);
echo "
<ul style='color:#6E6E6E'>";
$count = count($decode); //counting the number of status
$date = $tweets['created_at']; // created date
for($i=0;$i<$count;$i++){ echo '
<li>'.$decode[$i]['text'].'<br><a href='; echo '"http://twitter.com/#!/'.$decode[0][user][name].'/status/'.$decode[$i][id].'"><small>'. date('j F',strtotime($decode[$i]['created_at'])) ."</small></a> - <a href='http://twitter.com/intent/tweet?in_reply_to=".$decode[$i][id]."'><small>rispondi</small></a> - <a href='http://twitter.com/intent/retweet?tweet_id=".$decode[$i][id]."'><small>retweet</small></a> - <a href='http://twitter.com/intent/favorite?tweet_id=".$decode[$i][id]."'><small>preferito</small></a></li>";} echo "
</ul>
";
?>
Everything works perfectly except that the dates are in english. I need to set italian language for the strtotime function.. I know I need to use setlocale(LC_TIME, 'it_IT'); but I don't know where to add it..
510
Features / Re: "Select" code on iPhone
« on April 19th, 2012, 09:35 PM »
Nope. :D
Neither with default nor wireless theme
Neither with default nor wireless theme