Results 1 to 4 of 4
  1. #1

    Question Don't show listings until user login


    Is it possible to make WeBid not show items in auction until the user logs in?

    So the "Home" tab would only show the login and password dialog boxes, same as "Sell an Item" and "Message Board" tabs.


  2. #2
    Super Moderator/Coder Box Lot's Avatar
    Join Date
    Dec 2008
    Deep in Code & CSS!


    'B_LOGGED_IN' => $user->logged_in
    is defined in header.php so you can use that.

    <!-- IF B_LOGGED_IN eq false-->
    what you want to show those not logged in
    <!-- ELSE -->
    what you want to show to those who ARE logged in
    <!-- ENDIF -->

    Everyone should try to replicate Bugs & post results

    • I wont respond to users who;

    -Repeatedly ask for help & don't make the above simple contribution to the project
    -Don't follow rules or search for solutions.

    -Clearly haven't reviewed the WeBid Admin. and/or tested a simple scenario on their site.

  3. #3

    Smile Solved


    After digging around for a while I added the clause to index.php, in similar spot to msgboard.php.

    // Is the seller logged in?
    if (!$user->is_logged_in())
            $_SESSION['REDIRECT_AFTER_LOGIN'] = 'index.php';
            header('location: user_login.php');
    Your suggestion misled me a bit but gave me the hint that I needed to do the digging (there's no settings for this option).

    Last edited by kidkal; 26-04-2012 at 11:17 PM.

  4. #4
    Super Moderator/Coder/Designer nay27uk's Avatar
    Join Date
    Nov 2009
    Leicester, UK


    What boxlot was saying is in your .tpl all you needed to do was add

    PHP Code:
    <!-- IF B_LOGGED_IN --> 
    show this 
    <!-- ELSE --> 
    dont show this 
    <!-- ENDIF --> 
    where show this is the html you want displayed if they are loged in, and the dont show this is what is shown if they are not loged in.

    For example

    PHP Code:
    <!-- IF B_LOGGED_IN -->
    li><a href="{SITEURL}user_menu.php?">{L_622}</a></li>
    li><a href="{SSLURL}logout.php?">{L_245}</a></li>
    <!-- ELSE -->
    li><a href="{SSLURL}register.php?">{L_235}</a></li>
    li><a href="{SSLURL}user_login.php?">{L_052}</a></li>
    <!-- ENDIF --> 
    Last edited by nay27uk; 27-04-2012 at 12:59 AM.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts