Advertisement:

Author Topic: Optimus  (Read 198839 times)

Offline lurkalot

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 1,494
  • Gender: Male
  • Tinyportal Support
    • guitaristguild on Facebook
    • Tinyportal on GitHub
    • @GuitaristGuild on Twitter
    • Guitarist Guild
Re: Optimus
« Reply #580 on: June 29, 2019, 06:39:42 AM »
2.2.1 seems to work fine on html articles in 2.0.15

Thanks, I'm also testing with 2.0.15  I have some adsense code at the top of one of mine, and displays part of the code on facebook and twitter when I share it.  Apart from that it works really well.  For now I have just moved the code further down, and it works.

Offline Bugo

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,537
  • Gender: Male
    • dragomano on GitHub
    • @dragomano on Twitter
    • Russian translations for SMF mods
Re: Optimus
« Reply #581 on: June 29, 2019, 07:24:30 AM »
If article type is "php", it is better to use "intro" block (in article settings) for a short description. However, this block you can use for any article types.

Offline @rjen

  • Full Member
  • ***
  • Posts: 508
  • Gender: Male
Re: Optimus
« Reply #582 on: June 29, 2019, 07:37:07 AM »
If article type is "php", it is better to use "intro" block (in article settings) for a short description. However, this block you can use for any article types.

It could be , but the intro text is only open for input when you choose to use intro text. Doing that will cause the Frontpage to only show the intro text. A separate descriptive text would be more appropriate. Maybe we can add that in the next TP version...
Running SMF 2.0 with Tinyportal 1.6.4 at www.fjr-club.nl
Testing SMF 2.1 RC2 with Tinyportal at http://test2.fjr-club.nl/

Offline @rjen

  • Full Member
  • ***
  • Posts: 508
  • Gender: Male
Re: Optimus
« Reply #583 on: July 02, 2019, 07:05:10 AM »
I have made special versions to testing these issues, try it.

Testing 2.4.5 on SMF 2.1 RC2 with TinyPortal 1.6.3

When I have a BBC article without introtext each page load gives one error:

8: Undefined variable: intro
 /home/deb77453/domains/fjr-club.nl/public_html/test2/Sources/Optimus/addons/TinyPortal.php (Regel 139)

The line in question..

Code: [Select]
138: // Если есть intro, используем в качестве описания его, иначе — выдержку из текста страницы
==>139: $context['meta_description'] = $intro ?: $body;
140:
141: $context['optimus_og_type']['article']['published_time'] = date('Y-m-d\TH:i:s', $row['date']);

the $intro value needs to be checked for a value first...

Then If I set to use Intro for the article but leave the introtext empty the whole body text is showing in the page...
See attachment...
Running SMF 2.0 with Tinyportal 1.6.4 at www.fjr-club.nl
Testing SMF 2.1 RC2 with Tinyportal at http://test2.fjr-club.nl/

Offline @rjen

  • Full Member
  • ***
  • Posts: 508
  • Gender: Male
Re: Optimus
« Reply #584 on: July 02, 2019, 08:08:28 AM »
Fixed the code.

below the corrected section of the file TinyPortal.php

Code: [Select]
// Ищем изображение в тексте страницы
$first_post_image = preg_match('/<img(.*)src(.*)=(.*)"(.*)"/U', $body, $value);
$settings['og_image'] = $first_post_image ? array_pop($value) : null;

