Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4229
Latest: Ghost
New This Month: 3
New This Week: 0
New Today: 0
Stats
Total Posts: 43074
Total Topics: 7493
Most Online Today: 108
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 29
Total: 29

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

+- Recent Topics

Version 6.1.6 issues by davejo
Today at 02:21:44 pm

Follow / Follower Mod? by SMFHacks
September 23, 2023, 08:44:44 am

Looking for a good video player by replayuk
September 23, 2023, 12:17:39 am

[Mod]Discord Web Hooks by SMFHacks
September 22, 2023, 03:57:28 pm

SMF 2.1.4 Search by Anmer
September 22, 2023, 01:55:15 pm

Error in thise mode by Ghost
September 15, 2023, 08:42:24 am

Gallery Selection List Order by mickjav
September 07, 2023, 12:46:31 pm

[Mod]Tidy Child Boards 2.0 by Norwinjose
September 02, 2023, 11:42:54 am

PrettyUrls SEO Pro: Unable to submit sitemap to google search conmsole by SMFHacks
August 31, 2023, 10:55:22 am

PrettyURL - SEO4SMF Rewrites? by SMFHacks
August 28, 2023, 06:35:33 pm

Powered by EzPortal