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

SitePoint PHP Blog:
Building an Ad Manager in Symfony 2
Oct 28, 2014 @ 18:29:31

In a recent post to the SitePoint PHP blog Hugo Giraudel shows you how to create an ad manager as a Symfony-based application. His ad manager allows you to use videos, images or HTML content to create and cache advertisements to add to any application.

The main idea was to build an ad manager. What the hell is an ad manager you say? Let’s say you have some places on your site/application to display ads. We do have things like this on our site, and one of our teams is (partially) dedicated to bringing those places to life with content. Now for some boring reasons I won’t list here, we couldn’t use an existing tool, so we were doomed to build something from scratch. As usual, we wanted to do a lot without much coding, while keeping an overall simplicity for the end user (who is not a developer). I think we came up with a fairly decent solution for our little project.

He uses ESI rendering with Twig templates to identify the ad to return, grab its configuration and render it back to the requesting client. He includes a global configuration (URI and allowed types) an an example of a per-ad configuration file that includes the cace settings, data type and link. The code is also included to consume the request for the ad and render the result. There's also a "randomize" method that picks a random item from the array by weight. Finally, he includes the view templates that can be used to render the results - one for the main ad layout and a few for each type (video, image or HTML).

tagged: advertisement manager symfony2 application tutorial

Link: http://www.sitepoint.com/building-ad-manager-symfony-2/

Mark Brown's Blog:
Microsoft and Drupal
Dec 17, 2009 @ 15:37:05

In response to a blog post about a Google ad from Microsoft (seen here) by a member of the Drupal community, Mark Brown of the Web Platform group at Microsoft has posted an apology for the "Forget Drupal..." tagline the ad sported.

First, I want to offer my sincerest apology for this. I have contacted Google and we are working on having this ad pulled as soon as possible. In addition we are working internally to ensure this doesn’t happen again. Second, I want the Drupal Community to know that Microsoft and the Drupal Community have been working together for some time now to make Drupal better on Windows.

Mark also points out that there's a lot of marketing Microsoft is doing all around the world to help promote the Drupal project (especially with it being one of the initial PHP packages in their Web Platform Installer). The ad was found and has been removed from circulation.

tagged: drupal microsoft advertisement community

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:

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:

PHPToys.com:
Creating a file based AD rotator script
Apr 24, 2007 @ 16:43:00

From the PHPToys.com website, there's a simple tutorial that shows you how to create a simple file-based ad rotation script for your website.

In this tutorial I will show you hot to create a simple AD rotator script without using database. The script can display both text and image ads and you can control the number of ads to be displayed at once.

The content (images) are stored in a directory and the heart of the mini-app, the rotation list, is stored in a text-file. All of the code you'll need to get started is included and you can even just download the script if you want to get started right away.

tagged: advertisement rotator script textfile simple tutorial advertisement rotator script textfile simple tutorial

Link:

PHPToys.com:
Creating a file based AD rotator script
Apr 24, 2007 @ 16:43:00

From the PHPToys.com website, there's a simple tutorial that shows you how to create a simple file-based ad rotation script for your website.

In this tutorial I will show you hot to create a simple AD rotator script without using database. The script can display both text and image ads and you can control the number of ads to be displayed at once.

The content (images) are stored in a directory and the heart of the mini-app, the rotation list, is stored in a text-file. All of the code you'll need to get started is included and you can even just download the script if you want to get started right away.

tagged: advertisement rotator script textfile simple tutorial advertisement rotator script textfile simple tutorial

Link:


Trending Topics: