News:

SMF 2.1.4 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

Mick.

Quote from: Bugo on December 11, 2020, 11:19:44 PM
Any errors in the console?
All is good. I had to re-copy the lightportal folder into my theme.

Here's a thing to consider, it seems the new update added the "teaser" in the front blocks too right? The thing is, if that article block has a reply, when clicked it takes you straight to the reply. It should go straight to the first post instead.

Bugo

It depends on the article sorting type, the article type. For example, if you select "by the last comment" option, the article title will be as the link to the last reply, and the article image will be as the link to the first post. Is it a little confusing?

Mick.

Quote from: Bugo on December 12, 2020, 07:56:57 AM
It depends on the article sorting type, the article type. For example, if you select "by the last comment" option, the article title will be as the link to the last reply, and the article image will be as the link to the first post. Is it a little confusing?

I see it now.   I changed it in ViewFrontPage.template.php so both links go to the first post.

from:
<a href="', $topic['msg_link'], '">', $topic['subject'], '</a>

to:
<a href="', $topic['link'], '">', $topic['subject'], '</a>

Thank you again bruh!

pocttopus

Quote from: Bugo on December 11, 2020, 04:01:42 PM
v1.4


* Fixed found issues
* Added a new section in settings ("Misc")
* Added a new addon - Polls
* Added likes/unlikes for pages
* Added some new helpers
* Added a new addon type - "impex" (import/export)
* Added new addons - TinyPortal and EhPortal(=SimplePortal), to import pages from these mods
* Added alpine.js to improve work with JS
* Added a note field for blocks (for comfort work with untitled blocks in Admin section)
* Added one more option to sorting articles - by the date of update


This update requires to uninstall any previous versions of the LP
Thanks!  ;)

pocttopus

So... what's new in v.1.4.1?

Bugo


Fixed issues with import from EhPortal/TinyPortal
Fixed issues with comments
Fixed other found issues

pocttopus

Thanks! This mod is awesome...  ;)

Mick.

Bro, I would like to find out where to change the post time from Military time to regular time?

Bugo

Do you mean the time of articles on the frontpage?

Mick.


Bugo

/LightPortal/FrontPage.php, replace
$article['date']     = Helpers::getFriendlyTime($article['date']);
with
$article['date'] = timeformat($article['date']);
Then article cards will use forum time format.

Or, you can use your own format here, like this:
$article['date'] = date('F j, Y', $article['date']);

Mick.

Quote from: Bugo on December 26, 2020, 01:38:43 AM
/LightPortal/FrontPage.php, replace
$article['date']     = Helpers::getFriendlyTime($article['date']);
with
$article['date'] = timeformat($article['date']);
Then article cards will use forum time format.

Or, you can use your own format here, like this:
$article['date'] = date('F j, Y', $article['date']);
That worked. Thank you.

Mick.

Bugo,
I'd would like to make a suggestion....

Topic articles in the front page image and title link point to:
https://www.idesignsmf.com/index.php?topic=596.new;topicseen#new   

I think it should be just the actual link of post.
https://www.idesignsmf.com/index.php?topic=596.0

I looked around and found this bit in TopicArticle.php

'link'        => $scripturl . '?topic=' . $row['id_topic'] . ($row['new_from'] > $row['id_msg_modified'] ? '.0' : '.new;topicseen#new'),

This is where the change should be? Or do I need to look somewhere else?

Bugo

Yes, this is what you need. Do not forget to clean the SMF cache after your changes.

Mick.

Quote from: Bugo on December 27, 2020, 03:24:54 PM
Yes, this is what you need. Do not forget to clean the SMF cache after your changes.
Thank you. That did it. I had forgotten to clear cache lol

Mick.

Bugo, The sticky thingy on either left or right blocks, is it pure css or is it using javascript? I can't seem to find the js. I have a custom theme and the sticky it's not reading the anchor. #header or whatever the class may be. I need to find out tho so I can make the changes. Ty.

Bugo

Just a CSS

For your theme you should add these changes into CSS:

body {
    overflow-x: visible !important;
}

#lp_layout .sticky_sidebar {
    position: sticky;
    top: 100px;
}

Mick.

Quote from: Bugo on December 31, 2020, 10:18:27 AM
Just a CSS

For your theme you should add these changes into CSS:

body {
    overflow-x: visible !important;
}

#lp_layout .sticky_sidebar {
    position: sticky;
    top: 100px;
}

Yup. I was missing the body part. Alls good. Ty

Bugo

v1.5


* Fixed found issues
* Updated some template files
* Updated addons
* Updated language files
* Added a portal.php file into the package (as an example for the standalone mode)
* Added new addons: Search, and BoardStats
* Added a sample example of a custom template for article pages
* Added new frontpage modes
* Added new settings for customizing article cards
* Added the plugin maker wizard to create simple addon skeletons

Mick.

Unable to load the 'plugin_post' template.  :o  Happens when trying to add plugin

Advertisement: