Simple mod to make it obvious that login or registration is required to bid

Simple mod to make it obvious that login or registration is required to bid

  1. tholyoak

    tholyoak New Member

    Joined:
    Apr 11, 2011
    Messages:
    23
    Likes Received:
    2
    tholyoak submitted a new resource:

    Simple mod to make it obvious that login or registration is required to bid - Simple mod to make it obvious that login or registration is required to bid

    Read more about this resource...
     
    Last edited by a moderator: Sep 29, 2015
  2. tholyoak

    tholyoak New Member

    Joined:
    Apr 11, 2011
    Messages:
    23
    Likes Received:
    2
    I forgot to include the other change I mentioned, in the header where it should have been a login link instead of sending to a friend when not logged in. In global_header.tpl, search for "IF B_LOGGED_IN" and change the section to:

    <!-- 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 -->
     
  3. tholyoak

    tholyoak New Member

    Joined:
    Apr 11, 2011
    Messages:
    23
    Likes Received:
    2
    And here is a screenshot of what it looks like:
    [​IMG]
     
  4. Guest

    Guest Guest

    Tholyoak nice idea!

    The whole code if not logged in could be made into language code.
    For not to conflict with the other language codes i made new section called //other and use letter o for type and 001 for code
    in the end of /language/EN/messages.inc.php
    before the closing tag ?>
    Add
    PHP:
    //other
    $MSG['o001'] = '<font color="#ff3300"><b>Please&nbsp;<a href="user_login.php?">Login</a> or <a href="register.php?">Register</a> to place a bid</b></font>';

    And in item tpl above <!-- IF B_HASIMAGE -->
    PHP:
    <!-- IF B_LOGGED_IN -->
    <!-- ELSE -->
    {
    L_o001}
    <!-- ENDIF -->
    <!-- IF 
    B_HASIMAGE -->
    Result:
    [​IMG]

    and easy later for Renlok to move the language code $MSG['o001'] if he use your mod in the code :)
     
    Last edited by a moderator: May 3, 2012
  5. nay27uk

    nay27uk Super Moderator Staff Member

    Joined:
    Nov 24, 2009
    Messages:
    5,572
    Likes Received:
    546
    This is exactly what I already posted just two days ago for another member you just changed it around a bit. should help a few people though
     
    Last edited: May 3, 2012
  6. Guest

    Guest Guest

    you should had posted it in this thread.
    i could had saved 3-4 hours of programming
    forum is getting too big almost impossible to go tru it all,
    needed to see about payments had to browse 6 pages.
     
    Last edited by a moderator: May 3, 2012
  7. nay27uk

    nay27uk Super Moderator Staff Member

    Joined:
    Nov 24, 2009
    Messages:
    5,572
    Likes Received:
    546
    Hah Ha dahl you funny you even replied to the thread.

    had this have got accepted quicker then the user of my thread would not have had to post because this came first released on the 3/4/2012 my thread was the 30/4/2012 two days before this thread was accepted. the release date in a mod is actualy the date that the mod is submitted to the forums to await acceptence
     
    Last edited: May 3, 2012
  8. Guest

    Guest Guest

    i made this cause this mod had errors and has hard coded text i needed it with language codes
    so as always i post what i make,
    just saw your solution that has also hard coded text so not exactly the same ;)
     
  9. nay27uk

    nay27uk Super Moderator Staff Member

    Joined:
    Nov 24, 2009
    Messages:
    5,572
    Likes Received:
    546
    Dahl I was refering to the mod not yours mate. like I say though this came first but hye has been waiting since the 3rd of aprill for it to be accepted
     
  10. Guest

    Guest Guest

    ok nice,
    should had been 1 of april haha
     
  11. mpps

    mpps New Member

    Joined:
    Sep 18, 2012
    Messages:
    8
    Likes Received:
    0
    Thanks Tholyoak for nice idea and Dahlsvarehus.com for added a possibility to translate the text to another language.

    In item.php i have added the part of code (from Dahlsvarehus.com reply):
    PHP:
    <!-- ELSEIF B_HASENDED -->
            &
    nbsp;
    <!-- ELSE -->
        {
    L_o001}
    <!-- ENDIF -->
    AFTER
    PHP:
    <!-- ELSE -->
                    {
    BUYNOW} <a href="{BIDURL}buy_now.php?id={ID}"><img border="0" align="absbottom" alt="{L_496}" src="{BNIMG}"></a>
        <!-- ENDIF -->
    Why?
    If You are logged in, You will see input for bid and button [Place bid >>], if not - You will see in THE SAME PLACE the links for logging and register.

    IMHO there is the best place for this links.
    What do You think about?
     
    Last edited: Sep 29, 2012
  12. gtr_r4

    gtr_r4 New Member

    Joined:
    Nov 22, 2012
    Messages:
    3
    Likes Received:
    0
    Hi,

    I have webid 1.0.4 and I have tried doing this but I could not do it as the instruction is a little bit confusing. Could you please make the instruction a little more clear, as I need this on my items. Thanks
     
  13. nay27uk

    nay27uk Super Moderator Staff Member

    Joined:
    Nov 24, 2009
    Messages:
    5,572
    Likes Received:
    546
    GTR4 its easy mate follow this instead

    Open item.tpl and on lines 57-61 find this code
    PHP:
    <!-- IF B_LOGGED_IN -->
      <
    a href="{SITEURL}item_watch.php?{WATCH_VAR}={ID}">{WATCH_STRING}</a>
    <!-- ELSE -->
      <
    a href="{SITEURL}user_login.php?">{L_5202}</a>
    <!-- ENDIF -->
    Replace that code with this code
    PHP:
    <!-- IF B_LOGGED_IN -->
    <
    a href="{SITEURL}item_watch.php?{WATCH_VAR}={ID}">{WATCH_STRING}</a>
    </
    div>
    <!-- ELSE -->
    <
    a href="{SITEURL}user_login.php?"><b>Login</b></a> or <a href="{SITEURL}register.php?"><b>Register</b></a>
    </
    div>
    <
    font color="#ff3300"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Please <a href="{SITEURL}user_login.php?">Login</a> or <a href="{SITEURL}register.php?">Register</ato place a bid</b></font>
    <!-- ENDIF -->
    close and save item.tpl and upload it
     
  14. gtr_r4

    gtr_r4 New Member

    Joined:
    Nov 22, 2012
    Messages:
    3
    Likes Received:
    0
    Hi Mate,

    Thank you so much for the reply, but I'm still facing a problem I get this error when opening an item, afterI made the changes.

    Parse error: syntax error, unexpected $end in /home/auctionm/public_html/includes/template.php(165) : eval()'d code on line 387

    Please let me know.

    thanks
     
    Last edited: Nov 26, 2012
  15. nay27uk

    nay27uk Super Moderator Staff Member

    Joined:
    Nov 24, 2009
    Messages:
    5,572
    Likes Received:
    546
    make sure you have the <!-- ENDIF --> that is telling you you missed one
     
  16. thehippyelf

    thehippyelf Member

    Joined:
    Aug 25, 2015
    Messages:
    239
    Likes Received:
    10
    I'm looking to make the aforementioned change to my website (among other things) and am running the latest version of WeBid. Problem is that in item.tpl, the code doesn't exist!

    <!-- IF B_LOGGED_IN -->
    <a href="{SITEURL}item_watch.php?{WATCH_VAR}={ID}">{WATCH_STRING}</a>
    <!-- ELSE -->
    <a href="{SITEURL}user_login.php?">{L_5202}</a>
    <!-- ENDIF -->

    Helllllp pls :-/
     

Share This Page