Announcement

  •  » Extensions
  •  » Always show catagories, even when they are private (sample code)

#1 2005-08-24 23:35:39

vcb
Member
2005-08-24
3

Always show catagories, even when they are private (sample code)

I'm building a website for a photomodel. She has nude foto's and don't want this pictures to be spread on the web.
But she do wants to show that she has nude photos. I solved it like this if you're interesed:
in config.inc.php add:

Code:

//this makes it possible that public/private items are always shown
//to tease the visitor to register and get a special permit.
$conf['show_cat_always'] = true;

In the function "get_categories_menu" in functions_category.inc.php adjust the following code:

Code:

if ($user['forbidden_categories'] != '')
    {
      $query.= '
   AND id NOT IN ('.$user['forbidden_categories'].')';
}

to:

Code:

 if(!$conf['show_cat_always'])
  {
    if ($user['forbidden_categories'] != '')
    {
      $query.= '
      AND id NOT IN ('.$user['forbidden_categories'].')';
    }
  }

I've also made it possible that a warning and a NICE redirect to the register page is made. (So you don't get the strange out of the blue report)
That will be in the next post. But from now on it's a nice script, just downloaded this week :-)

Last edited by vcb (2005-08-24 23:38:33)

Offline

 

#2 2005-08-25 00:00:39

vcb
Member
2005-08-24
3

Re: Always show catagories, even when they are private (sample code)

I use it together with this adjustment
http://forum.phpwebgallery.net/viewtopic.php?id=4390

Offline

 
  •  » Extensions
  •  » Always show catagories, even when they are private (sample code)

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact