Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4260
Latest: Verrick
New This Month: 3
New This Week: 0
New Today: 0
Stats
Total Posts: 43301
Total Topics: 7525
Most Online Today: 119
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 193
Total: 193

Author Topic: You are not allowed to leave comments in this category.  (Read 6384 times)

0 Members and 1 Guest are viewing this topic.

Offline iosarian

  • Member
  • *
  • Posts: 24
    • View Profile
You are not allowed to leave comments in this category.
« on: October 10, 2007, 05:02:29 pm »
This error message was showing on the gallery yesterday for the regular members. Only in the user galleries. The permissions in the admin section are ok.
I looked in the database, table 'smf_gallery_catperm'. I saw that for the member group "0" (regular members in the forum) and for the ID_CAT "0"(may be user gallery category)  the addcomment value is "0" (it means fatal error, you don't..). I've changed it to "1", and now it seems there is no problem with the commenst.
My question is, is it everything OK now, or is possible to have more problems?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16455
    • View Profile
Re: You are not allowed to leave comments in this category.
« Reply #1 on: October 10, 2007, 09:15:16 pm »
!Fixed bug with adding comment in user galleries was checking permission from normal galleries

Fixed in SMF Gallery Pro 1.3.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 iosarian

  • Member
  • *
  • Posts: 24
    • View Profile
Re: You are not allowed to leave comments in this category.
« Reply #2 on: October 11, 2007, 03:37:34 am »
Thank you for the answer. Because I made some changes in gallery.php and gallery.template.php. If I install SMFGallery1.3.1upgrade will the chages be kept?
Can you tell me please, is it possible to make changes by hand?

P.S. There is no 1.3.1 changelog in SMFGallery1.3.1upgrade package.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16455
    • View Profile
Re: You are not allowed to leave comments in this category.
« Reply #3 on: October 11, 2007, 07:22:02 am »
The changes would not be kept

Find
Code: [Select]
// Checked if comments are allowed
if ($row['allowcomments'] == 0)
{
fatal_error($txt['gallery_error_not_allowcomment']);
}

GetCatPermission($ID_CAT,'addcomment');
Change to
Code: [Select]
// Checked if comments are allowed
if ($row['allowcomments'] == 0)
{
fatal_error($txt['gallery_error_not_allowcomment']);
}
if ($row['ID_CAT'] != 0 )
GetCatPermission($ID_CAT,'addcomment');
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 iosarian

  • Member
  • *
  • Posts: 24
    • View Profile
Re: You are not allowed to leave comments in this category.
« Reply #4 on: October 11, 2007, 01:14:31 pm »
Thank you.

Offline iosarian

  • Member
  • *
  • Posts: 24
    • View Profile
Re: You are not allowed to leave comments in this category.
« Reply #5 on: October 14, 2007, 05:49:44 am »
Same thing with delete picture. In the database I've changed delpic to 1 for member group "0" and now members can delete their own pictures.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16455
    • View Profile
Re: You are not allowed to leave comments in this category.
« Reply #6 on: October 14, 2007, 08:31:04 am »
Open Gallery.php
Find
Code: [Select]
if (db_affected_rows()== 0)
    fatal_error($txt['gallery_error_no_pictureexist'],false);
    $row = mysql_fetch_assoc($dbresult);
// Check the category permission
GetCatPermission($row['ID_CAT'],'delpic');
Change to
Code: [Select]
if (db_affected_rows()== 0)
    fatal_error($txt['gallery_error_no_pictureexist'],false);
    $row = mysql_fetch_assoc($dbresult);
// Check the category permission
if ($row['ID_CAT'] != 0)
GetCatPermission($row['ID_CAT'],'delpic');
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 iosarian

  • Member
  • *
  • Posts: 24
    • View Profile

 

Related Topics

  Subject / Started by Replies Last post
3 Replies
7898 Views
Last post July 03, 2006, 02:23:31 am
by MyFSI
1 Replies
4468 Views
Last post October 12, 2007, 07:01:53 pm
by SMFHacks
35 Replies
28945 Views
Last post April 11, 2009, 04:34:11 pm
by Cepheus
4 Replies
5918 Views
Last post February 12, 2009, 06:01:53 pm
by Bar Nuthin
5 Replies
6217 Views
Last post April 28, 2009, 10:22:11 am
by davieb

+- Recent Topics

Pretty Urls extras by SMFHacks
May 13, 2024, 10:28:54 am

Mod question by Verrick
May 11, 2024, 02:42:50 pm

i have paid but cant download ad pro. by SMFHacks
May 02, 2024, 11:29:38 pm

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

Powered by EzPortal