News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Optimus

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

Previous topic - Next topic

lurkalot

Quote from: @rjen on June 29, 2019, 05:47:51 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.

Bugo

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.

@rjen

Quote from: Bugo 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.

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.1 with latest TinyPortal at www.fjr-club.nl

@rjen

Quote from: Bugo on June 28, 2019, 11:52:52 PM
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..


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.1 with latest TinyPortal at www.fjr-club.nl

@rjen

Fixed the code.

below the corrected section of the file TinyPortal.php


// Ищем изображение в тексте страницы
$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.1 with latest TinyPortal at www.fjr-club.nl

@rjen

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.1 with latest TinyPortal at www.fjr-club.nl

Bugo

SMF 2.1 has such a setting by default, in Current Theme settings.

@rjen

Quote from: Bugo on July 02, 2019, 11:26:19 AM
SMF 2.1 has such a setting by default, in Current Theme settings.

Oops, must have missed that, thanks.
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

Kailash Aghera

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


Kailash Aghera

Quote from: Bugo on July 03, 2019, 05:19:18 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

Kailash Aghera

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

Bugo

Ok, I'll fix it in the next release.

Kailash Aghera

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.

Kindred

in theory, that would require a lot of parsing logic...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

njtweb

Quote from: Kailash Aghera 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.

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

Kailash Aghera

Quote from: njtweb on July 03, 2019, 05:21:50 PM
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

Massl

Hi, I updated to version 2.4.4 and now I often get this error.

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


muratbora

I have installed Optimus mod, but it is not generating sitemap file,
How OPTIMUS is creating sitemap?

digger

Quote from: muratbora 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?
There is a task in forum Scheduled Tasks.

Advertisement: