Create a Gallery to Present groups of HTML objects

I need to be able to display a bunch of books that are on sale from Amazon that interest the site’s audience. Amazon’s Associate Program makes it easy to monetize your site by advertising their stuff. And since the product (if placed properly) can be a value add to your clients, it is a win win.

In the SS, you can see the book ads from Amazon. Each one of these ads is a small node from a custom content type

drupal css gallery

called Ads-Books. This type is nothing more than a piece of full, unfiltered HTML that allows you to create any kind of node that you want to. I have created buttons, help graphics, all sorts of things using these types of nodes. And by using Panels and CSS, they are easy to style and place.

The View uses the Grid display. This uses <TR> and <TD> tags so the tables are added easy and don’t require much in the way of styling. I know, TABLES… but they still have their uses at times.

In addition to the Grid display, I added three pieces of CSS to make things fit together properly:
.book-ads-cell-class > p {width: 25px; /* helps align indiv cells*/} {left: -8px; position: relative; /* moves the whole panel pane content around inside the table rows/cells*/}

drupal images { /* more help for cells*/
position: relative;
left: -33px;
top: 23px;

the other SS shows what one of the individual book nodes looks like in code within CKEditor.

the nice thing about this view is that it is maintenance free. As long as I add book ads to that content type, they will appear properly in the view.

Advertising on your site – Adsense and Amazon

Well, I have had enough with Adsense. I tried for weeks to get them to place ads on my site with no luck. is a niche site anyway but I guess that I don’t get enough traffic for them. But it is annoying because I did set up the bank routing info and even received that first token payment that I then had to confirm. So I thought it was OK. But then, weeks with nothing. Forget it.

So, I looked for a few other placed to get ads. At this point, I’m not really trying to monetize my site; I just need some real ads to help me do the design stuff. If I were any good at design this wouldn’t be an issue but I am not so it is. I need to be able to place the ads so that I can see what the hell I am doing.

So, Amazon’s Affiliate Program looked good. And it is. I really like it. I created the account and was approved a few hours later. The confirmation was easy. I gave them my Magicjack number and clicked “call” and literally, three seconds later I got a call, put my on screen pin in and was off. I can set up the payment stuff later and get started now.

And I like what I can do. I can pick products that I want to show that are sold by Amazon. In my case, I picked a bunch of books that are concerned with incarceration since that’s my audience. And there are a bunch of way to show the ads. There is no Module PER SE the way there is with Adsense. But you don’t need it. Amazon will generate the code for you and you can just stick it into a content type that allows Full HTML. Then you can use Panels to place that content anywhere you want, then use CSS to tweak it a bit and you are good. I got more done in a few hours with Amazon than with Adsense over weeks.

Adsense update

learn drupal adsense

Well, I am making some progress on the adsense integration. I have the account setup and have confirmed that the bank info is correct but it has been over a week and it is still at the verification on the adsense interface. Not sure what that might mean except that they may not want my site to host ads. anyway, this is what you see when you are in the waiting status.

Google Adsense, Block, Views, and Panels.

The last thing that I am going to do before I start with the css styling on my site is configure some ads via Google Adsense. Here is a general overview of what to do:

  • Download and install the Drupal Adsense module. It has been around for many years and will behave very well. 
  • Create an Adsense account at Google. This means including payments options for them, including banking info. I’m sure it is fine but be aware of what you are doing.
  • Make a note of your pub number from Google. And the slot number from the ad that you create to get started
  • The module enabled the easy placement of the ad via a Block. The block config is also where you will go to enter the slot number referenced above.
  • The tough part for me now is the placement. I really use Panels and Views, and Nodes to display my content. So I am going to figure out how to do that. Otherwise, I may have to place the code for the ad manually in a content type and use it in a Panel that way. Which will be ok but I hope that I can do it a bit easier than that. I’ll be back with an update later.
  • OH – NOTE – You won’t see the ads if you are an admin unless you change the permissions
  • The blocks also show up under Miscellaneous in the Add Panel Content area so that solves that!
  • It appears that I have to complete the payment verification process from my bank to get things finished. That can take a day or two. I will then have to verify the amount in my account and go from there.