Author Topic: How do I limit postcards to registered users?  (Read 4123 times)

0 Members and 1 Guest are viewing this topic.

Offline Tombraider

  • Newbie
  • *
  • Posts: 40
    • View Profile
How do I limit postcards to registered users?
« on: September 23, 2006, 05:26:46 PM »
Hi,

I have a problem with "spam" postcards being sent from my 4Images site.  I would like to limit sending postcards to only registered users.  How do I do that?

I had a problem with spam comments and have wound up taking the code out for comments so now not even I can post comments.  There was a "guest" with -1 ID that I deleted from the database who was spamming.  Is there a less draconian measure I could take so that just registered users can post comments?  how do I do that?

I could not find answers in searching the forum.
Thanks in advance.  :oops:


« Last Edit: September 23, 2006, 10:31:58 PM by Tombraider »

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: How do I limit postcards to registered users?
« Reply #1 on: September 23, 2006, 06:32:42 PM »
you can control it via individual category permissions.

P.S. make sure you have the lattest version of 4images or at least applyed ALL the bug fixes for your version.
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 Tombraider

  • Newbie
  • *
  • Posts: 40
    • View Profile
Re: How do I limit postcards to registered users?
« Reply #2 on: September 23, 2006, 06:54:11 PM »
Oh,  thank you, thank you, V@no!  Thanks for taking the time to reply to a clueless person.  I've used 4Images for years and have over 6000 images online and never knew that!

It's probably right there in the documentation somewhere which I've only read parts of.

Thanks again...hope this helps someone else too.  :lol:

Offline Tombraider

  • Newbie
  • *
  • Posts: 40
    • View Profile
Re: How do I limit postcards to registered users?
« Reply #3 on: September 23, 2006, 07:01:46 PM »
Related question:  Is there some place to set default permission for categories?

AND I have about 60 categories to go through and change through "edit categoires".  Is there an easier way to do this?

Thanks.

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: How do I limit postcards to registered users?
« Reply #4 on: September 23, 2006, 07:18:53 PM »
The default permissions for new categories are defined in admin/categories.php:
Code: [Select]
$access_field_array = array(
  "auth_viewcat" => AUTH_ALL,
  "auth_viewimage" => AUTH_ALL,
  "auth_download" => AUTH_USER,
  "auth_upload" => AUTH_USER,
  "auth_directupload" => AUTH_ADMIN,
  "auth_vote" => AUTH_ALL,
  "auth_sendpostcard" => AUTH_ALL,
  "auth_readcomment" => AUTH_ALL,
  "auth_postcomment" => AUTH_USER
);
but if you add a subcategory to already existed category, then it will inherit permissions from parent category.

If you want to change permissions in all categories at once you can run this mysql query (use phpmyadmin or something):
Code: [Select]
UPDATE 4images_categories SET auth_sendpostcard = 2(referer)
or use this mod:
http://www.4homepages.de/forum/index.php?topic=7643.0
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 Tombraider

  • Newbie
  • *
  • Posts: 40
    • View Profile
Re: How do I limit postcards to registered users?
« Reply #5 on: September 23, 2006, 08:08:33 PM »
Hi,
I applied the "mod".  Did it twice...have version 1.7.1,  but am missing the "save" button.  I see someone else had the same problem but did not explain how they fixed it.
 :-(

I have 2 instances of "$auth_postcomment = $HTTP_POST_VARS['auth_postcomment'];".  Do I apply the change to both or to the first or second.
Thanks for your patience.  :oops:

Nevermind,  it was just careless copying and pasting.  Works great now.
« Last Edit: September 23, 2006, 08:31:55 PM by Tombraider »