Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#136 2009-04-22 20:13:02

mrtunes
Member
From: Toronto, On
Registered: 2007-03-12
Posts: 575
Website

Re: smd_random_banner: Random banner image for advertising

ok as i’ve been on the page more, i’m seeing it refresh more often now. i guess we’ll have to see how it works when we put more images in. i’ll also try the change to the advanced preferences that you mention.

thanks!

Offline

#137 2009-06-09 19:58:04

husainhk
Member
From: Dubai, UAE
Registered: 2007-08-12
Posts: 105
Website

Re: smd_random_banner: Random banner image for advertising

How can the visitor logs be used to track the clickthroughs on the banners? I need to setup a site, and the client wants a report on number of clicks each banner receives. Thanks in advance for any tips/advice.

Offline

#138 2009-06-09 20:27:33

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,521
Website GitHub

Re: smd_random_banner: Random banner image for advertising

husainhk wrote:

How can the visitor logs be used to track the clickthroughs on the banners?

First of all, remember this only works on internal clicks. If you’re thinking of using it to track affiliate clickthrough rates you’re better off looking elsewhere or using a dedicated tool for the job. In fact, you may well be better off using a 3rd party tool to analyse log files anyway ;-)

But if that hasn’t dissuaded you then simply use link_in="alt" (you could use caption or name to hold the destination URL if you prefer). When you put a URL in the chosen image field, your banners will become clickable and will have ?bid=ID_of_image added to the URL. Visit your standard TXP Visitor logs on the Admin tab and you’ll see each page that was served from a banner will show the ?bid in the ‘referrer’ column, thus you know which image ID generated the click. Use the search/filtering tools on that tab to see how many of each banner were clicked, or export your logs elsewhere to analyse them.

The ?bid= information should also be available in your server log files; they may have more powerful tools to slice and dice the data. Crucially, that may tell you how many times (and at what times of day) a banner was served so you can correlate that with the number of clicks to find the ratio. The time of day and frequency of click may also allow you to gauge the potential demographic who are using the site at any particular time, though this is subjective at best.

The analysis is useful if you have a bunch of different banners for the same page as you can find out (very roughly, assuming a normal distribution of randomness in delivery of images to visitors) which ads are the most effective. Oh, and if you don’t like the bid part, change it via the referer attribute.

Does that help at all?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#139 2009-09-29 16:14:15

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: smd_random_banner: Random banner image for advertising

Bloke:

I know this one may be a longshot, but is there anyway to set a timer so that the image appears for a set amount of time and then changes to another image without the page needing to be refreshed.

progre55

Offline

#140 2009-09-29 16:29:50

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,521
Website GitHub

Re: smd_random_banner: Random banner image for advertising

progre55 wrote:

is there anyway to set a timer so that the image appears for a set amount of time and then changes to another image

Not sure if this quite what you had in mind, but how about:

  1. use the limit attribute to grab N random related, random images
  2. dump them all on the page inside a div container that is set to the height+width of one image with overflow:hidden
  3. use the jQuery cycle-lite plugin to iterate over them after some delay

Not sure if it’ll work. If not and you really don’t need the random matching features of this plugin, smd_gallery will do the above without breaking into a big sweat.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#141 2009-09-29 16:47:35

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: smd_random_banner: Random banner image for advertising

As usual, thanks for the speedy response and I will take a look.

progre55

By the way, the title “Developer” looks sharp under your name and is very well deserved for both past (and I know) future contributions to make TXP what it is and will be …

Offline

#142 2010-04-15 14:48:42

Scott Girvan
Member
Registered: 2010-04-14
Posts: 10

Re: smd_random_banner: Random banner image for advertising

This is a great plugin. I have had many plugin acquaintances and dated a few but I’m thinking about going steady with this one. Reminds me of my last girlfriend being so random and all.

One question. I have 2 ‘banks’ of banners in the design, COL1 area and SideBar area. I have placed the plugin in both the COL1 (limit 1) and SB (limit 3). These are drawing banners from the same category. Is there anyway to have the 2 instances not repeat the same image? Assign a name to it, like radio buttons. I dunno. I’m just a designer. Sometimes.

Thanks alot. YOU ROCK!

Offline

#143 2010-04-15 15:21:38

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,521
Website GitHub

Re: smd_random_banner: Random banner image for advertising

Scott Girvan wrote:

Is there anyway to have the 2 instances not repeat the same image?

