Profile

Achievement

first submission:submitting first snipplet

ginoplusio's Recent Snippets



« Prev 1 2 3
Extract all the tags (shared between two post types) used with a specific post type
0 1299 posted 1 year ago by ginoplusio
From WordPress 4.7 when you upload a PDF it generates jpg previews. All pdf will remain without previews, or you can use this script to generate previews.
0 221 posted 3 years ago by ginoplusio
Use it to detect old browser, when your client still use an old browser!
0 257 posted 3 years ago by ginoplusio
This PHP function lets you reorder records on a table when you have a field used for save the position. If you have a field with position when you are editing records you probably want, for example, to move a record from position 5 to position 2, but...
0 259 posted 6 years ago by ginoplusio
Sometimes using small code snippets is faster than implement the official api. Using mini bots class is faster to get Instagram data.
0 244 posted 6 years ago by ginoplusio
Sometimes fake users use temporary emails account. Block them within email validation function.
1 236 posted 6 years ago by ginoplusio
This is a basic HTML5 starter template that I use when I start a new project. Scripts should go at the end.
8 917 posted 7 years ago by ginoplusio
How to remap a value to another inside a mysql query select.
0 226 posted 8 years ago by ginoplusio
Here is a function that read the number of times a url is shared on twitter.
1 228 posted 8 years ago by ginoplusio
I will show you how to crate an app for facebook to handle the facebook connect process on your web site. Then I will show you the php code to perform the login on facebook and retrieve the informations you need for your site. The last suggestion w...
0 231 posted 8 years ago by ginoplusio
When you add facebook like button to your site, probably, you also want to save the number of likes of your pages to your database.These data are very useful and very important because they tell you which of your articles are better than others. More...
0 305 posted 8 years ago by ginoplusio
Thanks to followgram.me you can read a public feed with your photos. Use this code to retrieve your Instagr.am photos and use them on your web.
0 247 posted 9 years ago by ginoplusio
I’ve made this function that receive the input $video string that contains the dirty embed code as it is from youtube. The second parameter $new_width (if specified) permits to resize the embed code proportionally to the width you need for your tem...
0 250 posted 10 years ago by ginoplusio
Since the 31 of august 2010, twitter made its API more secure, stopping basic authentication calls. So, if you used basic authentication you have to change your code and implement oAuth authentication model or you can follow this link and found a mi...
1 257 posted 10 years ago by ginoplusio
If you need to add some content to your pages without having that content in your database you can use Wikipedia API. You can, for example, need to add automatically a simple description to a city name, or to a band name. Or you could need to add the...
1 197 posted 10 years ago by ginoplusio
Push service is a technology that allows you to send alerts/notifications to a mobile device. Blackberry has its own push service, iPhone has its own, and also Android devices has their own push services (you can learn more on Wikipedia page).\r\nPus...
1 260 posted 10 years ago by ginoplusio
Add and remove www to urls through .htaccess with mod_rewrite
1 197 posted 10 years ago by ginoplusio
Redirects all calls to mp3 files to a proxy (usefull fr example to track stats on db) the +FollowSymlinks should be already setted, but if it isnt' this setting with use it. FollowSymlinks must be on to use the rewrite engine.
0 269 posted 10 years ago by ginoplusio
This simply php function will retrieve the links of the images from Google Images searched with a keyword. The function just calls images.google.it and parse the html to find the url of the images, in this case the urls are stored in the javascript,...
0 371 posted 10 years ago by ginoplusio
This small function receive a text as input and returns an html text with links if the source text contains urls (http://www… but also ftp://… and every other protocol), emails, twitter’s usernames (with @ at the beginning) and also twitter tag...
0 212 posted 10 years ago by ginoplusio
Sometime designers put form labels and instrucions into html inputs. One of the common uses is for login boxes when there’s not much space. I wrote a small jQuery plugin which dynamically replaces selected <input> fields with <input> fields display...
1 262 posted 10 years ago by ginoplusio
Changing Facebook Status with PHP, download the Mini Bot PHP class from the blog http://www.barattalo.it
1 207 posted 10 years ago by ginoplusio
PHP function of mini bot class that lets you retrieve twitter infos from twitter nickname. ($this->attr method is part of the Mini Bot Class)
2 183 posted 10 years ago by ginoplusio
This function calls pingomatic rpc service to increase traffic to your site. More info and instructions on [Barattalo blog](http://www.barattalo.it/2010/02/24/ping-pingomatic-com-services-with-php/ "read this post"). .
1 206 posted 10 years ago by ginoplusio
1 336 posted 10 years ago by ginoplusio
Suppose you have a login form and you want to send the form when user press enter on his keyboard and not only by clicking on the submit button. This can be achieved capturing a specific event when the user is typing. We have to capture the keypress...
1 218 posted 10 years ago by ginoplusio
Function to fix char set and collation on mysql tables, see [this link](http://www.barattalo.it/2010/02/11/php-function-to-fix-collation-on-database-fields-of-mysql/ "Fix encoding on db") for examples and more infos.
1 235 posted 10 years ago by ginoplusio
« Prev 1 2 3