dragomano / Optimus

A simple SEO mod for SMF
https://custom.simplemachines.org/mods/index.php?mod=2659
Artistic License 2.0
6 stars 8 forks source link

Problem with tapatalk plugin #22

Closed gazza07 closed 5 years ago

gazza07 commented 5 years ago

Tapatalk doesnt work with this mod installed it just shows an error on the mobile device anychance of fixing this quite a few of my members use tapatalk, There is no error shown in the forum log Screenshot_20190619-044101

dragomano commented 5 years ago

https://www.simplemachines.org/community/index.php?topic=567999.msg4020782#msg4020782

gazza07 commented 5 years ago

How is that link even remotely similar to my problem ? tapatalk is installed and working 100% on SMF v2.1rc2, If I install optimus then it stops tapatalk from working with the error shown in the previous post, I'm not having any problem uninstalling anything.

dragomano commented 5 years ago

Sorry, I cannot provide compatibility with all existing mods, especially unofficial.

dragomano commented 5 years ago

Try to add this line global $sourcedir; require_once($sourcedir . '/Optimus/Subs.php'); before the line 84 in Integration.php

gazza07 commented 5 years ago

Nice one thank you that appears to have fixed the problem tapatalk now works fine, Ive added a snippet of the code as I added it below

` // Favicon if (!empty($modSettings['optimus_favicon_text'])) { $favicon = explode("\n", trim($modSettings['optimus_favicon_text'])); foreach ($favicon as $fav_line) $context['html_headers'] .= "\n\t" . $fav_line; }

    // TapaTalk Fix Bugo
    global $sourcedir; require_once($sourcedir . '/Optimus/Subs.php');

    // Counters
    Subs::addCounters();

    // Addons
    Subs::runAddons();

`

smartm0use commented 2 years ago

I encountered the same problem on SMF version 2.1 RC4. Thank to your hints I solved adding the following code to row 158 of Integration.php file of new Optimus.

// TapaTalk Fix Bugo
global $sourcedir; require_once($sourcedir . '/Optimus/Subs.php');

Here is the modified function:

public static function loadTheme()
    {
        loadLanguage('Optimus/');

        // TapaTalk Fix Bugo
        global $sourcedir; require_once($sourcedir . '/Optimus/Subs.php');

        Subs::changeFrontPageTitle();

        Subs::addCounters();
    }