SMFHacks.com
SMF Gallery Pro => Support => Topic started 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]
-
Just noticed A Previous Post Had same problem last time Errors look same so will continue
-
Didn't work Restoring from Backup I made.
[attach=1]
-
Attach your subs.php or add near the end of your sources/Subs.php before ?>
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;
}
-
Will Do Thanks Just waiting on restore to complete
-
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/
-
Fixed manually duplicate code with prettyurls.
-
Thanks ;D
-
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?
-
I guess question is what happening and what was going with backup/restore?
-
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
-
For both of your forums? Just do a backup first. You will loose any mods installed and they will have to be reinstalled.
-
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?
-
My support forum is 2.1 but may employee somebody to do that?
-
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
-
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.
-
Thanks I'll do that.
All the best mick