Change the background in function of the gender of the poster - phpbb2
3 posters
Page 1 of 1
Change the background in function of the gender of the poster - phpbb2
hi
how to use this one here??
https://help.forumotion.com/t115828-change-the-background-in-function-of-the-gender-of-the-poster
i'm PHPbb2 user
how to use this one here??
https://help.forumotion.com/t115828-change-the-background-in-function-of-the-gender-of-the-poster
i'm PHPbb2 user
Re: Change the background in function of the gender of the poster - phpbb2
Alright, let's do this:
Put this in ACP < Modules < Javascript Management < Enable Javascript < Save < Create a New Javascript < Title it anything you want < Check: In all Topics < Paste the provided code above < Save
Also in this code in the one given above:
Change it to this:
And lastly:
ACP < Display < Colors < CSS < Paste the code anywhere < Save
- 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");
}
});
Put this in ACP < Modules < Javascript Management < Enable Javascript < Save < Create a New Javascript < Title it anything you want < Check: In all Topics < Paste the provided code above < Save
Also in this code in the one given above:
- Code:
//Indicate here the version of your forum.
var version = "phpBB3";
Change it to this:
- Code:
//Indicate here the version of your forum.
var version = "phpBB2";
And lastly:
- Code:
.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;
}
ACP < Display < Colors < CSS < Paste the code anywhere < Save
Re: Change the background in function of the gender of the poster - phpbb2
- Code:
$(function() {
//Indicate here the version of your forum.
var version = "phpbb2";
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() == "phpbb2"){
$(".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() == "phpbb2"){
$(".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() == "phpbb2"){
$(".postprofile img[title='Male']").closest('.post-container').addClass("fa_postbody_xy");
$(".postprofile img[title='Female']").closest('.post-container').addClass("fa_postbody_xx");
}
});
not working
Re: Change the background in function of the gender of the poster - phpbb2
Eh... you changed everything to phpBB2...
Try this one instead:
Try this one instead:
- Code:
$(function() {
//Indicate here the version of your forum.
var version = "phpBB2";
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");
}
});
Re: Change the background in function of the gender of the poster - phpbb2
The error in this might be affecting that Javascript code provided:
Re: Change the background in function of the gender of the poster - phpbb2
To change the background you can use my tutorial located here
http://easybbtutorials.forumotion.com/t10-post-background-effect
just edited this to include by gender. Sorry for that, I thought we had that already. All fixed now.
open for guest so its not advertising, and the full code is there
http://easybbtutorials.forumotion.com/t10-post-background-effect
just edited this to include by gender. Sorry for that, I thought we had that already. All fixed now.
open for guest so its not advertising, and the full code is there
Re: Change the background in function of the gender of the poster - phpbb2
Rideem3 wrote:Question, do you have a heavily modified view topic body template? If you do, then that could be the reason why it's not working.
i guess that the reason .. thanx
Similar topics
» New tip : Change the background in function of the gender of the poster
» Change the background in function of the gender of the poster
» Change the background in function of the gender of the poster, Problem
» Advertising poster on PunBB & PHPBB2
» background based on gender?
» Change the background in function of the gender of the poster
» Change the background in function of the gender of the poster, Problem
» Advertising poster on PunBB & PHPBB2
» background based on gender?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum