Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4267
Latest: ramiroelliot
New This Month: 2
New This Week: 0
New Today: 0
Stats
Total Posts: 43538
Total Topics: 7565
Most Online Today: 40
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 40
Total: 40

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

+- Recent Topics

Gallery Pro reinstalation by Lirorobert
October 06, 2024, 04:16:25 pm

quoting part of message by Lirorobert
October 04, 2024, 03:21:40 pm

Does SMF Gallery support by SMFHacks
October 02, 2024, 06:14:26 am

Restoring a deleted photo by Monocero
September 28, 2024, 04:12:20 am

Item count on Gallery Tab shows double by SMFHacks
September 26, 2024, 12:59:20 pm

Forum post missing when image over 4000x pixels is uploaded to gallery by Michel68
September 24, 2024, 01:37:17 pm

Setting a photo as invisible by Monocero
September 17, 2024, 02:11:56 pm

Two gallery names by SMFHacks
September 15, 2024, 02:17:49 pm

Bar during the regeneration of miniatures by Monocero
September 15, 2024, 12:35:08 pm

Error on upgrade by SMFHacks
September 14, 2024, 09:54:07 pm

Powered by EzPortal