News:

Join the Facebook Fan Page.

Main Menu

Optimus

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

Previous topic - Next topic

vitalog2010

Quote from: vitalog2010 on November 07, 2024, 09:59:36 AMDear @Bugo,

I recently installed Optimus 3.0 Beta and I'm trying to add a meta-tag description.

When I set "The forum description" for the Homepage, the meta-tag description remains the same across every page of the forum.

Configuration Details:
"Display the topic first message snippet as the meta-tag description": Enabled

In Optimus 2.13, this configuration worked perfectly, displaying the topic's first message snippet as the meta-tag description. However, it doesn't seem to function the same way in Optimus 3.0 Beta.

System Information:
  • SMF 2.1.4
  • PHP 8.2
  • Optimus 3.0 Beta
  • Installed mod: Stop Forum Spam

Could you please guide me on how to resolve this issue in Optimus 3.0 Beta?


After extensive testing, I finally identified the problem. [Refer to my initial request for more details, and check my previous messages in this topic].

@Bugo , I tested Optimus v3.0 RC1 and pinpointed the issue. Note that I conducted these tests on a clean SMF 2.1.4 with PHP 8.2 (no additional mods installed).

Here are the detailed test results:

When "Search Engine Friendly URLs" is checked in the "General Configuration" on SMF, and "Display the topic first message snippet as the meta-tag description" is enabled in the Optimus settings, the page meta description is the same for all pages.

How to verify the issue after making these settings:

  • Go to the main page of the forum by clicking the forum name. (Do not refresh the same page, follow the steps)
  • Click on any board.
  • Click on any topic.
  • Refresh the topic page using Ctrl+F5.
  • Open the page source to see the meta description.

You will see that the meta description is the same on all pages. However, when I disable "Search Engine Friendly URLs" in the global settings on SMF, the Optimus mod works correctly.

Hope you could you fix this issue in the next release or provide us resolution.

Screenshots of the settings:
1. SMF General Configuration
[nofollow]
2. Optimus Settings
[nofollow]
3. Topic Page source code (same meta description in the every forum pages):
[nofollow]

Thank you.
My System Information:
  • SMF Version: 2.1.4
  • PHP Version: 8.2
  • MySQL version: 8.0.40
  • Installed mods: Stop Forum Spam 1.5.6

Bugo

@vitalog2010 Thank you for the research conducted. I never enable that option, so I probably wouldn't have noticed. Try changing the code

if (empty(Utils::$context['current_action'])
    && empty(Input::server('query_string'))
    && empty(Input::server('argv'))
) {
    Utils::$context['meta_description'] = Input::xss(Config::$modSettings['optimus_description']);
}

in the Sources/Optimus/Handlers/FrontPageHandler.php file to this:

if (empty(Utils::$context['current_action'])
    && empty(Input::server('query_string'))
    && empty(Input::server('path_info'))
    && empty(Input::server('argv'))
) {
    Utils::$context['meta_description'] = Input::xss(Config::$modSettings['optimus_description']);
}

Xpresskonami

Quote from: Xpresskonami on November 29, 2024, 03:20:38 AMHello I use smf 2.0
I activate a Cloudflare DDos attack in which new visitors will pass through verification before accessing my forum. But My content image graph stops working whenever i share a post to whatsapp group or Facebook. But if i deactivate the cloudflare Ddos attack. The open image graph will start working back. Please how can I fix this with the DDOs activated?

How can I fix this ?? @Bugo

vitalog2010

Quote from: Bugo on December 08, 2024, 10:49:26 PM@vitalog2010 Thank you for the research conducted. I never enable that option, so I probably wouldn't have noticed. Try changing the code

if (empty(Utils::$context['current_action'])
    && empty(Input::server('query_string'))
    && empty(Input::server('argv'))
) {
    Utils::$context['meta_description'] = Input::xss(Config::$modSettings['optimus_description']);
}

in the Sources/Optimus/Handlers/FrontPageHandler.php file to this:

if (empty(Utils::$context['current_action'])
    && empty(Input::server('query_string'))
    && empty(Input::server('path_info'))
    && empty(Input::server('argv'))
) {
    Utils::$context['meta_description'] = Input::xss(Config::$modSettings['optimus_description']);
}


@Bugo,

Thank you so much. The problem is solved.

I have another question: Could you please add a "rel" attribute option in the next release to include, for example, rel="noopener noreferrer nofollow" for external URLs in forum messages?

Thanks again.
My System Information:
  • SMF Version: 2.1.4
  • PHP Version: 8.2
  • MySQL version: 8.0.40
  • Installed mods: Stop Forum Spam 1.5.6

Bugo

You can create the addon for Optimus right now without waiting - the file Sources/Optimus/Addons/SaveLinks.php with the code provided in the link:


https://laravel.su/pastebin/9daf765b-9b08-414b-b444-33d7b9435d94

vitalog2010

Hi @Bugo ,

I just found another problem/bug on the Optimus 3.0 RC1 [see my My System Information in the signature].

When I'm trying to "Move Topic", getting an error on the local server: (And 500 Error on the Hosting)

