mirror of
https://github.com/e107inc/e107.git
synced 2025-08-05 06:07:32 +02:00
Social plugin xurl menu added.
This commit is contained in:
63
e107_plugins/social/e_menu.php
Normal file
63
e107_plugins/social/e_menu.php
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* e107 website system
|
||||||
|
*
|
||||||
|
* Copyright (C) 2008-2015 e107 Inc (e107.org)
|
||||||
|
* Released under the terms and conditions of the
|
||||||
|
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (!defined('e107_INIT')) { exit; }
|
||||||
|
|
||||||
|
//v2.x Standard for extending menu configuration within Menu Manager. (replacement for v1.x config.php)
|
||||||
|
|
||||||
|
class social_menu
|
||||||
|
{
|
||||||
|
function __construct()
|
||||||
|
{
|
||||||
|
// e107::lan('_blank','menu',true); // English_menu.php or {LANGUAGE}_menu.php
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configuration Fields.
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function config($menu='')
|
||||||
|
{
|
||||||
|
if($menu !== 'xurl')
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$fields = array();
|
||||||
|
$fields['xurlCaption'] = array('title'=> "Caption", 'type'=>'text', 'multilan'=>true, 'writeParms'=>array('size'=>'xxlarge'));
|
||||||
|
|
||||||
|
// $fields['blankCustom'] = array('title'=> "Enabled", 'type'=>'method'); // see below.
|
||||||
|
|
||||||
|
return $fields;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// optional - for when using custom methods above.
|
||||||
|
|
||||||
|
class social_menu_form extends e_form
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
function blankCustom($curVal)
|
||||||
|
{
|
||||||
|
|
||||||
|
$frm = e107::getForm();
|
||||||
|
$opts = array(1,2,3,4);
|
||||||
|
$frm->select('blankCustom', $opts, $curVal);
|
||||||
|
|
||||||
|
|
||||||
|
}*/
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
9
e107_plugins/social/xurl_menu.php
Normal file
9
e107_plugins/social/xurl_menu.php
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
require_once(e_PLUGIN."social/e_shortcode.php");
|
||||||
|
$sc = new social_shortcodes;
|
||||||
|
$body = $sc->sc_xurl_icons();
|
||||||
|
$title = empty($parm['xurlCaption'][e_LANGUAGE]) ? LAN_PLUGIN_SOCIAL_NAME : $parm['xurlCaption'][e_LANGUAGE];
|
||||||
|
|
||||||
|
e107::getRender()->tablerender($title, $body, 'social-xurl-menu');
|
||||||
|
|
Reference in New Issue
Block a user