Popup if members have 0 posts
2 posters
Page 1 of 1
Popup if members have 0 posts
Hello guys,
I have a popup build with HTML that I want to appear if the member has no posts (_userdata["user_posts"] = 0)
let's call the HTML code X, I tried this:
but it doesn't work
can you help me?
I have a popup build with HTML that I want to appear if the member has no posts (_userdata["user_posts"] = 0)
let's call the HTML code X, I tried this:
- Code:
jQuery(window).load(function() {
if (typeof _userdata === "undefined") return;
if (_userdata["user_posts"] == '0') {
jQuery('#fa_toolbar').before('<div id="cover" style=" background: black; opacity: 0.7; width: 1350px; height: 634px; position: absolute; top: 0px; left: -186px; z-index: 20002;"></div><div id="introduce" style=" z-index: 20002; background: #fafafa; border: 1px solid #ccc; position: absolute; width: 500px; height: 186px; top: 76px; left: 274px; border-radius: 5px; padding: 7px;"><br><center><span style=" color: #111!important; font-family: Lato!important; font-size: 20px!important; font-weight: 300!important; overflow: hidden; ">Have you already posted your member introduction?</span></center><br><br><p>If you haven't already opened a topic to introduce yourself to the community you should do it right now! In this way you will be able to access to all the tutorials, resources and services offered by <b>FMcodes</b>!<br><br><a href="/f10-member-introductions" class="ipsButton_secondary" style="color:#b85f1d!important">Member Introductions</a><br><br></p></div>');
}
});
but it doesn't work
can you help me?
Re: Popup if members have 0 posts
Hello Niko,
Are you using the FA toolbar ? If not these variables will not work.
You can also use :
It will show up if the users posts is less than 1.
Are you using the FA toolbar ? If not these variables will not work.
You can also use :
- Code:
(_userdata["user_posts"] < 1)
It will show up if the users posts is less than 1.
Re: Popup if members have 0 posts
yes, I'm using the toolbar; i have added another html code using that variables only for adminsitrators (level = 1)
but that code doesn't work
if I test it on google chrome console it says me
SyntaxError: Unexpected identifier
but that code doesn't work
if I test it on google chrome console it says me
SyntaxError: Unexpected identifier
Re: Popup if members have 0 posts
Your code had some errors. You ended the string early by writing
'If you haven't already'
since you're writing in single quotes it should be :
'If you haven\'t already'
try this :
'If you haven't already'
since you're writing in single quotes it should be :
'If you haven\'t already'
try this :
- Code:
$(window).load(function() {
if (typeof _userdata === "undefined") return;
if (_userdata["user_posts"] < 1) {
$('#fa_toolbar').before('<div id="cover" style="background: black;opacity:0.7;width:1350px;height:634px;position:absolute;top:0px;left:-186px;z-index:20002;"></div><div id="introduce" style="z-index:20002;background:#fafafa;border:1px solid #ccc;position:absolute;width:500px;height:186px;top:76px;left:274px;border-radius:5px;padding:7px;"><br><center><span style="color: #111!important;font-family:Lato !important;font-size:20px !important;font-weight:300!important;overflow:hidden;">Have you already posted your member introduction?</span></center><br><br><p>If you haven\'t already opened a topic to introduce yourself to the community you should do it right now! In this way you will be able to access to all the tutorials, resources and services offered by <b>FMcodes</b>!<br><br><a href="/f10-member-introductions" class="ipsButton_secondary" style="color:#b85f1d!important">Member Introductions</a><br><br></p></div>');
}
});
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum