News:

SMF 2.1.3 has been released! Take it for a spin! Read more.

Main Menu

Optimus

Started by Bugo, February 15, 2011, 03:48:12 PM

Previous topic - Next topic

Bugo

Update the mod (v2.6, for SMF 2.0)

gorbi


shadav

checked my forum logs today and there's about 200 pages
tons of

8: Undefined index: sub_buttons
File: /Themes/default/Optimus.template.php (body_above sub template - eval?)

on several lines
Line: 423
Line: 424
Line: 426

funny part is there aren't that many lines to the optimus.template.php, there's only 414 lines

any suggestions?

Arantor

Turn off template eval in the admin area, see what the real error is.

shadav

hm ok...
now it says
8: Undefined index: sub_buttons
File: /Themes/SN/index.template.php

here's lines 420 - 434
foreach ($context['menu_buttons'] as $act => $button)
{
echo '
<li id="button_', $act, '" class="', $button['sub_buttons'] ? 'dropdown ' : '', '', $button['active_button'] ? 'active ' : '', '">
<a ', $button['sub_buttons'] ? 'class="dropdown-toggle" ' : '', 'href="', $button['sub_buttons'] ? '#' : $button['href'] . '', '"', isset($button['target']) ? ' target="' . $button['target'] . '"' : '', '', $button['sub_buttons'] ? ' data-toggle="dropdown"' : '', '>
', $button['title'], '
', $button['sub_buttons'] ? '<span class="caret"></span>' : '' ,'
</a>';
if (!empty($button['sub_buttons']))
{
echo '
<ul class="dropdown-menu" role="menu">
<li>
<a href="', $button['href'], '"', isset($button['target']) ? ' target="' . $button['target'] . '"' : '', '>', $button['title'], '</a>
</li>';


switched through other themes, and doesn't seem to produce the error so seems to be the greeny theme....so probably nothing to do with the mod....i'll go ask over in the theme support...

Arantor

After the opening { of that section (so, what would be between the { and the echo) add this:


if (empty($button['sub_buttons']))
$button['sub_buttons'] = [];


Yes it's a theme bug but this will get you an empty error log :)

shadav

thank you that seems to have stopped the flooding of my error log

muratbora

 2: Use of undefined constant OP_NAME - assumed 'OP_NAME' (this will throw an Error in a future version of PHP) https://www.otelisilanlari.net/forum/index.php?action=admin;area=optimus;sa=sitemap
/home/mrtsoftw/domains/otelisilanlari.net/public_html/forum/Sources/Optimus/Settings.php (Line 156)

After installing optimus_2.9.1_smf21.zip , above given records appear on dashboard.

Diego Andrés

Before or after updating (can't really tell it was 1-3 minute spawn) to version 2.6.2 I ran into a peculiar "bug" where my file directory got spammed with hundreds of new xml files for the sitemap in the root of my forum.
Is not happening anymore so I guess it was when I uninstalled previous version, but thought it was worth bringing that up.

SMF Tricks - Free & Premium Responsive Themes for SMF.

humbleworld

I installed Optimus after I installed PrettyURLs. The site got messed up. Are these two MODS not compatible with each other?

Bugo

These are compatible, don't worry. But unfortunately, PrettyURLs increase the time of Sitemap's generation.

As you can see, on this screenshot:
1) A sitemap has created without PrettyURLs
2) A sitemap has created with PrettyURLs (the option "Use caching instead of database table for PrettyUrls" is disabled)
3) A sitemap has created with PrettyURLs (the option "Use caching instead of database table for PrettyUrls" is enabled)
The screenshot made on a test site with 2 mln posts.

humbleworld

First, I installed PrettyURL mod and the forum site was fine. Next I installed Optimus mod, then the site became inaccessible already. I am using Plesk control panel.

Bugo

The information provided will not help me in any way. It seems it is not your fate to use both mods together.

humbleworld

Quote from: Bugo on June 27, 2020, 03:34:05 AM
The information provided will not help me in any way. It seems it is not your fate to use both mods together.
I agree with you, Bugo. Considering the Optimus has a built-in PrettyURL option, it may not be a better choice to install both mods.

Bugo

There is no such built-in option. The mod has only a plugin, to make SEO URLs in sitemaps if the PrettyURL is installed.

gorbi


humbleworld

Quote from: Bugo on June 27, 2020, 04:55:55 AM
There is no such built-in option. The mod has only a plugin, to make SEO URLs in sitemaps if the PrettyURL is installed.
I want to give optimus a second chance by installing it manually. I hope it won't run conflict with PrettyURLs.

Xpresskonami

Quote from: humbleworld on June 17, 2020, 05:35:15 AM
I installed Optimus after I installed PrettyURLs. The site got messed up. Are these two MODS not compatible with each other?

This also happen to my forum. up till now i haven't fix the problem am facing on my prettyurl + optimus. Bugo is really doing a great job. but my recommendation to this is, Smf should also allow user to be able to download the old version of mods instead of new version only. Immediately you find the working good mod for your forum, i suggest you shouldn't try to upgrade because it may give other side effect to the other working mod. Only those who just install smf latest version can enjoy latest mods version. 

Massl

Just udpate to 2.9.3 and sitemap stop working...
https://site.com/index.php?action=sitemap;xml takes you to the home page of the site.

OP_VERSION instead of the version of the mod.

Bugo

Now you should use such a link: http://yourforum/sitemap.xml
Or you can make a redirect via .ḥtaccess.

Advertisement: