Hello. I have a suggestion engine. It does not allow send a comment for logout users but I want to disable it. So logout users should send comment Which area should I change on this code? ----------------- /* show tooltip * * @author thanhsangvnm * version 1.0 */ function stooltip( x, y, html ) { if ( html == null ){ html = '<?php if ( empty( $user_ID ) ) { printf( __('You can NOT perform this function. <a href="%s" style="color:red">Login</a> if you have an account. Do NOT have an account? <a href="%s" style="color:blue">Create One</a>.', 'fbe' ), $fbe_utilities->get_login_link(), $fbe_utilities->get_user_register_link() ); } else { printf( __('You can NOT perform this function. <a href="%s" style="color:red">Sign in</a> with another account ', 'fbe' ), $fbe_utilities->get_login_link(), $fbe_utilities->get_user_register_link() ); }?>'; } var winW = 630, winH = 460; if ( parseInt( navigator.appVersion ) > 3 ) { if ( navigator.appName=="Netscape" ) { winW = window.innerWidth; winH = window.innerHeight; } if ( navigator.appName.indexOf("Microsoft") != -1 ) { winW = document.body.offsetWidth; winH = document.body.offsetHeight; } } // aligh x if( x + 250 > winW ) { var leftAligh = 250 - ( winW - x ) + 17; x = winW - 250; jQuery('.stooltip-pointer').attr( 'style', 'left: ' + leftAligh + 'px;'); } else { jQuery('.stooltip-pointer').attr( 'style', ''); } jQuery('#scontent').html(html); jQuery('.stooltip').attr( 'style', 'position: absolute; top: ' + y + 'px; left: ' + x + 'px'); jQuery('.stooltip').show(); return false; } </script> <div class="stooltip" style="display:none;" > <div class="stooltip-pointer"> </div> <a class="sclose-it stooltip-dismiss"> <span> x </span> </a> <div id="scontent"> <!-- Content here --> </div> </div>
I'm confused... what? Do you want to disable the login function, as you said in the thread title, or do you want logged-out users (guests?) to be able to comment? Either way, the code you posted is probably irrelevant.
change the if statements that check if empty on the user id, then give them anonymous or default info, and post the comment
if ( empty( $user_ID ) ){ $user_ID = "Anonymous" if i can see the rest of your code, everything, i can do it for you. pm me.