• [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 122951 times)

0 Members and 1 Guest 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
Re: [MOD] Hidden / Password protected categories v1.0.1 (2008-11-06)
« Reply #30 on: November 15, 2008, 10:10:05 AM »
If you want hide subcategories, edit each subcategory and set it to be hidden.


To everyone who installed v1.0 / v1.0.1

In includes/auth.php find:
Code: [Select]
      if (!$cat_cache[$val2]['cat_hide'] || ($cat_cache[$val2]['cat_hide'] && isset($user_info['cat_hide'][$val2])))
Replace it with:
Code: [Select]
      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]))))
(or re-do Step 6 - only one step)

This should fix the problem with private categories visible to everyone inside parent category.
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.1 (2008-11-06)
« Reply #31 on: November 15, 2008, 03:15:18 PM »

If you want hide subcategories, edit each subcategory and set it to be hidden.

It's still not working.
When i set the subcategories to be hidden i even can't see them after i passed the "Gästehaus"- entry  :?:

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.2 (2008-11-15)
« Reply #32 on: November 15, 2008, 08:34:55 PM »
I don't understand what you are trying to do...you don't want show subcategories, but want to see them?
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.2 (2008-11-15)
« Reply #33 on: November 16, 2008, 06:30:32 AM »
I don't understand what you are trying to do...you don't want show subcategories, but want to see them?

 nearly  :D
The Categorie "Gästehaus" is protected but I don't want to see the subcategories underneath,
after entering the "Gästehaus" everybody can see all Subcategories which are all extra password protected too.
That's it.

Maincategorie (=pass-protected, the Subcategories are hidden)
- Subcategorie 1 (=pass-protected, seen by everyone, not hidden, but password-protected)
- Subcategorie 2 (=pass-protected, seen by everyone, not hidden, but password-protected)
and so on............
« Last Edit: November 16, 2008, 08:38:25 AM by Werner1340 »

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.2 (2008-11-15)
« Reply #34 on: November 16, 2008, 09:43:39 AM »
Other words you want show subcategories only after visitors unlocked the parent category...In current version it's not possible, but I'll look into it.


[EDIT]
Try this and see if it works:
in includes/auth.php find:
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;
          }
« Last Edit: November 16, 2008, 10:23:19 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.2 (2008-11-15)
« Reply #35 on: November 16, 2008, 12:59:24 PM »
GREAT!!

Now it works exactly how i wanted it  :D

Sorry, for confusing you at the beginning and a very BIG THANKS for your help and efforts on this !!!!!!!!

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.2 (2008-11-15)
« Reply #36 on: November 16, 2008, 06:36:33 PM »
Good. I've added it as a tweak
Also added one more tweak which allows have parent category be password protected and subcategories don't inherit the password.
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 sanko86

  • Sr. Member
  • ****
  • Posts: 310
    • View Profile
    • Elemegim
Re: [MOD] Hidden / Password protected categories v1.0.2 (2008-11-15)
« Reply #37 on: January 27, 2009, 11:01:57 AM »
ý Thanks @v@no

good mod

perfect work.
Web site:http://www.anlatiyoruz.com
Hayat zorluklarla doludur.Ama en zoru insanýn insana düþmanlýðýdýr.

Offline tennis-ecards

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: [MOD] Hidden / Password protected categories v1.0.2 (2008-11-15)
« Reply #38 on: March 07, 2009, 12:21:22 PM »
Hallo,

ich habe auf meiner Seite diesen MOD installiert.
Aber irgendwie kann ich nur als Admin die passwortgeschützte Kategorie sehen, jedoch nicht als registrieter User.
Mache ich etwas bei den Settings falsch?
Ich habe die Befugnisse für "Kategorie sehen" schon auf "Alle", "Privat" oder "Registrierte User" gesellt aber nichts ändert sich.
Hat jemand eine Idee woran das liegt?

Danke

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.2 (2008-11-15)
« Reply #39 on: March 07, 2009, 04:57:35 PM »
Double check Step 9 - 9.x
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 tennis-ecards

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: [MOD] Hidden / Password protected categories v1.0.2 (2008-11-15)
« Reply #40 on: March 07, 2009, 10:21:12 PM »
Danke für die schnelle Antwort.
Jetzt kann man als registrierter User die Kategorie sehen und öffnen.
Ich möchte aber eigentlich dass JEDER die Kategorie sieht, aber sie nur öffnen kann, wenn er das Passwort kennt.
Eine Passwortabfrage kommt aber bei mir derzeit gar nicht.
Noch eine Idee, woran es liegen kann?

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.2 (2008-11-15)
« Reply #41 on: March 08, 2009, 12:49:16 AM »
Sorry, but when it comes to human errors, anything could be the cause.
So, what should do is check every single step and make sure you did all the changes correctly.
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 moto1985

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: [MOD] Hidden / Password protected categories v1.0.2 (2008-11-15)
« Reply #42 on: March 24, 2009, 01:13:40 AM »
ich habe folgendes Problem

Quote
DB Error: Bad SQL Query: UPDATE 4images_categories SET cat_name = 'Firmware', cat_description = 'Hier findet Ihr sämtliche Firmware Files für euer SE handy', cat_parent_id = 0, cat_order = 5, cat_hits = 31, auth_viewcat = 0, auth_viewimage = 0, auth_download = 2, auth_upload = 3, auth_directupload = 9, auth_vote = 0, auth_sendpostcard = 3, auth_readcomment = 0, auth_postcomment = 2, cat_password = '', cat_hide = 1, cat_image = WHERE cat_id = 1
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE cat_id = 1' at line 3

Warning: Cannot modify header information - headers already sent by (output started at O:\htdocs\includes\db_mysql.php:190) in O:\htdocs\includes\functions.php on line 114

komischerweise habe ich das jetzt bei allem wenn ich was ändern will.
« Last Edit: March 24, 2009, 01:28:25 AM by moto1985 »

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.2 (2008-11-15)
« Reply #43 on: March 24, 2009, 01:32:33 AM »
Check step 3, you might removed modifications from other mods if you simply replaced the whole line, instead of the part you were supposed to replace.
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 Sun Zaza

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
Re: [MOD] Hidden / Password protected categories v1.0.2 (2008-11-15)
« Reply #44 on: July 01, 2009, 01:35:27 AM »
Hi V@no,

I like the mod. Already installed and works fine so far.

I have a question (suggestion) for you:

Guess you have more than 50 categories on your gallery. What is the easier way to know which categories are hidden/password protected and which not? To look for 1 by one it will cost a lot time (Time is money :wink:).

I suggest the following:

When you click on category edit on the ACP, you get a list of the categories. After the name of cat you can put something like:

My fotos  (ID: 2)    [Open]  [delete]  [Add subcategory]   (Hidden & password protected)
My videos (ID: 3)    [Open]  [delete]  [Add subcategory]   (Hidden)
My friends (ID: 4)    [Open]  [delete]  [Add subcategory]   (password protected)

What do you think about that?