Hide links for anonymous users

Help
bobikk
2010-02-04
2013-05-28
  • bobikk

    bobikk - 2010-02-04

    Dear Developers,

    is there any way to hide links (url field in database) from anonymous users? Just like the files, but without any exceptions.

    By the way, thanks for this wonderful application.

    P.S. Just curious, what does the field "Approved" mean? Does it influence anything?

     
  • Matthias Steffens

    Hi bobikk,

    is there any way to hide links (url field in database) from anonymous users?

    Currently, refbase has no preferences setting to hide or show items in the links column depending on login status or on a user-specific level.

    If you would be fine with hiding the "Links" column entirely for anonymous users, then there might be an easy workaround, though:

    Open file 'search.php' and replace this line (line 236, in case of refbase-0.9.5):

    $showLinks = "1"; // show the links column by default

    with this code:

    {
       if (!isset($loginEmail))
         $showLinks = "0";
       else
         $showLinks = "1"; // show the links column by default
    }

    This will hide the "Links" column for users that aren't logged in. However, this won't necessarily adopt the interface accordingly (e.g. hide the "Display links" option from search pages).

    But maybe this solution is good enough for you? Let us know if not.

    what does the field "Approved" mean? Does it influence anything?

    It's a general purpose field that doesn't have any influence on citation formatting or the like. This field just lets one specify for a particular record whether the record has been "approved" - whatever that means in your own context. It could e.g. mean that its metadata have been verified for correctness. But it could be used for any other purpose as well. E.g., an institute could use this to indicate the internal review status for a paper or something similar.

    Btw, short descriptions for every field in table 'refs' are given here:

    http://www.refbase.net/index.php/Table_refs

    HTH, Matthias

     
  • bobikk

    bobikk - 2010-02-11

    Thank you for a quick and helpful reply. The problem is solved

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks