News:

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

Main Menu

Light Portal

Started by Bugo, March 25, 2020, 07:36:36 AM

Previous topic - Next topic

Bugo

v1.10.1

* Fixed found issues
How to update: just extract the directories Themes and Sources from the modification archive to the root of your forum, over the existing ones

pocttopus

Everything went fine after replacing Themes and Sources but the version stays as 1.10 instead of 1.10.1

Other issue after updating folders but I don't know if this error message is related with LightPortal or FaBoardIcons mod?

8: Undefined index: name /home/xxx/public_html/Sources/LightPortal/addons/FaBoardIcons/FaBoardIcons.php (Line 64) ==>64:     $boards[$row['id_board']]['name'] = '<i class="' . $icon . ' fa"' . (!empty($color) ? ' style="color: ' . $color . '"' : '') . '></i> ' . $boards[$row['id_board']]['name'];

Bugo

Quote from: pocttopus on December 07, 2021, 11:07:37 PMEverything went fine after replacing Themes and Sources but the version stays as 1.10 instead of 1.10.1
Make sure you replaced Integration.php in /Sources/LightPortal

Quote from: pocttopus on December 07, 2021, 11:07:37 PMOther issue after updating folders but I don't know if this error message is related with LightPortal or FaBoardIcons mod?

8: Undefined index: name /home/xxx/public_html/Sources/LightPortal/addons/FaBoardIcons/FaBoardIcons.php (Line 64) ==>64:     $boards[$row['id_board']]['name'] = '<i class="' . $icon . ' fa"' . (!empty($color) ? ' style="color: ' . $color . '"' : '') . '></i> ' . $boards[$row['id_board']]['name'];
This is the addon error. Open /Sources/addons/FaBoardIcons/FaBoardIcons.php, and replace
'name' with
'title'

pocttopus


marcosbr

Sorted out. 
Grateful!
Nothing in life is absolute. We are always learning... Did you know that?
https://amigosdaeletronica.com.br

wylekk

7c0ec568e06da45d8d8834812ee24c42
 /index.php?action=portal;start=12
/Sources/LightPortal/addons/RssFeed/RssFeed.php (Line 102)  Backtrace information

Type of error: General
Error messageSelect
2: simplexml_load_string(): </html>
15099




 7c0ec568e06da45d8d8834812ee24c42
/index.php?action=portal;start=12
/Sources/LightPortal/addons/RssFeed/RssFeed.php (Line 102)  Backtrace information

Type of error: General
Error messageSelect
2: simplexml_load_string(): Entity: line 1810: parser error : Premature end of data in tag html line 2

I installed the RSS Feed block. There are errors in the logs.
Question - does this block create an RSS feed or just specify the address of the feed and it shows it?

Установил блок Лента RSS. В логах ошибки.
Вопрос - этот блок создает RSS-ленту или просто указывать адрес ленты и он показывает ее?

Bugo

The addon uses simplexml_load_string for parsing, then properties link, pubDate, title, and description of each feed item are displayed inside the HTML block.
Try other RSS addresses, maybe the error is in your feed.

2 вариант. Идёт запрос ленты с помощью simplexml_load_string, затем внутри html-блока отображаются свойства link, pubDate, title, description каждого элемента ленты.
Попробуйте другие адреса, возможно, ошибка в конкретной ленте.

Mick.

@Bugo I have a suggestion...

Make pages to have the ability not to show the H2 page title. Same thing you did for blocks few versions back.

***There are pages that don't need it's title displayed when you have created a custom page. For example... https://www.idesignsmf.com/index.php?page=themes I had the title "Custom SMF Themes" removed along with the edit icon from the file but after I upgraded, is back. No biggie, I'll remove it again soon.

Ty.  ;)

Bugo

@Mick., should this new option hide the title only? Or even the author name, date, and the "Edit" icon?

Mick.

Quote from: Bugo on December 17, 2021, 03:53:05 PM@Mick., should this new option hide the title only? Or even the author name, date, and the "Edit" icon?

The author name and date is optional already in the mod. That's good. I'm just thinking the Title to be optional as well. Now the edit Icon, if it's not too much, might as well make it a global option.

Mick.

@Bugo
I noticed you use loading="lazy" for the avatar in the front page and article list. I would like to add it to the image as well (frontpage) but seems is not working, verified using developer console.

echo '
<div class="card_img"></div>
<a href="', $article['link'], '">
<div class="card_img_hover" style="background-image: url(\'', $article['image'], '\')" title="', $article['title'], '"></div>
</a>';

Do you have a different method?

Bugo

Quote from: https://web.dev/i18n/en/lazy-loading-images/Browser-level lazy-loading does not apply to CSS background images, so you need to consider other methods
I will try to apply any lazy-loading libraries to solve it.

Bugo

Well, there is a simple solution with LazyLoad script:

            echo '
                <div class="card_img"></div>
                <a href="', $article['link'], '">
                    <div class="card_img_hover lazy" data-bg="', $article['image'], '" title="', $article['title'], '"></div>
                </a>';

In FrontPage.php find show method and add this code after loadTemplate('LightPortal/ViewFrontPage');:
loadJavaScriptFile('https://cdn.jsdelivr.net/npm/vanilla-lazyload@17/dist/lazyload.min.js', ['external' => true]);
addInlineJavaScript('
new LazyLoad();', true);

I will apply this feature in v2.0

Mick.

Perfect. This sped up my site. Ty.

pocttopus

Is there any update? Because it's listed latest from the newest updates and yet stays the same version 1.10.1 ???

Bugo

I am waiting for SMF 2.1. Then I can release updates of LP and Optimus.

pocttopus

@Bugo 2.1 is coming very soon? Yuhuuuu...  :D

Bugo

v2.0 beta
* Fixed found issues
* Migrated to PHP 7.4
* Migrated to AlpineJS 3.x
* Improved UI a bit
* Added Uicons and FontAwesome6 add-ons
* Added a hook to change UI icons
* Updated translations
* Updated documentation
* Improved translating depending on language plural rules or even user gender
* Improved work with different locales
* Added "Promote to front page" and "Remove from front page" buttons in topics/pages (works if you choose "Selected pages" or "Selected topics" mode for the portal front page)
* User blocks are now visible only to their authors
* Added 2 new add-on types - icons and SEO
* Added lazy loading for background images in the front page templates
* And many other minor changes

How to update:
* Make export for blocks and pages (optional)
* Uninstall the previous version
* Make sure that the intl extension is enabled on your server.
* Update your forum to SMF 2.1 Final
* Install the new version (v2.0 beta)

P. S. Did you know that there are several Easter eggs hidden in the portal areas? Has anyone found them yet? If you find them, tell me about it via PM, but do not tell others where to find them. Let all the treasure hunters enjoy :)

Replikacep

please don't insist to use php 7.4 i am using php 7.0

it's causally not every mod compatible with 7.4

gevv

Hi,

@Bugo  Is the Blocks width adjustable?


+ Is it possible to make the blocks appear only on the home page?

ElkArte is a modern, powerful community building forum software. https://www.elkarte.net/

Advertisement: