Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SEO Expert Blog:
Creating Amazon Ads that Rock with jQuery and PHP
Aug 07, 2007 @ 15:16:00

From the SEO Expert Blog, there's a new tutorial focusing on making "Amazon ads that rock" by combining jQuery and PHP.

Are you sick of annoying ads that take up large parts of the screen, pop up, under or anywhere else, move around, blink and flash? You want to learn how to create ads that rock with a few lines of simple JavaScript and PHP code? Then let me show you how.

He shows his method for the creation of his unobtrusive ads with the advertising content that Amazon has to offer. The process is broken up into four steps:

  • The Data Structure - an array of arrays with the Amazon information for the items (in this case books)
  • Converting the PHP Array to JavaScript - using a Drupal module to assign the PHP array to a Javascript variable
  • The HTML Output - a function that outputs a "block" of ads
  • The JavaScript - the jQuery Javascript code to handle the clicks on each of the links.

You can see it in action at the top of the right sidebar on the SEO Expert website.

tagged: amazon advertisement jquery unobtrusive javascript drupal amazon advertisement jquery unobtrusive javascript drupal

Link:

SEO Expert Blog:
Creating Amazon Ads that Rock with jQuery and PHP
Aug 07, 2007 @ 15:16:00

From the SEO Expert Blog, there's a new tutorial focusing on making "Amazon ads that rock" by combining jQuery and PHP.

Are you sick of annoying ads that take up large parts of the screen, pop up, under or anywhere else, move around, blink and flash? You want to learn how to create ads that rock with a few lines of simple JavaScript and PHP code? Then let me show you how.

He shows his method for the creation of his unobtrusive ads with the advertising content that Amazon has to offer. The process is broken up into four steps:

  • The Data Structure - an array of arrays with the Amazon information for the items (in this case books)
  • Converting the PHP Array to JavaScript - using a Drupal module to assign the PHP array to a Javascript variable
  • The HTML Output - a function that outputs a "block" of ads
  • The JavaScript - the jQuery Javascript code to handle the clicks on each of the links.

You can see it in action at the top of the right sidebar on the SEO Expert website.

tagged: amazon advertisement jquery unobtrusive javascript drupal amazon advertisement jquery unobtrusive javascript drupal

Link:

24ways.org:
Introducing UDASSS!
Dec 19, 2005 @ 13:27:01

On our sister site, AjaxDeveloper.org today, there's a new post that references an "Unobtrusive Degradable Ajax Style Sheet Switcher" powered on the backend by PHP - UDASSS.

First of all, the idea is very simple. I wanted something just like what Paul Sowden put together in Alternative Style: Working With Alternate Style Sheets from Alistapart Magazine EXCEPT a few minor (not-so-minor actually) differences which I've listed briefly below:

  • Allow users to switch styles without JavaScript enabled (degradable)
  • Preventing the F.O.U.C. before the window 'load' when getting preferred styles
  • Keep the JavaScript entirely off our markup (no onclick’s or onload’s)
  • Make it very very easy to implement (ok, Paul did that too)
What I did to achieve this was used server-side cookies instead of JavaScript cookies. Hence, PHP. However this isn't a "PHP style switcher" – which is where Ajax comes in. For the extreme technical folks, no, there is no xml involved here, or even a callback response. I only say Ajax because everyone knows what 'it' means. With that said, it’s the Ajax that sets the cookies 'on the fly'. Got it? Awesome!

The rest of the post is a tutorial on how to use it (simply), and a direct link to download it.

tagged: ajax usasss Unobtrusive Degradable Ajax Style Sheet Switcher ajax usasss Unobtrusive Degradable Ajax Style Sheet Switcher

Link:

24ways.org:
Introducing UDASSS!
Dec 19, 2005 @ 13:27:01

On our sister site, AjaxDeveloper.org today, there's a new post that references an "Unobtrusive Degradable Ajax Style Sheet Switcher" powered on the backend by PHP - UDASSS.

First of all, the idea is very simple. I wanted something just like what Paul Sowden put together in Alternative Style: Working With Alternate Style Sheets from Alistapart Magazine EXCEPT a few minor (not-so-minor actually) differences which I've listed briefly below:

  • Allow users to switch styles without JavaScript enabled (degradable)
  • Preventing the F.O.U.C. before the window 'load' when getting preferred styles
  • Keep the JavaScript entirely off our markup (no onclick’s or onload’s)
  • Make it very very easy to implement (ok, Paul did that too)
What I did to achieve this was used server-side cookies instead of JavaScript cookies. Hence, PHP. However this isn't a "PHP style switcher" – which is where Ajax comes in. For the extreme technical folks, no, there is no xml involved here, or even a callback response. I only say Ajax because everyone knows what 'it' means. With that said, it’s the Ajax that sets the cookies 'on the fly'. Got it? Awesome!

The rest of the post is a tutorial on how to use it (simply), and a direct link to download it.

tagged: ajax usasss Unobtrusive Degradable Ajax Style Sheet Switcher ajax usasss Unobtrusive Degradable Ajax Style Sheet Switcher

Link:


Trending Topics: