Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#97 2007-12-30 19:13:32

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,447
Website GitHub

Re: smd_random_banner: Random banner image for advertising

One more minor update. This time to add static image support to the files mode :-s Yes, it does sound backwards, but sometimes it’s useful to be able to put in banner placeholders or simply non-moving banners instead of whizzy flash ones.

So now, instead of having to use two random_banner calls or being limited to having either images OR files, there’s a dedicated Image mime type for handling jpg, png, gif and tiff images in file mode. Essentially all it does is output a standard HTML <img> tag instead of using <object>. Outputting an object tag for an image is possible but it’s yukky and badly supported cross-browser (there’s a surprise).

v0.34 is the official attempt at this, so take it away and break it. Though not essential, an update to smd_lib is supplied in the zip package.


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

Txp Builders – finely-crafted code, design and Txp

Offline

#98 2008-01-06 09:32:36

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: smd_random_banner: Random banner image for advertising

Stef, I’m getting “Badly formed or empty plugin code” on smd_random_banner_v0.34. smd_lib and the older version installs fine.

Offline

#99 2008-01-06 11:00:23

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,447
Website GitHub

Re: smd_random_banner: Random banner image for advertising

jm wrote:

Stef, I’m getting “Badly formed or empty plugin code”

Try the compressed plugin


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

Txp Builders – finely-crafted code, design and Txp

Offline

#100 2008-01-06 11:53:14

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: smd_random_banner: Random banner image for advertising

Problem solved! Thanks!

Offline

#101 2008-01-28 13:50:45

amyng
Member
Registered: 2007-01-05
Posts: 55

Re: smd_random_banner: Random banner image for advertising

Hi Bloke,

I’m having some trouble understanding the referrer tracking. I checked my logs and nothing shows (they show my IP address, but nothing shows if I’ve been clicking onto the random images). There’s no link in the Page entry nor Referrer.

Is this normal? If yes then how do I track how many clicks did my banner ads receive?

Thanks,
Amy

Offline

#102 2008-01-28 14:49:41

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,447
Website GitHub

Re: smd_random_banner: Random banner image for advertising

amyng wrote:

I’m having some trouble understanding the referrer tracking… There’s no link in the Page entry nor Referrer.

Hi Amy, that’s weird it works here. I assume you’ve set up the link_in option to use alt or caption and put a URL in the alt/caption of the images you want to be clickable. So let’s run through a few checks:

  1. When you hover over a banner image, what do you see as the link? Does it show a correct URL to a valid article (TXP doesn’t log clicks to 404 pages) and does it have ?bid=ID_number on the end (?bid might be something else if you changed it with the referer attribute of course)
  2. Is the URL a local link to the same site? If it’s an external link to another site you’ll only see the click as a ‘referrer’ in the destination site

The system’s not foolproof and it’s only a rough guide to allow you to see how effective certain adverts are; as long as the link is a local link to your site it should show up in the Txp logs under the Page column. At least, that’s the theory.

I admit it’s not particularly friendly at the moment; the only way of really getting useful info out of it is to dump the logs out to a file and use some filtering software (even Excel!) to slice and dice the data. I believe Marios (or someone else, I forget…) was working on a companion plugin to enhance the log screen and make the output more usable. Not sure how far that went.

If you think the plugin is still behaving weirdly after checking the above, let me know some more detail about your setup; how your image links are set up, the URL of a page that’s misbehaving, your random_banner tag options, etc (via e-mail if your site’s not ready to go live) and I’ll see if I can work out what’s going wrong.


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

Txp Builders – finely-crafted code, design and Txp

Offline

#103 2008-02-01 17:32:36

amyng
Member
Registered: 2007-01-05
Posts: 55

Re: smd_random_banner: Random banner image for advertising

Hi Bloke,

Thanks for the very swift reply!

** Quote:

2. Is the URL a local link to the same site? If it’s an external link to another site you’ll only see the click as a ‘referrer’ in the destination site **

Oh, no wonder! It’s linked to an outgoing site, so probably only the person’s website will see it as a referrer link.

