• [MOD] Hidden / Password protected categories v1.1 (2009-06-30) 5 0 5 1
Currently:  

Author Topic: [MOD] Hidden / Password protected categories v1.1 (2009-06-30)  (Read 130091 times)

0 Members and 2 Guests are viewing this topic.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
[MOD] Hidden / Password protected categories v1.1 (2009-06-30)
« on: November 03, 2008, 07:33:39 AM »

----------------- [ Index ] -----------------


----------------- [ Introduction ] -----------------

With this mod you'll be able hide categories and/or set a password.

Hidden categories will not be visible anywhere on the site and can be accessed only by a direct link to it. By default once such category opened, it will become visible for the visitor, meaning it will not be hidden anymore for that particular visitor. This behavior can be changed.

If a category password protected, only it's name will be visible to the visitors (assuming visitor has "view category" permissions). Once visitor open it or open an image from such category, a prompt to enter the password will be showed instead. When the submitted password accepted, the category become fully accessible to the visitor, based on it's permissions. The submitted passwords are stored in the database for each member or in sessions for guests.

All subcategories inherit "hidden" and "password" settings from it's parent category.

If you have a request or suggestion, make sure you visit Tweaks section, it might be already there ;)


----------------- [ How to use ] -----------------

Once this mod is installed, you should see two new options when edit or create new category.


----------------- [ Demo ] -----------------

You can see how it works here. You can click on "reset cat password" link on left to reset entered password and visited hidden categories.


----------------- [ Changed files ] -----------------

global.php
details.php
categories.php
includes/auth.php
includes/page_header.php
includes/sessions.php
admin/categories.php
lang/<your language>/main.php

----------------- [ New files ] -----------------

install_catpashid.php
includes/catpass.php
templates/<your template>/catpass.html


----------------- [ Installation ] -----------------

Step 1
Download attached package. Extract files and upload them to your 4images folder, preserving this tree structure:
install_catpashid.php
includes/catpass.php
templates/<your template>/catpass.html


Step 2
Execute install_catpashid.php by typing in your browser's address bar:
http://yourdomain/4images/install_catpashid.php


Step 3
Open global.php
Find:  $sql "SELECT cat_id, cat_name, cat_description, cat_parent_id, cat_hits, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment

Replace it with:  $sql "SELECT cat_id, cat_name, cat_description, cat_parent_id, cat_hits, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment, cat_password, cat_hide

(or simply add , cat_password, cat_hide at the end of that line)

Step 4
Open details.php
Find:$cat_id = (isset($image_row['cat_id'])) ? $image_row['cat_id'] : 0;

Insert BELOW:
cat_unhide($cat_id);



Step 4.1 
Find:if (!check_permission("auth_viewcat"$cat_id) || !check_permission("auth_viewimage"$cat_id) || !$image_row) {
  
redirect($url);
}

Insert BELOW:
$txt_clickstream get_category_path($cat_id,1).$config['category_separator'].format_text($image_row['image_name'], 2).$config['category_separator'];
include(
ROOT_PATH."includes/catpass.php");



Step 5
Open categories.php
Find:$user_access get_permission();

Insert BELOW:
cat_unhide($cat_id);



Step 5.1 
Find:if (!$cat_id || !isset($cat_cache[$cat_id]) || !check_permission("auth_viewcat"$cat_id)) {
  
redirect("index.php");
}

Insert BELOW:
include(ROOT_PATH."includes/catpass.php");



Step 6
Open includes/auth.php
Find:function check_permission($type$cat_id 0) {

Replace it with:function cat_unhide($cat_id$save 1)
{
  global 
$cat_cache$site_sess$user_info$site_db$cat_parent_cache;
  if (!isset(
$cat_cache[$cat_id]))
    return;

  if (isset(
$cat_cache[$cat_id]['auth_viewcat_backup']))
    
$cat_cache[$cat_id]['auth_viewcat'] = $cat_cache[$cat_id]['auth_viewcat_backup'];

  
$cat_subcat_ids get_auth_subcat_ids($cat_id$cat_id$cat_parent_cache);
  if (isset(
$cat_subcat_ids[$cat_id]))
  {
    foreach (
$cat_subcat_ids[$cat_id] as $key2 => $val2)
    {
      if (
$cat_cache[$val2]['auth_viewcat'] < $cat_cache[$cat_id]['auth_viewcat']
            && (!
$cat_cache[$val2]['cat_hide']
                  || (
$cat_cache[$val2]['cat_hide'] && isset($user_info['cat_hide'][$val2]))))
      {
        
$cat_cache[$val2]['auth_viewcat'] = $cat_cache[$cat_id]['auth_viewcat'];
      }
    }
  }
  if (
$cat_cache[$cat_id]['cat_hide'])
  {
    if (isset(
$user_info['cat_hide'][$cat_id]))
      return;

    
$user_info['cat_hide'][$cat_id] = "";
    if (!
$save)
      return;

    if (
$user_info['cat_hide_db'])
    {
      
$sql "UPDATE ".USERS_TABLE." SET cat_hide = '".implode("|"array_keys($user_info['cat_hide']))."' WHERE ".get_user_table_field("""user_id")." = ".$user_info['user_id'];
      
$site_db->query($sql);
    }
    else
    {
      
$site_sess->set_session_var("cathide"implode("|"array_keys($user_info['cat_hide'])));
    }
  }
  else
  {
    if (
$cat_cache[$cat_id]['cat_parent_id'] != 0)
    {
//uncomment next line if you want unhide parent category when opened child category.
//      cat_unhide($cat_cache[$cat_id]['cat_parent_id'], $save);
    
}
  }
  
}

function 
cat_pass_check($cat_id)
{
  global 
$user_info$site_sess$cat_cache;
  if (
$user_info['user_level'] == ADMIN)
    return 
true;

  if (isset(
$cat_cache[$cat_id]['cat_password_id']))
    
$cat_id $cat_cache[$cat_id]['cat_password_id'];

  if (!isset(
$cat_cache[$cat_id]['cat_password']) || !$cat_cache[$cat_id]['cat_password'])
    return 
true;

  return (isset(
$user_info['cat_password'][$cat_id]) && $cat_cache[$cat_id]['cat_password'] == $user_info['cat_password'][$cat_id]) ? true false;
}

function 
check_permission($type$cat_id 0) {
  global 
$user_info$cat_cache;
  if (!
_check_permission($type$cat_id) && $cat_cache[$cat_id][$type] != 999)
  {
    return 
false;
  }
  if (
$type != "auth_viewcat")
  {
    return 
true;
  }
  if (
$user_info['user_level'] != ADMIN && $cat_cache[$cat_id][$type] == 999)
  {
    return 
false;
  }
  return 
true;
}

function 
_check_permission($type$cat_id 0) {



Step 6.1 
Find:    if ($val['auth_viewcat'] != AUTH_ALL) {

Replace it with:    if ($val['cat_hide'] && !isset($user_info['cat_hide'][$key]))
    {
      
$cat_cache[$key]['auth_viewcat_backup'] = $val['auth_viewcat'];
      
$cat_cache[$key]['auth_viewcat'] = $val['auth_viewcat'] = 999;
    }
    if (
$val['auth_viewcat'] != AUTH_ALL || $val['cat_password']) {



Step 6.2 
Find:        foreach ($cat_subcat_ids[$key] as $key2 => $val2) {

Insert BELOW:
          if (!$cat_cache[$val2]['cat_password'] && $cat_cache[$key]['cat_password']) //all subcategories also should obbey cat password from parent
          
{
            
$cat_cache[$val2]['cat_password'] = $cat_cache[$key]['cat_password'];
            
$cat_cache[$val2]['cat_password_id'] = (isset($cat_cache[$key]['cat_password_id'])) ? $cat_cache[$key]['cat_password_id'] : $key;
          }
          if (
$val['auth_viewcat'] == 999)
          {
            if (
$cat_cache[$val2]['cat_hide'] && isset($user_info['cat_hide'][$val2]) && $cat_cache[$val2]['auth_viewcat'] < $cat_cache[$key]['auth_viewcat'])
            {
              
$cat_cache[$val2]['auth_viewcat'] = $cat_cache[$key]['auth_viewcat_backup'];
              continue;
            }
            
$cat_cache[$val2]['auth_viewcat_backup'] = $cat_cache[$key]['auth_viewcat_backup'];
          }



Step 6.3 
Find:    if (!check_permission($type$key)) {

Replace it with:    if (!check_permission($type$key) || !cat_pass_check($key)) {



Step 7
Open includes/page_header.php
Find:      if (check_permission("auth_viewcat"$key)) {

Replace it with:      if (check_permission("auth_viewcat"$key) && cat_pass_check($key)) {



Step 8   
Open includes/sessions.php
Find:$user_info $site_sess->return_user_info();

Insert BELOW:
$user_info['cat_password_db'] = true//set to false to use only sessions to store passwords
$user_info['cat_hide_db'] = true//set to false to use only sessions to store visited hidden categories
if ($user_info['user_level'] == GUEST || !isset($user_info['cat_password']) || ($user_info['user_level'] != GUEST && !$user_info['cat_password_db']))
{
  
$cat_pass trim($site_sess->get_session_var("catpass"));
  
$user_info['cat_password_db'] = false;
}
else
{
  
$cat_pass $user_info['cat_password'];
  
$user_info['cat_password_db'] = true;
}
$user_info['cat_password'] = array();
$cat_pass explode("|"$cat_pass);
foreach(
$cat_pass as $key)
{
  
$val explode(","$key);
  if (
count($val) > && $val[0] = (int)$val[0])
    
$user_info['cat_password'][$val[0]] = $val[1];
}

if (
$user_info['user_level'] == GUEST || !isset($user_info['cat_hide']) || ($user_info['user_level'] != GUEST && !$user_info['cat_hide_db']))
{
  
$cat_hide trim($site_sess->get_session_var("cathide"));
  
$user_info['cat_hide_db'] = false;
}
else
{
  
$cat_hide $user_info['cat_hide'];
  
$user_info['cat_hide_db'] = true;
}
$user_info['cat_hide'] = array();
$cat_hide explode("|"$cat_hide);
foreach(
$cat_hide as $key)
{
  if (
$key = (int)$key)
    
$user_info['cat_hide'][$key] = "";
}



Step 9
Open admin/categories.php
Find two (2) times:
  $auth_postcomment $HTTP_POST_VARS['auth_postcomment'];

Insert BELOW each:
  $cat_password un_htmlspecialchars(trim($HTTP_POST_VARS['cat_password']));
  
$cat_hide intval($HTTP_POST_VARS['cat_hide']);



Step 9.1 
Find:    $sql "INSERT INTO ".CATEGORIES_TABLE."
            (cat_name, cat_description, cat_parent_id, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment)
            VALUES
            ('
$cat_name', '$cat_description', $cat_parent_id$cat_order$auth_viewcat$auth_viewimage$auth_download$auth_upload$auth_directupload$auth_vote$auth_sendpostcard$auth_readcomment$auth_postcomment)";

Replace it with:    $sql "INSERT INTO ".CATEGORIES_TABLE."
            (cat_name, cat_description, cat_parent_id, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment, cat_password, cat_hide)
            VALUES
            ('
$cat_name', '$cat_description', $cat_parent_id$cat_order$auth_viewcat$auth_viewimage$auth_download$auth_upload$auth_directupload$auth_vote$auth_sendpostcard$auth_readcomment$auth_postcomment, '$cat_password', $cat_hide)";



Step 9.2 
Find:  show_table_separator($permission_headline2);

Insert ABOVE:
  show_radio_row($lang['cat_hide'], "cat_hide"0);
  
show_input_row($lang['cat_password'], "cat_password"""$textinput_size);



Step 9.3 
Find:
Code: [Select]
            SET cat_name = '$cat_name', cat_description = '$cat_description', cat_parent_id = $cat_parent_id, cat_order = $cat_order, cat_hits = $cat_hits, auth_viewcat = $auth_viewcat, auth_viewimage = $auth_viewimage, auth_download = $auth_download, auth_upload = $auth_upload, auth_directupload = $auth_directupload, auth_vote = $auth_vote, auth_sendpostcard = $auth_sendpostcard, auth_readcomment = $auth_readcomment, auth_postcomment = $auth_postcomment
Replace it with:
Code: [Select]
            SET cat_name = '$cat_name', cat_description = '$cat_description', cat_parent_id = $cat_parent_id, cat_order = $cat_order, cat_hits = $cat_hits, auth_viewcat = $auth_viewcat, auth_viewimage = $auth_viewimage, auth_download = $auth_download, auth_upload = $auth_upload, auth_directupload = $auth_directupload, auth_vote = $auth_vote, auth_sendpostcard = $auth_sendpostcard, auth_readcomment = $auth_readcomment, auth_postcomment = $auth_postcomment, cat_password = '$cat_password', cat_hide = $cat_hide


Step 9.4 
Find:  $sql "SELECT cat_name, cat_description, cat_parent_id, cat_hits, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment

Replace it with:  $sql "SELECT cat_name, cat_description, cat_parent_id, cat_hits, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment, cat_password, cat_hide



Step 9.5 
Find:  show_input_row($lang['field_hits'], "cat_hits"$cat_row['cat_hits'], 5);

Insert BELOW:
  show_radio_row($lang['cat_hide'], "cat_hide"$cat_row['cat_hide']);
  
show_input_row($lang['cat_password'], "cat_password"$cat_row['cat_password'], $textinput_size);


Step 9.6 
Find:    show_text_link($lang['add_subcategory'], "categories.php?action=addcat&cat_parent_id=".$cats['cat_id']);
Insert below:
    if ($cats['cat_hide'] || $cats['cat_password'])
    {
      echo 
"&nbsp;&nbsp;&nbsp;&nbsp;<b>(";
      if (
$cats['cat_hide'])
      {
        echo 
$lang['cat_hidden'];
      }

      if (
$cats['cat_password'])
      {
        echo ((
$cats['cat_hide']) ? ", " "").$lang['cat_password2'];
      }

      echo 
")</b>";
    }


Step 9.7 
Find two times:$sql "SELECT cat_id, cat_name, cat_description, cat_parent_id, cat_hits, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment
Replace both with:
$sql "SELECT cat_id, cat_name, cat_description, cat_parent_id, cat_hits, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment, cat_hide, cat_password


Step 10   
Open lang/<your language>/main.php
At the end, ABOVE closing ?> insert:
$lang['cat_hide'] = "Hidden";
$lang['cat_password'] = "Category password";
$lang['cat_password_msg'] = "This category is password protected.<br />Please enter the password";
$lang['cat_password_error'] = "You have entered incorrect password";
$lang['cat_hidden'] = "hidden";
$lang['cat_password2'] = "password";





Tweaks and version history in the next reply.
« Last Edit: September 23, 2009, 02:39:16 AM by V@no »
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Tweaks / Changes log
« Reply #1 on: November 03, 2008, 07:36:01 AM »
----------------- [ Tweaks ] -----------------

1. If you don't want passwords be saved in the database and only in the session, then in the code from Step 8. replace:
Code: [Select]
$user_info['cat_password_db'] = true; //set to false to use only sessions to store passwords
With:
Code: [Select]
$user_info['cat_password_db'] = false; //set to false to use only sessions to store passwords


2. If you don't want visited hidden categories be saved in the database and only in the session, then in the code from Step 8. replace:
Code: [Select]
$user_info['cat_hide_db'] = true; //set to false to use only sessions to store visited hidden categories
With:
Code: [Select]
$user_info['cat_hide_db'] = false; //set to false to use only sessions to store visited hidden categories


3. If you want when visiting a hidden subcategory (only when "hidden" setting inherited from parent) automatically unhide parent category, then in the code from Step 6. replace:
Code: [Select]
//      cat_unhide($cat_cache[$cat_id]['cat_parent_id'], $save);
With:
Code: [Select]
     cat_unhide($cat_cache[$cat_id]['cat_parent_id'], $save);


4. If you want hide subcategories and it's content in password protected categories and make it inaccessible for the visitors until they unlocked the parent category, find in includes/auth.php:
Code: [Select]
         if (!$cat_cache[$val2]['cat_password'] && $cat_cache[$key]['cat_password']) //all subcategories also should obbey cat password from parent
Insert ABOVE:
Code: [Select]
         if (!cat_pass_check($key))
          {
            $cat_cache[$val2]['auth_viewcat'] = ADMIN;
            continue;
          }


5. If you don't want subcategories inherit passwords from parent categories in includes/auth.php find:
Code: [Select]
           $cat_cache[$val2]['cat_password'] = $cat_cache[$key]['cat_password'];
            $cat_cache[$val2]['cat_password_id'] = (isset($cat_cache[$key]['cat_password_id'])) ? $cat_cache[$key]['cat_password_id'] : $key;
Replace it with:
Code: [Select]
//            $cat_cache[$val2]['cat_password'] = $cat_cache[$key]['cat_password'];
//            $cat_cache[$val2]['cat_password_id'] = (isset($cat_cache[$key]['cat_password_id'])) ? $cat_cache[$key]['cat_password_id'] : $key;


----------------- [ Version history ] -----------------

v1.1 (2009-06-30)
- ADDED: at categories list at ACP shows which category is hidden or password protected (added Step 9.6 and Step 9.7 and updated Step 10)

v1.0.2 (2008-11-15)
- FIXED:  private subcategories visible under parent category. Re-do Step 6

v1.0.1 (2008-11-06)
- FIXED: an issue with redirects on servers with php running in CGI mode. Simply redownload the attached package and replace includes/catpass.php

v1.0 (2008-11-03)
- first release
« Last Edit: July 01, 2009, 02:46:25 AM by V@no »
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Werner1340

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: [MOD] Hidden / Password protected categories v1.0 (2008-11-03)
« Reply #2 on: November 03, 2008, 09:28:20 PM »
Hello V@no,

BIG Thanks for that great MOD. Works perfect on my site  :thumbup:  :!: :!:

Just 2 suggestions/questions:

1: Is it possible to protect the categories for each time I enter the site?

For example: I'm entering my site, answer the categorie-password-question and I'm in. So far, so good.
Now I'm leaving my site to  go somewhere else and after a while I come back and now I have to
answer the password again for the protected categorie, because i didn't stay on my site all the time.

2: Is it possibel to make the password case-sensitive? Just a little feature  :D, if it's easy to realize.

Thank you very much...................Werner

   


Offline V@nо

  • Addicted member
  • ******
  • Posts: 1.223
    • View Profile
Re: [MOD] Hidden / Password protected categories v1.0 (2008-11-03)
« Reply #3 on: November 03, 2008, 11:16:32 PM »
1. at the moment there is no expiration on passwords and the only way make it close to your request is do tweak 1 and set session expiration to  shorter time.

2. its supossed to be case sensetive...is it not?
Your first three "must do" before you ask a question:
If I asked you to PM me, I meant PM to my primary account, this account doesn't accept PMs.

Offline Werner1340

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: [MOD] Hidden / Password protected categories v1.0 (2008-11-03)
« Reply #4 on: November 03, 2008, 11:30:35 PM »
Hello V@no,

1: Ok, no problem.

2: Sorry, my fault  :oops:. It is case-sensitive. Sorry for that :!:

Werner

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Hidden / Password protected categories v1.0 (2008-11-03)
« Reply #5 on: November 04, 2008, 06:45:20 AM »
Added a little demo site.
« Last Edit: November 04, 2008, 07:14:22 AM by V@no »
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline kai

  • Administrator
  • Addicted member
  • *****
  • Posts: 1.423
    • View Profile
    • 4images - Image Gallery Management System
Re: [MOD] Hidden / Password protected categories v1.0 (2008-11-03)
« Reply #6 on: November 04, 2008, 08:06:57 AM »
That's awesome! Thanks V@no!
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD] Hidden / Password protected categories v1.0 (2008-11-03)
« Reply #7 on: November 04, 2008, 09:20:07 AM »
... cool ... a very small "V@no's Gallery" since (I think) two years from vano.org ...  8O
... Images with gps-infos and google-maps ... I hope it will not remain only a demo site ... ;)
... btw ... nice mod ...
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline batu544

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Free Celebrity wallpapers
Re: [MOD] Hidden / Password protected categories v1.0 (2008-11-03)
« Reply #8 on: November 04, 2008, 04:46:27 PM »
After all ... vano.org  is now up..  :D

V@no, I saw the last line of your page  "Page generated in 0.107483 seconds with 11 queries, spending 0.047000 seconds doing MySQL queries and 0.060483 doing PHP things. GZIP compression enabled" 

If you don't mind can you tell me how can I get this on my website ?? :)

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD] Hidden / Password protected categories v1.0 (2008-11-03)
« Reply #9 on: November 04, 2008, 04:56:47 PM »
@batu544

... in /includes/constants.php at the end find ...
Code: [Select]
//define("PRINT_STATS", 1);
//define("PRINT_QUERIES", 1);
//define('PRINT_CACHE_MESSAGES', 1);
... and remove all " // " ...
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline batu544

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Free Celebrity wallpapers
Re: [MOD] Hidden / Password protected categories v1.0 (2008-11-03)
« Reply #10 on: November 06, 2008, 01:07:45 PM »
Thanks mawenzi :) 

