how to change position of the facebook comments code
2 posters
Page 1 of 1
how to change position of the facebook comments code
hi to the best support forum every thing i hace asked till now is solved
now i have new thing to ask about i have JavaScript that put the facebook
under the topic at the end under the topic at the end of the topic page
i tried to understand by my self about the position settings but i faill
the image of the code
the code
under topic as i want thanks to your tip Ange Tuteur you really great
now i have new thing to ask about i have JavaScript that put the facebook
under the topic at the end under the topic at the end of the topic page
i tried to understand by my self about the position settings but i faill
the image of the code
the code
- Code:
$(document).ready(function () {
var fb_skin = "light"; //Valores posibles "light" o "dark". Skin claro u oscuro de Facebook Comments
var fb_numposts = 5; //Nْmero de comentarios a mostrar por defecto
(function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s);
js.id = id;
js.src = "//connect.facebook.net/ar_AR/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs)
}(document, 'script', 'facebook-jssdk'));
v = '.forumline:has(.post .postbody)';
ifphpbb2in = '';
ifphpbb2out = '';
if ($(v).length == 0) {
v = '.post:has(.postbody, .pun .postbody)';
} else {
ifphpbb2in = '<table class="forumline"><tr><td colspan=3>';
ifphpbb2out = '</td></tr></table>';
}
if ($(v).length == 0) {
v = '#blog_comments'
}
$(v).eq(-1).after(ifphpbb2in + '<div class=fb-comments data-href="http://' + location.host + location.pathname + '" data-colorscheme="' + fb_skin + '" data-num-posts=' + fb_numposts + ' data-width=' + $(v).eq(-1).css('width') + '></div>' + ifphpbb2out);
});
under topic as i want thanks to your tip Ange Tuteur you really great
Last edited by Michael_vx on March 27th 2014, 2:46 pm; edited 1 time in total (Reason for editing : solved)
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Re: how to change position of the facebook comments code
okay i think no progress for this one or this is not my lucky day
if i need to wait just let me know
if i need to wait just let me know
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Re: how to change position of the facebook comments code
Hi,
You want to place this after every message in a topic ?
You want to place this after every message in a topic ?
Re: how to change position of the facebook comments code
no i want to after the first message in the topic not after the last message in topic thats allAnge Tuteur wrote:Hi,
You want to place this after every message in a topic ?
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Re: how to change position of the facebook comments code
Try this :
- Code:
$(document).ready(function () {
var fb_skin = "light"; //Valores posibles "light" o "dark". Skin claro u oscuro de Facebook Comments
var fb_numposts = 5; //Nْmero de comentarios a mostrar por defecto
(function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s);
js.id = id;
js.src = "//connect.facebook.net/ar_AR/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs)
}(document, 'script', 'facebook-jssdk'));
v = '.forumline:has(.post:first)';
ifphpbb2in = '';
ifphpbb2out = '';
if ($(v).length == 0) {
v = '.post:first:has(.postbody, .pun .postbody)';
} else {
ifphpbb2in = '<table class="forumline"><tr><td colspan=3>';
ifphpbb2out = '</td></tr></table>';
}
if ($(v).length == 0) {
v = '#blog_comments'
}
$(v).eq(-1).after(ifphpbb2in + '<div class=fb-comments data-href="http://' + location.host + location.pathname + '" data-colorscheme="' + fb_skin + '" data-num-posts=' + fb_numposts + ' data-width=' + $(v).eq(-1).css('width') + '></div>' + ifphpbb2out);
});
Re: how to change position of the facebook comments code
okay its still under the last message in topic
can it be changed to be after the first message
like when i start topic and some one reply the code apper before his reply
that what i`m thinking about
i don`t know if it possible or just apper like signatrue and i think that would make like in all messages but it will be okay in that case
can it be changed to be after the first message
like when i start topic and some one reply the code apper before his reply
that what i`m thinking about
i don`t know if it possible or just apper like signatrue and i think that would make like in all messages but it will be okay in that case
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Re: how to change position of the facebook comments code
I can't really test fully since it's really laggy, but try this :
- Code:
$(document).ready(function () {
var fb_skin = "light"; //Valores posibles "light" o "dark". Skin claro u oscuro de Facebook Comments
var fb_numposts = 5; //Nْmero de comentarios a mostrar por defecto
(function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s);
js.id = id;
js.src = "//connect.facebook.net/ar_AR/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs)
}(document, 'script', 'facebook-jssdk'));
v = '.forumline:has(tr.post .postbody)';
ifphpbb2in = '';
ifphpbb2out = '';
if ($(v).length == 0) {
v = 'tr.post:first:has(.postbody)';
} else {
ifphpbb2in = '<table class="forumline"><tr><td colspan=3>';
ifphpbb2out = '</td></tr></table>';
}
if ($(v).length == 0) {
v = '#blog_comments'
}
$('tr.post:first').after(ifphpbb2in + '<div class=fb-comments data-href="http://' + location.host + location.pathname + '" data-colorscheme="' + fb_skin + '" data-num-posts=' + fb_numposts + ' data-width=' + $(v).css('width') + '></div>' + ifphpbb2out);
});
Re: how to change position of the facebook comments code
its looks like almost solved its apper in the poster profile and make topics with bad view its need to be inside the topic not poster profile i think
sorry for late to reply
you really doing great work
edit
you might give a little look
http://micsoft.logu2.com/t1865-topic
sorry for late to reply
you really doing great work
edit
you might give a little look
http://micsoft.logu2.com/t1865-topic
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
i find a way
first sorry for 2nd post in row
why i did the 2nd post in row ?
because i find a way to put the code in topic and not in poster profile
the way was to change from
tr.post:first
to
.signature_div
its about 80% solved now
i will try to make it apper for once but if i could not i will say that
Ange Tuteur
really thank you you did gave me the tip in the edits you made to the code i sow what is changed and i tried my on way to make it
thanks again
Edit
i made it .signature_div:first its worked at the first post under signature the only thing is might be problem is the signature is needed to the one who will start the topic i guees now if there a way to force signature to all Members and default signature for new members this topic is 100% solved
why i did the 2nd post in row ?
because i find a way to put the code in topic and not in poster profile
the way was to change from
tr.post:first
to
.signature_div
its about 80% solved now
i will try to make it apper for once but if i could not i will say that
Ange Tuteur
really thank you you did gave me the tip in the edits you made to the code i sow what is changed and i tried my on way to make it
thanks again
Edit
i made it .signature_div:first its worked at the first post under signature the only thing is might be problem is the signature is needed to the one who will start the topic i guees now if there a way to force signature to all Members and default signature for new members this topic is 100% solved
- Code:
$(document).ready(function () {
var fb_skin = "light"; //Valores posibles "light" o "dark". Skin claro u oscuro de Facebook Comments
var fb_numposts = 5; //Nْmero de comentarios a mostrar por defecto
(function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s);
js.id = id;
js.src = "//connect.facebook.net/ar_AR/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs)
}(document, 'script', 'facebook-jssdk'));
v = '.forumline:has(td.signature_div .postbody)';
ifphpbb2in = '';
ifphpbb2out = '';
if ($(v).length == 0) {
v = 'tr.post:first:has(.signature_div, .pun)';
} else {
ifphpbb2in = '<table class="forumline"><tr><td colspan=3>';
ifphpbb2out = '</td></tr></table>';
}
if ($(v).length == 0) {
v = '#blog_comments'
}
$('.signature_div:first').after(ifphpbb2in + '<div class=fb-comments data-href="http://' + location.host + location.pathname + '" data-colorscheme="' + fb_skin + '" data-num-posts=' + fb_numposts + ' data-width=' + $(v).css('width') + '></div>' + ifphpbb2out);
});
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Re: how to change position of the facebook comments code
Oh you want it to be inside the post ?
Try with postbody, it should work :
Try with postbody, it should work :
- Code:
$(document).ready(function () {
var fb_skin = "light"; //Valores posibles "light" o "dark". Skin claro u oscuro de Facebook Comments
var fb_numposts = 5; //Nْmero de comentarios a mostrar por defecto
(function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s);
js.id = id;
js.src = "//connect.facebook.net/ar_AR/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs)
}(document, 'script', 'facebook-jssdk'));
v = '.forumline:has(tr.post .postbody)';
ifphpbb2in = '';
ifphpbb2out = '';
if ($(v).length == 0) {
v = 'tr.post:first:has(.postbody)';
} else {
ifphpbb2in = '<table class="forumline"><tr><td colspan=3>';
ifphpbb2out = '</td></tr></table>';
}
if ($(v).length == 0) {
v = '#blog_comments'
}
$('tr.post .postbody:first').after(ifphpbb2in + '<div class=fb-comments data-href="http://' + location.host + location.pathname + '" data-colorscheme="' + fb_skin + '" data-num-posts=' + fb_numposts + ' data-width=' + $(v).css('width') + '></div>' + ifphpbb2out);
});
Re: how to change position of the facebook comments code
Ange Tuteur wrote:Oh you want it to be inside the post ?
Try with postbody, it should work :
- Code:
$(document).ready(function () {
var fb_skin = "light"; //Valores posibles "light" o "dark". Skin claro u oscuro de Facebook Comments
var fb_numposts = 5; //Nْmero de comentarios a mostrar por defecto
(function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s);
js.id = id;
js.src = "//connect.facebook.net/ar_AR/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs)
}(document, 'script', 'facebook-jssdk'));
v = '.forumline:has(tr.post .postbody)';
ifphpbb2in = '';
ifphpbb2out = '';
if ($(v).length == 0) {
v = 'tr.post:first:has(.postbody)';
} else {
ifphpbb2in = '<table class="forumline"><tr><td colspan=3>';
ifphpbb2out = '</td></tr></table>';
}
if ($(v).length == 0) {
v = '#blog_comments'
}
$('tr.post .postbody:first').after(ifphpbb2in + '<div class=fb-comments data-href="http://' + location.host + location.pathname + '" data-colorscheme="' + fb_skin + '" data-num-posts=' + fb_numposts + ' data-width=' + $(v).css('width') + '></div>' + ifphpbb2out);
});
you did not read my last topic
when i change
$('tr.post:first').after(ifphpbb2in +
to
$('.signature_div:first').after(ifphpbb2in +
the code apperd in side the topic and by the way i can not edit the template
its all thanks to you the only thing needed i think is if the member have no signatrue the code might not apper i guess but i will try find a way to make signatrue for all members i dont know how yet but i will
the code is solved
the code to work for none template
- Code:
$(document).ready(function () {
var fb_skin = "light"; //Valores posibles "light" o "dark". Skin claro u oscuro de Facebook Comments
var fb_numposts = 5; //Nْmero de comentarios a mostrar por defecto
(function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s);
js.id = id;
js.src = "//connect.facebook.net/ar_AR/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs)
}(document, 'script', 'facebook-jssdk'));
v = '.forumline:has(td.signature_div .postbody)';
ifphpbb2in = '';
ifphpbb2out = '';
if ($(v).length == 0) {
v = 'td.post:first:has(.signature_div, .pun)';
} else {
ifphpbb2in = '<table class="forumline"><tr><td colspan=3>';
ifphpbb2out = '</td></tr></table>';
}
if ($(v).length == 0) {
v = '#blog_comments'
}
$('tr.post .postbody:first').after(ifphpbb2in + '<div class=fb-comments data-href="http://' + location.host + location.pathname + '" data-colorscheme="' + fb_skin + '" data-num-posts=' + fb_numposts + ' data-width=' + $(v).css('width') + '></div>' + ifphpbb2out);
});
1000% solved you can close the topic
and please add the code to tips and tricks this code wont need template
Last edited by Michael_vx on March 27th 2014, 3:15 pm; edited 1 time in total (Reason for editing : 1000% solved)
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Similar topics
» i need to change the position of this code
» How can I add Facebook Comments?
» why in many of my articles can not censor comments facebook
» HTML Page Jquery Code Position
» Change position of some buttons
» How can I add Facebook Comments?
» why in many of my articles can not censor comments facebook
» HTML Page Jquery Code Position
» Change position of some buttons
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum