Skip to main content
Topic: Preview in SimplePortal Blocks (Read 2319 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Preview in SimplePortal Blocks

Hello!

I am not sure, if this is a bug...

By creating a new block in portal (or when I edit an existing block), the block will not stay at the place, where it should be - if I use the preview. Then the block "jumps back" to the first position in its section, it is always at the top there. I have to select the position of the block again, without using the preview...or move the block afterwards on the blocklist to the place where it should be.

It is not really important... ;) but first this had confused me.

Re: Preview in SimplePortal Blocks

Reply #1

Better keep the bug reports board only for ElkArte bugs. ;)

I think I got it:
go to admin > SP > blocks > add block
pick on, and "select block type"
change the "column" to one you have already some blocks
click "preview"
change the order to something different
hit again "preview"
=> the order it reset to "before" and the first block.
Bugs creator.
Features destroyer.
Template killer.

Re: Preview in SimplePortal Blocks

Reply #2

Yes...

Sorry for using the wrong board, emanuele...

Re: Preview in SimplePortal Blocks

Reply #3

No problem, the move feature is there to move topics around! :P
Bugs creator.
Features destroyer.
Template killer.

Re: Preview in SimplePortal Blocks

Reply #4

Sorry I have not had a chance to look at this issue just yet ... but I will, once I get done playing with test cases :'(


Re: Preview in SimplePortal Blocks

Reply #5

Blocks module is the oldest one but I never got around to recoding it. That's the first thing in the to-do list for the next version though, once I finish adding the new features.

PortalAdminBlocks.controller.php

Code: (Find) [Select]
				'row' => !empty($_POST['block_row']) ? $_POST['block_row'] : 0,
Code: (Replace) [Select]
				'placement' => !empty($_POST['placement']) && in_array($_POST['placement'], array('before', 'after')) ? $_POST['placement'] : '',
'row' => !empty($_POST['block_row']) ? $_POST['block_row'] : 0,

PortalAdminBlocks.template.php

Code: (Find) [Select]
								<option value="before">', $txt['sp-placementBefore'], '...</option>
<option value="after">', $txt['sp-placementAfter'], '...</option>
Code: (Replace) [Select]
								<option value="before"', (!empty($context['SPortal']['block']['placement']) && $context['SPortal']['block']['placement'] == 'before' ? ' selected="selected"' : ''), '>', $txt['sp-placementBefore'], '...</option>
<option value="after"', (!empty($context['SPortal']['block']['placement']) && $context['SPortal']['block']['placement'] == 'after' ? ' selected="selected"' : ''), '>', $txt['sp-placementAfter'], '...</option>

Code: (Find) [Select]
								<option value="', $block['row'], '">', $block['label'], '</option>';
Code: (Replace) [Select]
								<option value="', $block['row'], '"', (!empty($context['SPortal']['block']['row']) && $context['SPortal']['block']['row'] == $block['row'] ? ' selected="selected"' : ''), '>', $block['label'], '</option>';