Closed (fixed)
Project:
Flag
Version:
6.x-2.0-beta1
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
16 Dec 2009 at 18:20 UTC
Updated:
9 Mar 2011 at 14:56 UTC
Jump to comment: Most recent
Comments
Comment #1
Cheek commentedI thought of this simple half working patch yesterday. I put this in my teaser:
$string = flag_create_link('flagname', $node->nid); $string = str_replace("image.png", "image_small.png", $string); echo $string;This works, but only if the button is not clicked. The AJAX script responsible for replacing the image (naturally) replaces it with the big image.
Any ideas are welcome..
Comment #2
quicksketchI would suggest not using any image in your HTML at all, but instead add a background-image to your links just through CSS. You can target the "full" and "teaser" versions of the link just by using different CSS selectors.
Comment #3
Cheek commentedI guess I could do that as well. Didn't think of targeting the parent div id's in CSS, thanks!
I'd be nice to have the option to do it properly though..
Here's the CSS code for anyone interested:
Comment #4
Anonymous (not verified) commentedIs there any way to make different images display if you are on a specific URL?
pseudo example:
if ($url = "mysite.com/blog/" . $node->nid) {$image_file = big image; } else {$image_file = small image;}