I’m thinking of putting the Google Analytics code snippet so that I can track the clicks the ads will collect; see here and here

Do you think it’ll work?

Amy

Offline

#104 2008-02-01 19:52:32

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,447
Website GitHub

Re: smd_random_banner: Random banner image for advertising

amyng wrote:

I’m thinking of putting the Google Analytics code snippet so that I can track the clicks the ads will collect; Do you think it’ll work?

No reason why not. I think it’ll work just fine.

I’ve not really looked at it much; I briefly delved into it when I kinda half considered encompassing something like this into random banner (after Anton had some success) but it would require me to sit down and think about how best to implement it. I figured with the amount of effort required and the multitude of ways of doing it (probably wrongly!), the easiest thing to do in situations such as yours is use a third party tracker.

fwiw, I’m not much of a fan of ad tracking or Google Analytics because pages invariably seem to be waiting for it which — to me at least — imposes a negative impact on the user experience for very little business gain. But some places absolutely insist on it; bizarre.

And the number of sites I’ve seen with the javascript error “urchinTracker is not defined” is unreal…

Last edited by Bloke (2008-02-01 19:55:55)


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

Txp Builders – finely-crafted code, design and Txp

Offline

#105 2008-02-12 22:21:18

fowler
Member
Registered: 2007-02-12
Posts: 79

Re: smd_random_banner: Random banner image for advertising

on the most current release, i’m getting a “badly formed” error…

Offline

#106 2008-02-13 10:58:43

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,447
Website GitHub

Re: smd_random_banner: Random banner image for advertising

fowler wrote:

on the most current release, i’m getting a “badly formed” error…

Try the zipped version


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

Txp Builders – finely-crafted code, design and Txp

Offline

#107 2008-02-25 22:29:16

johnno
Member
Registered: 2007-06-14
Posts: 30

Re: smd_random_banner: Random banner image for advertising

Hi Bloke

Firstly – smd_slimbox and smd_random_banner are just fabulous.

Now…I have successfully used smd_random_banner to embed the file ‘test.swf’ into an article thus <txp:smd_random_banner match_text="test" />.

But…substitute the file ‘test.flv’ and nothing is displayed (should it work?)

However…chucking a lot of code wrapped in ‘object’ tags into the article WILL display my ‘test.flv’, proving that I’m not completely incompetent.

Interestingly though…whilst the raw code technique does work in Firefox (MacOSX 2.0.0.12), it will only work in Safari (Mac OSX 3.0.4) with smd_slimbox DISABLED (gulp).

What to do?

(Using TXP v.4.0.6)

Offline

#108 2008-02-25 22:47:07

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,447
Website GitHub

Re: smd_random_banner: Random banner image for advertising

johnno wrote:

substitute the file ‘test.flv’ and nothing is displayed (should it work?)

Erm, well it should. But the MIME type for both flv and swf are set to “application/x-shockwave-flash”. Thinking about it I’m not sure this is right but I’d have to check. I just assumed the flash player could handle .flv since it is, well, Flash video. Perhaps that was a bogus assumption? btw, you are using mode="file" in the random_banner tag, right? ;-)

Anyway, diagnostic time: When you substitute your swf for the flv, check the page source and see if it’s actually adding it to the object tag. If it’s in there then it’s just a plugin rendering issue and is likely to be my poor MIME type assumption. If you happen to know the correct MIME type, please enlighten me!

However, if test.flv is not being inserted into the source code at all and/or the object tag looks malformed, can you please post it here so I might be able to track down why flv is causing grief. Thanks.

Interestingly though…whilst the raw code technique does work in Firefox (MacOSX 2.0.0.12), it will only work in Safari (Mac OSX 3.0.4) with smd_slimbox DISABLED (gulp).

Ug? If you could supply some more info on this it’d be greatly appreciated. Could you post both your random banner and slimbox tags, if applicable (might be a weird clash I’ve not yet encountered).

Thanks for any help in tracking these down. Not something I’ve seen before so I’m a bit stuck at the mo.


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

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB