Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4220
Latest: agolac
New This Month: 1
New This Week: 1
New Today: 0
Stats
Total Posts: 42854
Total Topics: 7464
Most Online Today: 112
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 53
Total: 53

Author Topic: You are not allowed to leave comments in this category.  (Read 5504 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: 16257
    • 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: 16257
    • 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: 16257
    • 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
6768 Views
Last post July 03, 2006, 02:23:31 am
by MyFSI
1 Replies
3658 Views
Last post October 12, 2007, 07:01:53 pm
by SMFHacks
35 Replies
26986 Views
Last post April 11, 2009, 04:34:11 pm
by Cepheus
4 Replies
5073 Views
Last post February 12, 2009, 06:01:53 pm
by Bar Nuthin
5 Replies
5361 Views
Last post April 28, 2009, 10:22:11 am
by davieb

+- Recent Topics

Is the PayPal Sandbox still working? by Nicole
Today at 06:51:18 am

Question on Completed Listing & Reserve Price by Nicole
June 01, 2023, 06:06:12 pm

[Mod]GDPR Helper by Nicole
May 29, 2023, 11:58:49 pm

RSS Feed Poster Database Error by SMFHacks
May 22, 2023, 06:26:18 pm

Errors With Older Version. by Ken.
May 09, 2023, 05:35:40 pm

Pretty Urls SEO Pro by SMFHacks
May 06, 2023, 03:30:11 pm

New Post Image Upload Error by Mike66
April 28, 2023, 07:30:28 am

Copyright Removal Key by SMFHacks
April 03, 2023, 02:44:28 pm

Converting from Aeva Media by sudhakar
April 02, 2023, 11:09:54 am

Using SMF's Built-in Search Algorithm by shuban
March 27, 2023, 09:15:10 am

Powered by EzPortal