Code visible only under conditions
3 posters
Page 1 of 1
Code visible only under conditions
Hello guys,
another issue..
what's wrong? the CODE HERE appears, but always! and not only if the member is logged in and if the post number is equal to 1
(and only on the home page)
can you help me?
I want to view the code only if posts=1 and if you are logged in
thanks guys
another issue..
what's wrong? the CODE HERE appears, but always! and not only if the member is logged in and if the post number is equal to 1
(and only on the home page)
- Code:
$(window).load(function() {
if (typeof _userdata === "undefined") return;
if (_userdata["user_posts"] == '1' || _userdata["session_logged_in"] == '1') {
$('#fa_toolbar').before('CODE HERE');
}
});
can you help me?
I want to view the code only if posts=1 and if you are logged in
thanks guys
Last edited by Niko! on March 10th 2014, 4:41 pm; edited 1 time in total
Re: Code visible only under conditions
Im not sure, but I believe that || is OR, you must make it && .. but thats a guess.
Re: Code visible only under conditions
Rhino.Freak wrote:Can you post what was the problem?
using && instead of ||
Re: Code visible only under conditions
Problem solved & topic archived.
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Similar topics
» [code]s do not be visible for guests
» the code is visible, inserted as is from the tutorial
» Usernames not visible to guests after applying a Javascript code
» Hide Code? or Post to See Content Code?
» Terms and Conditions - Paypal
» the code is visible, inserted as is from the tutorial
» Usernames not visible to guests after applying a Javascript code
» Hide Code? or Post to See Content Code?
» Terms and Conditions - Paypal
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum