Topic: https://help.forumotion.com/t115828-change-the-background-in-function-of-the-gender-of-the-poster#757421
Last edited by Darksphere92 on December 7th 2013, 9:55 am; edited 1 time in total
This is a Hitskin.com skin preview
Install the skin • Return to the skin page
yes i did this is the code i used.SLGray wrote:Did you read this
Important!: To make it works you absolutely need to indicate the version of your forum by editing the value of the variable version, you have the choice between phpBB2, phpBB3, punBB and Invision.
(version.toLowerCase() == "phpbb3"){
$(".postprofile img[title='Male']").closest('.postprofile').prev('.postbody').addClass("fa_postbody_xy");
$(".postprofile img[title='Female']").closest('.postprofile').prev('.postbody').addClass("fa_postbody_xx");
$(function() {
//Indicate here the version of your forum.
var version = "phpBB3";
if(version.toLowerCase() == "phpbb2"){
$(".postdetails img[title='Male']").closest('.postdetails').parent('td').next('td').addClass("fa_postbody_xy");
$(".postdetails img[title='Female']").closest('.postdetails').parent('td').next('td').addClass("fa_postbody_xx");
}else if(version.toLowerCase() == "phpbb3"){
$(".postprofile img[title='Male']").closest('.postprofile').prev('.postbody').addClass("fa_postbody_xy");
$(".postprofile img[title='Female']").closest('.postprofile').prev('.postbody').addClass("fa_postbody_xx");
}else if(version.toLowerCase() == "punbb"){
$(".user-info img[title='Male']").closest('.postmain').addClass("fa_postbody_xy");
$(".user-info img[title='Female']").closest('.postmain').addClass("fa_postbody_xx");
}else if(version.toLowerCase() == "invision"){
$(".postprofile img[title='Male']").closest('.post-container').addClass("fa_postbody_xy");
$(".postprofile img[title='Female']").closest('.post-container').addClass("fa_postbody_xx");
}
});
that's what i got.SLGray wrote:
- Code:
$(function() {
//Indicate here the version of your forum.
var version = "phpBB3";
if(version.toLowerCase() == "phpbb2"){
$(".postdetails img[title='Male']").closest('.postdetails').parent('td').next('td').addClass("fa_postbody_xy");
$(".postdetails img[title='Female']").closest('.postdetails').parent('td').next('td').addClass("fa_postbody_xx");
}else if(version.toLowerCase() == "phpbb3"){
$(".postprofile img[title='Male']").closest('.postprofile').prev('.postbody').addClass("fa_postbody_xy");
$(".postprofile img[title='Female']").closest('.postprofile').prev('.postbody').addClass("fa_postbody_xx");
}else if(version.toLowerCase() == "punbb"){
$(".user-info img[title='Male']").closest('.postmain').addClass("fa_postbody_xy");
$(".user-info img[title='Female']").closest('.postmain').addClass("fa_postbody_xx");
}else if(version.toLowerCase() == "invision"){
$(".postprofile img[title='Male']").closest('.post-container').addClass("fa_postbody_xy");
$(".postprofile img[title='Female']").closest('.post-container').addClass("fa_postbody_xx");
}
});
I didSLGray wrote:Did you check the box for In the Topics only?
shouldnt all the Topics have the backgrounds?SLGray wrote:Post a link to a topic that should have these backgrounds.
ok Link: http://fastforum.forum-board.net/t1-these-are-the-host-you-can-useSLGray wrote:Yes. Post a link to one that guests can see.
i did here's the code i have.Sanket wrote:I don't think you have added the CSS. Did you?
.fa_postbody_xy{
background: url("http://i45.servimg.com/u/f45/17/45/19/77/xy10.png");
min-height: 500px;
}
.fa_postbody_xx {
background: url("http://i45.servimg.com/u/f45/17/45/19/77/xx10.png");
min-height: 500px;
}
i pushed MaleSanket wrote:In your profile, did you choose the gender as Male/female ?
this is what i got nowSanket wrote:What is the code you added in the javascript?
$(function() {
//Indicate here the version of your forum.
var version = "phpBB3";
if(version.toLowerCase() == "phpbb2"){
$(".postdetails img[title='Male']").closest('.postdetails').parent('td').next('td').addClass("fa_postbody_xy");
$(".postdetails img[title='Female']").closest('.postdetails').parent('td').next('td').addClass("fa_postbody_xx");
}else if(version.toLowerCase() == "phpbb3"){
$(".postprofile img[title='Male']").closest('.postprofile').prev('.postbody').addClass("fa_postbody_xy");
$(".postprofile img[title='Female']").closest('.postprofile').prev('.postbody').addClass("fa_postbody_xx");
}else if(version.toLowerCase() == "punbb"){
$(".user-info img[title='Male']").closest('.postmain').addClass("fa_postbody_xy");
$(".user-info img[title='Female']").closest('.postmain').addClass("fa_postbody_xx");
}else if(version.toLowerCase() == "invision"){
$(".postprofile img[title='Male']").closest('.post-container').addClass("fa_postbody_xy");
$(".postprofile img[title='Female']").closest('.post-container').addClass("fa_postbody_xx");
}
});
how do i do that?Sanket wrote:I think you've done everything right. It should work.
Can you make a test admin account that I can use?
ok here Username: As i said, via PM's. Anyways, the password was incorrect. Send it to me via PM.Sanket wrote:Just make an account on your forum & give it admin access, by adding it to the administrator group.
Send me the login details via PM, i will check.
$(function() {
//Indicate here the version of your forum.
var version = "phpbb3";
if(version.toLowerCase() == "phpbb2"){
$(".postdetails img[title='Male']").closest('.postdetails').parent('td').next('td').addClass("fa_postbody_xy");
$(".postdetails img[title='Female']").closest('.postdetails').parent('td').next('td').addClass("fa_postbody_xx");
}else if(version.toLowerCase() == "phpbb3"){
$(".postprofile img[title='Male']").closest('.postprofile').prev('.postbody').addClass("fa_postbody_xy");
$(".postprofile img[title='Female']").closest('.postprofile').prev('.postbody').addClass("fa_postbody_xx");
}else if(version.toLowerCase() == "punbb"){
$(".user-info img[title='Male']").closest('.postmain').addClass("fa_postbody_xy");
$(".user-info img[title='Female']").closest('.postmain').addClass("fa_postbody_xx");
}else if(version.toLowerCase() == "invision"){
$(".postprofile img[title='Male']").closest('.post-container').addClass("fa_postbody_xy");
$(".postprofile img[title='Female']").closest('.post-container').addClass("fa_postbody_xx");
}
});
no still nothing, maybe im doing something wrong.SethC1995 wrote:Variables are case sensitive, if you change phpBB3 => phpbb3 it should work.
- Code:
$(function() {
//Indicate here the version of your forum.
var version = "phpbb3";
if(version.toLowerCase() == "phpbb2"){
$(".postdetails img[title='Male']").closest('.postdetails').parent('td').next('td').addClass("fa_postbody_xy");
$(".postdetails img[title='Female']").closest('.postdetails').parent('td').next('td').addClass("fa_postbody_xx");
}else if(version.toLowerCase() == "phpbb3"){
$(".postprofile img[title='Male']").closest('.postprofile').prev('.postbody').addClass("fa_postbody_xy");
$(".postprofile img[title='Female']").closest('.postprofile').prev('.postbody').addClass("fa_postbody_xx");
}else if(version.toLowerCase() == "punbb"){
$(".user-info img[title='Male']").closest('.postmain').addClass("fa_postbody_xy");
$(".user-info img[title='Female']").closest('.postmain').addClass("fa_postbody_xx");
}else if(version.toLowerCase() == "invision"){
$(".postprofile img[title='Male']").closest('.post-container').addClass("fa_postbody_xy");
$(".postprofile img[title='Female']").closest('.post-container').addClass("fa_postbody_xx");
}
});
that worked... i feel stupid, thanks for the help y'all.SethC1995 wrote:Ensure that the gender is shown in posts, see '1. Definition :' of the tuto.