4images Forum & Community
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 29, 2017, 10:42:56 PM

Login with username, password and session length
Search:     Advanced search
Check the new Tutorial subforum with helpfull guides and tutorials for modifications and tweaks.
Togle to toolbar
Translate this page with =>
Translate this page >
* Home Help Search Login Register
 
+  4images Forum & Community
|-+  4images Modifications / Modifikationen
| |-+  Mods & Plugins (Releases & Support) (Moderators: mawenzi, Rembrandt)
| | |-+  [MOD] Hidden / Password protected categories v1.1 (2009-06-30)
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] 2 3 4 5 6 » »» Print
Current Topic Rating: *****
Author Topic: [MOD] Hidden / Password protected categories v1.1 (2009-06-30)  (Read 82258 times)
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 565

mmm PHP...


View Profile WWW
« 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 Wink


----------------- [ 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:
1
  $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:
1
  $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:
1
$cat_id = (isset($image_row['cat_id'])) ? $image_row['cat_id'] : 0;
Insert BELOW:
1
cat_unhide($cat_id);


Step 4.1 
Find:
1
2
3
if (!check_permission("auth_viewcat"$cat_id) || !check_permission("auth_viewimage"$cat_id) || !$image_row) {
  
redirect($url);
}
Insert BELOW:
1
2
$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:
1
$user_access get_permission();
Insert BELOW:
1
cat_unhide($cat_id);


Step 5.1 
Find:
1
2
3
if (!$cat_id || !isset($cat_cache[$cat_id]) || !check_permission("auth_viewcat"$cat_id)) {
  
redirect("index.php");
}
Insert BELOW:
1
include(ROOT_PATH."includes/catpass.php");


Step 6
Open includes/auth.php
Find:
1
function check_permission($type$cat_id 0) {
Replace it with:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
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:
1
    if ($val['auth_viewcat'] != AUTH_ALL) {
Replace it with:
1
2
3
4
5
6
    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:
1
        foreach ($cat_subcat_ids[$key] as $key2 => $val2) {
Insert BELOW:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
          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:
1
    if (!check_permission($type$key)) {
Replace it with:
1
    if (!check_permission($type$key) || !cat_pass_check($key)) {


Step 7
Open includes/page_header.php
Find:
1
      if (check_permission("auth_viewcat"$key)) {
Replace it with:
1
      if (check_permission("auth_viewcat"$key) && cat_pass_check($key)) {


Step 8   
Open includes/sessions.php
Find:
1
$user_info $site_sess->return_user_info();
Insert BELOW:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
$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:
1
  $auth_postcomment $HTTP_POST_VARS['auth_postcomment'];
Insert BELOW each:
1
2
  $cat_password un_htmlspecialchars(trim($HTTP_POST_VARS['cat_password']));
  
$cat_hide intval($HTTP_POST_VARS['cat_hide']);


Step 9.1 
Find:
1
2
3
4
    $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:
1
2
3
4
    $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:
1
  show_table_separator($permission_headline2);
Insert ABOVE:
1
2
  show_radio_row($lang['cat_hide'], "cat_hide"0);
  
show_input_row($lang['cat_password'], "cat_password"""$textinput_size);


Step 9.3 
Find:
1
            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:
1
            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:
1
  $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:
1
  $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:
1
  show_input_row($lang['field_hits'], "cat_hits"$cat_row['cat_hits'], 5);
Insert BELOW:
1
2
  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:
1
    show_text_link($lang['add_subcategory'], "categories.php?action=addcat&cat_parent_id=".$cats['cat_id']);
Insert below:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
    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:
1
$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:
1
$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:
1
2
3
4
5
6
$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.

* catpashid.zip (3.35 KB - downloaded 178 times.)
« Last Edit: September 23, 2009, 02:39:16 AM by V@no » Logged

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)
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 565

mmm PHP...


View Profile WWW
« 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:
1
$user_info['cat_password_db'] = true; //set to false to use only sessions to store passwords
With:
1
$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:
1
$user_info['cat_hide_db'] = true; //set to false to use only sessions to store visited hidden categories
With:
1
$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:
1
//      cat_unhide($cat_cache[$cat_id]['cat_parent_id'], $save);
With:
1
     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:
1
         if (!$cat_cache[$val2]['cat_password'] && $cat_cache[$key]['cat_password']) //all subcategories also should obbey cat password from parent
Insert ABOVE:
1
2
3
4
5
         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:
1
2
           $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:
1
2
//            $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 » Logged

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)
Werner1340
Newbie
*
Offline Offline

Posts: 11

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #2 on: November 03, 2008, 09:28:20 PM »

Hello V@no,

BIG Thanks for that great MOD. Works perfect on my site  Good  Exclamation Exclamation

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  Very Happy, if it's easy to realize.

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

   

Logged
V@nо
Addicted member
******
Offline Offline

Posts: 1223

Thank You
-Given: 11
-Receive: 17


View Profile
« 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?
Logged

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.
Werner1340
Newbie
*
Offline Offline

Posts: 11

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #4 on: November 03, 2008, 11:30:35 PM »

Hello V@no,

1: Ok, no problem.

2: Sorry, my fault  Embarassed. It is case-sensitive. Sorry for that Exclamation

Werner
Logged
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 565

mmm PHP...


View Profile WWW
« 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 » Logged

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)
kai
Administrator
Addicted member
*****
Offline Offline

Posts: 1405

Thank You
-Given: 66
-Receive: 196


View Profile WWW
« Reply #6 on: November 04, 2008, 08:06:57 AM »

That's awesome! Thanks V@no!
Logged


Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search
mawenzi
Moderator
4images Guru
*****
Offline Offline

Posts: 4500

Thank You
-Given: 36
-Receive: 121


View Profile
« 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 ...  Shocked
... Images with gps-infos and google-maps ... I hope it will not remain only a demo site ... Wink
... btw ... nice mod ...
Logged

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) ...
batu544
Sr. Member
****
Offline Offline

Posts: 336

Thank You
-Given: 2
-Receive: 27


View Profile WWW
« Reply #8 on: November 04, 2008, 04:46:27 PM »

After all ... vano.org  is now up..  Very Happy

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 ?? Smile
Logged

mawenzi
Moderator
4images Guru
*****
Offline Offline

Posts: 4500

Thank You
-Given: 36
-Receive: 121


View Profile
« Reply #9 on: November 04, 2008, 04:56:47 PM »

@batu544

... in /includes/constants.php at the end find ...
1
2
3
//define("PRINT_STATS", 1);
//define("PRINT_QUERIES", 1);
//define('PRINT_CACHE_MESSAGES', 1);
... and remove all " // " ...
Logged

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) ...
batu544
Sr. Member
****
Offline Offline

Posts: 336

Thank You
-Given: 2
-Receive: 27


View Profile WWW
« Reply #10 on: November 06, 2008, 01:07:45 PM »

Thanks mawenzi Smile 
Logged

Gazzagreen
Newbie
*
Offline Offline

Posts: 25

Thank You
-Given: 0
-Receive: 0

trying to get things to go my way :)


View Profile WWW
« 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 » Logged
SnaFy
Full Member
***
Offline Offline

Posts: 130

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #12 on: November 07, 2008, 12:34:38 AM »

Thanks You are creative in the programming and I hope to continue innovation
Logged

I love 4imagezZzZz7
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 565

mmm PHP...


View Profile WWW
« 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.
Logged

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)
Gazzagreen
Newbie
*
Offline Offline

Posts: 25

Thank You
-Given: 0
-Receive: 0

trying to get things to go my way :)


View Profile WWW
« 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 Sad
Logged
Pages: [1] 2 3 4 5 6 » »» Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.122 seconds with 20 queries.
Post your comments here