1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-05 22:27:34 +02:00

Social plugin xurl menu added.

This commit is contained in:
Cameron
2020-12-28 08:41:49 -08:00
parent b521bbe740
commit d579facf8f
2 changed files with 72 additions and 0 deletions

View 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);
}*/
}

View 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');