When writing a Post in WordPress you can upload images to simultaneously writing the article. These images, which are part of the media library, are associated with that particular post. The peculiarity of this behavior lies in the possibility of extracting these images no matter if they were physically placed inside the post.
Articles Tagged 'tips-&-tricks'
Retrieve the images loaded in a Post
Getting latitutine and longitude in Google Maps
To find the coordinates of an address or latitude and longitude, we can use this simple and useful hacks. Open the site in Google Maps . Once on the map looking for the address you want (eg Via Cortese 10, Modena).
Very short snippet: Wordpress, coming soon on your blog
WordPress, like most of you know, allows you to publish a post "post-dated" (good pun). In practice, the post is stored with a date that is yet to come. This allows many bloggers to "schedule" (programmed) to publish a post without worrying about being in your console for the actual publication. It also allows you to keep publishing posts consistently even when we are on vacation.
Very short snippet: PHP slug
Who develops WordPress definitely knows the word slug , usually used to indicate the text strings that contain spaces or other "strange". In practice a URL string friendly, ie able to be used within a URL.
Very short trick: 3 output function in PHP
Within a PHP function can be printed in three different ways:
1 2 3 4 5 6 7 8 9 10 | <? Php $valore = 'Ciao' ) { miaFunction function ($ value = 'Hello') { ?> <ul> $valore ; ?> --> <! - <li> <? Php echo $ value;?> -> ?> </li> <li> <? = $ value?> </ li> </ Ul> <? Php } ?> |
Or:
1 2 3 4 | $valore = 'Ciao' ) { miaFunction function ($ value = 'Hello') { '<ul><li>' . $valore . '</li></ul>' ; $ O = '<li>'. $ Value. '</ Li> </ ul>'; ; echo $ o; } |
Or:
1 2 3 4 | $valore = 'Ciao' ) { miaFunction function ($ value = 'Hello') { "<ul><li> $valore </li></ul>" ; $ O = "<li> $ value </ li> </ ul>"; ; echo $ o; } |
Very short trick: undefined values in Javascript
Is there a shortcut to assign "on the fly" a value to a variable if one is not defined (undefined), using the logical OR operator (| |) - double pipe:
1 2 3 4 5 | / / Foo is undefined var bar; pluto || '5' ; var foo = bar | | '5 '; pippo ) ; alert (foo); / / Result: 5 |
Very short trick: faster loops in Actionscript
In Actionscript cycles for it is good to use them with care. For example, it is good to use variables uint when you can:
You can also use the - not always known - the form:
Very short trick: PHP echo car
In PHP you can use an abbreviated form, or contracted, to display variables or returns of functions:
1 2 3 4 5 6 7 8 | / / In place of $miavar ?> <? Php echo $ miavar?> / / You can write ?> <? = $ Miavar?> / / In place of miaFunc ( ) ?> <? Php echo miaFunc ()?> / / You can write ?> <? MiaFunc = ()?> |
Movies resizable Flash: Act II
Returning to the Post StageExt Class: resizable Flash movies here is an even easier to get the same effect, only if the library for our movie is at least one Flash component!
Create a symbol, a red square 100 × 100 and place it in stages resizeWindow calling. Enter the library, not on the Stage, any component, such as a TextInput, and enter the following code in the first frame of the movie.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | managers . SystemManager ; import mx. managers. SystemManager; / / scaleMode = "noscale" Stage . scaleMode = "noScale" / / / / SystemManager.init (); ( "resize" , resizeWindow ) ; SystemManager. AddEventListener ("resize", resizeWindow); / / = function ( Void ) : Void { resizeWindow. resize = function (Void): Void { Object = SystemManager . screen ; var s: Object = SystemManager. screen; _width = s . width ; this. _width = s. width; _height = s . height ; this. _height = s. height; _x = Math . round ( s . x ) ; this. _x = Math . round (s. x); _y = Math . round ( s . y ) ; this. _y = Math . round (s. y); } ( ) ; resizeWindow. resize (); |
Line 6 (SystemManager.init () ;) can be omitted.
Flight Simulator in Google Earth
Hear, hear ... for all fans of Flight Simulator here is a really tasty treat. Within Google Earth is a hidden flight simulator.

For attivarolo just open Google Earth and press the following key combinations:
- Command + Option + A (Mac)
- Ctrl + Alt + A (Windows)
For instructions see the flight: http://earth.google.com/intl/en/userguide/v4/flightsim/index.html
For more details see: http://marco-za.blogspot.com/2007/08/google-earth-flight-simulator.html






Latest Comments
Giovambattista Fazioli : @ GM: If you upload images to a different server (that WordPress can not ...
GM : Hi, sorry to resurrect an old post but I hope you can give me a hand. How do I, with this method, ...
Giovambattista Fazioli : @ Fabio: a post from the past! I would recommend using the most convenient features of tabs now ...
Fabio : Hello, searching the web I found this article to create your javascript tab strip with php and css, but ...
Miriam : What do you think of Disqus? I am using it and I love it.