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.

Trying to load a back ground pic

3 posters

Go down

In progress Trying to load a back ground pic

Post by THE MALIGOON March 24th 2014, 6:40 am

I am at G3GM.com and want to know how to let a member when he / she posts, How do you make a back ground pic of there Automobile  ?


www.G3GM.com
avatar
THE MALIGOON
New Member

Posts : 4
Reputation : 0
Language : ENGLISH

Back to top Go down

In progress Re: Trying to load a back ground pic

Post by Ange Tuteur March 24th 2014, 8:55 am

Hello THE MALIGOON,

You are wanting to place a background image on the posts ?
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

In progress Re: Trying to load a back ground pic

Post by THE MALIGOON March 24th 2014, 5:45 pm

Yes I am ...well They are when they make a post they would like there car to be a show background pic
avatar
THE MALIGOON
New Member

Posts : 4
Reputation : 0
Language : ENGLISH

Back to top Go down

In progress Re: Trying to load a back ground pic

Post by Ange Tuteur March 24th 2014, 10:48 pm

Go to :
Administration panel > users & groups > profiles > contact fields > create a new field

Choose the following settings for the field :
Trying to load a back ground pic  Captu419

Save, and then go to :
Administration panel > modules > javascript codes management > create a new script

Title : what you wish
Placement : in the topics
Paste the code below and save :
Code:
$(document).ready(function() {
    $('.postprofile a[href$=".png"], .postprofile a[href$=".bmp"], .postprofile a[href$=".gif"], .postprofile a[href$=".jpeg"], .postprofile a[href$=".jpg"]').each(function() {
        var src = $(this).attr('href');
        $(this).parent().parent().parent().parent().attr('style','background-image:url('+src+')');
        $(this).remove();
    })
})

Now that profile contact field you added will be used as a hook for finding a valid image URL. If one is found, it will remove the link off the profile and add it as a background image to that users post.
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

In progress Re: Trying to load a back ground pic

Post by Michael_vx March 26th 2014, 4:08 pm

Ange Tuteur wrote:Go to :
Administration panel > users & groups > profiles > contact fields > create a new field

Choose the following settings for the field :
Trying to load a back ground pic  Captu419

Save, and then go to :
Administration panel > modules > javascript codes management > create a new script

Title : what you wish
Placement : in the topics
Paste the code below and save :
Code:
$(document).ready(function() {
    $('.postprofile a[href$=".png"], .postprofile a[href$=".bmp"], .postprofile a[href$=".gif"], .postprofile a[href$=".jpeg"], .postprofile a[href$=".jpg"]').each(function() {
        var src = $(this).attr('href');
        $(this).parent().parent().parent().parent().attr('style','background-image:url('+src+')');
        $(this).remove();
    })
})

Now that profile contact field you added will be used as a hook for finding a valid image URL. If one is found, it will remove the link off the profile and add it as a background image to that users post.
hello thats looks great work i tried it for my forum but didn`t work is there the same thing for phpbb2 i have some reasons to not change from bb2 to bb3  confused
Michael_vx
Michael_vx
Forumember

Male Posts : 664
Reputation : 29
Language : Arabic and some English
Location : Egypt

Back to top Go down

In progress Re: Trying to load a back ground pic

Post by THE MALIGOON March 30th 2014, 7:41 am

I also tried this with NO LUCK please advise Ty Maligoon
avatar
THE MALIGOON
New Member

Posts : 4
Reputation : 0
Language : ENGLISH

Back to top Go down

In progress Re: Trying to load a back ground pic

Post by Michael_vx March 30th 2014, 8:23 am

i changed the forum to phpbb3 to test works but on phpbb2 not working
Ange is there any way to have same thing on phpbb2
this is the 2nd time im asking here Very Happy
please say yes or no
thanks
Michael_vx
Michael_vx
Forumember

Male Posts : 664
Reputation : 29
Language : Arabic and some English
Location : Egypt

Back to top Go down

In progress Re: Trying to load a back ground pic

Post by Ange Tuteur March 30th 2014, 1:21 pm

THE MALIGOON wrote:I also tried this with NO LUCK please advise Ty Maligoon
Have you made sure that the contact field is shown in the messages ? If so what was the image format you used ?

Michael_vx wrote:i changed the forum to phpbb3 to test works but on phpbb2 not working
Ange is there any way to have same thing on phpbb2
this is the 2nd time im asking here Very Happy
please say yes or no
thanks
That may be a bit more tricky since phpbb2's selectors are almost all the same.
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

In progress Re: Trying to load a back ground pic

Post by Michael_vx March 30th 2014, 7:13 pm

Ange Tuteur wrote:
THE MALIGOON wrote:I also tried this with NO LUCK please advise Ty Maligoon
Have you made sure that the contact field is shown in the messages ? If so what was the image format you used ?

Michael_vx wrote:i changed the forum to phpbb3 to test works but on phpbb2 not working
Ange is there any way to have same thing on phpbb2
this is the 2nd time im asking here Very Happy
please say yes or no
thanks
That may be a bit more tricky since phpbb2's selectors are almost all the same.
looks not the reason you might find it in the test forum
http://micsoft-test.allgoo.net/t2-here-is-test-topic
only link apper if th javascript need change let me know what it should be changed thanks
Michael_vx
Michael_vx
Forumember

Male Posts : 664
Reputation : 29
Language : Arabic and some English
Location : Egypt

Back to top Go down

Back to top

- Similar topics

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