The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Trying to load a back ground pic

View previous topic View next topic Go down

In progress Trying to load a back ground pic

Post by THE MALIGOON on 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

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 on March 24th 2014, 8:55 am

Hello THE MALIGOON,

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

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2684
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

In progress Re: Trying to load a back ground pic

Post by THE MALIGOON on 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

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 on 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 :


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
Forumaster

Male Posts : 13021
Reputation : 2684
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

In progress Re: Trying to load a back ground pic

Post by Michael_vx on 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 :


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
Forumember

Male Posts : 655
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 on March 30th 2014, 7:41 am

I also tried this with NO LUCK please advise Ty Maligoon

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 on 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
Forumember

Male Posts : 655
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 on 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
Forumaster

Male Posts : 13021
Reputation : 2684
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

In progress Re: Trying to load a back ground pic

Post by Michael_vx on 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
Forumember

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

Back to top Go down

View previous topic View next topic Back to top


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