if ($row['useintro'] && !empty($row['intro'])) {
$intro = $row['type'] == 'bbc' ? parse_bbc($row['intro'], false) : ($row['type'] == 'php' ? '<?php' . $row['intro'] : $row['intro']);
$intro = Subs::getTeaser($intro);
$intro = explode('
&nbsp;', $intro)[0];
$intro = shorten_subject($intro, 130);
} else {
$body = Subs::getTeaser($body);
$body = str_replace($txt['
quote'], '', $body);
$body = explode('
&nbsp;', $body)[0];
$body = shorten_subject($body, 130);
}

// Если есть intro, используем в качестве описания его, иначе — выдержку из текста страницы
$context['
meta_description'] = (isset($intro) ? $intro : $body);
Running SMF 2.0 with Tinyportal 1.6.4 at www.fjr-club.nl
Testing SMF 2.1 RC2 with Tinyportal at http://test2.fjr-club.nl/

Offline @rjen

  • Full Member
  • ***
  • Posts: 508
  • Gender: Male
Re: Optimus
« Reply #585 on: July 02, 2019, 09:23:20 AM »
Just an observation: in version 2.4.5 you dropped the "Link to your default Open Graph image" setting.

I found this very useful in the 2.0 branch... any particular reason for not having that setting in 2.1?
Running SMF 2.0 with Tinyportal 1.6.4 at www.fjr-club.nl
Testing SMF 2.1 RC2 with Tinyportal at http://test2.fjr-club.nl/

Offline Bugo

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,537
  • Gender: Male
    • dragomano on GitHub
    • @dragomano on Twitter
    • Russian translations for SMF mods
Re: Optimus
« Reply #586 on: July 02, 2019, 11:26:19 AM »
SMF 2.1 has such a setting by default, in Current Theme settings.

Offline @rjen

  • Full Member
  • ***
  • Posts: 508
  • Gender: Male
Re: Optimus
« Reply #587 on: July 02, 2019, 12:14:46 PM »
SMF 2.1 has such a setting by default, in Current Theme settings.

Oops, must have missed that, thanks.
Running SMF 2.0 with Tinyportal 1.6.4 at www.fjr-club.nl
Testing SMF 2.1 RC2 with Tinyportal at http://test2.fjr-club.nl/

Offline Kailash Aghera

  • Semi-Newbie
  • *
  • Posts: 49
  • Gender: Male
    • aghera on Facebook
    • @webhosttalk on Twitter
Re: Optimus
« Reply #588 on: July 03, 2019, 02:57:05 AM »
I have enabled sitemap in SMF 2.1 RC2  but it is not generating sitemap.xml and no other sitemap file. I am using 2.4.4 [06/27/19] version.

- Kailash

Offline Bugo

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,537
  • Gender: Male
    • dragomano on GitHub
    • @dragomano on Twitter
    • Russian translations for SMF mods
Re: Optimus
« Reply #589 on: July 03, 2019, 05:19:18 AM »

Offline Kailash Aghera

  • Semi-Newbie
  • *
  • Posts: 49
  • Gender: Male
    • aghera on Facebook
    • @webhosttalk on Twitter
Re: Optimus
« Reply #590 on: July 03, 2019, 09:16:13 AM »
Try this version => https://www.simplemachines.org/community/index.php?topic=422210.msg4023106#msg4023106
It worked on one test installation but it is not working on another installation. Both are having same SMF version and other mods.

- Kailash

Offline Kailash Aghera

  • Semi-Newbie
  • *
  • Posts: 49
  • Gender: Male
    • aghera on Facebook
    • @webhosttalk on Twitter
Re: Optimus
« Reply #591 on: July 03, 2019, 11:10:13 AM »
Hi,

I just noticed a bug in latest version. It is actually creating sitemap.xml file but if you have install SMF in subfolder, it is creating xml file in website's root directory instead of subfolder. For example, if forum is in example.com/forum, it is creating sitemap in example.com/sitemap.xml instead of example.com/forum/sitemap.xml.

Can this be fixed?

Thanks,
Kailash

Offline Bugo

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,537
  • Gender: Male
    • dragomano on GitHub
    • @dragomano on Twitter
    • Russian translations for SMF mods
Re: Optimus
« Reply #592 on: July 03, 2019, 12:38:32 PM »
Ok, I'll fix it in the next release.

Offline Kailash Aghera

  • Semi-Newbie
  • *
  • Posts: 49
  • Gender: Male
    • aghera on Facebook
    • @webhosttalk on Twitter
Re: Optimus
« Reply #593 on: July 03, 2019, 01:14:12 PM »
Thank you!

Also, as a feature request, it is possible to split the sitemap to multiple xml files as follow:

- sitemap.xml (main sitemap file) contains xml of individual forum board sitemap.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,556
  • Gender: Male
    • Kindred-999 on GitHub
Re: Optimus
« Reply #594 on: July 03, 2019, 01:26:06 PM »
in theory, that would require a lot of parsing logic...
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline njtweb

  • Sr. Member
  • ****
  • Posts: 964
Re: Optimus
« Reply #595 on: July 03, 2019, 05:21:50 PM »
Thank you!

Also, as a feature request, it is possible to split the sitemap to multiple xml files as follow:

- sitemap.xml (main sitemap file) contains xml of individual forum board sitemap.

What do you believe the benefit would be? Google and Bing webmaster tools only support one sitemap. submission per site.

Offline Kailash Aghera

  • Semi-Newbie
  • *
  • Posts: 49
  • Gender: Male
    • aghera on Facebook
    • @webhosttalk on Twitter
Re: Optimus
« Reply #596 on: July 04, 2019, 06:07:20 AM »
What do you believe the benefit would be? Google and Bing webmaster tools only support one sitemap. submission per site.
That is not true. You can submit multiple sitemaps for one website and in fact if you have large website having large number of of URLs, you will have to break your sitemap to multiple sitemaps. To understand in better way, you can refer the following:

https://support.google.com/webmasters/answer/75712?hl=en

- Kailash

Offline Massl

  • Jr. Member
  • **
  • Posts: 260
Re: Optimus
« Reply #597 on: July 11, 2019, 03:02:07 AM »
Hi, I updated to version 2.4.4 and now I often get this error.

Code: [Select]
Table 'smf.smf_tp_articles' doesn't exist
 https://sitename/index.php?topic=95.0&amp;amp;page=35
 /home/user/public_html/Sources/Optimus/addons/TinyPortal.php (Riga 99)

I never installed TinyPortal!

Topic 95 is not present in the sitemap and does not exist in the forum.

SMF 2.1 RC2 with default theme and language.

Many thanks


Offline muratbora

  • Semi-Newbie
  • *
  • Posts: 59
Re: Optimus
« Reply #598 on: August 04, 2019, 12:20:09 PM »
I have installed Optimus mod, but it is not generating sitemap file,
How OPTIMUS is creating sitemap?

Offline digger

  • Sr. Member
  • ****
  • Posts: 761
  • Gender: Male
    • realdigger on GitHub
    • SMF Russian Community
Re: Optimus
« Reply #599 on: August 04, 2019, 09:38:05 PM »
I have installed Optimus mod, but it is not generating sitemap file,
How OPTIMUS is creating sitemap?
There is a task in forum Scheduled Tasks.