ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

how to make a link to members?

June 28, 2007 7:44am

Subscribe [1]
  • #1 / Jun 28, 2007 7:44am

    Riverboy

    2993 posts

    Hi,

    a silly question again from me. How to make a shortlink to members who are allowed to acces weblog and write entries to specified weblog?

    example: i have a weblog called “test”
    how to: add a link (and what kind of a link it is) to sidebar of the website what is shown only when logged in as a member (and super admin).

    I have EE 1.6 commercial!

    Thank you so much again!
    - Tuittu

  • #2 / Jun 28, 2007 10:44am

    tripp

    92 posts

    The simple answer would be something along the lines of:

    {if logged_in}
    <a href="http://{path=templategroup/entry-form}">link to stand-alone entry form</a>
    {/if}
    
    {if logged_out}
    You need to <a href="http://{path=member/login}">login</a> or <a href="http://{path=member/register}">register</a> to post.
    {if}

    You may want to modify the if logged_in to check for specific member groups, etc.


    Related links:

    Conditionals
    Stand-Alone Entry Form

  • #3 / Jun 28, 2007 11:40am

    Riverboy

    2993 posts

    damn. whats wrong cos i tried and copypasted that into index-template like this:

    {if logged_in}
    <a href="http://{path=XX/ajankohtaista}">ILMOITA AJANKOHTAISTA</a>
    {/if}
    
    {if logged_out}
    You need to <a href="http://{path=member/login}">KIRJAUDU</a> or <a href="http://{path=member/register}">REKISTERÖIDY</a> kirjoittaakseni ajankohtaista-osioon.
    {if}

    But after that index-page brings this error:

    Parse error: syntax error, unexpected ')' in /www/XXX/XXX/XXX/XXX/XXX/core/core.functions.php(635) : eval()'d code on line 65

    what im missing now?
    I created the stand-alone form template webpage called “ajankohtaista” and templategroup is also right in that code…

    Cheers:
    - Tuittu

  • #4 / Jun 28, 2007 2:50pm

    tripp

    92 posts

    I can’t help you on that one. Someone from the EE support team will need to weigh in. Sorry.

  • #5 / Jun 28, 2007 3:14pm

    Riverboy

    2993 posts

    Yeah. i did kinda know that. I wait for response.

    - Tuittu

  • #6 / Jun 29, 2007 3:12am

    Riverboy

    2993 posts

    No response from support theme but:

    I was thinking that it might have been a problem with many “if"tags. Dont know but just a quess. So i simply did this:

    {if logged_in}
    <a href="http://{path=templategroup/entry-form}">link to stand-alone entry form</a>
    {/if}

    And put that inside of an login form without those “ifs” in it. I also got rid of the if logged out cos that form does not show when you are logged out so it is totally un-needed for my point of view?

    Thats my response - is this good, that i dont know!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases