Textpattern CMS support forum

You are not logged in. Register | Login | Help

#111 2008-02-26 09:52:25

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

Re: smd_random_banner: Random banner image for advertising

Effected changes, but no go.

And though
<txp:bas_flvplayer video='/files/all.flv' player='/files/flvplayer.swf' />
has tested OK in Firefox (Mac), it still fails to display in Safari (Mac) when smd_slimbox is active on the same page.

Offline

#112 2008-02-26 10:23:15

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 7,811
Website

Re: smd_random_banner: Random banner image for advertising

johnno wrote:

Effected changes, but no go.

Thought so. Damn.

<txp:bas_flvplayer video='/files/all.flv' player='/files/flvplayer.swf' />
has tested OK in Firefox (Mac), it still fails to display in Safari (Mac) when smd_slimbox is active on the same page.

Well if you’re not using the “random” nature of random banner, bas_flvplayer is certainly a helluva lot simpler :-) As to the clash, if it works ok in firefox and not safari it sounds browser specific to me, but I’m willing to admit it may be plugin related.

First port of call though, since I don’t have access to a Mac to check it out, is to have a look at Christophe’s forums for a possible solution. Lots of people embedding stuff and trying to marry slimbox on the same page. Sorry if it seems I’m giving you the run-around at the mo; I’m a bit stumped!


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

#113 2008-02-26 13:32:23

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

Re: smd_random_banner: Random banner image for advertising

Definitely browser specific – though I assume a plugin should be able to cope with that ;-)

Some further info
Setting aside <txp:bas_flvplayer video='/files/all.flv' player='/files/flvplayer.swf' /> for the moment, as it’s behaviour seems to be erratic:

In Safari
IF smd_slimbox is active and used for the display of article images
AND the raw <object> code is PRECEDED by TWO OR MORE separate articles (each of which has an image included)
THEN the .flv will FAIL to display.

Place the code BEFORE the articles and there is no problem.
Or if the code is preceded by only a SINGLE article with image, again there is no problem.

(including the proviso that the wind IS south-westerly, naturally)

Hope this sheds some light on the issue.

Offline

#114 2008-02-26 14:02:28

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 7,811
Website

Re: smd_random_banner: Random banner image for advertising

johnno wrote:

Definitely browser specific – though I assume a plugin should be able to cope with that ;-)

You’d like to think… ;-)

IF smd_slimbox is active and used for the display of article images
AND the raw <object> code is PRECEDED by TWO OR MORE separate articles (each of which has an image included) THEN the .flv will FAIL to display. Place the code BEFORE the articles and there is no problem.
Or if the code is preceded by only a SINGLE article with image, again there is no problem.

wtf? That’s freaky. Article lists, I assume? Can you send me a URL or two (privately if you prefer) showing both behaviours please? I’d like to see the output on Firefox here. When I get home I’ll see if I can check it out on OSX. I know there are some weird browser issues with (swf)object and embed tags. Vittorio had some with slimbox. You may find some joy or ideas if you trawl through the slimbox thread from there onwards, and it might be quicker than waiting for me to get home!

btw, are you using hak_textile_tags?

(including the proviso that the wind IS south-westerly, naturally)

Computers, eh? Who’d ‘ave em…


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

#115 2008-02-27 10:36:03

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

Re: smd_random_banner: Random banner image for advertising

wtf? That’s freaky.

Spot on! Seems I’ve been barking up the wrong red herring. Clean install on fresh site with stripped down page has exonerated smd_slimbox (hurrah!).
Basically, it’s just Safari being a pig with multiple swf(object) tags.

To recap:
<txp:smd_random_banner mode="file" match_text="swf" /> remains a winner, but <txp:smd_random_banner mode="file" match_text="flv" /> isn’t there yet.

Offline

#116 2008-04-29 14:25:20

mattmikulla
Member
From: Nashville Tennessee
Registered: 2004-08-25
Posts: 281
Website

Re: smd_random_banner: Random banner image for advertising

I’m a little confused here. Can I output a raw url without a link or img tag. For example: http://mysite.com/images/23.jpg


Art Rogue – Fine Art Photography

Offline

#117 2008-04-29 14:28:38

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 7,811
Website

Re: smd_random_banner: Random banner image for advertising

mattmikulla wrote:

Can I output a raw url without a link or img tag. For example: http://mysite.com/images/23.jpg

Yup, use raw_url="1"


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

#118 2008-04-29 15:44:34

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 7,811
Website

Re: smd_random_banner: Random banner image for advertising

Forgot all about this. I’ve got a new version that I’ve been sitting on:

  • new id attribute so you can now pick from groups of image IDs as well as categories
  • compare_to can now take ID as well
  • display_url allows you turn on or off the plugin’s insistence at publically displaying any URL in the caption/alt text (thanks Andrew Blevins for the idea)
  • subcats is now expanded to be able to pick how many levels to go down. if you previously used subcats=“1”, this will now only go down one level; if you want to look at all sub-categories, use subcats="all"
  • link_in can now use name as well as alt or caption if you wish to hijack the image filename for its destination url (just gives one more option so you can now use both caption and alt as intended while still retaining the ability to link to another URL on image click)
  • imgclass is now renamed class for consistency
  • removed id_prefix since it’s no longer needed. Newly refactored code and smd_lib_v0.32 mean you can put multiple replacement sequences in one element and mix that with fixed text. e.g. category="article-?id, mycat_?c_?s" would choose from categories labelled article-42 and mycat_lion_animals if the user was looking at an article with ID 42 in category lion, section animals
  • Bug fix in swfobject mode when using FlashVars

Give v0.4 [ compressed version ] a spin and let me know how you get on. The size of this beast is approaching critical so you’re probably better off with the compressed version. While the plugin is actually shorter than before thanks to the new smd_lib, the help is bigger so I have to find a better (more compact) way to write the help. Anyone with any ideas, please holler.


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

#119 2008-10-06 14:54:25

SuMu
Member
From: Germany - Wuppertal
Registered: 2008-03-06
Posts: 242
Website

Re: smd_random_banner: Random banner image for advertising

Hello Bloke

I would have only a klickable random header, but I don’t understand the code :-(

<txp:smd_random_banner category=“random”
link_in=“mysection” display_url=“1” />

this is not korrekt, it shows only the image, but it’s not klickable…

Please could you help me?

Thanks.


viele Grüße
SuMu

Psychomuell + blogZicke

Offline

#120 2008-10-06 15:15:46

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 7,811
Website

Re: smd_random_banner: Random banner image for advertising

SuMu wrote:

it shows only the image, but it’s not klickable…

To make a banner clickable you must tell the plugin two things:

  1. Where to find your desired destination URL, via the link_in attribute. This can currently be either: name, alt or caption
  2. The actual URL in the image field you specified.

So for example, if you wanted to use the ‘caption’ to hold your URL and had a banner image of a lion that you wanted to link to the /zoo/wild-cats article, you would:

  1. visit TXP’s Images tab, open up the picture of your lion
  2. make sure it is in the relevant category (e.g. ‘random’ in your case)
  3. type in /zoo/wild-cats in the ‘caption’ field, then save the changes
  4. find your smd_random_banner tag and add link_in="caption"

Then whenever the ‘lion’ image is displayed, it will be clickable. Note that all other images in the same category should also have a URL given in their ‘caption’ fields or you will get some very odd URL for all other banner images!

Does that help?

EDIT: you may wish to use display_url="0" to hide the caption URL in this case.

Last edited by Bloke (2008-10-06 15:18:34)


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