Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4255
Latest: andreios
New This Month: 3
New This Week: 1
New Today: 0
Stats
Total Posts: 43259
Total Topics: 7518
Most Online Today: 201
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 179
Total: 179

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

+- Recent Topics

No thumbnails on new uploads by SMFHacks
March 27, 2024, 02:10:41 pm

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

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

[Mod] RSS Feed Poster by SMFHacks
February 27, 2024, 11:57:18 am

find duplicate pictures by fvlog19
February 14, 2024, 02:22:40 pm

Error uploading video. by SMFHacks
February 08, 2024, 02:04:16 pm

Gallery icon as last added image by fvlog19
February 01, 2024, 01:04:56 pm

Powered by EzPortal