SMFHacks.com

SMF Gallery Pro => Support => Topic started by: mickjav on February 09, 2022, 12:35:08 pm

Title: Re: Mods Support
Post by: mickjav on February 09, 2022, 12:35:08 pm
Just tried to uninstall And getting the following, from package manager these are probably because of mods I have

I have updated the files for my gallery mods so they will be available within the package.

[attach=1]
Title: Re: Re: Mods Support
Post by: mickjav on February 09, 2022, 12:43:00 pm
Just noticed A Previous Post Had same problem last time Errors look same so will continue
Title: Re: Re: Mods Support
Post by: mickjav on February 09, 2022, 01:09:42 pm
Didn't work Restoring from Backup I made.

[attach=1]
Title: Re: Re: Mods Support
Post by: SMFHacks on February 09, 2022, 01:19:40 pm
Attach your subs.php or add near the end of your sources/Subs.php before ?>

Code: [Select]
function GalleryMemberUnviewedItems()
{
global $txt, $context, $smcFunc, $mbname, $modSettings, $scripturl, $user_info, $options;

if (empty($modSettings['gallery_show_unviewed_items']))
return '';

if ($context['user']['is_guest'] == 1)
return '';

if (($total = cache_get_data('smfgallery_unseen_' . $user_info['id'], 10)) == null)
{


$dateFilter = '';


if (isset($options['gallery_markviewedtime']))
{
$markViewedTime = (int) $options['gallery_markviewedtime'];

if (!empty($markViewedTime))
{
$dateFilter = "p.date > $markViewedTime AND ";
}
}



if (!$context['user']['is_guest'])
$groupsdata = implode(',',$user_info['groups']);
else
$groupsdata = -1;

$dbresult = $smcFunc['db_query']('', "
SELECT
COUNT(*) as total
FROM {db_prefix}gallery_pic as p
LEFT JOIN {db_prefix}members AS m ON (p.ID_MEMBER = m.ID_MEMBER)
LEFT JOIN {db_prefix}gallery_catperm AS c ON (c.ID_GROUP IN ($groupsdata) AND c.ID_CAT = p.ID_CAT)
LEFT JOIN {db_prefix}gallery_log_mark_view AS v ON (p.ID_PICTURE = v.ID_PICTURE AND v.ID_MEMBER = " . $user_info['id'] . " AND v.user_id_cat = p.user_id_cat)
LEFT JOIN {db_prefix}gallery_usersettings AS s ON (s.ID_MEMBER = m.ID_MEMBER)
WHERE $dateFilter v.ID_PICTURE IS NULL AND (((s.private =0 OR s.private IS NULL ) AND (s.password = '' OR s.password IS NULL )  AND p.USER_ID_CAT !=0 AND p.approved =1) OR (p.approved =1 AND p.USER_ID_CAT =0 AND (c.view IS NULL OR c.view =1)))
 ");
$row = $smcFunc['db_fetch_assoc']($dbresult);
$total = $row['total'];
$smcFunc['db_free_result']($dbresult);
cache_put_data('smfgallery_unseen_' . $user_info['id'], $total, 10);
}

if (!empty($total))
$total = ' [' . $total .']';
else
$total = '';

return $total;

}
Title: Re: Re: Mods Support
Post by: mickjav on February 09, 2022, 01:23:27 pm
Will Do Thanks Just waiting on restore to complete
Title: Re: Re: Mods Support
Post by: mickjav on February 09, 2022, 02:16:17 pm
The Restore Failed With Token Error.

So Deleted Old Version From List Then Used Package Manager to install New version When I went to site at said there was a dup of that function so removed It And now All I get is a white screen, Not sure what's happened.

Just checked my Support Site that seems ok

https://www.databasedreams.co.uk/charts/
Title: Re: Re: Mods Support
Post by: SMFHacks on February 09, 2022, 02:38:33 pm
Fixed manually duplicate code with prettyurls.
Title: Re: Re: Mods Support
Post by: mickjav on February 09, 2022, 02:39:34 pm
Thanks  ;D
Title: Re: Re: Mods Support
Post by: mickjav on February 09, 2022, 02:43:13 pm
All My Mods Are there two.

Am thinking of making what I have do available Should I post it to The Gallery Forum On SMF?
There is no installer just the script edits?
Title: Re: Re: Mods Support
Post by: SMFHacks on February 09, 2022, 02:51:06 pm
I guess question is what happening and what was going with backup/restore?
Title: Re: Mods Support
Post by: mickjav on February 09, 2022, 02:55:35 pm
The Backup And Restore Stopped and showed a token error Sorry Didn't Take A Screen shot

Everything seems to be working OK, I am thinking of Upgrading to 2.1.0
Title: Re: Re: Mods Support
Post by: SMFHacks on February 09, 2022, 03:22:00 pm
For both of your forums? Just do a backup first. You will loose any mods installed and they will have to be reinstalled.
Title: Re: Mods Support
Post by: mickjav on February 09, 2022, 03:24:45 pm
Always do backups lol Even when altering script, Learnt that lesson many years ago lol

thanks for your help did you find what Was up with the backup, It was 7gb?
Title: Re: Mods Support
Post by: mickjav on February 09, 2022, 03:26:53 pm
My support forum is 2.1 but may employee somebody to do that?
Title: Re: Mods Support
Post by: mickjav on February 09, 2022, 04:12:48 pm
If you need it I still have the backup file that was downloaded when I created the backup of my Home I can upload to my account
Title: Re: Re: Mods Support
Post by: SMFHacks on February 09, 2022, 05:01:24 pm
The backup not sure would have to troubleshoot will take a long time to research.
I do have a files backup on the 3rd for your whole site.

The main thing when upgraded would be just to do database backup you can do an export via phpmyadmin which works the best.
Title: Re: Mods Support
Post by: mickjav on February 09, 2022, 05:20:59 pm
Thanks I'll do that.

All the best mick