1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 12:48:24 +01:00

Added Missing social plugin font. Added {CMENUURL} shortcode. Issue #1507. Added example of getFieldVar() method to plugin builder.

This commit is contained in:
Cameron 2016-07-07 14:28:12 -07:00
parent 7223abe458
commit 345bbc4ff8
6 changed files with 22 additions and 5 deletions

View File

@ -3887,6 +3887,7 @@ $text .= "
public function customPage()
{
\$text = 'Hello World!';
\$otherField = \$this->getController()->getFieldVar('other_field_name');
return \$text;
}

View File

@ -301,6 +301,21 @@ class cpage_shortcodes extends e_shortcode
// print_a($this);
return e107::getParser()->toHTML($this->var['menu_text'], true, 'BODY');
}
/**
* @param null $parm
* @example {CMENUURL}
* @return string
*/
function sc_cmenuurl($parm=null)
{
if(empty($this->var['menu_button_url']))
{
return $this->sc_cpageurl();
}
return e107::getParser()->replaceConstants($this->var['menu_button_url']);
}
function sc_cmenuimage($parm='')

View File

@ -2788,7 +2788,7 @@ class e_admin_controller_ui extends e_admin_controller
return null;
}
if($this->getQuery('action') == 'list')
if($this->getAction() == 'list')
{
return $this->getListModel()->get($key);
}

View File

@ -3765,7 +3765,7 @@ class e_form
$text = "<a class='e-tip e-editable editable-click ".$class."' data-name='".$dbField."' ";
$text .= (is_array($array)) ? "data-source=\"".$source."\" " : "";
$text .= " title=\"".$title."\" data-type='".$type."' data-inputclass='x-editable-".$this->name2id($dbField)."' data-value=\"{$curVal}\" href='#' ";
$text .= " title=\"".$title."\" data-type='".$type."' data-inputclass='x-editable-".$this->name2id($dbField)." ".$class."' data-value=\"{$curVal}\" href='#' ";
if(!empty($options))
{
@ -4544,7 +4544,7 @@ class e_form
}
else
{
$false = ($value === '') ? "&square;" : "&cross;";
$false = ($value === '') ? "&square;" : "&cross;";
}
$true = varset($parms['true'],'&check;'); // custom representation for 'true'. (supports font-awesome when set by css)
@ -4555,7 +4555,7 @@ class e_form
$wparms = (vartrue($parms['reverse'])) ? array(0=>$true, 1=>$false) : array(0=>$false, 1=>$true);
$dispValue = $wparms[$value];
return $this->renderInline($field, $id, $attributes['title'], $value, $dispValue, 'select', $wparms);
return $this->renderInline($field, $id, $attributes['title'], $value, $dispValue, 'select', $wparms, array('class'=>'e-editable-boolean'));
}
if(vartrue($parms['reverse']))

View File

@ -2255,7 +2255,8 @@ class e107plugin
//print_a($tag);
switch ($function)
{
case 'install':
case 'install':
case 'refresh':
$c = 1;
foreach($tag['mediaCategories']['category'] as $v)
{

Binary file not shown.