Problem sa Top X Stats v1.0.1 modom

Started by SATmax, December 28, 2013, 03:47:56 PM

Previous topic - Next topic

SATmax

Pozdrav.

Kolega je deinstalirao pa ponovo instalirao mod Top X Stats i poslije uspijesne instalacije pojavljuje se dva puta kao na slici. Sto bi se trebalo ( i gdje u kojoj datoteci ) da se ponisti jedan prikaz statistike.

Napominjem da sam kod prvog unosa odradio mod ok i bio je prikaz jedan put sa urednom statistikom foruma. Verzija foruma je 2.0.6

Link do foruma je:
www.dreambox-zone.info/forum

Branko.

Koliko vidim mod je specifičan. Daj zakači Subs.php datoteku.
Strong people don't put others down, they lift them up.
A clever person solves a problem. A wise person avoids it.

SATmax

Kolega koji ima pristup cPanelu nije trenutno online a meni se ista stvar dogodila kod deinstalacije istoga moda. Izbacilo je gresku i ne mogu dalje pristupiti admin panelu kao ni forumu.

Greska:

Fatal error: require_once(): Failed opening required '/home/dream613/public_html/forum/Sources/topxstats_source/main.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/dream613/public_html/forum/Sources/Subs.php on line 3634

U privitku je Subs.php datoteka pa ako nije problem da je ocistis. Hvala unaprijed.

Pozdrav.

Branko.

Otvori datoteku u Notepad++ i vidjećeš da poslije ?> imaš još dodatih kodova. Ukloni sve i naravno sačuvaj original datoteku za slučaj da pogriješiš. Naravno ako imaš pristup preko FTP-a ..  :)
Strong people don't put others down, they lift them up.
A clever person solves a problem. A wise person avoids it.

SATmax

Jeli to vrijedi za ovu moju Subs.php ili za obje ?

Branko.

Ovu imaš ovdje zakačenu ako ti zatreba. Kod sebe na računaru je izmijeni, snimi i stavi umjesto postojeće u Source folderu. Naći ćeš sve oko linije 4808.
Umalo zaboravih.. ako si deinstalirao taj mod onda je greškom ostao ovaj dio linije 3630-3638:

//-- cicka; Top X Stats
if (empty($context['uninstalling']) && (!isset($_GET['package']) || !stripos($_GET['package'], 'Top-X-Stats')))
{
global $sourcedir;
require_once($sourcedir . '/topxstats_source/main.php');
topXStats_construct(true);
$already_called = true;
}
// End cicka; Top X Stats --//
Strong people don't put others down, they lift them up.
A clever person solves a problem. A wise person avoids it.

SATmax

trenutno sam na Linux i sa SciTE sam otvorio Subs.php datoteku i ocistio sve poslije

?>!== false ? explode('::', $function) : $function;

      // Is it valid?
      if (is_callable($call))
         $results[$function] = call_user_func_array($call, $parameters);
   }

   return $results;
}

// Add a function for integration hook.
function add_integration_function($hook, $function, $permanent = true)
{
   global $smcFunc, $modSettings;

   // Is it going to be permanent?
   if ($permanent)
   {
      $request = $smcFunc['db_query']('', '
         SELECT value
         FROM {db_prefix}settings
         WHERE variable = {string:variable}',
         array(
            'variable' => $hook,
         )
      );
      list($current_functions) = $smcFunc['db_fetch_row']($request);
      $smcFunc['db_free_result']($request);

      if (!empty($current_functions))
      {
         $current_functions = explode(',', $current_functions);
         if (in_array($function, $current_functions))
            return;

         $permanent_functions = array_merge($current_functions, array($function));
      }
      else
         $permanent_functions = array($function);

      updateSettings(array($hook => implode(',', $permanent_functions)));
   }

   // Make current function list usable.
   $functions = empty($modSettings[$hook]) ? array() : explode(',', $modSettings[$hook]);

   // Do nothing, if it's already there.
   if (in_array($function, $functions))
      return;

   $functions[] = $function;
   $modSettings[$hook] = implode(',', $functions);
}

