Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4200
Latest: [chrisB]
New This Month: 0
New This Week: 1
New Today: 0
Stats
Total Posts: 42613
Total Topics: 7433
Most Online Today: 98
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 36
Total: 36

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - SMFHacks

Pages: [1] 2 3 ... 921
1
Support / Re: List of changes in SMFGallery
« on: December 01, 2022, 09:19:55 am »
9.0.7
!Fixed the category/user gallery select page for single/bulk uploads to only show the section (main galleries or user gallery) if there is a gallery created for each section

9.0.6
!Fixed category dropdown not showing all categories to add pictures to.

9.0.5
!Fixed gallery_modlog to support ipv6.

2
Support / Re: Permissions query
« on: November 30, 2022, 08:09:05 am »
 Assuming SMF 2.13? anything else in the error log.

3
Glad that solved the issue.

4
Support / Re: Permissions query
« on: November 29, 2022, 01:15:30 pm »
This is experimental but if it looks good will update the permissions code in all my mods to use this same logic.

Quick overview on permissions and how it works in this setup.
download admins always have full access.
The global permissions under admin -> permissions must be set to allowed in order for users to get access via category level permissions.

If no category level permission is setup access is assumed allowed!  If any category permissions setup in the category then you must grant each group access via category level permissions. An allowed in any membergroup overrides a deny


Open
Sources\Downloads2.php around line(6030):
Replace the whole function ending in }
Code: [Select]
function Downloads_GetCatPermission($cat, $perm, $return = false, $checkpostGroup = false, $checkAdditonal = true, $groupID = 0)

with
Code: [Select]

function Downloads_GetCatPermission($cat, $perm, $return = false, $checkpostGroup = false, $checkAdditonal = true, $groupID = 0)
{
global $smcFunc, $txt, $user_info;

$manage = allowedTo('downloads_manage');
// They can manage the downloads so let them have access to everything
if ($manage == true)
return true;
$cat = (int) $cat;
    $groupList = array();

if ($user_info['is_guest'] == 1)
{
$groupList[] = -1;
}
else
{
$request = $smcFunc['db_query']('', '
SELECT id_group,additional_groups
FROM {db_prefix}members
WHERE id_member = ' . $user_info['id'],
);

while ($row = $smcFunc['db_fetch_assoc']($request))
{

if (empty($row['additional_groups']))
$groupList = array($row['id_group']);
else
$groupList = array_merge(
array($row['id_group']),
explode(',', $row['additional_groups'])
);

}
}

// Handle case if no permissions set
    $request = $smcFunc['db_query']('', "
SELECT
count(*) as total
FROM {db_prefix}down_catperm as c
WHERE c.ID_CAT = $cat ");
    $row = $smcFunc['db_fetch_assoc']($request);
if ($row['total'] == 0)
return true;

// check for permissions
$request = $smcFunc['db_query']('', "
SELECT
count(*) as total
FROM {db_prefix}down_catperm as c
WHERE c.ID_GROUP IN(" . implode(',',$groupList ) . ") AND c.ID_CAT = $cat AND c." . $perm . " = 1");
$row = $smcFunc['db_fetch_assoc']($request);
if ($row['total'] > 0)
return true;
else
{

if ($perm == 'view')
{
if ($return == false)
fatal_error($txt['downloads_perm_no_view'],false);
else
return false;

}
else if ($perm == 'download')
{
if ($return == false)
fatal_error($txt['downloads_perm_no_download'],false);
else
return false;

}
else if ($perm == 'addfile')
{
if ($return == false)
fatal_error($txt['downloads_perm_no_add'],false);
else
return false;

}
else if ($perm == 'editfile')
{
if ($return == false)
fatal_error($txt['downloads_perm_no_edit'],false);
else
return false;

}
else if ($perm == 'delfile')
{
if ($return == false)
fatal_error($txt['downloads_perm_no_delete'],false);
else
return false;

}
else if ($perm == 'ratefile')
{
if ($return == false)
fatal_error($txt['downloads_perm_no_ratefile'],false);
else
return false;

}
else if ($perm == 'addcomment')
{
if ($return == false)
fatal_error($txt['downloads_perm_no_addcomment'],false);
else
return false;

}
else if ($perm == 'editcomment')
{
if ($return == false)
fatal_error($txt['downloads_perm_no_editcomment'],false);
else
return false;

}
else if ($perm == 'report')
{
if ($return == false)
fatal_error($txt['downloads_perm_no_report'],false);
else
return false;

}

}

}

5
Modifications Talk / Re: Errors with SMF2WPBridge
« on: November 29, 2022, 12:21:25 pm »
I doubt it from the error. Because that is more of an SMF thing than wordpress.

6
Modifications Talk / Re: Errors with SMF2WPBridge
« on: November 29, 2022, 10:07:54 am »
Guess it didn't work.
The original guy who made is at  https://github.com/xchwarze/WP2SMFBridge but he no longer updates it.
I just updated it to with some SMF fixes.

7
Modifications Talk / Re: Errors with SMF2WPBridge
« on: November 29, 2022, 10:00:23 am »
Replace the old code I gave you to add
Code: [Select]
class_WP_SMFBridge (

Before it add

8
Modifications Talk / Re: Errors with SMF2WPBridge
« on: November 29, 2022, 09:43:32 am »
Never mind that didn't do what I wanted it to do.

You can try just adding this line but it looks like it is included already

require ABSPATH . WPINC . '/rest-api.php';

9
Support / Re: Undefined index: id
« on: November 29, 2022, 09:41:30 am »
Fixed in latest download

10
Modifications Talk / Re: Errors with SMF2WPBridge
« on: November 29, 2022, 09:00:39 am »
On the wordpress side try editing bridge.php
Find
Code: [Select]
class_WP_SMFBridge (

Before it add
Code: [Select]
define( 'WP_SMF_BRIDGE_PLUGIN', __FILE__ );

define( 'WP_SMF_BRIDGE_PLUGIN_DIR', untrailingslashit( dirname( WP_SMF_BRIDGE_PLUGIN ) ) );

require_once WP_SMF_BRIDGE_PLUGIN_DIR . '/includes/rest-api.php';


In terms of a paid plugin, there is not enough of a market for it to spend time on. That goes for all SMF paid plugins at this point the peak was back in 2007 to 2010.

11
Support / Re: Permissions query
« on: November 28, 2022, 08:53:23 pm »
I probably can come up with a code to allow a member with the allow permission in any of groups/additional groups

Currently it is set for any deny statement to override any allow permission on the category


12
That explains it.
The free products didn't get the store keepers email message and additional emails sent to all store admins.

Have updated the download to include those features. When buying a free product.

13
This is a full purchase right from checkout?
I was testing on SMF 2.1.x too

There was an email bug in SMF 2.1.2 that should have been fixed in SMF 2.1.3
https://www.simplemachines.org/community/index.php?topic=584230.msg4139424#msg4139424


I think I might do a test script for you next to try and see if it sends anything.

14
Updated download.
With the error offset fix and added email on all store admins on copy of users purchase email.

Strange though I haven't touched that code in a while so not sure why that email would have been stopped.
Please check again the customize email section for the purchase email is not empty.

15
What is in the subject of the email you want to receive?

The "Receive Copy of Sales Email" only goes to one person currently the store contact email address.

The "Notify all store admins of item purchase" should go to admins. As long as
Store Configuration -> Customize Emails
"Purchase Notification for Store Admins" is not empty for the message


 





Pages: [1] 2 3 ... 921

+- Recent Topics

List of changes in SMFGallery by Monocero
Today at 06:23:53 am

Permissions query by davejo
November 30, 2022, 09:52:38 am

Errors with SMF2WPBridge by [chrisB]
November 29, 2022, 04:30:26 pm

"Notify all store admins of item purchase" Not Working in SMF 2.1.2 or 2.1.3 by SMFHacks
November 29, 2022, 01:15:50 pm

Undefined index: id by Shades
November 29, 2022, 12:15:20 pm

Additional Recommendations for SMF Store by Michael Vail
November 26, 2022, 12:49:58 pm

SMF Store 5.0 Beta Errors - Trying to access array offset on value of type null by Michael Vail
November 26, 2022, 12:07:42 pm

Modification: Subcategories total in main gallery view by VisiGod
November 26, 2022, 11:27:34 am

Change log for Downloads Pro 6.13 and 6.14 by Nicole
November 20, 2022, 08:24:34 am

Release date? by SMFHacks
November 20, 2022, 08:09:10 am

Powered by EzPortal