Skip to main content
Recent Posts
61
Addons / Re: [ADDON] SimplePortal
Last post by Spuds -
Quote from: Burke Knight –
Code: [Select]
class Recent_Ex_Block extends SP_Abstract_Block
Looks like to fix that we need to move up the require_once of that class (it does not autoload in 1.1) So in sources\admin\PortalAdminBlocks.controller.php we need to add a line.
Code: (find) [Select]
		// We'll need the utility functions from here.
require_once(SUBSDIR . '/PortalAdmin.subs.php');
require_once(SUBSDIR . '/Portal.subs.php');
Code: (replace) [Select]
		// We'll need the utility functions from here.
require_once(SUBSDIR . '/PortalAdmin.subs.php');
require_once(SUBSDIR . '/Portal.subs.php');
require_once(SUBSDIR . '/spblocks/SPAbstractBlock.class.php');
I think the best thing to do is make the edit in sources\subs\spblocks\BoardNews.block.php  in that file in the template_sp_boardNews function
Code: (find) [Select]
	// Output all the details we have found
foreach ($data['news'] as $news)
{
$attachment = $news['attachment'];

echo '
<h3 class="category_header">' . (empty($modSettings['messageIcons_enable'])
and just add a div to the start of that like
Code: (replace) [Select]
	// Output all the details we have found
foreach ($data['news'] as $news)
{
$attachment = $news['attachment'];

echo '
<div class="well">
<h3 class="category_header">' . (empty($modSettings['messageIcons_enable'])
I used the class well (that is roundframe), but content, or forumpost or ... whatever you want would work fine.  Also be sure to close that new div at the end of the function, so it looks like:
Code: (replace) [Select]
		echo $news['body'], '
</div>
<div class="submitbutton">', $news['link'], ' ', $news['new_comment'], '</div>
</div>
</div>
</div>';
64
Addons / Re: [ADDON] SimplePortal
Last post by Burke Knight -
@Spuds

Board News Block...

Is there a way, to divide each post into it's own div with a space between them?
Right now, I have an hr then the next post's title, but would like it to show each post in it's own div, if possible.
Kind of making each post into it's own block, look wise. Since set the main display as No Title and Roundframe.
65
Feature Discussion / Re: PWA Progressive Web App
Last post by Steeley -
Quote from: ahrasis –
Quote from: Spuds – Since a forum tends to be all dynamic content, its difficult to have an offline experience where one could potentially reply while offline and have it post when your network comes back, stuff like that, but that would be a large project just on its own   :shocked:
If member is offline, keep it as a draft instead?


If you are offline, you should take advantage of that, turn off the borg tether ..



.. and go play!
69
Feature Discussion / Re: PWA Progressive Web App
Last post by Spuds -
The admin interface makes creating / updating the basic manifest easy, but a manifest w/o a sw.js is ends up as pretty shortcut/bookmark.  I allowed for that option as that is all some sites may require.

Adding in a functional service worker allows one to install it, like an app from the play store, gives you some extra SEO points.

I went from a simple sw.js shell that simply allowed it to register/install/activate but really did nothing .... to what I currently have for testing where I make use of a cache so the app will at least launch a homepage even if you are offline, and then "complain" about being offline. 

Since a forum tends to be all dynamic content, its difficult to have an offline experience where one could potentially reply while offline and have it post when your network comes back, stuff like that, but that would be a large project just on its own  :shocked:

Anyway, hope folks test it out.
70
Feature Discussion / Re: PWA Progressive Web App
Last post by Burke Knight -
Quote from: Spuds – I've been working on adding this feature to 2.0 and its now it is available for testing.

Hmm... I remember a while back I suggested something like this, since I learned and PWA'd all my sites.
Nice to see that it'll be in the admin panel to set up. A lot simpler than making the manifest.json file and adding the code to the index.template file. :)