// Remove an integration hook function.
function remove_integration_function($hook, $function)
{
   global $smcFunc, $modSettings;

   // Get the permanent functions.
   $request = $smcFunc['db_query']('', '
      SELECT value
      FROM {db_prefix}settings
      WHERE variable = {string:variable}',
      array(
         'variable' => $hook,
      )
   );
   list($current_functions) = $smcFunc['db_fetch_row']($request);
   $smcFunc['db_free_result']($request);

   if (!empty($current_functions))
   {
      $current_functions = explode(',', $current_functions);

      if (in_array($function, $current_functions))
         updateSettings(array($hook => implode(',', array_diff($current_functions, array($function)))));
   }

   // Turn the function list into something usable.
   $functions = empty($modSettings[$hook]) ? array() : explode(',', $modSettings[$hook]);

   // You can only remove it if it's available.
   if (!in_array($function, $functions))
      return;

   $functions = array_diff($functions, array($function));
   $modSettings[$hook] = implode(',', $functions);
}

         
function integrateModifyModificationsTOA($subActions) {
   $subActions['transparentofflineavatars'] = 'ModifyTransparentOfflineAvatarsSettings';
}
         
function integrateAdminAreasTOA($admin_areas) {
   
   global $txt;
   
   $admin_areas['config']['areas']['modsettings']['subsections']['transparentofflineavatars'] = array($txt['transparent_avatars_tab']);
}

// Custom Copyright
function editBuffer($buffer)
{
   global $modSettings, $scripturl;

   if(empty($modSettings['custom_copyright_message']) || $modSettings['custom_copyright_message'] == 'Edit This...' || empty($modSettings['custom_copyright_enable']))
      return $buffer;
      
   $search = ($modSettings['custom_copyright_after'] == 1 ? ('class="new_win">SMF &copy; 2011</a>, <a href="http://www.simplemachines.org" title="Simple Machines" target="_blank" class="new_win">Simple Machines</a>') : ('<a href="' . $scripturl . '?action=credits" title="Simple Machines Forum" target="_blank" class="new_win">'));
   $replace = ($modSettings['custom_copyright_after'] == 1 ? ($search . '<br />' . $modSettings['custom_copyright_message']) : ($modSettings['custom_copyright_message'] . '<br />' . $search));
   return (isset($_REQUEST['xml']) ? $buffer : str_replace($search, $replace, $buffer));
}

         
function integrateModifyModificationsGRN($subActions) {
   $subActions['guestnotify'] = 'ModifyGuestNotificationSettings';
}
         
function integrateAdminAreasGRN($admin_areas) {
   
   global $txt;
   
   $admin_areas['config']['areas']['modsettings']['subsections']['guestnotify'] = array($txt['guest_notify_tab']);
}

function grnModifyLayer() {
   
    global $context, $modSettings;
   
    // Make sure we arent intercepting AJAX calls
    if (isset($_REQUEST['xml']))
        return;
   
   // If ... dont bother
   if (!$context['user']['is_guest'] || empty($modSettings['enable_guest_notify']) || empty($modSettings['guest_notify_contents']) || empty($modSettings['guest_notify_title']))
      return;
         
   if (empty($context['current_action']) && !empty($_REQUEST['board']) && empty($modSettings['guest_notify_enable_boards']))
      return;
      
   if (empty($context['current_action']) && !empty($_REQUEST['topic']) && empty($modSettings['guest_notify_enable_posts']))
      return;
   
    $context['template_layers'][] = 'grn';   
}

?>

Snimio u Subs.php i vratio u forum/Sources Subs.php i dobijem gresku

Fatal error: require_once(): Failed opening required '/home/dream613/public_html/forum/Sources/topxstats_source/main.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/dream613/public_html/forum/Sources/Subs.php on line 3634


Branko.

Imaš na dva mjesta:
//-- cicka; Top X Stats
if ($layer == 'body' && isset($already_called))
topXStats_construct(false);
// End cicka; Top X Stats --//


Potraži ih, kad nađeš jedan i drugi sličan ovom je malo gore ili dolje od tog. Oba ukloni. Inače datoteka ti ima još duplih kodova od modifikacija i dosta je zabrljana. Pravo je čudo da je forum radio bez greške.
Strong people don't put others down, they lift them up.
A clever person solves a problem. A wise person avoids it.

SATmax

Ok Branko. Zahvaljujem na trudu i vremenu. Moj Subs.php je sada ok i ne prijavljuje greske u radu roruma. Kolegin sredim pa se javim. Jos jednom hvala i uzivaj.

Branko.

Super. Evo ti i prevod za hrvatski Top X Stats, samo ih ubaci u Themes/default/languages/topxstats_languages. Možeš i prilagoditi prevod po svome.  ;)
Strong people don't put others down, they lift them up.
A clever person solves a problem. A wise person avoids it.

SATmax

Ubačeno Branko i respeckt za ovo kao i za dosadašnju ( a nadam se i ubuduće :) ) podršku u riješavanju problema. Svaka čast.

Advertisement: