Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4257
Latest: Alex998.
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 43295
Total Topics: 7523
Most Online Today: 344
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 211
Total: 211

Author Topic: Changing Member Gallery (Group?)  (Read 9481 times)

0 Members and 1 Guest are viewing this topic.

Offline Hobbs

  • Member
  • *
  • Posts: 6
    • View Profile
Changing Member Gallery (Group?)
« on: December 29, 2011, 07:46:06 pm »
I have over 11,000 Regular Members on my smf, i'd like to change the Default Category (Member Gallery) from the 11,000+ "Regular Members" to my "Members" group.

So that way when i click on the first Category Member Gallery, i would only see my custom group, and not everyone registered on the site.

Where can i find the edit? And what to edit?

Thanks!

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: Changing Member Gallery (Group?)
« Reply #1 on: December 29, 2011, 08:24:28 pm »
In themes/default/UserGallery.template.php

In the template_userlist function

Find
Code: [Select]
  ON (p.id_member = m.id_member AND p.user_id_cat <> 0 AND p.approved = 1 )

After it add
Code: [Select]
WHERE ID_GROUP = ###
Replace ### with the your membergroups id
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 Hobbs

  • Member
  • *
  • Posts: 6
    • View Profile
Re: Changing Member Gallery (Group?)
« Reply #2 on: December 29, 2011, 09:06:38 pm »
I did the edit, no change. However using the latest gallery i only have: UseGallery2.template.php

This is what i have:

Quote
$dbresult = $smcFunc['db_query']('',"
      SELECT m.id_member, COUNT(p.ID_PICTURE )as total
         FROM {db_prefix}members as m
      LEFT JOIN {db_prefix}gallery_pic as p  ON (p.id_member = m.id_member AND p.user_id_cat <> 0 AND p.approved = 1 ) WHERE ID_GROUP = 4
      GROUP BY m.id_member HAVING  COUNT(p.ID_PICTURE) > 0      
       ");
      $rowCount = $smcFunc['db_num_rows']($dbresult);
      $num_rows  = $rowCount;
      $ptotalCheck  = ' HAVING  COUNT(p.ID_PICTURE) > 0 ';
   }


Any ideas?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: Changing Member Gallery (Group?)
« Reply #3 on: December 29, 2011, 09:12:39 pm »
There should be another similar query under that 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 Hobbs

  • Member
  • *
  • Posts: 6
    • View Profile
Re: Changing Member Gallery (Group?)
« Reply #4 on: December 29, 2011, 10:31:56 pm »
That worked, many thanks.

Only issue, if an ID_GROUP = 30 user is an admin, they do not show in the Member Gallery for ID_GROUP = 30,
because they are ID_GROUP = 0.

The admins are in the Members group, and we just need the Members group to be listed for the gallery, including admins.

Any ideas, aside from "ID_GROUP =30,0

Thanks

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: Changing Member Gallery (Group?)
« Reply #5 on: December 29, 2011, 10:38:07 pm »
Change to
m.ID_GROUP IN(30,1)
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 Hobbs

  • Member
  • *
  • Posts: 6
    • View Profile
Re: Changing Member Gallery (Group?)
« Reply #6 on: December 29, 2011, 10:44:24 pm »
just throws an error:

Quote
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 'm.ID_GROUP IN(30,1)

GROUP BY m.id_member ORDER BY total DESC LIMIT 0' at line 3/quote]

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: Changing Member Gallery (Group?)
« Reply #7 on: December 29, 2011, 10:50:48 pm »
Try just
WHERE ID_GROUP IN(30,1)
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 Hobbs

  • Member
  • *
  • Posts: 6
    • View Profile
Re: Changing Member Gallery (Group?)
« Reply #8 on: December 29, 2011, 10:56:37 pm »
spoke too soon, roger that. I forgot the WHERE, Works like a charm.

Many thanks for the help.

 

Related Topics

  Subject / Started by Replies Last post
13 Replies
18078 Views
Last post July 26, 2007, 08:15:47 pm
by SMFHacks
0 Replies
3997 Views
Last post December 03, 2007, 11:08:05 am
by CrotalusCo
0 Replies
6661 Views
Last post April 02, 2009, 01:24:20 pm
by CLSSY56
2 Replies
8766 Views
Last post November 30, 2010, 02:04:57 pm
by elieco
1 Replies
23242 Views
Last post October 22, 2023, 07:24:12 am
by SMFHacks

+- Recent Topics

Please Help! by SMFHacks
April 17, 2024, 08:04:55 am

Rate own images by fvlog19
April 11, 2024, 10:56:53 am

Tidy Child Boards on 2.1.4 by SMFHacks
April 04, 2024, 03:54:12 pm

Problems SMF 2.0.19 > 2.1.4 SMF Gallery Pro - Recents Images to overall header by Michel68
March 30, 2024, 12:41:08 pm

Can't DROP 'id_member'; check that column/key exists Datei: by SMFHacks
March 30, 2024, 11:58:20 am

No thumbnails on new uploads by Tonyvic
March 29, 2024, 06:26:18 am

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

Powered by EzPortal