I have no experience with said plugin but I’d imagine it’d be as simple as finding the code that outputs the <img> tag and replacing it with a flash object tag with the variables in the appropriate positions. Is this what you tried?
I did try this, however the code’s not quite so simple as to explicitly output the image by conventional means. Also, I can’t simply just replace it, as that would mean I can no longer use the other image types; I’d prefer to throw in a If…Then statement to deal with the unique .swf file type.
Edit: I did manage to find the Kimili Flash Embed plugin. This does take care of one problem, but editing the Category plugin to include this new plugin is beyond me. So, help is still very much appreciated.
Sorry, I wasn’t thinking. You nailed what I was trying to sya…I was thinking logic like this:
// Regex /$.swf/ means if it ends in .swf
if(preg_match(“/$.swf/”, $img_path)) {
echo “<object type=’swf/flash’ src=’$img_path’ />”; // example, probably bad tag
} else {
// Images logic (original)
echo “<img src=’$img_path’ />”;
}
Honestly, I just can’t make sense of the code in this plugin. I simply cannot find where everything is brought together to finally echo the code which outputs the image. If someone else can take a few moments to download the plugin I originally talked about and see if it can be understood, I’d really appreciate it. I’ve been staring at this code for awhile now, and I’ve only managed to work up a decent headache.
Thanks for the help injate, and thanks in advance to anyone else willing to help.
I saw two places that probably need it: Line 104 and 143 of the unmodified category-images.php.
This line:
$category_display = '<img class="catimage" alt="' . $category->cat_name . '" src="' . $image_url . '" />';
needs to be:
if(preg_match("/$.swf/", $image_url)) {
$category_display = '<object type="flash/swf" alt="' . $category->cat_name . '" src="' . $image_url . '" />';
} else {
$category_display = '<img class="catimage" alt="' . $category->cat_name . '" src="' . $image_url . '" />';
}
That may not be flawless code and changing those 2 lines to this may not be everything needed but this is a start.