Not yet, but you’ll have mail in about 5 minutes :-)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#144 2010-07-25 15:19:38

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,521
Website GitHub

Re: smd_random_banner: Random banner image for advertising

Pure slackerage on my part. I finished v0.42 back in April and then forgot about it. Here’s the link in all its glory. New stuff:

  • Added file title as a possible location to compare_to (assuming you’re running a recent SVN of TXP 4.3.0)
  • Added row_delim
  • Added onclick handler to file mode (thanks renobird)
  • Added SMD_UNIQUE (thanks Scott Girvan)

The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#145 2011-04-02 02:10:11

wolfcry911
Member
From: MA, USA
Registered: 2006-06-30
Posts: 51

Re: smd_random_banner: Random banner image for advertising

Hi Bloke,
First, thank-you very much for all your work!!

I have a request for this plugin. Could height and width attributes be added so as to override the value stored in the database. And specifically could those attributes be set to zero so that no html attribute is output, so that browsers could scale (similar to image_article)?

edit// I guess the img tag could be hard-coded without those attributes and use the plugin to output the src att…

Last edited by wolfcry911 (2011-04-02 02:14:24)

Offline

#146 2011-04-10 17:50:23

wolfcry911
Member
From: MA, USA
Registered: 2006-06-30
Posts: 51

Re: smd_random_banner: Random banner image for advertising

Bloke,
What would be involved in having the script output html instead of xhtml (specifically the closing ‘/>’ of images)?

Offline

#147 2011-04-10 20:04:43

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,521
Website GitHub

Re: smd_random_banner: Random banner image for advertising

wolfcry911 wrote:

Could height and width attributes be added so as to override the value stored in the database.

Hmmm, this plugin is showing its age. Currently it’s not easy because of the way the output templates are generated; the width and height are hard-coded into the image template. I had grand designs (once upon a time) to allow you to specify your own template formats which would then permit you to define exactly what was output. I never pursued this; primarily because it was a lot of extra code for very little gain. So I guess the answer is no at the moment.

However, if you wanted to do it yourself you could probably hack the plugin. Line 55 defines the Image format template:

"Image" => array('<img src="@@data" width="@@width" height="@@height" @@others />', ''),

You could probably alter this to:

"Image" => array('<img src="@@data" @@others>', ''),

without any ill effetcs (though it’s untested). Note I’ve also removed the trailing / to cater for your second request of HTML compliance.

Alternatively, for finer-grained control, you could add an extra template called, I dunno, HTMLImage like this:

"Image" => array('<img src="@@data" width="@@width" height="@@height" @@others />', ''),
"HTMLImage" => array('<img src="@@data" @@others>', ''),

And then alter the $objMimeType list (from line 30 onwards in the code) to use your new template under certain circumstances, e.g. you could tell:

"jpg" => array("image/jpeg", "HTMLImage"),

so that only JPGs get the special treatment.

This plugin really is quite hamfisted in its approach and I’d love to rip it apart one day to make it more flexible *sigh* In the meantime I hope that helps.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#148 2011-04-12 01:16:33

wolfcry911
Member
From: MA, USA
Registered: 2006-06-30
Posts: 51

Re: smd_random_banner: Random banner image for advertising

Thanks Bloke,
I did try changing the Image => array, eliminating the width and height attributes as well as the trailing /, but to no affect. I’ve tried deactiving/reactiving, logging out and in, clearing cache, restating the browser, restarting the computer (and hence the server) and still nothing. Is there anything in the smd_lib that would override this?

This is what that line looks like now (just like yours above):

"Image" => array('<img src="@@data" @@others>', ''),

Last edited by wolfcry911 (2011-04-12 01:17:46)

Offline

#149 2011-07-26 15:41:06

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: smd_random_banner: Random banner image for advertising

Bloke:

Is it possible to put a limit on how many times a banner will be show? i.e. I want a banner to be displayed only x amount of time and/or I want a banner displayed until December 1?

progre55

Offline

#150 2011-07-26 15:47:33

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,521
Website GitHub

Re: smd_random_banner: Random banner image for advertising

progre55 wrote:

Is it possible to put a limit on how many times a banner will be show?

Not natively in the plugin. You could perhaps tally the number of times a particular banner has been displayed using rvm_counter but I don’t know if you can “get at” the info since this plugin (stupidly) doesn’t have container support. Can you tell it was my first plugin :-)

Not sure how you’d do this, sorry. Perhaps with another plugin!


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB