Má tá tú nua leis an láithreán gréasáin, tú nach bhfuil faoi deara dócha. Ach tá an cúlra a bhfuil tú ag féachaint ar iarbhír rud nua. Agus randamacha. Agus sruthaithe ó Flickr. Tá sé ar an breiseán nua gur mé a fhorbairt le haghaidh WordPress ar a dtugtar ‘WP Flickr Cúlra '.

Is beag thar dhá sheachtain ó shin, d'athraigh mé mo téama a Motion ag 85ideas, Bhí intrigued agus a úsáid éifeachtach tréshoilseáin agus an cúlra. Agus ós rud é liom leamh de tapa ag breathnú ar an rud céanna, Cheap mé go ‘Cén fáth nach bhfuil a dhéanamh an chúlra seo randamach '? Flickr Soláthraíonn na milliúin grianghraif, go leor acu faoi Creative Commons Attribution License, agus go mbeadh sé seo ar foinse iontach do na cúlraí randamach. Mar sin, thosaigh mé ag códú…

Interestingly, it wasn’t as straight forward as one would expect. After all, you could simply use a dynamically generated CSS style sheet with abackgroundelement pointing to a random Flickr photo. Right?

But small photos cascade and your website will look like a bad 1995 rendition of your first HTML page. And the large photos may be Mar sin, large, you end up staring at just a grain of sand instead of a beach.

CSS3, the brand-spanking new version of CSS style sheets, supports stretching of background images. Ar an drochuair, not a single browser I have tried supports it. So I reverted to good-old image hacking, basically injecting the background in a negative Z-indexed <div> block at a fixed position.

Is ea, that last sentence is a great conversation breaker. But trust me, it is the injection portion that’s trickiest. For one, I do not like it when plugins require me to manually modify files, let alone modify files in the first place. So I assume there are other people out there who think alike. So how can I change a WordPress theme without actually modifying its files? Enter Javascript, jQuery to be specific, and we are on our way to great trickery!

So in the end, WP Flickr Background will use Javascript to add a new background image overlaid by the actual (original) contents. And it works! At least, it does so with Opera 10, Firefox 3, Google Chrome 3, MSIE 8 and Safari 4. Hence I am now putting the plugin through a public Alpha test, waiting for complaints to roll in: “Your website looks weird” agus “I’m getting Javascript errorsare some of the things I am expecting to see during testing, but hopefully there will be none! You will let me know, right?

If I am satisfied that there are no major issues with the plugin, then I will make it available for download. I Idir an dá linn, I will be re-arranging a few things on the website once again to make room for the new plugin and a few others I am thinking about writing. So please excuse construction going on in the next few days!

Related Poist:

  1. WP Flickr Cúlra
  2. WP Flickr Cúlra leagan 1.0.2 (Béite) le fáil
  3. WP Flickr Cúlra leagan 1.0.3 (Béite) le fáil
  4. WP beannú gné autohide Bosca
  5. Mhaisiúil Translations WordPress