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.

profile cover help !

View previous topic View next topic Go down

Solved profile cover help !

Post by Lufffy- on July 5th 2016, 9:17 pm

Hi ..



i found this code ( javascript ) but i don't knew how it work and how the user can choose his cover


Code:
$(document).ready(function(){var fbcapa=$('#field_id8 .field_uneditable').text();
$('table[width="100%"][cellspacing="1"][cellpadding="1"][border="0"]').before('<div style="width: 100%; height: 315px; position: relative; background: url('+fbcapa+') no-repeat center center scroll; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover;" id="fbfundo"><div style="position: absolute; left: 0; width: 100%; bottom: 0;"><table id="fbperfil"><tr><td rowspan="3" id="fbavatar"></td><td style="font-size: 16px;" id="fbnome"></td></tr></table></div></div> ');$('table.forumline td[class="row1 gensmall"][align="center"] img[alt=""]:first').clone().appendTo($('#fbavatar'));$('.catLeft:first span[class="genmed module-title"]').clone().appendTo($('#fbnome'));$('td[class="row1 gensmall"][align="center"] img:last').clone().appendTo($('#fbrank'));$(function(){var fbavatarduplo=[],imagemdupla;$("#fbfundo img").filter(function(){imagemdupla=$(this).attr("src");if($.inArray(imagemdupla,fbavatarduplo)<0){fbavatarduplo.push(imagemdupla);return false}return true}).remove()});$('table#fbperfil span[class="genmed module-title"]').html(function(_,html){return html.replace("(conectado)","<img alt='Conectado' title='Conectado' src='http://i19.servimg.com/u/f19/19/09/87/49/34501910.gif' />")});$(function(){var tabfbperfil=function(){$('td[align="right"][valign="bottom"][width="100%"][nowrap="nowrap"] a').click(function(e){e.preventDefault();var url=this.href;if(url=='#')return;$('table[width="100%"][cellspacing="1"][cellpadding="1"][border="0"]').load(url+' table[width="100%"][cellspacing="1"][cellpadding="1"][border="0"]',tabfbperfil)})};tabfbperfil()})})}






and thank u ^^


Last edited by Lufffy- on July 7th 2016, 6:48 pm; edited 3 times in total

Lufffy-
New Member

Posts : 2
Reputation : 1
Language : greek

http://fmdesign.forumotion.com/

Back to top Go down

Solved Re: profile cover help !

Post by Nemo on July 5th 2016, 9:22 pm

Please change the title of your topic to something that is related to your question/issue, so that other users will be able to find their question/issue using the search engine.
Please read our forum rules: ESF General Rules

Nemo
Support Moderator
Support Moderator

Male Posts : 1085
Reputation : 114
Language : Greek, English, French

http://www.helpgr.forumgreek.com

Back to top Go down

Solved Re: profile cover help !

Post by SLGray on July 5th 2016, 9:35 pm

Where did you found the coding?


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 36742
Reputation : 2449
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Solved Re: profile cover help !

Post by 10spetter10 on July 7th 2016, 12:28 pm

Oke I quickly tried it so I can say you will probably need to do some template editing and css to make a neat profile, but the script does work.

Code:
$(document).ready(function() {
    var fbcapa = $('#field_id8 .field_uneditable').text();
    $('table[width="100%"][cellspacing="1"][cellpadding="1"][border="0"]').before('<div style="width: 100%; height: 315px; position: relative; background: url(' + fbcapa + ') no-repeat center center scroll; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover;" id="fbfundo"><div style="position: absolute; left: 0; width: 100%; bottom: 0;"><table id="fbperfil"><tr><td rowspan="3" id="fbavatar"></td><td style="font-size: 16px;" id="fbnome"></td></tr></table></div></div> ');
    $('table.forumline td[class="row1 gensmall"][align="center"] img[alt=""]:first').clone().appendTo($('#fbavatar'));
    $('.catLeft:first span[class="genmed module-title"]').clone().appendTo($('#fbnome'));
    $('td[class="row1 gensmall"][align="center"] img:last').clone().appendTo($('#fbrank'));
    $(function() {
        var fbavatarduplo = [],
            imagemdupla;
        $("#fbfundo img").filter(function() {
            imagemdupla = $(this).attr("src");
            if ($.inArray(imagemdupla, fbavatarduplo) < 0) {
                fbavatarduplo.push(imagemdupla);
                return false
            }
            return true
        }).remove()
    });
    $('table#fbperfil span[class="genmed module-title"]').html(function(_, html) {
        return html.replace("(conectado)", "<img alt='Conectado' title='Conectado' src='http://i19.servimg.com/u/f19/19/09/87/49/34501910.gif' />")
    });
    $(function() {
        var tabfbperfil = function() {
            $('td[align="right"][valign="bottom"][width="100%"][nowrap="nowrap"] a').click(function(e) {
                e.preventDefault();
                var url = this.href;
                if (url == '#') return;
                $('table[width="100%"][cellspacing="1"][cellpadding="1"][border="0"]').load(url + ' table[width="100%"][cellspacing="1"][cellpadding="1"][border="0"]', tabfbperfil)
            })
        };
        tabfbperfil()
    })
});

