I want to disable login function

Discussion in 'PHP' started by alkantenik, May 12, 2013.

  1. #1
    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>
     
    alkantenik, May 12, 2013 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    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.
     
    nico_swd, May 12, 2013 IP
  3. alkantenik

    alkantenik Well-Known Member

    Messages:
    190
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    138
    #3
    I want logged-out users (guests?) to be able to comment Nico.
     
    alkantenik, May 12, 2013 IP
  4. alkantenik

    alkantenik Well-Known Member

    Messages:
    190
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    138
    #4
    Comment means suggestion.
    http://beta.goverlan.com/blog/
     
    alkantenik, May 12, 2013 IP
  5. wren11

    wren11 Active Member

    Messages:
    89
    Likes Received:
    10
    Best Answers:
    3
    Trophy Points:
    53
    #5
    change the if statements that check if empty on the user id, then give them anonymous or default info, and post the comment
     
    wren11, May 12, 2013 IP
  6. alkantenik

    alkantenik Well-Known Member

    Messages:
    190
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    138
    #6
    Can you write a sample code. I don't know writing php. You mean this field?
    if ( empty( $user_ID ) )
     
    alkantenik, May 13, 2013 IP
  7. HowDoYou

    HowDoYou Well-Known Member

    Messages:
    443
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    130
    #7
    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.
     
    HowDoYou, May 13, 2013 IP