Facebook  Twitter 

SMFHacks.com

+- +-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 12400
Latest: mikel
New This Month: 5
New This Week: 1
New Today: 1
Stats
Total Posts: 40609
Total Topics: 7132
Most Online Today: 121
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 57
Total: 57

Author Topic: Restrict Member Galleries viewing to only one membergroup  (Read 4224 times)

0 Members and 1 Guest are viewing this topic.

Offline Tonyvic

  • Newbie
  • *
  • Posts: 20
    • View Profile
Restrict Member Galleries viewing to only one membergroup
« on: August 28, 2015, 01:55:41 pm »
Hi,
Is it possible to restrict access to member's galleries so that only one membergroup can see them, but still allow all other membergroups to see all other galleries?

Also, how do I turn off emails sent with regards to pics/comments etc. awaiting approval. I have installed the GalleryInfoHeader mod so emails aren't required.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 15291
    • View Profile
Re: Restrict Member Galleries viewing to only one membergroup
« Reply #1 on: August 28, 2015, 04:57:56 pm »
Quote
Is it possible to restrict access to member's galleries so that only one membergroup can see them, but still allow all other membergroups to see all other galleries?
Not currently. Would require a lot of different checks if you wanted to hide the pictures from appearing everywhere.

Quote
Also, how do I turn off emails sent with regards to pics/comments etc. awaiting approval. I have installed the GalleryInfoHeader mod so emails aren't required.
Would require editing the code. Sources/Gallery2.php

Find
Code: [Select]
// Send all the administrators a lovely email.
function Gallery_emailAdmins($subject, $body, $additional_recipients = array())
{
Add after
Code: [Select]
return;
That will stop them from being sent to gallery admins
[/quote]
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Tonyvic

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Restrict Member Galleries viewing to only one membergroup
« Reply #2 on: August 29, 2015, 05:46:06 am »
Many thanks for your swift reply, and of course for an excellent product.

Offline Tonyvic

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Restrict Member Galleries viewing to only one membergroup
« Reply #3 on: August 31, 2015, 02:55:11 pm »
Hi Hacks,

Is there an easy way to move all member galleries (200 galleries containing over 3000 pics) into a general gallery?
I have been looking and searching for a couple of days but can't see anything obvious.



Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 15291
    • View Profile
Re: Restrict Member Galleries viewing to only one membergroup
« Reply #4 on: August 31, 2015, 02:59:59 pm »
Into a single category maybe but it would need to be an sql statement.
Otherwise there is an option when you edit a picture to move them one by one.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Tonyvic

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Restrict Member Galleries viewing to only one membergroup
« Reply #5 on: August 31, 2015, 04:40:30 pm »
All 3000+ pictures into one category would be great, is it possible to give me a guide for the sql statement as I have no idea. Thanks.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 15291
    • View Profile
Re: Restrict Member Galleries viewing to only one membergroup
« Reply #6 on: August 31, 2015, 04:45:49 pm »
Make a backup of your database first.

The following SQL will move ALL your user galleries images to a single category
Code: [Select]
UPDATE smf_gallery_pic SET USER_ID_CAT = 0, ID_CATEGORY = ###REPLACEWITHCATID###  WHERE ID_CAT = 0 AND USER_ID_CAT != 0

Just change ###REPLACEWITHCATID###  to the category ID number in the gallery category that you are changing it to.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Tonyvic

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Restrict Member Galleries viewing to only one membergroup
« Reply #7 on: September 01, 2015, 01:59:50 pm »
Many thanks, that helped a lot. Just one thing in case someone else needs this, I received an error with the SQL in your code
Code: [Select]
UPDATE smf_gallery_pic SET USER_ID_CAT = 0, ID_CATEGORY = ###REPLACEWITHCATID###  WHERE ID_CAT = 0 AND USER_ID_CAT != 0
( #1054 - Unknown column 'ID_CATEGORY' in 'field list') and changed it to
Code: [Select]
UPDATE smf_gallery_pic SET USER_ID_CAT = 0, ID_CAT = ###REPLACEWITHCATID###  WHERE ID_CAT = 0 AND USER_ID_CAT != 0

All Images appear to have been moved ok but the 'Target' category is showing 'Total Images 0', if I open the target there is only one page of images (Up to 60 if thats what I choose. However if I select 'Random Items (List All)' in fact any section from the index page I see all 59 pages of the images.

Have you got another trick up your sleeve to correct these issues.

TIA, I feel sure it is now close to perfect for us.

Tony

Edited to add: Member Galleries still shows 'Total Images 3477' but when opened it is empty.
« Last Edit: September 01, 2015, 02:10:45 pm by Tonyvic »

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 15291
    • View Profile
Re: Restrict Member Galleries viewing to only one membergroup
« Reply #8 on: September 01, 2015, 02:12:06 pm »
Oops yeah meant ID_CAT

There should be a button in the settings area to recount all picture totals I believe.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Tonyvic

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Restrict Member Galleries viewing to only one membergroup
« Reply #9 on: September 01, 2015, 04:35:22 pm »
There should be a button in the settings area to recount all picture totals I believe.
I have been all through settings twice, can't see a 'recount all picture totals' anywhere.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 15291
    • View Profile
Re: Restrict Member Galleries viewing to only one membergroup
« Reply #10 on: September 01, 2015, 04:53:12 pm »
Download SMFGalleryPro and rerun the galleryinstall2.0.x.php script by copying to the main directory of your forum and run it in your browser
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Tonyvic

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Restrict Member Galleries viewing to only one membergroup
« Reply #11 on: September 01, 2015, 05:28:21 pm »
Brilliant, thanks a lot Hacks that did the trick.

Tony

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 15291
    • View Profile
Re: Restrict Member Galleries viewing to only one membergroup
« Reply #12 on: September 01, 2015, 05:35:04 pm »
Glad to help.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

 

Related Topics

  Subject / Started by Replies Last post
2 Replies
2592 Views
Last post September 24, 2008, 04:12:25 am
by maxipes
4 Replies
3076 Views
Last post December 14, 2009, 06:34:16 pm
by SMFHacks
2 Replies
2229 Views
Last post February 27, 2011, 03:33:27 pm
by simibill
2 Replies
2323 Views
Last post July 04, 2011, 12:39:13 pm
by Marshall
4 Replies
4362 Views
Last post August 10, 2012, 09:51:49 am
by amwebby

+- Recent Topics

Forum ToolBox by Monocero
January 23, 2021, 11:47:48 am

Gallery Pro v8.0 and PHP 7.4 by SMFHacks
January 20, 2021, 10:21:25 pm

[Mod] Tagging System by SMFHacks
January 13, 2021, 08:43:33 pm

Using Alternate PayPal Address by KKOG
January 13, 2021, 07:24:46 pm

Assigning a BuyNow Button to a product by SMFHacks
January 12, 2021, 04:59:32 pm

SMF Links by Nicole
January 10, 2021, 12:02:39 pm

Error on the latest version by davejo
January 06, 2021, 08:04:05 am

Recent topics on board index by eugen
January 01, 2021, 11:08:16 am

Parser by swayforth
December 31, 2020, 12:24:23 am

Show Gallery in Users Profile by swayforth
December 29, 2020, 10:37:17 pm

Powered by EzPortal