![]() |
|
Button Add favorites - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: Themes (https://forum.zenphoto.org/forum-5.html) +--- Thread: Button Add favorites (/thread-11866.html) Pages:
1
2
|
Button Add favorites - ClicClac - 06-07-2014 Hello, I would like replacing this button by a small one (picture). Button Add favorites - fretzl - 06-07-2014 Use CSS Button Add favorites - ClicClac - 06-07-2014 Do you an example ? I'm using Basic Theme. The submit button is ` Button Add favorites - ClicClac - 06-07-2014 Ok I will use: ` .imagesFavorites_remove input[type="submit"] {
} .imagesFavorites_add input[type="submit"] {
} ` Button Add favorites - ClicClac - 06-07-2014 Now I'm trying to add an icon webfont. I need to add this somewhere... ` .icon-heart:before {
} ` Any idea ? Button Add favorites - acrylian - 06-07-2014
Button Add favorites - ClicClac - 07-07-2014 Nope :( Button Add favorites - acrylian - 07-07-2014
Button Add favorites - ClicClac - 07-07-2014 Not better :( A last question: the form is made by the function 'ad_removeButton'. Can I make a new one with ' 'zp_register_filter ' ? Button Add favorites - fretzl - 07-07-2014 This works for me. So it should work with an icon font as well.
Button Add favorites - acrylian - 07-07-2014 If you use icomoon iconfonts you beed to modify the generated css as well. You can disable the filter but then you have to re-create the full function attached as well. Button Add favorites - ClicClac - 08-07-2014 @ fretzl @acrylian Button Add favorites - acrylian - 08-07-2014 The hook is the filter you want to use. You have to look at the favorites plugin which that is exactly. Be aware that this is a fairly complex plugin. You might have to re-create a lot of things to not break anything. It should be possible to do this via CSS only. [quote]For me, it just add "some text" before the form. Button Add favorites - ClicClac - 08-07-2014 zp_remove_filter: zp_remove_filter( string $hook, callback $function_to_remove, [int $priority = NULL]) How to replace them with a substitute ? I will look for css later. Button Add favorites - acrylian - 08-07-2014 You really should try CSS. Using filters is rather advanced coding. You have to look the faviorites plugin and see what it does. Find the filter used for the button (I don't know off hand which filter does what right now) and replicate the function attached. Best make a custom plugin. You could also hack the plugin directly but in both cases you have to maintain your changes if we do any changes ourselves. CSS is really saver :-) Button Add favorites - gjr - 08-07-2014 .imagesFavorites_add input[type="submit"]:before has no content to put the pseudo-element before so this will not work. The "content" of an input submit is defined in the value attribute (value="Remove favorite"). You can do this via js though, see the solution @: Button Add favorites - acrylian - 08-07-2014 Hm, right. Another way would maybe be the old school way via a background image. Button Add favorites - gjr - 08-07-2014 You shouldn't be so anti-js acrylian! :) Button Add favorites - acrylian - 08-07-2014 Yeah, I know, but with JS I still feel less is more often :-) Button Add favorites - ClicClac - 09-07-2014 gjr's script is fine for unicode character, but not for icomoon font |