Offline Gazzagreen

  • Newbie
  • *
  • Posts: 25
  • trying to get things to go my way :)
    • View Profile
    • LoveMansfield.co.uk Social website
Re: [MOD] Hidden / Password protected categories v1.0 (2008-11-03)
« Reply #11 on: November 06, 2008, 11:04:13 PM »
Hello

I have been trying to get this mod to work but have had no luck. I have even tried to reinstall gallery from fresh incase any other mods were interfering with it, but still not working.

I can get the password page, but when I enter a password I get HTTP 404 - File not found.

The address in the addressbar is : http://gallery.lovemansfield.co.uk/php.cgi?cat_id=2

I don't have a php.cgi file?

Any advice welcome.
« Last Edit: November 07, 2008, 01:41:44 AM by Gazzagreen »

SnaFy

  • Guest
Re: [MOD] Hidden / Password protected categories v1.0 (2008-11-03)
« Reply #12 on: November 07, 2008, 12:34:38 AM »
Thanks You are creative in the programming and I hope to continue innovation

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Hidden / Password protected categories v1.0.1 (2008-11-06)
« Reply #13 on: November 07, 2008, 02:04:47 AM »
I don't have a php.cgi file?

Any advice welcome.
This is interesting...try redownload the package and replace includes/catpass.php with the new version.

I hope it fixed now.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Gazzagreen

  • Newbie
  • *
  • Posts: 25
  • trying to get things to go my way :)
    • View Profile
    • LoveMansfield.co.uk Social website
Re: [MOD] Hidden / Password protected categories v1.0.1 (2008-11-06)
« Reply #14 on: November 07, 2008, 02:26:35 AM »
No its the same. Can get to the password page, but when i enter the correct (or incorrect) password the next page is an error page with this path

http://gallery.lovemansfield.co.uk/php.cgi?cat_id=23

Off tpo bed now, its 1.30am :(