This needs to be of the type 'text field' and name it 'background url' (or something like that). Make sure that you make it visible in the profile. Then open a profile (ex: /u1) and use the developers-tool on the label of 'background url' by right clicking and select 'element inspect'. Then you go up the html-tree till you find an id starting with 'field_id', copy that id and paste it in the first line of the javascript where you find 'field_id8'. Save the script and that should do it.

Now you will find a new editable profile field were you can paste the url of your cover (ex: https://i19.servimg.com/u/f19/19/09/87/49/anime-11.jpg ).

10spetter10
Forumember

Posts : 195
Reputation : 81
Language : Dutch

Back to top Go down

Solved Re: profile cover help !

Post by Lufffy- on July 7th 2016, 6:48 pm

@10spetter10 wrote:Oke I quickly tried it so I can say you will probably need to do some template editing and css to make a neat profile, but the script does work.

Code:
$(document).ready(function() {
  var fbcapa = $('#field_id8 .field_uneditable').text();
  $('table[width="100%"][cellspacing="1"][cellpadding="1"][border="0"]').before('<div style="width: 100%; height: 315px; position: relative; background: url(' + fbcapa + ') no-repeat center center scroll; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover;" id="fbfundo"><div style="position: absolute; left: 0; width: 100%; bottom: 0;"><table id="fbperfil"><tr><td rowspan="3" id="fbavatar"></td><td style="font-size: 16px;" id="fbnome"></td></tr></table></div></div> ');
  $('table.forumline td[class="row1 gensmall"][align="center"] img[alt=""]:first').clone().appendTo($('#fbavatar'));
  $('.catLeft:first span[class="genmed module-title"]').clone().appendTo($('#fbnome'));
  $('td[class="row1 gensmall"][align="center"] img:last').clone().appendTo($('#fbrank'));
  $(function() {
  var fbavatarduplo = [],
  imagemdupla;
  $("#fbfundo img").filter(function() {
  imagemdupla = $(this).attr("src");
  if ($.inArray(imagemdupla, fbavatarduplo) < 0) {
  fbavatarduplo.push(imagemdupla);
  return false
  }
  return true
  }).remove()
  });
  $('table#fbperfil span[class="genmed module-title"]').html(function(_, html) {
  return html.replace("(conectado)", "<img alt='Conectado' title='Conectado' src='http://i19.servimg.com/u/f19/19/09/87/49/34501910.gif' />")
  });
  $(function() {
  var tabfbperfil = function() {
  $('td[align="right"][valign="bottom"][width="100%"][nowrap="nowrap"] a').click(function(e) {
  e.preventDefault();
  var url = this.href;
  if (url == '#') return;
  $('table[width="100%"][cellspacing="1"][cellpadding="1"][border="0"]').load(url + ' table[width="100%"][cellspacing="1"][cellpadding="1"][border="0"]', tabfbperfil)
  })
  };
  tabfbperfil()
  })
});

This needs to be of the type 'text field' and name it 'background url' (or something like that). Make sure that you make it visible in the profile. Then open a profile (ex: /u1) and use the developers-tool on the label of 'background url' by right clicking and select 'element inspect'. Then you go up the html-tree till you find an id starting with 'field_id', copy that id and paste it in the first line of the javascript where you find 'field_id8'. Save the script and that should do it.

Now you will find a new editable profile field were you can paste the url of your cover (ex: https://i19.servimg.com/u/f19/19/09/87/49/anime-11.jpg ).
@10spetter10 Thank u very much .. it's work now
merci

Lufffy-
New Member

Posts : 2
Reputation : 1
Language : greek

http://fmdesign.forumotion.com/

Back to top Go down

Solved Re: profile cover help !

Post by brandon_g on July 7th 2016, 7:06 pm

Thanks for the help 10spetter10. Wink

Problem solved & topic archived. ~ brandon_g
Please read our forum rules: ESF General Rules


Remember to mark your topic when a solution is found.

brandon_g
Support Moderator
Support Moderator

Male Posts : 5358
Reputation : 489
Language : English
Location : USA

http://broadcastingduo.forumotion.com/

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