mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 05:07:27 +02:00
Issue #3103 -Wrappers containing parms were not overriding wrappers of the same name without parms.
This commit is contained in:
@@ -74,7 +74,7 @@ if (!defined('e107_INIT'))
|
|||||||
*/
|
*/
|
||||||
function initShortcodeClass($class, $force = false, $eVars = null)
|
function initShortcodeClass($class, $force = false, $eVars = null)
|
||||||
{
|
{
|
||||||
return e107::getScParser()->initShortcodeClass($class, $eVars, $force);
|
return e107::getScParser()->initShortcodeClass($class, $force);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -93,6 +93,8 @@ class e_parse_shortcode
|
|||||||
private $legacyBatch = array(); // List of legacy batch file codes. eg. using SC_BEGIN etc.
|
private $legacyBatch = array(); // List of legacy batch file codes. eg. using SC_BEGIN etc.
|
||||||
private $legacyBatchFile = null;
|
private $legacyBatchFile = null;
|
||||||
private $debug_legacy = array();
|
private $debug_legacy = array();
|
||||||
|
|
||||||
|
/** @var e_vars */
|
||||||
protected $eVars = null;
|
protected $eVars = null;
|
||||||
protected $wrappers = array(); // Wrappers array for the current parsing cycle, see contact_template.php and $CONTACT_WRAPPER variable
|
protected $wrappers = array(); // Wrappers array for the current parsing cycle, see contact_template.php and $CONTACT_WRAPPER variable
|
||||||
protected $wrapper = null; // current wrapper being processed.
|
protected $wrapper = null; // current wrapper being processed.
|
||||||
@@ -1429,14 +1431,14 @@ class e_parse_shortcode
|
|||||||
{
|
{
|
||||||
$pre = $post = '';
|
$pre = $post = '';
|
||||||
|
|
||||||
if(isset($this->wrappers[$code]) && !empty($this->wrappers[$code])) // eg: $NEWS_WRAPPER['view']['item']['NEWSIMAGE']
|
if(!empty($fullShortcodeKey) && !empty($this->wrappers[$fullShortcodeKey]) ) // eg: $NEWS_WRAPPER['view']['item']['NEWSIMAGE: item=1']
|
||||||
{
|
|
||||||
list($pre, $post) = explode("{---}", $this->wrappers[$code], 2);
|
|
||||||
}
|
|
||||||
elseif(!empty($fullShortcodeKey) && !empty($this->wrappers[$fullShortcodeKey]) ) // eg: $NEWS_WRAPPER['view']['item']['NEWSIMAGE: item=1']
|
|
||||||
{
|
{
|
||||||
list($pre, $post) = explode("{---}", $this->wrappers[$fullShortcodeKey], 2);
|
list($pre, $post) = explode("{---}", $this->wrappers[$fullShortcodeKey], 2);
|
||||||
}
|
}
|
||||||
|
elseif(isset($this->wrappers[$code]) && !empty($this->wrappers[$code])) // eg: $NEWS_WRAPPER['view']['item']['NEWSIMAGE']
|
||||||
|
{
|
||||||
|
list($pre, $post) = explode("{---}", $this->wrappers[$code], 2);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//if $sc_mode exists, we need it to parse $sc_style
|
//if $sc_mode exists, we need it to parse $sc_style
|
||||||
|
@@ -152,6 +152,9 @@ $sc_style['CPAGENAV|default']['post'] = '</div>';
|
|||||||
$PAGE_WRAPPER['customfields']['CPAGEFIELDTITLE'] = "<tr id='customfields-{CPAGEFIELDNAME}'><td>{---}</td>";
|
$PAGE_WRAPPER['customfields']['CPAGEFIELDTITLE'] = "<tr id='customfields-{CPAGEFIELDNAME}'><td>{---}</td>";
|
||||||
$PAGE_WRAPPER['customfields']['CPAGEFIELD'] = "<td>{---}</td></tr>";
|
$PAGE_WRAPPER['customfields']['CPAGEFIELD'] = "<td>{---}</td></tr>";
|
||||||
|
|
||||||
|
// Override the wrapper above for {CPAGEFIELD: name=myvideo}
|
||||||
|
$PAGE_WRAPPER['customfields']['CPAGEFIELD: name=myvideo'] = "<tr><td colspan='2'>{---}</td></tr>";
|
||||||
|
|
||||||
$PAGE_TEMPLATE['customfields']['body'] = '
|
$PAGE_TEMPLATE['customfields']['body'] = '
|
||||||
|
|
||||||
<div class="col-xs-12 col-md-5 pull-right" style="margin-right:-15px">
|
<div class="col-xs-12 col-md-5 pull-right" style="margin-right:-15px">
|
||||||
@@ -159,6 +162,7 @@ $sc_style['CPAGENAV|default']['post'] = '</div>';
|
|||||||
<tr>
|
<tr>
|
||||||
<th class="text-center" colspan="2">Custom Fields</th>
|
<th class="text-center" colspan="2">Custom Fields</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
{CPAGEFIELD: name=myvideo}
|
||||||
{CPAGEFIELDTITLE: name=mybbarea}
|
{CPAGEFIELDTITLE: name=mybbarea}
|
||||||
{CPAGEFIELD: name=mybbarea}
|
{CPAGEFIELD: name=mybbarea}
|
||||||
{CPAGEFIELDTITLE: name=myboolean}
|
{CPAGEFIELDTITLE: name=myboolean}
|
||||||
@@ -191,8 +195,7 @@ $sc_style['CPAGENAV|default']['post'] = '</div>';
|
|||||||
{CPAGEFIELD: name=mytext}
|
{CPAGEFIELD: name=mytext}
|
||||||
{CPAGEFIELDTITLE: name=myurl}
|
{CPAGEFIELDTITLE: name=myurl}
|
||||||
{CPAGEFIELD: name=myurl}
|
{CPAGEFIELD: name=myurl}
|
||||||
{CPAGEFIELDTITLE: name=myvideo}
|
|
||||||
{CPAGEFIELD: name=myvideo}
|
|
||||||
</table>
|
</table>
|
||||||
{CPAGEEDIT}
|
{CPAGEEDIT}
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user