News:

Join the Facebook Fan Page.

Main Menu

Optimus

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

Previous topic - Next topic

Butiks

Quote from: Bugo on March 29, 2023, 11:44:19 PMOk, then try to test with this updated file.

Replaced the file, again the same as before.
QuoteCloudflare Rocket ON. Form keyword SEO is hidden  again trouble.
Cloudflare Rocket OFF. Form keyword SEO visible is ok


In the screenshot, the console error when Cloudflare Rocket ON


Bugo

So, this Rocket Loader is blocking some other scripts. And for every script that needs to load to bypass the rules, you will have to manually add the attribute data-cfasync="false". But you are unlikely to do that, so it's easier to disable the Rocket Loader :)

shawnb61

Quote from: Bugo on March 30, 2023, 10:52:02 PMSo, this Rocket Loader is blocking some other scripts. And for every script that needs to load to bypass the rules, you will have to manually add the attribute data-cfasync="false". But you are unlikely to do that, so it's easier to disable the Rocket Loader :)

FYI - we've seen this before - where Rocket Loader interferes with SMF javascript.  In the past, the workaround was to disable it.
https://www.simplemachines.org/community/index.php?msg=4076917
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

blackhawk10

Hi all,

I just installed this mod and i love it. im having one problem though. When i click  the sitemap link
on the footer, sometimes the map shows, and sometimes the page is blank. Any ideas?

Im using the Steyle_V1 theme.

thanks

webtiryaki

Sitemap white page issue?

Hello
Mods I use
1 Google Analytics Code   1.6.1   
2 Pretty URLs 2.5.1c   
3 SMF Trader System 3.0.2   
4 Optimus 2.11   

Site url https://f1wm.net/index.php

https://f1wm.net/sitemap.xml
PHP version: 8.0.28, MySQL version: 10.5.19-MariaDB.

You cannot view this attachment.

Bugo

#985
Try to deactivate/activate again. Then repeat with disabled Pretty URLs.

There seems to be no problem with the sitemap links, but for some reason the style sheet for it is not loaded.


Lazarus™

@Bugo:

I'am using Optimus V2.11 on SMF V2.1.3

So i wan't to have Optimus and PrettyURL working. I have heard that i need a extra "Plugin" from you.
What is the way to become this Addon ?

Thank you!

Bugo

Quote from: Lazarus™ on May 06, 2023, 03:08:06 AM@Bugo:

I'am using Optimus V2.11 on SMF V2.1.3

So i wan't to have Optimus and PrettyURL working. I have heard that i need a extra "Plugin" from you.
What is the way to become this Addon ?

Thank you!
Currently it is provided as a present for sponsors, without any garanties.

MartyHunter

Hi, only just realised this thread is for question/support on this (excellent) mod!

I have just installed and have an issue. I chose to pull the first post image for OG tags. It works, IF there is an image in the first post of a topic, but if not, it shows a blank "image missing" when I use OG preview tools. I hoped it would default to the board's default OG image when no first post image is present.
Any ideas? thanks

PS example: https://www.opengraph.xyz/url/https%3A%2F%2Fforum.thehunterslife.com%2Findex.php%3Ftopic%3D21065.0

(P.P.S. I do have the settings correct to show the default board OG image. If I turn off the setting to use first post image, that image does work in preview tools)

Bugo

File Sources/Optimus/Topics.php, find this code
        // Looking for an image in the text of the topic first message
        if (empty($context['optimus_og_image']) && ! empty($context['topicinfo']['topic_first_message'])) {
            $image = preg_match('/\[img.*]([^]\[]+)\[\/img]/U', $context['topicinfo']['topic_first_message'], $value);
            $settings['og_image'] = $image ? array_pop($value) : null;
        }
and replace with
        // Looking for an image in the text of the topic first message
        if (empty($context['optimus_og_image']) && ! empty($context['topicinfo']['topic_first_message'])) {
            $image = preg_match('/\[img.*]([^]\[]+)\[\/img]/U', $context['topicinfo']['topic_first_message'], $value);
            $settings['og_image'] = $image ? array_pop($value) : $settings['og_image'];
        }

MartyHunter

Thanks very much, will try that

jacbier

Where is the sitemap saved? I can't find it with my ftp program.
I am using SMF 2.1.4 and Optimus 2.12.

Julius_2000

Shouldn't it be located in root?

jacbier

Quote from: Julius_2000 on July 22, 2023, 04:36:04 PMShouldn't it be located in root?

It took a little longer for the sitemap to be created. It is now in the root.
Sorry I didn't report this back in this topic.

Butiks

Hello @Bugo,

Could you please advise on how to configure or edit the script (PHP) in the Optimus module? I need to remove index.php from all forum topic links in ../sitemap_0.xml.

P.S. This is related to the fact that I have removed index.php from all links on my forum, as mentioned here: https://www.simplemachines.org/community/index.php?topic=146969.msg4156008#msg4156008.

Bugo

You can do a small addon for that.

Create a file \Sources\Optimus\addons\ChangeSitemap.php with this content:
Code (php) Select
<?php

namespace Bugo\Optimus\Addons;

/**
 * ChangeSitemap.php
 *
 * @package Optimus
 */

if (! defined('SMF'))
    die(
'No direct access...');

class 
ChangeSitemap
{
    public function 
__construct()
    {
        
add_integration_function('integrate_optimus_sitemap_rewrite_content'__CLASS__ '::optimusSitemapRewriteContent'false__FILE__true);
    }

    public function 
optimusSitemapRewriteContent(string &$content)
    {
        
$content str_replace('index.php'''$content);
    }
}

Then disable and again enable "Activate the Sitemap" option in the Optimus' settings.

Butiks

Quote from: Bugo on August 31, 2023, 03:28:48 AMYou can do a small addon for that.

Create a file \Sources\Optimus\addons\ChangeSitemap.php with this content:
Code (php) Select
<?php

namespace Bugo\Optimus\Addons;

/**
 * ChangeSitemap.php
 *
 * @package Optimus
 */

if (! defined('SMF'))
    die(
'No direct access...');

class 
ChangeSitemap
{
    public function 
__construct()
    {
        
add_integration_function('integrate_optimus_sitemap_rewrite_content'__CLASS__ '::optimusSitemapRewriteContent'false__FILE__true);
    }

    public function 
optimusSitemapRewriteContent(string &$content)
    {
        
$content str_replace('index.php'''$content);
    }
}

Then disable and again enable "Activate the Sitemap" option in the Optimus' settings.
Thank you, its work!)

Speed King

Quote from: Speed King on December 23, 2022, 01:55:26 AMInstalling Optimus 2.10.6 on SMF 2.1.3 causes destroying of table layout in section Admin => Maintenance => Integration Hooks

Click =>

The problem was caused by another mod - Arantor Sidebar  :-X

MobileCS

Is there a way to make Optimus automatically update the sitemap after a new topic is created?

-Rock Lee-

Quote from: MobileCS on September 22, 2023, 09:42:32 PMIs there a way to make Optimus automatically update the sitemap after a new topic is created?

But it already does it every 3 days by default, otherwise make sure your cronjob is working...


Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

Advertisement: