Twitter SMFHacks Facebook SMFHacks SMFHacks.com
** Home Forum Index Hacks Products Login Register Search
Welcome, Guest. Please login or register.
May 24, 2013, 01:00:34 pm

Login with username, password and session length
Members
Total Members: 10768
Latest: CayoTTe
Stats
Total Posts: 32397
Total Topics: 5481
Online Today: 57
Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Users: 0
Guests: 50
Total: 50
+ 
|-+ 
| |-+ 
| | |-+ 
| | | |-+ 
| | | | |-+ 
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] 2 Go Down Print
Author Topic: Quirks  (Read 8395 times)
SBB
Inline PM Customer
*****
Offline Offline

Posts: 9


View Profile
« on: November 02, 2006, 11:26:56 pm »

Heya!  Grabbed the lite version on Monday, and I just bought the pro tonite. Well done!

A couple of issues floating around -

install package was for 1.0.8.  Modded the mod to work with 1.0.9.


gallery.template.php - hardcoded name.  Referenced table name in line 1570 is not abstracted.
...FROM {$db_prefix}gallery_pic AS p, smf_members AS m...
:: fixed in my production

gallery.template.php - undefined reference in line 109. 
...$context['gallery_cat_norate'] != 1)
:: It's somehow possible to bypass the initialization in gallery.php line 190. I suspect it has something to do with saving edits to an existing image. Mitigated by commenting out, since I'm allowing all images to be rated.

sql table not upgraded properly from gallery.lite to .pro, manifests in gallery.php line 1563 -
...   GetCatPermission($row['ID_CAT'],'addcomment');
::  ID_CAT undefined in table. fixed SQL tables by hand

gallery.template.php - unknown reference 'catwhere', line 1878
...m.ID_MEMBER AND " . $context['catwhere'] . " p.approved = 1 AND...
::no clue on this one.

And, quirks -
- it appears that if a group member has no rights to view a category, the category itself is still visible. Make it an option to hide denied categories, or just hide them, period.
- the per-group rights assignment (within the gallery mod) appears to have no provision for unregistered guests. Or, I've been awake too long. Either is possible... and judging by the size of your code base, I'm sure you can relate Smiley

And, a moronic question -
- I can't seem to find the option to not require comment approvals. I swear to god I saw it, earlier...
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 11003


View Profile
« Reply #1 on: November 02, 2006, 11:49:04 pm »

Fixed the install package for 1.0.9
Fixed the hardcoded table name noticed that couple days ago.

The next error is strange not sure what is not being set for gallery_cat_norate

Fixed the GetCatPermission($row['ID_CAT'],'addcomment');
Just needed to add p.ID_CAT to the last query that was made on line 1551

I have an idea on $context['catwhere'] on what causes that log error.

Comment approval should be under permissions
Make sure that you have them all if not
Open Sources/ManagePermissions.php
Find
Code:
'smfgallery' => array(
'smfgallery_view' => false,
'smfgallery_add' => false,
'smfgallery_edit' => false,
'smfgallery_delete' => false,
'smfgallery_comment' => false,
'smfgallery_report' => false,
'smfgallery_autoapprove' => false,
'smfgallery_manage' => false,
),
Replace with
Code:
'smfgallery' => array(
'smfgallery_view' => false,
'smfgallery_add' => false,
'smfgallery_edit' => false,
'smfgallery_delete' => false,
'smfgallery_ratepic' => false,
'smfgallery_comment' => false,
'smfgallery_editcomment' => false,
'smfgallery_report' => false,
'smfgallery_autocomment' => false,
'smfgallery_autoapprove' => false,
'smfgallery_usergallery' => false,
'smfgallery_manage' => false,
),

Pretty late for me as well. Too many projects working on at one time and never enough time in the day. The rest I will check out in the morning when I am more awake.

Also don't forget to upgrade your account you get access to more forums which have some additonal mods for SMF Gallery Pro

« Last Edit: November 02, 2006, 11:57:48 pm by SMFHacks » Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 11003


View Profile
« Reply #2 on: November 03, 2006, 10:00:21 am »

Fixed most of the issues above expect for hiding categories which I will look into for the next release.

Released a new version with the fixes in the download area.
SMF Gallery Pro 1.1.1
+Added Guest Category permissions
+Thumbnail settings affect the main gallery index blocks
!Fixed a couple bugs including comment category permission, and some undefined variables.
Logged
rjmiz
Jr. Member
**
Offline Offline

Posts: 97



View Profile
« Reply #3 on: November 03, 2006, 10:32:15 pm »

Where is the download area?
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 11003


View Profile
« Reply #4 on: November 04, 2006, 06:57:56 am »

In the forum called Downloads/Add On's should be the first topic
Logged
tambitch
Inline PM Customer
*****
Offline Offline

Posts: 9


View Profile
« Reply #5 on: November 16, 2006, 02:02:38 pm »

I am getting the same gallery_cat_norate-bug, like described above. I am running SMF, 1.1RC3 and TP 0.96. Is there a solution to this bug yet?
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 11003


View Profile
« Reply #6 on: November 16, 2006, 05:51:45 pm »

That's an odd error since it really is set...hmm
Open Gallery.template.php
Find
Code:

//Show the pictures
$dbresult = db_query("SELECT p.ID_PICTURE, p.totalratings, p.rating, p.commenttotal, p.filesize, p.views, p.thumbfilename, p.title, p.ID_MEMBER, m.memberName, m.realName, p.date, p.description FROM {$db_prefix}gallery_pic as p, {$db_prefix}members AS m WHERE  p.ID_MEMBER = m.ID_MEMBER  AND p.ID_CAT = $cat AND p.approved = 1 ORDER BY ID_PICTURE DESC LIMIT $curpage," . $modSettings['gallery_set_images_per_page'], __FILE__, __LINE__);
$rowlevel = 0;
Add after
Code:
if(!isset($context['gallery_cat_norate']))
$context['gallery_cat_norate'] = 0;
« Last Edit: November 16, 2006, 09:07:49 pm by SMFHacks » Logged
SBB
Inline PM Customer
*****
Offline Offline

Posts: 9


View Profile
« Reply #7 on: November 16, 2006, 08:59:55 pm »

I agree... it's odd.

Theory question - how does the initialization handle a null result set?

Code:
$cat = (int) $_REQUEST['cat'];
...
$dbresult1 = db_query("SELECT ...disablerating FROM {$db_prefix}gallery_cat WHERE ID_CAT = $cat...
$row1 = mysql_fetch_assoc($dbresult1);
...
$context['gallery_cat_norate'] = $row1['disablerating'];

Clearly, $cat is defined, since this entire path is if()ed by that fact.  And, we know that the query is being executed.

So... possibility #1:  the query is returning an empty set.
If true, how would the $context['gallery_cat_norate']  assignment behave?

If that behavior results in it being "undefined", then we know the issue. Clearly, $cat is not a valid value... but this conclusion is only if an empty SQL set will cause the "undefined" behavior.

Gut hunch if so: something to do with non-approved submissions?
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 11003


View Profile
« Reply #8 on: November 16, 2006, 09:07:30 pm »

Its odd cause I was pretty sure I added this code to Gallery.php for that release that tambitch downloaded.

Code:
if($context['gallery_cat_norate'] == '')
$context['gallery_cat_norate'] = 0;
To take care of it just in case...
Logged
tambitch
Inline PM Customer
*****
Offline Offline

Posts: 9


View Profile
« Reply #9 on: November 17, 2006, 01:03:00 am »

it wasnt in the file I downloaded (the full packages). I added it to the code so we will see if it helps Smiley
Logged
cubby61
Inline PM Customer
*****
Offline Offline

Posts: 9



View Profile WWW
« Reply #10 on: November 19, 2006, 06:02:00 pm »

I just got my Gallery Pro 1.1 installed and noticed something.  No matter what permissions I set, users cannot see the Gallery Menu item in the menu bar at the top (Default Theme).  Once they make one post the menu link appears.  This is not true for Guests.  They have the menu with no posts.
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 11003


View Profile
« Reply #11 on: November 19, 2006, 07:26:27 pm »

I just got my Gallery Pro 1.1 installed and noticed something.  No matter what permissions I set, users cannot see the Gallery Menu item in the menu bar at the top (Default Theme).  Once they make one post the menu link appears.  This is not true for Guests.  They have the menu with no posts.
Do you have the guest membergroup as not allowed to view the gallery?

The gallery button is tied to Allow View Gallery permission for each membergroup.

Logged
SBB
Inline PM Customer
*****
Offline Offline

Posts: 9


View Profile
« Reply #12 on: November 20, 2006, 01:37:20 am »

Also verify that the "View Gallery" permission is not "Denied" in your lowest post-rank group.
Logged
cubby61
Inline PM Customer
*****
Offline Offline

Posts: 9



View Profile WWW
« Reply #13 on: November 21, 2006, 10:26:00 am »

There are no Deny's on any Group in the Forum. Guests and every other Group are allowed to view the Gallery.
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 11003


View Profile
« Reply #14 on: November 21, 2006, 10:37:35 am »

Would it be possible for me to recieve a temp admin account to look over the permissions.
Logged
Pages: [1] 2 Go Up Print 
« previous next »
Jump to:  

Recent
[Today at 11:14:22 am]

[May 23, 2013, 08:29:56 pm]

[May 23, 2013, 04:50:21 am]

[May 22, 2013, 10:03:30 pm]

[May 22, 2013, 03:00:09 pm]

[May 22, 2013, 03:03:31 am]

[May 21, 2013, 03:27:16 pm]

[May 21, 2013, 02:11:10 pm]

[May 21, 2013, 01:18:58 pm]

[May 21, 2013, 12:22:02 am]
Random Picture
Donate to SMFHacks.com
Help Support the SMFHacks.com mod making.
Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
TinyPortal v0.9.7 © Bloc
SMF and SimpleMachines are registered trademarks of Simple Machines. SMFHacks.com is not affiliated with nor endorsed by Simple Machines.
Page created in 1.516 seconds with 21 queries.