Facebook  Twitter 

SMFHacks.com

+- +-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 12374
Latest: LevelLord
New This Month: 1
New This Week: 2
New Today: 0
Stats
Total Posts: 40211
Total Topics: 7082
Most Online Today: 67
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 45
Total: 45

Author Topic: Restrict Member Galleries viewing to only one membergroup  (Read 4071 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: 15105
    • 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: 15105
    • 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: 15105
    • 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: 15105
    • 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: 15105
    • 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: 15105
    • 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
2514 Views
Last post September 24, 2008, 04:12:25 am
by maxipes
4 Replies
2964 Views
Last post December 14, 2009, 06:34:16 pm
by SMFHacks
2 Replies
2142 Views
Last post February 27, 2011, 03:33:27 pm
by simibill
2 Replies
2255 Views
Last post July 04, 2011, 12:39:13 pm
by Marshall
4 Replies
4238 Views
Last post August 10, 2012, 09:51:49 am
by amwebby

+- Recent Topics

Download System Lite by Rock Lee
June 03, 2020, 07:34:24 pm

Font question by SMFHacks
May 27, 2020, 08:15:26 am

Error message with latest SMF 2.1 Github build by Hatshepsut
May 25, 2020, 01:43:26 am

smfblog not working on 2.0.17 by tech9
May 20, 2020, 01:44:34 pm

Copyright removal by stbc
May 18, 2020, 01:27:57 am

Mod Verified User i can't square the image by Rock Lee
May 07, 2020, 07:56:10 pm

SMF4Mobile 2.0 released for SMF 2.0.x by SMFHacks
May 06, 2020, 12:13:14 pm

SMF Social Login Pro - Discontinued? by Nicole
May 02, 2020, 05:47:04 pm

Likes by SMFHacks
April 30, 2020, 09:50:35 pm

Upgrade Issue - by SMFHacks
April 28, 2020, 12:40:13 pm

Powered by EzPortal