Fatal error: Uncaught TypeError: explode(): Argument #2 ($string) must be of type string, array given in https://localtestforum.com/Sources/Optimus/Handlers/TagHandler.php:192 Stack trace: #0 https://localtestforum.com/Sources/Optimus/Handlers/TagHandler.php(192): explode() #1 https://localtestforum.com/Sources/Subs.php(5797): Bugo/Optimus/Handlers/TagHandler->createTopic() #2 https://localtestforum.com/Sources/Subs-Post.php(1978): call_integration_hook() #3 https://localtestforum.com/Sources/MoveTopic.php(314): createPost() #4 https://localtestforum.com/index.php(184): MoveTopic2() #5 {main} thrown in https://localtestforum.com/Sources/Optimus/Handlers/TagHandler.php on line 192
[nofollow]

Could you please test at your end ?

Thank you so much for your help.

My System Information:
  • SMF Version: 2.1.4
  • PHP Version: 8.2
  • MySQL version: 8.0.40
  • Installed mods: Stop Forum Spam 1.5.6

Bugo

I see, replace "$keywords = Input::xss(Input::request('optimus_keywords', []));" with "$keywords = Input::xss(Input::request('optimus_keywords', ''));" in that string.

vitalog2010

Quote from: Bugo on December 19, 2024, 09:51:36 AMI see, replace "$keywords = Input::xss(Input::request('optimus_keywords', []));" with "$keywords = Input::xss(Input::request('optimus_keywords', ''));" in that string.

@Bugo , Solved, Thank you so much
My System Information:
  • SMF Version: 2.1.4
  • PHP Version: 8.2
  • MySQL version: 8.0.40
  • Installed mods: Stop Forum Spam 1.5.6

Myselfttt

You cannot view this attachment.

@Bugo

I installed the mod and found that the topic page was not displayed, but the borad page was shown as shown in the picture.

How should I fix it?

Thank you in advance.

www.ponboon.com/sitemap.xml [nofollow]


Bugo

In your sitemap, as it should be, the boards available to guests are displayed. And the topics with more than 0 replies, as configured in the settings. What is wrong? If you need these topics without replies in the sitemap, just change the mod settings.

Myselfttt

Quote from: Bugo on December 28, 2024, 06:44:16 AMIn your sitemap, as it should be, the boards available to guests are displayed. And the topics with more than 0 replies, as configured in the settings. What is wrong? If you need these topics without replies in the sitemap, just change the mod settings.

@Bugo

Thank you ^^

[chrisB]

Hello, @bungo.

Any chance of default OG Images for forum topics via your ACP settings? (limited to topics).

Some forum scripts have this, where you can upload several images and some social media sites allow you to toggle which to use. I do plan to seek a mod that will allow me to upload a custom one to topics, as this is sometimes the best way to grab people's attention but as a default image most would fall within that due to convenience.

Thank you for releasing this awesome mod.
I'm stuck in a time warp from the early 00's.

Bugo

Optimus displays the first attachment from the first post of the topic as the OG image. If no such image exists, the default OG image set in the topic settings will be displayed. This is mentioned both in the mod settings and in the documentation.

[chrisB]

Quote from: Bugo on March 04, 2025, 10:55:48 AMOptimus displays the first attachment from the first post of the topic as the OG image. If no such image exists, the default OG image set in the topic settings will be displayed. This is mentioned both in the mod settings and in the documentation.

Sorry, Bugo. I am not greatly familiar with SMF's ACP as I am to other software and I have never used your mod until recently. I also might need glasses, but that's more of an excuse. 😂
I'm stuck in a time warp from the early 00's.

Oldiesmann

Upgraded to the latest version and keep seeing this error in my error log:

https://www.archiefans.com/cron.php
/.../Sources/Optimus/Task.php (Line 37)
Call to undefined function Bugo\Optimus\is_on()

Bugo

The latest version is 3.0 RC4 now. The file mentioned in your error is from some previous version. Therefore, you need to clear all its references in the smf_background_tasks table.

bluevoodu

@Bugo - I have a forum with 7-8k posts and messages.  I installed Optimus  last night and tried generating a site map (1st time using).  It creates the site map xml file and links it to the bottom of the forum. Howeever, the site map is blank when I click on it. I don't see any errors.

Forum is public to view. Any thought on what is wrong or I might be doing wrong?  All the other functions I made it through see to work fine so far.

I appreciate your help!
We want you to join:
Chicken Dinner Gaming Community

Bugo

@bluevoodu I see the error - Unsafe attempt to load URL http://www.chickendinnergaming.com/forum/index.php?action=sitemap_xsl from frame with URL https://www.chickendinnergaming.com/forum/sitemap.xml. Domains, protocols and ports must match. Did you enable the SSL mode for your forum (Server settings => General)? Did you try to re-run the sitemap generation?

bluevoodu

#1178
Thank you, @Bugo --> I see this now in the Google developer console.

I do not have SSL mode on - it is disabled.  I did check the box for: 
Remove previously generated sitemap*.xml files and hit save.  I then removed the check and saved again.  I also tried to uncheck the activate and show check boxes... plus tried to remove previously generated sitemap.

Maybe it is because the link is trying to load http and not https for even though I have ssl mode disabled:
http://www.chickendinnergaming.com/forum/index.php?action=sitemap_xsl

My .htaccess does have rewrite on for https

I missed the following in the initial post:
PHP version  - 8.1.32
MySQL version - 8.0.34
SMF - 2.1.6

Packages installed:
social login
smf updates
Optimus
Simple Audio Video Embedder
Yet Another Spoiler Mod
Discord Webhooks
We want you to join:
Chicken Dinner Gaming Community

Bugo

Well, turn on the SSL mode in the forum settings and rebuild the sitemap.

Advertisement: