The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

change bookmarks image

4 posters

Go down

Solved change bookmarks image

Post by Richard. December 31st 2011, 2:00 am

How can i change the imagines from the Blog bookmark, SS:change bookmarks image Untit164
Richard.
Richard.
Forumember

Male Posts : 249
Reputation : 12
Language : English,Romanian
Location : Durham, NC - USA.

http://forum.phpbbonline.com/

Back to top Go down

Solved Re: change bookmarks image

Post by Richard. January 1st 2012, 7:34 am

bump
Richard.
Richard.
Forumember

Male Posts : 249
Reputation : 12
Language : English,Romanian
Location : Durham, NC - USA.

http://forum.phpbbonline.com/

Back to top Go down

Solved Re: change bookmarks image

Post by FL.ux January 1st 2012, 7:41 am

i think there's no way change bookmarks image Qwert18
FL.ux
FL.ux
Forumember

Male Posts : 841
Reputation : 18
Language : I hope I could be a FM staff :'(
Location : I shall fly to the subterranean sky.

Back to top Go down

Solved Re: change bookmarks image

Post by robot_boy18 January 1st 2012, 8:48 am

I give you the example for twitter Wink Take a look at this css
Code:
#bookmarks a img.twitter {background-image:url('your image url');}
avatar
robot_boy18
Forumember

Male Posts : 107
Reputation : 7
Language : English
Location : Greenville, South Carolina, USA

http://en.fmvi.org/

Back to top Go down

Solved Re: change bookmarks image

Post by Guest January 1st 2012, 12:56 pm

Try to add in your JavaScript management:
Code:
jQuery(document).ready(function() {
    jQuery('div#bookmarks a img').each(function() {
        if(jQuery(this).attr('src') == 'LINK_ORIGINAL_IMAGE') jQuery(this).attr('src', 'LINK_NEW_IMAGE');
    });
})
So, this code works very simple:
jQuery('div#bookmarks a img') = This code give the css selectors;
if(jQuery(this).attr('src') == 'LINK_ORIGINAL_IMAGE') = If the image attribute src from img tag that are selectors (div#bookmarks a img) is a certain image link replace that attribute's src value with new image;
jQuery(this).attr('src', 'LINK_NEW_IMAGE'); = As I said below, this code replace the value's src attribute. Smile

I give you an example with first image: change bookmarks image Twitter (https://2img.net/i/fa/social_bookmarking/twitter.png)

Code:
jQuery(document).ready(function() {
    jQuery('div#bookmarks a img').each(function() {
        if(jQuery(this).attr('src') == 'http://2img.net/i/fa/social_bookmarking/twitter.png') jQuery(this).attr('src', 'http://i.imgur.com/8xvmW.gif');
    });
})
Enjoy! Smile
avatar
Guest
Guest


Back to top Go down

Solved Re: change bookmarks image

Post by Richard. January 1st 2012, 4:04 pm

Thanks Gassy.
Richard.
Richard.
Forumember

Male Posts : 249
Reputation : 12
Language : English,Romanian
Location : Durham, NC - USA.

http://forum.phpbbonline.com/

Back to top Go down

Solved Re: change bookmarks image

Post by Guest January 1st 2012, 4:16 pm

My pleasure. Smile
avatar
Guest
Guest


Back to top Go down

Solved Re: change bookmarks image

Post by Sanket January 1st 2012, 7:06 pm

Topic Solved & Locked
Sanket
Sanket
ForumGuru

Male Posts : 48766
Reputation : 2830
Language : English
Location : Mumbai

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum