Skip to main content
Topic: [ADDON] SimplePortal (Read 160235 times) previous topic - next topic
0 Members and 8 Guests are viewing this topic.

Re: [ADDON] SimplePortal

Reply #135

See the answer from spuds 2 posts below.;)
sorry for my bad english


Re: [ADDON] SimplePortal

Reply #137

I noticed that the cutoff tag is not working. Was this removed?

I found another small bug in SP. When I create a block "Board Statistics", the stats are showed correctly, but on Total users there is a link to index.php?action=mlist instead of index.php?action=memberlist.
To solve it we must edit /sources/subs/PortalBlocks.subs.php
on line 375 find
Code: [Select]
									<li ', sp_embed_class('portalstats'), '>', $txt['total_members'], ': <a href="', $scripturl . '?action=mlist">', comma_format($totals['members']), '</a></li>
and replace with:
Code: [Select]
									<li ', sp_embed_class('portalstats'), '>', $txt['total_members'], ': <a href="', $scripturl . '?action=memberlist">', comma_format($totals['members']), '</a></li>
Last Edit: January 07, 2015, 06:36:47 am by radu81
sorry for my bad english

Re: [ADDON] SimplePortal

Reply #138

Yep, I can see a small trace of the cutoff tag, but none in the places where it would give result.
I see an "articlelength" setting somewhere, but funnily enough I can't find it in my code. lol
Bugs creator.
Features destroyer.
Template killer.

Re: [ADDON] SimplePortal

Reply #139

I can set a max number of characters before a post is cut an that works. Is in the settings of block Board News, you need to create it first.

there is also "Maximum Characters" for articles block (I did not tested yet on elkarte)
sorry for my bad english

Re: [ADDON] SimplePortal

Reply #140

Quote from: Spuds – Thats because I forgot to add them so its just using the image name instead  :-[

In Portal.subs find the sp_embed_class function (~line 930).
Code: [Select]
		$default_title = array(
'dot' => $txt['sp-dot'],
'stars' => $txt['sp-star'],
'arrow' => $txt['sp-arrow'],
'modify' => $txt['modify'],
'delete' => $txt['delete'],
'delete_small' => $txt['delete'],
'history' => $txt['sp_shoutbox_history'],
'refresh' => $txt['sp_shoutbox_refresh'],
'smiley' => $txt['sp_shoutbox_smiley'],
'style' => $txt['sp_shoutbox_style'],
'bin' => $txt['sp_shoutbox_prune'],
'move' => $txt['sp_move'],
);
As you can see both 'given' => and 'received' => are missing, so they need to be added. 
Code: [Select]
		$default_title = array(
'dot' => $txt['sp-dot'],
'stars' => $txt['sp-star'],
'arrow' => $txt['sp-arrow'],
'modify' => $txt['modify'],
'delete' => $txt['delete'],
'delete_small' => $txt['delete'],
'history' => $txt['sp_shoutbox_history'],
'refresh' => $txt['sp_shoutbox_refresh'],
'smiley' => $txt['sp_shoutbox_smiley'],
'style' => $txt['sp_shoutbox_style'],
'bin' => $txt['sp_shoutbox_prune'],
'move' => $txt['sp_move'],
'given' => $txt['sp_likes_given'],
'received' => $txt['sp_likes_received'],
);

Then in your Sportal.language.php files add
Code: [Select]
$txt['sp_likes_given'] = 'Given';
$txt['sp_likes_received'] = 'Received';


on next release, please remember to add it ;)
sorry for my bad english

Re: [ADDON] SimplePortal

Reply #141

It will be ... I have a few changes for a .0.1 update, nothing major at all but a few tweaks like the above that have been IDed

Now the bigger update is still a ways off, probably with 1,1 itself

Re: [ADDON] SimplePortal

Reply #142

Updated package to address several issues reported on the 0.0.1 pre release. This one will now only install in ElkArte 1.0.2 and above as well.

1) cutoff tag was missing, its been added back
2) missing language strings for likes given/received on member block
3) wrong link to the member list
4) who's online list did not show proper portal actions
5) shoutbox block could spam the error log when a session times out
6) relative time did not work in the page or article sections
7) couple of minor block performance tweaks
8) various format tweaks here and there

No source edits changed so you can just replace your existing files with this, or uninstall and reinstall the new version. Your choice.

https://github.com/Spuds/Elk-SimplePortal/releases/tag/0.0.2

Still pre-release of course, since thats whats 2.4 is !


Re: [ADDON] SimplePortal

Reply #144

I just uninstalled the old 2.4 version and installed the 2.4.1 version, I added a thread with [cutoff] tag and in the homepage I saw this
Fatal error: Call to undefined function preparsecode() in ...sources/subs/PortalBlocks.subs.php on line 1301
no other blocks from SP were displayed

On topic view the cutoff tag was displayed
sorry for my bad english

Re: [ADDON] SimplePortal

Reply #145

Just before:
Code: [Select]
	$return = array();
$colorids = array();
5 lines above 1301:
https://github.com/Spuds/Elk-SimplePortal/blob/b43678156d338e9667d72c5f34ea9fcb2545058f/subs/PortalBlocks.subs.php#L1301

add:
Code: [Select]
require_once(SUBSDIR . '/Post.subs.php');
Bugs creator.
Features destroyer.
Template killer.

Re: [ADDON] SimplePortal

Reply #146

Well it did worked then, it cut it off  O:-)  ;D

Re: [ADDON] SimplePortal

Reply #147

Thanks Emanuele!
So it will be:
Code: [Select]
	$return = array();
$colorids = array();
while ($row = $db->fetch_assoc($request))
{
// Using the cutoff tag?
$limited = false;
if (($cutoff = Util::strpos($row['body'], '[cutoff]')) !== false)
{
$row['body'] = Util::substr($row['body'], 0, $cutoff);
require_once(SUBSDIR . '/Post.subs.php');
preparsecode($row['body']);
$limited = true;
}

that fixed the cutoff tag in portal, but in topic is still visible
skodaclub.it/index.php?topic=3328.0
sorry for my bad english

Re: [ADDON] SimplePortal

Reply #148

another question:

on SP we can set permissions for blocks: Geusts, Members or Everyone. In SP for SMF I have also a "Custom" option where I can set a block for Moderators, Admin or other Custom Group. Was this removed form SP for Elkarte?


==edit==
found it  O:-)
Last Edit: February 22, 2015, 02:32:51 pm by radu81
sorry for my bad english

Re: [ADDON] SimplePortal

Reply #149

Came across a few issues while using SimplePortal
  • The content erases when switching from BBC to HTML in the articles feature. Also, format editor would be useful for html in Simple Portal articles.
  • The help link on custom display action when editing blocks is broken.

 This isn't really an issue but I'd like help with changing the drop down menu items under Community to move under Forum and changing Community to Home.