Example #1
0
    function init()
    {
        if (E107_DEBUG_LEVEL > 0) {
            $this->adminMenu['ranks/list'] = array('caption' => LAN_USER_RANKS . " (experimental)", 'perm' => '4|U3');
        }
        $JS = <<<JS

\t\t\t//\t\$('#user-action-indicator-'+user).html('<i class="fa fa-cog"></i>'); //

\t\t\t\$(document).on('click', ".user-action", function(e){
\t\t\t\t// e.stopPropagation();

\t\t\t\tvar action = \$(this).attr('data-action-type');
\t\t\t\tvar user = \$(this).attr('data-action-user');

\t\t\t//\t\$('#user-action-indicator-'+user).html('<i class="fa fa-spin fa-spinner"></i>'); //

\t\t\t\t\$('.user-action-hidden').val(''); // clear all, incase of back-button or auto-fill.
\t\t\t\t\$('#user-action-'+ user).val(action);
\t\t\t\t\$('#core-user-list-form').submit();


\t\t\t\t});
JS;
        e107::js('footer-inline', $JS);
        e107::css('inline', '
			.user-action { cursor: pointer }
			.btn-user-action { margin-right:15px}

		');
    }
Example #2
0
function loadJSAddons()
{
    if (e_PAGE == 'menus.php' && vartrue($_GET['configure'])) {
        return;
    }
    // e107::js('core',    'bootstrap/js/bootstrap-modal.js', 'jquery', 2);  // Special Version see: https://github.com/twitter/bootstrap/pull/4224
    e107::css('core', 'bootstrap-select/bootstrap-select.min.css', 'jquery');
    e107::js('core', 'bootstrap-select/bootstrap-select.min.js', 'jquery', 2);
    e107::css('core', 'bootstrap-multiselect/css/bootstrap-multiselect.css', 'jquery');
    e107::js('core', 'bootstrap-multiselect/js/bootstrap-multiselect.js', 'jquery', 2);
    // TODO: remove typeahead.
    e107::js('core', 'bootstrap-jasny/js/jasny-bootstrap.js', 'jquery', 2);
    e107::css('core', 'bootstrap-datetimepicker/css/datetimepicker.css', 'jquery');
    e107::js('core', 'bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js', 'jquery', 2);
    e107::js('core', 'jquery.h5validate.min.js', 'jquery', 2);
    e107::js('core', 'jquery.elastic.js', 'jquery', 2);
    e107::js('core', 'jquery.at.caret.min.js', 'jquery', 2);
    // e107::js('core', 	'jquery-ui-timepicker-addon.js', 'jquery', 2);
    //e107::css('core', 	'chosen/chosen.css', 'jquery');
    //e107::js('core', 	'chosen/chosen.jquery.min.js', 'jquery', 2);
    // e107::js('core', 	'password/jquery.pwdMeter.js', 'jquery', 2); // loaded in form-handler.
    // e107::css('core', 	'bootstrap-tag/bootstrap-tag.css', 'jquery');
    //	e107::js('core', 	'bootstrap-tag/bootstrap-tag.js', 'jquery', 2);
    //	e107::js("core",	"tags/jquery.tagit.js","jquery",3);
    //	e107::css('core', 	'tags/jquery.tagit.css', 'jquery');
    e107::css('core', 'core/admin.jquery.css', 'jquery');
    e107::js("core", "core/admin.jquery.js", "jquery", 4);
    // Load all default functions.
    e107::css('core', 'core/all.jquery.css', 'jquery');
    e107::js("core", "core/all.jquery.js", "jquery", 4);
    // Load all default functions.
}
Example #3
0
 /**
  * Available parameters (GET string format)
  * - cols (integer): number of items per column, default 1
  * - no_fill_empty (boolean): don't fill last column with empty items (if required), default 0
  * - tablestyle (string): mode to be used with <code>tablerender()</code>, default 'featurebox'
  * - notablestyle (null): if isset - disable <code>tablerender()</code>
  * - force (boolean): force category model load , default false
  * - ids (string): comma separated id list - load specific featurebox items, default empty 
  * 
  * @param string $parm parameters
  * @param string $mod category template
  * @example {FEATUREBOX=cols=2|tabs}
  */
 function sc_featurebox($parm = null, $mod = '')
 {
     if ($parm == null && $mod == '') {
         $type = vartrue(e107::getPlugPref('featurebox', 'menu_category'), 'bootstrap_carousel');
         $text = e107::getParser()->parseTemplate("{FEATUREBOX|" . $type . "}");
         return $text;
     }
     // TODO cache
     if (!e107::isInstalled('featurebox')) {
         return '';
     }
     if (!$mod) {
         $ctemplate = 'default';
     } else {
         $ctemplate = $mod;
     }
     parse_str($parm, $parm);
     $category = $this->getCategoryModel($ctemplate, vartrue($parm['force']) ? true : false);
     $defopt = array('force' => 0, 'no_fill_empty' => 0, 'tablestyle' => 'featurebox', 'cols' => 1, 'ids' => '', 'notablestyle' => null);
     // reset to default, update current
     $category->setParams($defopt)->updateParams($parm);
     if (!$category->hasData()) {
         return '';
     }
     $tmpl = $this->getFboxTemplate($ctemplate);
     $type = vartrue($tmpl['js_type'], '');
     // Legacy support (prototype.js)
     if (vartrue($tmpl['js'])) {
         $tmp = explode(',', $tmpl['js']);
         foreach ($tmp as $file) {
             e107::js('footer', $file, $type);
         }
     }
     $tp = e107::getParser();
     if (vartrue($tmpl['js_inline'])) {
         $data = $tp->toText($category->getData('fb_category_parms'));
         $jsInline = str_replace("{FEATUREBOX_PARMS}", "{" . trim($data) . "}", $tmpl['js_inline']);
         e107::js('footer-inline', $jsInline, $type, 3);
     }
     // Fix - don't use tablerender if no result (category could contain hidden items)
     $ret = $this->render($category, $ctemplate, $parm);
     if (empty($ret)) {
         e107::getMessage()->addDebug('Featurebox returned nothing.')->addDebug('Category: ' . print_a($category, true))->addDebug('Template: ' . $ctemplate)->addDebug('Param: ' . print_a($parm, true));
         return '';
     }
     $ret = $tp->parseTemplate($tmpl['list_start'], true, $category) . $ret . $tp->parseTemplate($tmpl['list_end'], true, $category);
     if (isset($parm['notablestyle'])) {
         return $ret;
     }
     return e107::getRender()->tablerender(LAN_PLUGIN_FEATUREBOX_NAME, $ret, vartrue($parm['tablestyle'], 'featurebox'), true);
 }
Example #4
0
 function facebook($data)
 {
     if (!deftrue('SOCIAL_FACEBOOK_INIT')) {
         return "<div class='alert alert-important alert-danger'>Unable to render comments. Missing Facebook appID.</div>";
     }
     e107::js('footer-inline', SOCIAL_FACEBOOK_INIT);
     if (E107_DEBUG_LEVEL > 0) {
         $link = "http://developers.facebook.com/docs/plugins/comments/";
     } else {
         $link = e_REQUEST_URL;
     }
     $pref = e107::pref('social');
     $limit = vartrue($pref['facebook_comments_limit'], 10);
     $theme = vartrue($pref['facebook_comments_theme'], 'light');
     $loading = vartrue($pref['facebook_comments_loadingtext'], 'Loading...');
     $text = '<div class="fb-comments" data-href="' . $link . '" data-width="100%" data-numposts="' . $limit . '" data-colorscheme="' . $theme . '">' . $loading . '</div>';
     return $text;
 }
Example #5
0
 function __construct()
 {
     e107::js('core', 'zrssfeed/jquery.zrssfeed.min.js');
     // http://www.zazar.net/developers/jquery/zrssfeed/
     $code = "\n\t\t\n\t\t\n\t\tjQuery(function(\$){\n\t\t \$('#e-adminfeed').rssfeed('" . ADMINFEED . "', {\n    \t\tlimit: 3,\n    \t\theader: false,\n    \t\tlinktarget: '_blank'\n  \t\t\t});\n\t\t});\n";
     global $user_pref;
     // quick fix.
     $pref = e107::getPref();
     e107::js('inline', $code, 'jquery');
     if (isset($_POST['submit-mye107']) || varset($_POST['submit-mymenus'])) {
         $user_pref['core-infopanel-mye107'] = $_POST['e-mye107'];
         save_prefs('user');
         $pref['core-infopanel-menus'] = $_POST['e-mymenus'];
         save_prefs();
     }
     //	$array_functions_assoc = e107::getNav()->adminLinks('assoc');
     //	$this->iconlist = array_merge($array_functions_assoc, e107::getNav()->pluginLinks(E_16_PLUGMANAGER, "array"));
     $this->iconlist = e107::getNav()->adminLinks();
 }
Example #6
0
    public function init()
    {
        e107::plugLan('gallery', 'front');
        e107::js('gallery', 'jslib/prettyPhoto/js/jquery.prettyPhoto.js', 'jquery');
        e107::css('gallery', 'jslib/prettyPhoto/css/prettyPhoto.css', 'jquery');
        e107::css('gallery', 'gallery_style.css');
        $prettyPhoto = <<<JS
\$(document).ready(function(){
    \$("a[data-gal^='prettyPhoto']").prettyPhoto(
\t    {
\t    \thook: 'data-gal',
\t    \ttheme: 'pp_default',
\t    \toverlay_gallery: false,
\t    \tdeeplinking: false
\t    }
    );
  });
JS;
        e107::js('footer-inline', $prettyPhoto, 'jquery');
        $this->catList = e107::getMedia()->getCategories('gallery');
    }
Example #7
0
function loadJSAddons()
{
    if (e_PAGE == 'menus.php' && vartrue($_GET['configure'])) {
        return;
    }
    // e107::js('core',    'bootstrap/js/bootstrap-modal.js', 'jquery', 2);  // Special Version see: https://github.com/twitter/bootstrap/pull/4224
    e107::css('core', 'bootstrap-editable/css/bootstrap-editable.css', 'jquery');
    e107::js('core', 'bootstrap-editable/js/bootstrap-editable.min.js', 'jquery', 2);
    //	e107::css('url', 		"//cdnjs.cloudflare.com/ajax/libs/x-editable/1.5.0/bootstrap-editable/css/bootstrap-editable.css");
    //	e107::js('url', 		"//cdnjs.cloudflare.com/ajax/libs/x-editable/1.5.0/bootstrap-editable/js/bootstrap-editable.min.js");
    e107::css('core', 'bootstrap-select/bootstrap-select.min.css', 'jquery');
    e107::js('core', 'bootstrap-select/bootstrap-select.min.js', 'jquery', 2);
    e107::css('core', 'bootstrap-multiselect/css/bootstrap-multiselect.css', 'jquery');
    e107::js('core', 'bootstrap-multiselect/js/bootstrap-multiselect.js', 'jquery', 2);
    // TODO: remove typeahead.
    e107::js('core', 'bootstrap-jasny/js/jasny-bootstrap.js', 'jquery', 2);
    e107::css('core', 'bootstrap-datetimepicker/css/datetimepicker.css', 'jquery');
    e107::js('core', 'bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js', 'jquery', 2);
    e107::js('core', 'jquery.h5validate.min.js', 'jquery', 2);
    if (e_LAN != 'en') {
        e107::js('inline', buildDateLocale(), 'jquery', 2);
    }
    e107::js('core', 'jquery.elastic.js', 'jquery', 2);
    e107::js('core', 'jquery.at.caret.min.js', 'jquery', 2);
    // e107::js('core', 	'jquery-ui-timepicker-addon.js', 'jquery', 2);
    //e107::css('core', 	'chosen/chosen.css', 'jquery');
    //e107::js('core', 	'chosen/chosen.jquery.min.js', 'jquery', 2);
    e107::js('core', 'password/jquery.pwdMeter.js', 'jquery', 2);
    // e107::css('core', 	'bootstrap-tag/bootstrap-tag.css', 'jquery');
    e107::js('core', 'bootstrap-tag/bootstrap-tag.js', 'jquery', 2);
    //	e107::js("core",	"tags/jquery.tagit.js","jquery",3);
    //	e107::css('core', 	'tags/jquery.tagit.css', 'jquery');
    e107::css('core', 'core/admin.jquery.css', 'jquery');
    e107::js("core", "core/admin.jquery.js", "jquery", 4);
    // Load all default functions.
    e107::css('core', 'core/all.jquery.css', 'jquery');
    e107::js("core", "core/all.jquery.js", "jquery", 4);
    // Load all default functions.
}
Example #8
0
 /**
  * Include necessary CSS and JS files.
  */
 function includePrivateComponents()
 {
     $eufPrefix = 'user_plugin_nodejs_comment_';
     $defs = $this->defaultValues;
     // User defined settings.
     $alert_comment_any = isset($defs[$eufPrefix . 'alert_comment_any']) ? intval($defs[$eufPrefix . 'alert_comment_any']) : 1;
     $sound_comment_any = isset($defs[$eufPrefix . 'sound_comment_any']) ? intval($defs[$eufPrefix . 'sound_comment_any']) : 1;
     $alert_comment_own = isset($defs[$eufPrefix . 'alert_comment_own']) ? intval($defs[$eufPrefix . 'alert_comment_own']) : 1;
     $sound_comment_own = isset($defs[$eufPrefix . 'sound_comment_own']) ? intval($defs[$eufPrefix . 'sound_comment_own']) : 1;
     // If admin disabled it globally.
     if ((int) $this->plugPrefs['disable_alerts'] === 1) {
         $alert_comment_any = 0;
         $alert_comment_own = 0;
     }
     // If admin disabled it globally.
     if ((int) $this->plugPrefs['disable_sounds'] === 1) {
         $sound_comment_any = 0;
         $sound_comment_own = 0;
     }
     $js_options = array('current_user' => USERID, 'alert_comment_any' => (int) $alert_comment_any, 'sound_comment_any' => (int) $sound_comment_any, 'alert_comment_own' => (int) $alert_comment_own, 'sound_comment_own' => (int) $sound_comment_own);
     e107::js('settings', array('nodejs_comment' => $js_options));
     e107::js('footer', '{e_PLUGIN}nodejs_comment/js/nodejs_comment.js', 'jquery', 5);
 }
Example #9
0
    public function customPage()
    {
        // TODO: Utilize the URL instead of the local file.
        // First, I have to figure out why it won't load!
        e107::js('forecasty', 'assets/googlemaps.js', 'jquery');
        //		e107::js('url', 'http://maps.googleapis.com/maps/api/js?sensor=false');
        e107::js('forecasty', 'assets/jquery-gmaps-latlon-picker.js', 'jquery');
        e107::css('forecasty', 'assets/jquery-gmaps-latlon-picker.css');
        $text = '
		The below accepts many different formats of locations:
		<ul>
			<li>Zip Codes</li>
			<li>City, State</li>
			<li>City, Country</li>
			<li>State</li>
			<li>.. etc.</li>
		</ul>

		You can also fine tune your location by dragging and double clicking the map.
		<br /><br />
		<fieldset class="gllpLatlonPicker">
			<input type="text" class="gllpSearchField">
			<input type="button" class="gllpSearchButton" value="Search">
			<div class="gllpMap">Google Maps</div>
			Latitude: <input type="text" class="gllpLatitude" value="-76.61483160837915">
			<br />
			Longitude: <input type="text" class="gllpLongitude" value="19.218757152557373">
			<input type="hidden" class="gllpZoom" value="3">
		</fieldset>
		<br /><br />
		For your Fallback Location you need Latitude,Longitude in that exact format.<br /><br />

		This page will be updated to work, flow, and look better in the future.
		';
        return $text;
    }
Example #10
0
    $template = e107::getCoreTemplate('usersettings', '', true, true);
    // always merge
    $USERSETTINGS_MESSAGE = "{MESSAGE}";
    $USERSETTINGS_MESSAGE_CAPTION = LAN_OK;
    $USERSETTINGS_EDIT_CAPTION = LAN_USET_39;
    // 'Update User Settings'
    $USERSETTINGS_EDIT = $template['edit'];
    $usersettings_shortcodes = e107::getScBatch('usersettings');
    $usersettings_shortcodes->wrapper('usersettings/edit');
} else {
    include_once e107::coreTemplatePath('usersettings');
    //correct way to load a core template.
    e107::scStyle($sc_style);
    $usersettings_shortcodes = e107::getScBatch('usersettings');
}
e107::js('footer-inline', "\n\tfunction addtext_us(sc)\n\t{\n\t\tdocument.getElementById('dataform').image.value = sc;\n\t}\n\t");
$photo_to_delete = '';
$avatar_to_delete = '';
$ue_fields = '';
$promptPassword = false;
$error = FALSE;
$extraErrors = array();
$eufVals = array();
$savePassword = '';
$inp = USERID;
// Initially assume that user is modifying their own data.
$_uid = false;
// FALSE if user modifying their own data; otherwise ID of data being modified
$adminEdit = FALSE;
// FALSE if editing own data. TRUE if admin edit
if (is_numeric(e_QUERY)) {
Example #11
0
        $script .= $custom_var;
    }
    if (!empty($url_custom)) {
        $script .= 'ga("set", "page", ' . $url_custom . ');';
    }
    $script .= 'ga("send", "pageview");';
    if (!empty($message_events)) {
        $script .= $message_events;
    }
    if ((int) varset($prefs['track_adsense'], 0)) {
        // Custom tracking. Prepend before all other JavaScript.
        // @TODO: https://support.google.com/adsense/answer/98142
        // sounds like it could be appended to $script.
        e107::js('inline', $googleanalytics_adsense_script, null, 1);
    }
    e107::js('inline', $script, null, 2);
}
/**
 * Based on visibility setting this function returns TRUE if GA code should be added to the current user class and
 * otherwise FALSE.
 */
function google_analytics_visibility_roles()
{
    $prefs = e107::getPlugConfig('google_analytics')->getPref();
    $class = (int) varset($prefs['visibility_roles'], 0);
    return check_class($class);
}
/**
 * Based on visibility setting this function returns TRUE if GA code should be added to the current page and otherwise
 * FALSE.
 */
Example #12
0
File: faqs.php Project: armpit/e107
 function view_all_query($srch = '')
 {
     $sql = e107::getDb();
     $tp = e107::getParser();
     $text = "";
     $insert = "";
     $item = false;
     $removeUrl = e107::url('faqs', 'index');
     if (!empty($srch)) {
         $srch = $tp->toDB($srch);
         $insert = " AND (f.faq_question LIKE '%" . $srch . "%' OR f.faq_answer LIKE '%" . $srch . "%' OR FIND_IN_SET ('" . $srch . "', f.faq_tags) ) ";
         $message = "<span class='label label-lg label-info'>" . $srch . " <a class='e-tip' title='Remove' href='" . $removeUrl . "'>×</a></span>";
         e107::getMessage()->setClose(false, E_MESSAGE_INFO)->setTitle(LAN_FAQS_FILTER_ACTIVE, E_MESSAGE_INFO)->addInfo($message);
         $text = e107::getMessage()->render();
     }
     if (!empty($_GET['id'])) {
         $srch = intval($_GET['id']);
         //	$insert = " AND (f.faq_id = ".$srch.") ";
         $item = $srch;
     }
     if (!empty($_GET['cat'])) {
         $srch = $tp->toDB($_GET['cat']);
         $insert = " AND (cat.faq_info_sef = '" . $srch . "') ";
     }
     if (!empty($_GET['tag'])) {
         $srch = $tp->toDB($_GET['tag']);
         $insert = " AND FIND_IN_SET ('" . $srch . "', f.faq_tags)  ";
         $message = "<span class='label label-lg label-info'>" . $srch . " <a class='e-tip' title='Remove' href='" . $removeUrl . "'>×</a></span>";
         e107::getMessage()->setClose(false, E_MESSAGE_INFO)->setTitle(LAN_FAQS_FILTER_ACTIVE, E_MESSAGE_INFO)->addInfo($message);
         $text = e107::getMessage()->render();
     }
     list($orderBy, $ascdesc) = explode('-', vartrue($this->pref['orderby'], 'faq_order-ASC'));
     $query = "SELECT f.*,cat.* FROM #faqs AS f LEFT JOIN #faqs_info AS cat ON f.faq_parent = cat.faq_info_id WHERE cat.faq_info_class IN (" . USERCLASS_LIST . ") " . $insert . " ORDER BY cat.faq_info_order, f." . $orderBy . " " . $ascdesc . " ";
     if (!$sql->gen($query)) {
         $message = !empty($srch) ? "<b>" . $srch . "</b> was not found in search results. <a class='e-tip' title='Reset' href='" . $removeUrl . "'>Reset</a>" : LAN_FAQS_NONE_AVAILABLE;
         return "<div class='alert alert-warning alert-block'>" . $message . "</div>";
         //TODO LAN
     }
     // -----------------
     $FAQ_LISTALL = e107::getTemplate('faqs', true, 'all');
     $prevcat = "";
     $sc = e107::getScBatch('faqs', true);
     $sc->counter = 1;
     $sc->tag = htmlspecialchars($tag, ENT_QUOTES, 'utf-8');
     $sc->category = $category;
     if (!empty($_GET['id'])) {
         $sc->item = intval($_GET['id']);
         $js = "\n\t\t\t\t\$( document ).ready(function() {\n                    \$('html, body').animate({ scrollTop:  \$('div#faq_" . $sc->item . "').offset().top - 300 }, 4000);\n\t\t\t\t});\n\n\t\t\t\t";
         e107::js('footer-inline', $js);
     }
     //	$text = $tp->parseTemplate($FAQ_START, true, $sc);
     //	$text = "";
     if ($this->pref['list_type'] == 'ol') {
         $reversed = $ascdesc == 'DESC' ? 'reversed ' : '';
         $tsrch = array('<ul ', '/ul>');
         $trepl = array('<ol ' . $reversed, '/ol>');
         $FAQ_LISTALL['start'] = str_replace($tsrch, $trepl, $FAQ_LISTALL['start']);
         $FAQ_LISTALL['end'] = str_replace($tsrch, $trepl, $FAQ_LISTALL['end']);
     }
     while ($rw = $sql->fetch()) {
         $rw['faq_sef'] = eHelper::title2sef($tp->toText($rw['faq_question']), 'dashl');
         $sc->setVars($rw);
         if ($sc->item == $rw['faq_id']) {
             $this->pageTitle = $rw['faq_question'];
             $this->pageDescription = $rw['faq_answer'];
         }
         if ($rw['faq_info_order'] != $prevcat) {
             if ($prevcat != '') {
                 $text .= $tp->parseTemplate($FAQ_LISTALL['end'], true, $sc);
             }
             $text .= "\n\n<!-- FAQ Start " . $rw['faq_info_order'] . "-->\n\n";
             $text .= $tp->parseTemplate($FAQ_LISTALL['start'], true, $sc);
             $start = TRUE;
         }
         $text .= $tp->parseTemplate($FAQ_LISTALL['item'], true, $sc);
         $prevcat = $rw['faq_info_order'];
         $sc->counter++;
     }
     $text .= $start ? $tp->parseTemplate($FAQ_LISTALL['end'], true, $sc) : "";
     //		$text .= $tp->parseTemplate($FAQ_END, true, $sc);
     return $text;
 }
Example #13
0
require_once '../class2.php';
/*
@todo should this be here?
if(count($_POST) && !varset($_POST['e-token']))
{
	die('Access denied - bl');
}
*/
if (!getperms('4')) {
    header('location:' . e_BASE . 'index.php');
    exit;
}
require_once e_HANDLER . 'iphandler_class.php';
// This is probably already loaded in class2.php
include_lan(e_LANGUAGEDIR . e_LANGUAGE . '/admin/lan_' . e_PAGE);
e107::js('footer-inline', "\n\n\t\t\$('#useip').click(function (event) {\n\n\t\t\tvar id = \$(this).attr('data-ip');\n\t\t\t\$('#banlist-ip').val(id);\n\t\t\tevent.preventDefault();\n\t\t});\n\n\n");
class banlist_admin extends e_admin_dispatcher
{
    protected $modes = array('main' => array('controller' => 'banlist_ui', 'path' => null, 'ui' => 'banlist_form_ui', 'uipath' => null), 'white' => array('controller' => 'banlist_ui', 'path' => null, 'ui' => 'banlist_form_ui', 'uipath' => null), 'failed' => array('controller' => 'failed_ui', 'path' => null, 'ui' => 'failed_form_ui', 'uipath' => null));
    protected $adminMenu = array('main/list' => array('caption' => "Blacklist", 'perm' => '4'), 'main/create' => array('caption' => "Add to Blacklist", 'perm' => '4'), 'other' => array('divider' => true), 'white/list' => array('caption' => BANLAN_52, 'perm' => '4'), 'white/create' => array('caption' => BANLAN_53, 'perm' => '4'), 'other1' => array('divider' => true), 'failed/list' => array('caption' => 'Failed logins', 'perm' => '4'), 'other2' => array('divider' => true), 'main/transfer' => array('caption' => BANLAN_35, 'perm' => '4'), 'main/times' => array('caption' => BANLAN_15, 'perm' => '0'), 'main/options' => array('caption' => LAN_OPTIONS, 'perm' => '0'));
    protected $adminMenuAliases = array('main/edit' => 'main/list');
    protected $menuTitle = BANLAN_16;
}
class banlist_ui extends e_admin_ui
{
    protected $pluginTitle = BANLAN_16;
    protected $eventName = 'ban';
    protected $table = 'banlist';
    protected $pid = 'banlist_id';
    protected $perPage = 10;
    protected $listQry = "SELECT * FROM `#banlist` WHERE banlist_bantype != 100 ";
Example #14
0
    {
    	var b64pad  = \"=\"; //  base-64 pad character. \"=\" for strict RFC compliance  
    	var tab = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";
    	var output = \"\";
    	var len = input.length;
    	for(var i = 0; i < len; i += 3)
    	{
    		var triplet = (input.charCodeAt(i) << 16)
                    | (i + 1 < len ? input.charCodeAt(i+1) << 8 : 0)
                    | (i + 2 < len ? input.charCodeAt(i+2)      : 0);
    		for(var j = 0; j < 4; j++)
    		{
    			if(i * 8 + j * 6 > input.length * 8) output += b64pad;
    			else output += tab.charAt((triplet >>> 6*(3-j)) & 0x3F);
    		}
    	}
    	return output;
    }
    var ref=\"\"+escape(top.document.referrer);
    var colord = window.screen.colorDepth;
    var res = window.screen.width + \"x\" + window.screen.height;
    var logString = 'referer=' + ref + '&colour=' + colord + '&eself=' + eself + '&res=' + res + '".$err_flag."';
    logString = rstr2b64(logString);
    document.write('<link rel=\"stylesheet\" type=\"text/css\" href=\"".e_PLUGIN_ABS."log/log.php?lv='+logString + '\">' );
    ";
    */
    if (USER_AREA) {
        $logJS = "\r\n\r\n\t\t\$(function() {\r\n\r\n\t\t\tfunction rstr2b64(input)\r\n\t\t\t{\r\n\t\t\t\tvar b64pad  = \"=\"; /* base-64 pad character. \"=\" for strict RFC compliance   */\r\n\t\t\t\tvar tab = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\r\n\t\t\t\tvar output = \"\";\r\n\t\t\t\tvar len = input.length;\r\n\t\t\t\tfor(var i = 0; i < len; i += 3)\r\n\t\t\t\t{\r\n\t\t\t\t\tvar triplet = (input.charCodeAt(i) << 16)\r\n\t\t\t                | (i + 1 < len ? input.charCodeAt(i+1) << 8 : 0)\r\n\t\t\t                | (i + 2 < len ? input.charCodeAt(i+2)      : 0);\r\n\t\t\t\t\tfor(var j = 0; j < 4; j++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(i * 8 + j * 6 > input.length * 8) output += b64pad;\r\n\t\t\t\t\t\telse output += tab.charAt((triplet >>> 6*(3-j)) & 0x3F);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn output;\r\n\t\t\t}\r\n\r\n\r\n\r\n\r\n\r\n\t\t\tvar ref\t\t\t=\"\"+escape(top.document.referrer);\r\n\t\t\tvar colord \t\t= window.screen.colorDepth;\r\n\t\t\tvar res \t\t= window.screen.width + \"x\" + window.screen.height;\r\n\t\t\tvar logString \t= 'referer=' + ref + '&colour=' + colord + '&eself=' + eself + '&res=' + res + '" . $err_flag . "';\r\n\t\t\tlogString \t\t= rstr2b64(logString);\r\n\r\n\t\t\tvar url = '" . SITEURLBASE . e_PLUGIN_ABS . "log/log.php';\r\n\t\t\tvar dataText = 'lv='+logString;\r\n\r\n\t\t\t\$.ajax({\r\n\t\t\t\ttype: 'get',\r\n\t\t\t\turl: url,\r\n\t\t\t\tdata: {'lv' :logString},\r\n\t\t\t\tsuccess: function(e) {\r\n\t\t\t\t\tif(e)\r\n\t\t\t\t\t{\r\n\t\t\t\t//\t\talert(e);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\t\t";
        e107::js('footer-inline', $logJS, 'jquery');
    }
}
Example #15
0
 /**
  * Include necessary CSS and JS files
  */
 function include_components()
 {
     e107::css('nodejs_online', 'css/nodejs_online.css');
     e107::js('footer', '{e_PLUGIN}nodejs_online/js/nodejs_online.js', 'jquery', 5);
 }
Example #16
0
/*
 * e107 website system
 *
 * Copyright (C) 2008-2009 e107 Inc (e107.org)
 * Released under the terms and conditions of the
 * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
 *
 *
 *
 * $URL$
 * $Id$
 */
if (!defined('e107_INIT')) {
    exit;
}
if (e_WYSIWYG || strpos(e_SELF, "tinymce/admin_config.php")) {
    if (e_PAGE != 'image.php') {
        e107::js('tinymce', 'tiny_mce.js', 'jquery');
        e107::js('tinymce', 'wysiwyg.php', 'jquery', 5);
    } else {
        e107::js('tinymce', 'tiny_mce_popup.js', 'jquery');
    }
    if (ADMIN) {
        define("SWITCH_TO_BB", "\$('#'+id).after('<div><a href=\"#\" id=\"' + id + '\" class=\"e-wysiwyg-toggle\">Switch to BBCODE</a></div>');");
    } else {
        define("SWITCH_TO_BB", "");
    }
    //	print_a($_POST);
    // <div><a href='#' class='e-wysiwyg-switch' onclick=\"tinyMCE.execCommand('mceToggleEditor',false,'".$tinyMceID."');expandit('".$toggleID."');\">Toggle WYSIWYG</a></div>
    e107::js('inline', "\n\t\n\t\$(function() {\n\t\t\n\t\t\t\$('.e-wysiwyg').each(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tvar id = \$(this).attr('id'); // 'e-wysiwyg';\n\t\t\t\t" . SWITCH_TO_BB . "\n\t\t    //\talert(id);\n\t\t     \t\$('#bbcode-panel-'+id+'--preview').hide();\n\t\t       \t\t\t\n\t\t\t});\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t// When new tab is added - convert textarea to TinyMce. \n\t\t\t\$('.e-tabs-add').on('click',function(){\n\t\t\t\t\n\t\t\t\talert('New Page Added'); // added for delay - quick and dirty work-around. XXX fixme\n\t\t\t\t\n\t\t\t\tvar idt = \$(this).attr('data-target'); // eg. news-body\t\n\t\t\t\tvar ct = parseInt(\$('#e-tab-count').val());\n\t\t\t\tvar id = idt + '-' + ct;\n\t\t\t\t\$('#bbcode-panel-'+id+'--preview').hide();\n\t\t\t\t" . SWITCH_TO_BB . "\n\t\t\t\ttinyMCE.execCommand('mceAddControl', false, id);\n\t\t\t});\n\t\t\t\t\n\t\t\t\t\n\t\t \t\$('a.e-wysiwyg-toggle').toggle(function(){\n\t\t \t\t\tvar id = \$(this).attr('id'); // eg. news-body\t\n\t\t \t\t\t\$('#bbcode-panel-'+id+'--preview').show();\n\t\t \t\t\t\$(this).text('Switch to WYSIWYG');\n\t\t           tinyMCE.execCommand('mceRemoveControl', false, id);\n\t\t\t}, function () {\n\t\t\t\t\t var id = \$(this).attr('id');\n\t\t\t\t\t \$('#bbcode-panel-'+id+'--preview').hide();\n\t\t\t\t\t \$(this).text('Switch to BBCODE');\n\t\t            tinyMCE.execCommand('mceAddControl', false, id);\n\t\t\t});\t\n\t\t\t\n\t\t\t\$('.e-dialog-save').click(function(){\n\t\t\t\t\n\t\t\t\tvar html = \$('#html_holder').val();\t\n\t\t\t//\ttinyMCE.execCommand('mceInsertContent',false,html);\n\t\t\t\ttinyMCE.execCommand('mceInsertRawHTML',false,html);\n\t\t\t\ttinyMCEPopup.close();\n\t\t\t});\n\t\t\t\n\t\t\n\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t});\n\t\n\t\n\t\n\t\n\t", "jquery");
}
Example #17
0
 function init()
 {
     if (E107_DEBUG_LEVEL > 0) {
         $this->fields['media_url']['inline'] = true;
     }
     $sql = e107::getDb();
     //	$sql->db_Select_gen("SELECT media_cat_title, media_title_nick FROM #core_media as m LEFT JOIN #core_media_cat as c ON m.media_category = c.media_cat_owner GROUP BY m.media_category");
     $sql->gen("SELECT media_cat_title, media_cat_owner, media_cat_category FROM `#core_media_cat`");
     while ($row = $sql->fetch()) {
         $cat = $row['media_cat_category'];
         $owner = $row['media_cat_owner'];
         $this->owner[$owner] = $owner;
         $this->ownercats[$owner . '|' . $cat] = $row['media_cat_title'];
         $this->cats[$cat] = $row['media_cat_title'];
     }
     asort($this->cats);
     $tmp = $sql->retrieve('core_media', 'media_type', 'media_type !="" GROUP BY media_type', true);
     $mimeTypes = array();
     foreach ($tmp as $val) {
         $id = $val['media_type'];
         $mimeTypes[$id] = $id;
     }
     asort($mimeTypes);
     $this->fields['media_category']['writeParms'] = $this->cats;
     $this->fields['media_type']['writeParms'] = $mimeTypes;
     $pref = e107::getPref();
     $tp = e107::getParser();
     $fl = e107::getFile();
     $path = e_THEME . $pref['sitetheme'] . "/fonts/";
     $fDir = $fl->get_files(e_THEME . $pref['sitetheme'] . "/fonts/", ".ttf", '', 2);
     $fonts = array(0 => 'None');
     foreach ($fDir as $f) {
         $id = $tp->createConstants($f['path'] . $f['fname'], 'rel');
         $fonts[$id] = $f['fname'];
     }
     $this->prefs['watermark_font']['writeParms'] = $fonts;
     $this->prefs['watermark_font']['readParms'] = $fonts;
     $wm_pos = array('BR' => "Bottom Right", 'BL' => "Bottom Left", 'TR' => "Top Right", 'TL' => "Top Left", 'C' => "Center", 'R' => "Right", 'L' => "Left", 'T' => "Top", 'B' => "Bottom", '*' => "Tile");
     $this->prefs['watermark_pos']['writeParms'] = $wm_pos;
     $this->prefs['watermark_pos']['readParms'] = $wm_pos;
     e107::getCache()->clearAll('image');
     //	print_a($_GET);
     if ($this->getAction() == 'youtube') {
         $parm = array('search' => $_GET['search']);
         echo $this->videoTab($parm);
         exit;
     }
     if ($this->getAction() == 'glyph') {
         $parm = array('search' => $_GET['search']);
         echo $this->glyphTab($parm);
         exit;
     }
     if ($this->getAction() == 'nav') {
         //echo $this->navPage();\
         //	$this->getResponse()->setIframeMod(); // disable header/footer menus etc.
         //	print_a($_GET);
     }
     if (varset($_POST['batch_import_selected'])) {
         $this->batchImport();
     }
     if (varset($_POST['batch_import_delete'])) {
         $this->batchDelete();
     }
     if (varset($_POST['update_options'])) {
         $this->updateSettings();
     }
     // filepicker stuff.
     if ($this->getQuery('mode') == 'dialog') {
         if (!ADMIN) {
             exit;
         }
     }
     if ($this->getQuery('iframe')) {
         e107::js('tinymce4', 'plugins/compat3x/tiny_mce_popup.js');
         $this->getResponse()->setIframeMod();
         // disable header/footer menus etc.
         if (!$this->getQuery('for')) {
             $this->setPosted('media_category', "_common");
             $this->getModel()->set('media_category', "_common");
         } elseif ($this->getMediaCategory($this->getQuery('for'))) {
             $this->setPosted('media_category', $this->getQuery('for'));
             if (!$this->getId()) {
                 $this->getModel()->set('media_category', $this->getQuery('for'));
             }
         }
     }
 }
Example #18
0
    function password($name, $value = '', $maxlength = 50, $options = array())
    {
        if (is_string($options)) {
            parse_str($options, $options);
        }
        $addon = "";
        $gen = "";
        if (vartrue($options['generate'])) {
            $gen = '&nbsp;<a href="#" class="btn btn-default btn-small e-tip" id="Spn_PasswordGenerator" title="Generate a password">Generate</a> ';
            if (empty($options['nomask'])) {
                $gen .= '<a class="btn btn-default btn-small e-tip" href="#" id="showPwd" title="Display the password">Show</a><br />';
            }
        }
        if (vartrue($options['strength'])) {
            $addon .= "<div style='margin-top:4px'><div  class='progress' style='float:left;display:inline-block;width:218px'><div class='progress-bar bar' id='pwdMeter' style='width:0%' ></div></div> <div id='pwdStatus' class='smalltext' style='float:left;display:inline-block;width:150px;margin-left:5px'></span></div>";
        }
        $options['pattern'] = vartrue($options['pattern'], '[\\S]{4,}');
        $options['required'] = varset($options['required'], 1);
        $options['class'] = vartrue($options['class'], 'e-password');
        e107::js('core', 'password/jquery.pwdMeter.js', 'jquery', 2);
        e107::js('footer-inline', '
			$(".e-password").pwdMeter({
	            minLength: 6,
	            displayGeneratePassword: true,
	            generatePassText: "Generate",
	            randomPassLength: 12
	        });
	    ');
        if (deftrue('BOOTSTRAP') == 3) {
            $options['class'] .= ' form-control';
        }
        if (vartrue($options['size']) && !is_numeric($options['size'])) {
            $options['class'] .= " input-" . $options['size'];
            unset($options['size']);
            // don't include in html 'size='.
        }
        $type = empty($options['nomask']) ? 'password' : 'text';
        $options = $this->format_options('text', $name, $options);
        //never allow id in format name-value for text fields
        $text = "<input type='" . $type . "' name='{$name}' value='{$value}' maxlength='{$maxlength}'" . $this->get_attributes($options, $name) . " />";
        if (empty($gen) && empty($addon)) {
            return $text;
        } else {
            return "<span class='form-inline'>" . $text . $gen . "</span>" . vartrue($addon);
        }
    }
Example #19
0
<?php

define("e_ADMIN_AREA", true);
require_once "../../../../class2.php";
//e107::lan('core','admin',TRUE);
define("e_IFRAME", true);
//require_once(e_ADMIN."auth.php");
if (!USER || check_class($pref['post_html']) == FALSE) {
    exit;
}
e107::css('inline', "\n\n\t.selectEmote \t\t{ display:inline-block; cursor:pointer;margin:3px }\n\tbody\t\t\t\t{ text-align:center }\n\t.area\t\t\t\t{  \n\t\t\t\t\t \t  margin-top:-1px; padding:20px; \n\t\t\t\t\t\t}\n\tspan.badge\t\t\t{ cursor: pointer }\n\tspan.label\t\t\t{ cursor: pointer }\n\tul.glyphicons\t\t{ list-style:none; margin-left:0px; font-size:120%}\n\tul.glyphicons  li\t{ float:left;  cursor:pointer; width:190px; padding:5px; }\n\ta, li\t\t\t\t\t{  outline: 0; }    \n\n");
e107::js('tinymce4', 'plugins/compat3x/tiny_mce_popup.js');
e107::js('inline', "\n\n\$(document).ready(function()\n{\n\t\t\$('#insertButton').click(function () {\n\t\t\t\t\t\t\n\t\t\tvar buttonType = \$('input:radio[name=buttonType]:checked').val();\n\t\t\tvar buttonSize = \$('input:radio[name=buttonSize]:checked').val();\n\t\t\t\t\t\n\t\t\tvar buttonText = \$('#buttonText').val();\n\t\t\tvar buttonUrl = \$('#buttonUrl').val();\n\t\t\t\n\t\t\tvar buttonClass = (buttonType != '') ? 'btn-'+buttonType : '';\n\t\t\t\t\t\n\n\t\t\tvar html = '<a class=\"btn ' + buttonClass + ' ' + buttonSize + '\" href=\"' + buttonUrl + '\" >' + buttonText + '</a>  ';\n\t\t//\talert(html);\t\t\n\t\t\ttinyMCEPopup.editor.execCommand('mceInsertContent', false, html);\n\t\t\ttinyMCEPopup.close();\n\t\t});\n\t\t\n\t\t\n\t\t\$('span.label, span.badge').click(function () {\n                var cls = \$(this).attr('class');\n                var html = '<span class=\"' + cls + '\">' + \$(this).text() + '</span>&nbsp;';\n\t\t\t\ttinyMCEPopup.editor.execCommand('mceInsertContent', false, html);\n\t\t\t\ttinyMCEPopup.close();\n\t\t});\n\t\t\n\t\n\t\t\$('ul.glyphicons li, #glyph-save').click(function () {\n\t\t\n\t\t\t\tvar color = \$('#glyph-color').val();\t\n\t\t\t\tvar custom = \$('#glyph-custom').val();\t\t\t\n                var cls = (custom != '') ? custom : \$(this).find('i').attr('class');\t\n\t\n                var html = '<i class=\"' + cls + '\"></i>&nbsp;';\n\t\t\t\t\n\t\t\t//\talert(html);\n\t\t\t\ttinyMCEPopup.editor.execCommand('mceInsertContent', false, html);\n\t\t\t\ttinyMCEPopup.close();\n\t\t});\n\t\n\t\t\$('#bbcodeInsert').click(function () \n\t\t{\n\t\t\t\ts = \$('#bbcodeValue').val();\n\t\t\t\ts = s.trim(s);\n\t\n\t\t\t\tvar html = \$.ajax({\n\t\t\t\t\ttype: 'POST',\n\t\t\t\t\turl: './parser.php',\n\t\t\t\t\tdata: { content: s, mode: 'tohtml' },\n\t\t\t\t\tasync       : false,\n\n\t\t\t\t\tdataType: 'html',\n\t\t\t\t\tsuccess: function(html) {\n\t\t\t\t      return html;\n\t\t\t\t    }\n\t\t\t\t}).responseText;\n\n\t\t\t\thtml = '<bbcode alt=\"'+encodeURIComponent(s)+'\">' + html + '</bbcode>   ' ;\nalert(html);\n\t\t\t\ttinyMCEPopup.editor.execCommand('mceInsertContent', false, html);\n\t\t\t\ttinyMCEPopup.close();\n\t\t});\n\t\n\t\t\$('a.bbcodeSelect').click(function () {\n\t\t\tvar html = \$(this).html();\t\n\t\t\t\$('#bbcodeValue').val(html);\n\t\t});\n\t\t\n\t\t\$('#e-cancel').click(function () {\n\t\t\t\t\t\n\t\t\ttinyMCEPopup.close();\n\t\t});\n\t\t\n});\n\n\n", 'jquery');
class e_bootstrap
{
    private $styleClasses = array('' => 'Default', 'primary' => "Primary", 'success' => "Success", 'info' => "Info", 'warning' => "Warning", 'danger' => "Danger", 'inverse' => "Inverse");
    function init()
    {
        $ns = e107::getRender();
        if (e_QUERY == 'bbcode') {
            echo $this->bbcodeForm();
            return;
        }
        $text = "<div class='alert alert-warning'>Warning: These will only work if you have a bootstrap-based theme installed</div>";
        $text .= '
		<ul class="nav nav-tabs">';
        $text .= '<li class="active" ><a href="#mbuttons" data-toggle="tab">Buttons</a></li>';
        $text .= '<li><a href="#badges" data-toggle="tab">Labels &amp; Badges</a></li>';
        $text .= '<li><a href="#glyphs" data-toggle="tab">Glyphicons</a></li>';
        $text .= '</ul>';
        $text .= '<div class="tab-content">';
Example #20
0
// G final JS script keeps user and server time in sync.
//   It must be the last thing created before sending the page to the user.
//
// see e107.js and class2.php
// This must be done as late as possible in page processing.
$_serverTime = time();
$lastSet = isset($_COOKIE['e107_tdSetTime']) ? $_COOKIE['e107_tdSetTime'] : 0;
$_serverPath = e_HTTP;
$_serverDomain = deftrue('MULTILANG_SUBDOMAIN') ? '.' . e_DOMAIN : '';
if (abs($_serverTime - $lastSet) > 120) {
    /* update time delay every couple of minutes.
     * Benefit: account for user time corrections and changes in internet delays
     * Drawback: each update may cause all server times to display a bit different
     */
    // echo "<script type='text/javascript'>\n";
    e107::js('footer-inline', "SyncWithServerTime('{$_serverTime}', '{$_serverPath}', '{$_serverDomain}');", 'prototype');
    //echo "SyncWithServerTime('{$_serverTime}', '{$_serverPath}', '{$_serverDomain}');
    //  </script>\n";
}
e107::getJs()->renderJs('footer_inline', true);
//
// H Final HTML
//
echo "</body></html>";
//
// I Send the buffered page data, along with appropriate headers
//
// SecretR - EXPERIMENT! SEND CSS data to header. Performance tests in progress.
$tmp = array();
$e_js = e107::getJs();
// Other CSS - from unknown location, different from core/theme/plugin location or backward compatibility
Example #21
0
 */
require_once "class2.php";
if (vartrue($_POST['email2'])) {
    exit;
}
$qs = explode(".", e_QUERY);
if ($qs[0] != 'activate') {
    // multi-language fix.
    e107::coreLan('signup');
    //include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/lan_'.e_PAGE);
    //	include_lan(e_LANGUAGEDIR.e_LANGUAGE."/lan_usersettings.php");		Shouldn't need this now
}
e107::coreLan('user');
// Generic user-related language defines
define('SIGNUP_DEBUG', FALSE);
e107::js('core', 'jquery.mailcheck.min.js', 'jquery', 2);
include_once e_HANDLER . 'user_extended_class.php';
$usere = new e107_user_extended();
require_once e_HANDLER . 'validator_class.php';
// require_once(e_HANDLER.'user_handler.php');
$userMethods = e107::getUserSession();
$userMethods->deleteExpired();
// Delete time-expired partial registrations
require_once e107::coreTemplatePath('signup');
//correct way to load a core template.
$signup_shortcodes = e107::getScBatch('signup');
// $facebook_shortcodes = e107::getScBatch('facebook',TRUE);
$signup_imagecode = $pref['signcode'] && extension_loaded('gd');
$text = '';
$extraErrors = array();
$error = FALSE;
Example #22
0
}
include_lan(e_LANGUAGEDIR . e_LANGUAGE . '/admin/lan_' . e_PAGE);
function js()
{
    //FIXME
    include_once e_LANGUAGEDIR . e_LANGUAGE . "/lan_user_extended.php";
    $text = "\n\n\n\t\tfunction changeHelp(type) {\n\t //<![CDATA[\n\t\tvar ftype;\n\t\tvar helptext;\n\n\n\t\t";
    for ($i = 1; $i <= 9; $i++) {
        $type_const = "UE_LAN_{$i}";
        $help_const = "\"" . str_replace("/", "\\/", "EXTLAN_HELP_{$i}") . "\"";
        $text .= "\n\t\t\t\tif(type == \"{$i}\")\n\t\t\t\t{\n\t\t\t\t\txtype=\"" . defset($type_const) . "\";\n\t\t\t\t\twhat=\"" . defset($help_const) . "\";\n\t\t\t\t}";
    }
    $text .= "\n\t\t//\tdocument.getElementById('ue_type').innerHTML=''+xtype+'';\n\t\t//\tdocument.getElementById('ue_help').innerHTML=''+what+'';\n\n\t\t\tif(type == 4){\n\t\t\t\tdocument.getElementById('db_mode').style.display = '';\n\t\t\t\tdocument.getElementById('values').style.display = 'none';\n\t\t\t}else{\n\t            document.getElementById('values').style.display = '';\n\t\t\t\tdocument.getElementById('db_mode').style.display = 'none';\n\t\t\t}\n\t\t\t   // ]]>\n\t\t}\n\n\n";
    return $text;
}
e107::js('inline', js());
if (E107_DEBUG_LEVEL > 0) {
    class user_extended_adminArea extends e_admin_dispatcher
    {
        protected $modes = array('main' => array('controller' => 'user_extended_struct_ui', 'path' => null, 'ui' => 'user_extended_struct_form_ui', 'uipath' => null));
        protected $adminMenu = array('main/list' => array('caption' => LAN_MANAGE, 'perm' => 'P'), 'main/create' => array('caption' => LAN_CREATE, 'perm' => 'P'));
        protected $adminMenuAliases = array('main/edit' => 'main/list');
        protected $menuTitle = 'user_extended';
    }
    class user_extended_struct_ui extends e_admin_ui
    {
        protected $pluginTitle = 'user_extended';
        protected $pluginName = 'user_extended';
        //	protected $eventName		= 'user_extended-user_extended_struct'; // remove comment to enable event triggers in admin.
        protected $table = 'user_extended_struct';
        protected $pid = 'user_extended_struct_id';
Example #23
0
    $js_body_onload[] = THEME_ONLOAD;
}
$body_onload = '';
if (count($js_body_onload)) {
    $body_onload = " onload=\"" . implode(" ", $js_body_onload) . "\"";
}
//
// J: Send end of <head> and start of <body>
//
/*
 * Fire Event e107:loaded
 * core JS available only in Prototype front-end environment
 */
// e_css.php is removed
//\$('e-js-css').remove();
e107::js('inline', "\ndocument.observe('dom:loaded', function () {\ne107Event.trigger('loaded', null, document);\n});\n", 'prototype', 5);
e107::getJs()->renderJs('header_inline', 5);
e107::getJs()->renderCached('js');
echo "</head>\n";
// ---------- New in 2.0 -------------------------------------------------------
if (isset($LAYOUT) && is_array($LAYOUT)) {
    foreach ($LAYOUT as $key => $template) {
        if ($key == '_header_' || $key == '_footer_') {
            continue;
        }
        if (strpos($template, '{---}') !== false) {
            list($hd, $ft) = explode("{---}", $template);
            $HEADER[$key] = isset($LAYOUT['_header_']) ? $LAYOUT['_header_'] . $hd : $hd;
            $FOOTER[$key] = isset($LAYOUT['_footer_']) ? $ft . $LAYOUT['_footer_'] : $ft;
        } else {
            e107::getMessage()->addDebug('Missing "{---}" in $LAYOUT["' . $key . '"] ');
Example #24
0
    /**
     *	Date field with popup calendar // NEW in 0.8/2.0
     *
     * @param string $name the name of the field
     * @param integer $datestamp UNIX timestamp - default value of the field
     * @param array or str 
     * @example $frm->datepicker('my_field',time(),'type=date');
     * @example $frm->datepicker('my_field',time(),'type=datetime&inline=1');
     * @example $frm->datepicker('my_field',time(),'type=date&format=yyyy-mm-dd');
     * @example $frm->datepicker('my_field',time(),'type=datetime&format=MM, dd, yyyy hh:ii');
     * 
     * @url http://trentrichardson.com/examples/timepicker/
     */
    function datepicker($name, $datestamp = false, $options = null)
    {
        if (vartrue($options) && is_string($options)) {
            parse_str($options, $options);
        }
        $type = varset($options['type']) ? trim($options['type']) : "date";
        // OR  'datetime'
        $dateFormat = varset($options['format']) ? trim($options['format']) : e107::getPref('inputdate', '%Y-%m-%d');
        $ampm = preg_match("/%l|%I|%p|%P/", $dateFormat) ? 'true' : 'false';
        $value = null;
        if ($type == 'datetime' && !varset($options['format'])) {
            $dateFormat .= " " . e107::getPref('inputtime', '%H:%M:%S');
        }
        $dformat = e107::getDate()->toMask($dateFormat);
        $id = $this->name2id($name);
        $classes = array('date' => 'e-date', 'datetime' => 'e-datetime');
        if ($datestamp) {
            $value = is_numeric($datestamp) ? e107::getDate()->convert_date($datestamp, $dateFormat) : $datestamp;
            //date("d/m/Y H:i:s", $datestamp);
        }
        $text = "";
        //	$text .= 'dformat='.$dformat.'  defdisp='.$dateFormat;
        $class = isset($classes[$type]) ? $classes[$type] : "tbox e-date";
        $size = vartrue($options['size']) ? intval($options['size']) : 40;
        $required = vartrue($options['required']) ? "required" : "";
        $firstDay = vartrue($options['firstDay']) ? $options['firstDay'] : 0;
        $xsize = vartrue($options['size']) && !is_numeric($options['size']) ? $options['size'] : 'xlarge';
        if (vartrue($options['inline'])) {
            $text .= "<div class='{$class}' id='inline-{$id}' data-date-format='{$dformat}'  data-date-ampm='{$ampm}' data-date-firstday='{$firstDay}' ></div>\r\n\t\t\t\t<input  type='hidden' name='{$name}' id='{$id}' value='{$value}' data-date-format='{$dformat}'  data-date-ampm='{$ampm}' data-date-firstday='{$firstDay}' />\r\n\t\t\t";
        } else {
            $text .= "<input class='{$class} input-" . $xsize . " form-control' type='text' size='{$size}' name='{$name}' id='{$id}' value='{$value}' data-date-format='{$dformat}' data-date-ampm='{$ampm}'  data-date-language='" . e_LAN . "' data-date-firstday='{$firstDay}' {$required} />";
        }
        //	$text .= "ValueFormat: ".$dateFormat."  Value: ".$value;
        //	$text .= " ({$dformat}) type:".$dateFormat." ".$value;
        // Load it in the footer.
        e107::css('core', 'bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css', 'jquery');
        e107::js('core', 'bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js', 'jquery', 2);
        if (e_LANGUAGE !== 'English') {
            e107::js('footer-inline', e107::getDate()->buildDateLocale());
        }
        e107::js('footer-inline', '
			$("input.e-date").each(function() {
        		$(this).datetimepicker({
        			minView: "month",
        			maxView: "decade",
        			autoclose: true,
        			format: $(this).attr("data-date-format"),
        			weekStart: $(this).attr("data-date-firstday"),
        			language: $(this).attr("data-date-language")
        		 });
    		});

    		$("input.e-datetime").each(function() {
        		$(this).datetimepicker({
        			autoclose: true,
        			format: $(this).attr("data-date-format"),
        			weekStart: $(this).attr("data-date-firstday"),
        			showMeridian: $(this).attr("data-date-ampm"),
        			language: $(this).attr("data-date-language")
        		 });
    		});
    		');
        return $text;
    }
Example #25
0
File: theme.php Project: gitye/e107
<?php

/**
 * Bootstrap 3 Theme for e107 v2.x
 */
if (!defined('e107_INIT')) {
    exit;
}
define("BOOTSTRAP", 3);
define("FONTAWESOME", 4);
define('VIEWPORT', "width=device-width, initial-scale=1.0");
e107::js("url", "http://netdna.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js");
e107::css('url', 'http://netdna.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css');
e107::css('url', "http://netdna.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css");
e107::js("footer-inline", "\$('.e-tip').tooltip({container: 'body'})");
// activate bootstrap tooltips.
define('OTHERNEWS_COLS', false);
// no tables, only divs.
define('OTHERNEWS_LIMIT', 3);
// Limit to 3.
define('OTHERNEWS2_COLS', false);
// no tables, only divs.
define('OTHERNEWS2_LIMIT', 3);
// Limit to 3.
define('COMMENTLINK', e107::getParser()->toGlyph('fa-comment'));
define('COMMENTOFFSTRING', '');
define('PRE_EXTENDEDSTRING', '<br />');
/**
 * @param string $caption
 * @param string $text
 * @param string $id : id of the current render
Example #26
0
e107::css('gallery', 'gallery_style.css');
// Work-around for indent issue. see: https://github.com/twitter/bootstrap/issues/4890
e107::css('inline', "\r\n/* Gallery CSS */\r\n.thumbnails .span2:nth-child(6n+1) {\r\nmargin-left:0;\r\n}", 'jquery');
$prettyPhoto = <<<JS
\$(document).ready(function(){
    \$("a[data-gal^='prettyPhoto']").prettyPhoto(
\t    {
\t    \thook: 'data-gal',
\t    \ttheme: 'pp_default', /* pp_default , light_rounded , dark_rounded , light_square , dark_square ,facebook */
\t    \toverlay_gallery: false,
\t    \tdeeplinking: false
\t    }
    );
  });
JS;
e107::js('inline', $prettyPhoto, 'jquery');
require_once HEADERF;
class gallery
{
    private $catList = array();
    function __construct()
    {
        $this->catList = e107::getMedia()->getCategories('gallery');
        if (vartrue($_GET['cat']) && isset($this->catList[$_GET['cat']])) {
            $this->showImages($_GET['cat']);
        } else {
            $this->listCategories();
        }
    }
    function listCategories()
    {
Example #27
0
 function renderFilter($current_query = array(), $location = '', $input_options = array())
 {
     if (!$input_options) {
         $input_options = array('size' => 20);
     }
     if (!$location) {
         $location = 'main/list';
         //default location
     }
     $l = e107::getParser()->post_toForm(explode('/', $location));
     if (!is_array($input_options)) {
         parse_str($input_options, $input_options);
     }
     $input_options['id'] = false;
     $input_options['class'] = 'tbox input-text filter ';
     $controller = $this->getController();
     $filter_pre = vartrue($controller->preFiliterMarkup);
     $filter_post = vartrue($controller->postFiliterMarkup);
     $filter_preserve_var = array();
     // method requires controller - stanalone advanced usage not possible
     if ($this->getController()) {
         $get = $this->getController()->getQuery();
         foreach ($get as $key => $value) {
             if ($key == 'searchquery' || $key == 'filter_options' || $key == 'etrigger_filter') {
                 continue;
             }
             $key = preg_replace('/[^\\w]/', '', $key);
             $filter_preserve_var[] = $this->hidden($key, rawurlencode($value));
         }
     } else {
         $filter_preserve_var[] = $this->hidden('mode', $l[0]);
         $filter_preserve_var[] = $this->hidden('action', $l[1]);
     }
     $text = "\n\t\t\t<form method='get' action='" . e_SELF . "'>\n\t\t\t\t<fieldset id='admin-ui-list-filter' class='e-filter'>\n\t\t\t\t\t<legend class='e-hideme'>" . LAN_LABEL_LABEL_SELECTED . "</legend>\n\t\t\t\t\t" . $filter_pre . "\n\t\t\t\t\t<div class='row-fluid'>\n\t\t\t\t\t\t<div  class='left form-inline span8 col-md-8' >\n\t\t\t\t\t\t\t<span class='form-group has-feedback has-feedback-left'>\n\t\t\t\t\t\t\t\t" . $this->text('searchquery', $current_query[0], 50, $input_options) . "\n\t\t\t\t\t\t\t\t<i class='fa fa-search searchquery form-control-feedback form-control-feedback-left'></i>\n\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t" . $this->select_open('filter_options', array('class' => 'form-control e-tip tbox select filter', 'id' => false, 'title' => 'Filter the results below')) . "\n\t\t\t\t\t\t\t\t" . $this->option(LAN_FILTER_LABEL_DISPLAYALL, '') . "\n\t\t\t\t\t\t\t\t" . $this->option(LAN_FILTER_LABEL_CLEAR, '___reset___') . "\n\t\t\t\t\t\t\t\t" . $this->renderBatchFilter('filter', $current_query[1]) . "\n\t\t\t\t\t\t\t" . $this->select_close() . "\n\t\t\t\t\t\t\t<div class='e-autocomplete'></div>\n\t\t\t\t\t\t\t" . implode("\n", $filter_preserve_var) . "\n\t\t\t\t\t\t\t" . $this->admin_button('etrigger_filter', 'etrigger_filter', 'filter e-hide-if-js', LAN_FILTER, array('id' => false)) . "\n\t\t\t\t\t\t\t<span class='indicator' style='display: none;'>\n\t\t\t\t\t\t\t\t<img src='" . e_IMAGE_ABS . "generic/loading_16.gif' class='icon action S16' alt='" . LAN_LOADING . "' />\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div id='admin-ui-list-db-language' class='span4 col-md-4 text-right' >";
     // Let Admin know which language table is being saved to. (avoid default table overwrites)
     $text .= $this->renderLanguageTableInfo();
     $text .= "\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t" . $filter_post . "\n\t\t\t\t</fieldset>\n\t\t\t</form>\n\t\t";
     e107::js('core', 'scriptaculous/controls.js', 'prototype', 2);
     //TODO - external JS
     e107::js('footer-inline', "\n\t\n\t            //autocomplete fields\n\t             \$\$('input[name=searchquery]').each(function(el, cnt) {\n\t\t\t\t \tif(!cnt) el.activate();\n\t\t\t\t\telse return;\n\t\t\t\t\tnew Ajax.Autocompleter(el, el.next('div.e-autocomplete'), '" . e_SELF . "?mode=" . $l[0] . "&action=filter', {\n\t\t\t\t\t  paramName: 'searchquery',\n\t\t\t\t\t  minChars: 2,\n\t\t\t\t\t  frequency: 0.5,\n\t\t\t\t\t  afterUpdateElement: function(txt, li) {\n\t\t\t\t\t  \tvar cfrm = el.up('form'), cont = cfrm.next('.e-container');\n\t\t\t\t\t\tif(!cont) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t  \tcfrm.submitForm(cont);\n\t\t\t\t\t  },\n\t\t\t\t\t  indicator:  el.next('span.indicator'),\n\t\t\t\t\t  parameters: 'ajax_used=1'\n\t\t\t\t\t});\n\t\t\t\t\tvar sel = el.next('select.filter');\n\t\t\t\t\tif(sel) {\n\t\t\t\t\t\tsel.observe('change', function (e) {\n\t\t\t\t\t\t\tvar cfrm = e.element().up('form'), cont = cfrm.next('.e-container');\n\t\t\t\t\t\t\tif(cfrm && cont && e.element().value != '___reset___') {\n\t\t\t\t\t\t\t\te.stop();\n\t\t\t\t\t\t\t\tcfrm.submitForm(cont);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\te107Helper.selectAutoSubmit(e.element());\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t", 'prototype');
     // TODO implement ajax queue
     // FIXME - dirty way to register events after ajax update - DO IT RIGHT - see all.jquery, create object
     // and use handler, re-register them global after ajax update (context)
     e107::js('footer-inline', "\n\t\t\tvar filterRunning = false, request;\n\t\t\tvar applyAfterAjax = function(context) {\n\t\t\t\t\$('.e-hideme', context).hide();\n\t\t\t\t\$('.e-expandit', context).show();\n\t\t      \t\$('.e-expandit', context).click(function () {\n\t\t       \t\tvar href = (\$(this).is('a')) ? \$(this).attr('href') : '';\n\t\t       \t\tif(href == '' && \$(this).attr('data-target'))\n\t\t       \t\t{\n\t\t       \t\t\thref = '#' + \$(this).attr('data-target');\t\n\t\t       \t\t}\n\t\t\t\t\tif(href === '#' || href == '') \n\t\t\t\t\t{\n\t\t\t\t\t\tidt = \$(this).nextAll('div');\t\n\t\t\t\t\t\t\$(idt).toggle('slow');\n\t\t\t\t\t\t return true;\t\t\t\n\t\t\t\t\t}\n\t\t       \t\t//var id = \$(this).attr('href');   \t\t\n\t\t\t\t\t\$(href).toggle('slow');\n\t\t\t\t\treturn false;\n\t\t\t\t}); \n\t\t\t\t\$('input.toggle-all', context).click(function(evt) {\n\t\t\t\t\tvar selector = 'input[type=\"checkbox\"].checkbox';\n\t\t\t\t\tif(\$(this).val().startsWith('jstarget:')) {\n\t\t\t\t\t\tselector = 'input[type=\"checkbox\"][name^=\"' + \$(this).val().split(/jstarget\\:/)[1] + '\"]';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(\$(this).is(':checked')){\n\t\t\t\t\t\t\$(selector).attr('checked', 'checked');\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t\$(selector).removeAttr('checked');\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t};\n\t\t\tvar searchQueryHandler = function (e) {\n\t\t\t\tvar el = \$(this), frm = el.parents('form'), cont = frm.nextAll('.e-container');\n\t\t\t\tif(cont.length < 1 || frm.length < 1 || (el.val().length > 0 && el.val().length < 3)) return;\n\t\t\t\te.preventDefault();\n\t\t\t\t\n\t\t\t\tif(filterRunning && request) request.abort();\n\t\t\t\tfilterRunning = true;\n\t\t\t\t\n\t\t\t\tcont.css({ opacity: 0.5 });\n\t\t\t\t\n\t\t\t\trequest = \$.get(frm.attr('action'), frm.serialize(), function(data){\n\t\t\t\t\tfilterRunning = false;\n\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\tif(filterRunning) {\n\t\t\t\t\t\t\t//cont.css({ opacity: 1 });\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcont.html(data).css({ opacity: 1 });\n\t\t\t\t\t\tapplyAfterAjax(cont);\n\t\t\t\t\t}, 700);\n\t\t\t\t}, 'html')\n\t\t\t\t.error(function() {\n\t\t\t\t\tfilterRunning = false;\n\t\t\t\t\tcont.css({ opacity: 1 });\n\t\t\t\t});\n\t\t\t};\n\t\t\t\$('#searchquery').on('keyup', searchQueryHandler);\n\t\t", 'jquery');
     return $text;
 }
Example #28
0
				window.onload = function () {

				$("textarea.e-wysiwyg").css("display","block");
				$("textarea.e-wysiwyg").css("visibility","inherit");

				}
			');
        }
    } else {
        e107::js('tinymce4', 'plugins/compat3x/tiny_mce_popup.js');
        //	e107::js('tinymce','tiny_mce_popup.js','jquery');
    }
    if (ADMIN) {
        $insert = "\$('#'+id).after('<div>";
        $insert .= "<a href=\"#\" id=\"' + id + '\" class=\"e-wysiwyg-toggle btn btn-xs btn-default btn-inverse btn-mini\">Switch to bbcode<\\/a>";
        if (e_PAGE == 'mailout.php') {
            $insert .= "&nbsp;&nbsp;<a href=\"#\" class=\"btn btn-mini tinyInsert\" data-value=\"|USERNAME|\" >" . LAN_MAILOUT_16 . "<\\/a>";
            $insert .= "<a href=\"#\" class=\"btn btn-mini tinyInsert\"     data-value=\"|DISPLAYNAME|\" >" . LAN_MAILOUT_14 . "<\\/a>";
            $insert .= "<a href=\"#\" class=\"btn btn-mini tinyInsert\"     data-value=\"|SIGNUP_LINK|\" >" . LAN_MAILOUT_17 . "<\\/a>";
            $insert .= "<a href=\"#\" class=\"btn btn-mini tinyInsert\"     data-value=\"|USERID|\" >" . LAN_MAILOUT_18 . "<\\/a>";
        }
        $insert .= "</div>');";
        define("SWITCH_TO_BB", $insert);
    } else {
        define("SWITCH_TO_BB", "");
    }
    //	print_a($_POST);
    // <div><a href='#' class='e-wysiwyg-switch' onclick=\"tinyMCE.execCommand('mceToggleEditor',false,'".$tinyMceID."');expandit('".$toggleID."');\">Toggle WYSIWYG</a></div>
    e107::js('footer-inline', "\n\n\t<!---- TinyMCE Footer Inline Code -->\n\n\t\$(function() {\n\n\n\t\t\t\$('.e-wysiwyg').each(function() {\n\n\t\t\t\tvar id = \$(this).attr('id'); // 'e-wysiwyg';\n\t\t\t\tconsole.log(id);\n\t\t\t\t" . SWITCH_TO_BB . "\n\t\t    //\talert(id);\n\t\t     \t\$('#bbcode-panel-'+id+'--preview').hide();\n\n\t\t\t});\n\n\t\t\t\$('.tinyInsert').click(function() {\n\n                var val = \$(this).attr('data-value');\n                top.tinymce.activeEditor.execCommand('mceInsertContent',0,val);\n                return false;\n            });\n\n\n\n         /*\n            \$('img.tinyInsertEmote').live('click',function() {\n\n                         var src = \$(this).attr('src');\n                  //         alert(src);\n                     //  var html = '<img src=\\''+src +'\\' alt=\\'emote\\' />';\n                       tinyMCE.execCommand('mceInsertRawHTML',false, 'hi there');\n                       ;\n                       \$('.mceContentBody', window.top.document).tinymce().execCommand('mceInsertContent',false,src);\n\n                      //   tinyMCE.selectedInstance.execCommand('mceInsertContent',0,src);\n\n                         \$('#uiModal').modal('hide');\n                         return true;\n                     });\n            */\n\n\n\n\n\t\t\t// When new tab is added - convert textarea to TinyMce.\n\t\t\t\$('.e-tabs-add').on('click',function(){\n\n\t\t\t\talert('New Page Added'); // added for delay - quick and dirty work-around. XXX fixme\n\n\t\t\t\tvar idt = \$(this).attr('data-target'); // eg. news-body\n\t\t\t\tvar ct = parseInt(\$('#e-tab-count').val());\n\t\t\t\tvar id = idt + '-' + ct;\n\t\t\t\t\$('#bbcode-panel-'+id+'--preview').hide();\n\t\t\t\t" . SWITCH_TO_BB . "\n\t\t\t\ttop.tinymce.activeEditor.execCommand('mceAddControl', false, id);\n\t\t\t});\n\n\n\t\t \t\$('a.e-wysiwyg-toggle').toggle(function(){\n\n\t\t \t\t\tvar id = \$(this).attr('id'); // eg. news-body\n\n\t\t \t\t\t\$('#bbcode-panel-'+id+'--preview').show();\n\t\t \t\t\t\$(this).text('Switch to wysiwyg');\n\n\t\t             tinymce.EditorManager.execCommand('mceRemoveEditor',true, id); //v4.x\n\n\t\t         //\ttinymce.remove('#'+id);\n\t\t        //   tinymce.activeEditor.execCommand('mceRemoveControl', false, id);\n\t\t         //  \$('#'+id).tinymce().remove();\n\n\t\t\t}, function () {\n\t\t\t\t\t var id = \$(this).attr('id');\n\t\t\t\t\t \$('#bbcode-panel-'+id+'--preview').hide();\n\t\t\t\t\t \$(this).text('Switch to bbcode');\n\t\t\t\t\t tinymce.EditorManager.execCommand('mceAddEditor',true, id); //v4.x\n\t\t\t\t//\t tinymce.remove('#'+id);\n\t\t        //    tinymce.activeEditor.execCommand('mceAddControl', false, id);\n\t\t\t});\n\n\n\t\t\t \$(document).on('click','.e-dialog-save', function(){\n\t\t\t//\tvar html = \$('#html_holder').val();\n\n\t\t\t\tvar s = \$('#bbcode_holder').val();\n\n\t\t\t//\talert(s);\n\n\t\t\t\tvar p = \$.ajax({\n\t\t\t\t\ttype: 'POST',\n\t\t\t\t\turl: '" . e_PLUGIN_ABS . "tinymce4/plugins/e107/parser.php', // parse bbcode value\n\t\t\t\t\tdata: { content: s, mode: 'tohtml' },\n\t\t\t\t\tasync       : false,\n\n\t\t\t\t\tdataType: 'html',\n\t\t\t\t\tsuccess: function(html) {\n\t\t\t\t      return html;\n\t\t\t\t    }\n\n\n\t\t\t\t}).responseText;\n\n\t\t\t\thtml = p;\n\t\t\t\t//\t\talert(s);\n\n\t\t\t\tif(html === undefined)\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t//\ttinyMCE.execCommand('mceInsertContent',false,html);\n\t\t\t\ttop.tinymce.activeEditor.execCommand('mceInsertRawHTML',false,html);\n\t\t\t\ttop.tinymce.activeEditor.windowManager.close();\n\n\t\t\t});\n\n\t\t\t\$('.e-dialog-close').click(function(){\n\n\t\t//\ttop.tinymce.activeEditor.windowManager.close();\n\t\t\t});\n\n\n\n\n\n\n\t});\n\n\n\n\n\t", "jquery", 1);
}
Example #29
0
	
	 }
	
	 ');
}
e107::css('bootstrap', 'bootstrap-responsive.min.css');
e107::css('bootstrap', 'jquery-ui.custom.css');
e107::css('url', "https://netdna.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css");
e107::css('theme', 'js/google-code-prettify/prettify.css');
e107::js('theme', "js/google-code-prettify/prettify.js");
e107::css('page', 'css/page.navigation.css', 'jquery');
if (THEME_LAYOUT == 'docs') {
    e107::css('inline', 'body { padding-top: 40px }');
    e107::css('theme', 'css/docs.css');
    e107::js('theme', "js/holder/holder.js");
    e107::js('theme', "js/application.js");
}
//$no_core_css = TRUE;
//define("STANDARDS_MODE",TRUE);
/*
$OTHERNEWS_STYLE = '<div class="span4">
              		<h2>{NEWSTITLE}</h2>
              		<p>{NEWSSUMMARY}</p>
              		<p><a class="btn" href="{NEWSURL}">View details &raquo;</a></p>
            		</div><!--/span-->';


$OTHERNEWS2_STYLE = '<div class="span4">
              		<h2>{NEWSTITLE}</h2>
              		<p>{NEWSSUMMARY}</p>
              		<p><a class="btn" href="{NEWSURL}">View details &raquo;</a></p>
Example #30
0
* Gallery Template 
*/
if (!defined('e107_INIT')) {
    exit;
}
e107::plugLan('gallery', 'front');
$gp = e107::getPlugPref('gallery');
e107::js('gallery', 'jslib/prettyPhoto/js/jquery.prettyPhoto.js', 'jquery');
e107::css('gallery', 'jslib/prettyPhoto/css/prettyPhoto.css', 'jquery');
e107::css('gallery', 'gallery_style.css');
// Work-around for indent issue. see: https://github.com/twitter/bootstrap/issues/4890
e107::css('inline', "\r\n\r\n.thumbnails .span2:nth-child(6n+1) {\r\nmargin-left:0;\r\n}", 'jquery');
$prettyPhoto = <<<JS
\$(document).ready(function(){
    \$("a[data-gal^='prettyPhoto']").prettyPhoto(
\t    {
\t    \thook: 'data-gal',
\t    \ttheme: 'pp_default',
\t    \toverlay_gallery: false,
\t    \tdeeplinking: false
\t    }
    );
  });
JS;
e107::js('footer-inline', $prettyPhoto, 'jquery');
e107::js('gallery', 'jslib/jquery.cycle.all.js', 'jquery');
e107::js('footer-inline', "\r\n\r\n\$(document).ready(function() \r\n{\r\n\t\r\n\t\$('#gallery-slideshow-content').cycle({\r\n\t\tfx: \t\t'" . varset($gp['slideshow_effect'], 'scrollHorz') . "',\r\n\t\tnext:\t\t'.gal-next',\r\n\t\tprev: \t\t'.gal-prev',\r\n\t\tspeed:\t\t" . varset($gp['slideshow_duration'], 1000) . ",  // speed of the transition (any valid fx speed value) \r\n    \ttimeout:\t" . varset($gp['slideshow_freq'], 4000) . ",\r\n\t\tslideExpr:\t'.slide', \r\n\t\tpause: \t\t1, // pause on hover - TODO pref\r\n\t\t\r\n\t\tactivePagerClass: '.gallery-slide-jumper-selected',//,\r\n\t\tbefore: function(currSlideElement, nextSlideElement, options, forwardFlag)\r\n\t\t{\r\n\t\t\tvar nx = \$(nextSlideElement).attr('id').split('item-');\r\n\t\t\tvar th = \$(currSlideElement).attr('id').split('item-');\r\n\t\t\t\$('#gallery-jumper-'+th[1]).removeClass('gallery-slide-jumper-selected');\r\n\t\t\t\$('#gallery-jumper-'+nx[1]).addClass('gallery-slide-jumper-selected');\t\t\t\t\t\t\r\n\t\t}\r\n\t});\r\n\t\r\n\t\r\n\t\r\n\t\$('.gallery-slide-jumper').click(function() { \r\n\t\tvar nid = \$(this).attr('id');\r\n\t\tvar id = nid.split('-jumper-');\r\n\t\r\n\t\tvar go = parseInt(id[1]) - 1;\r\n    \t\$('#gallery-slideshow-content').cycle(go); \r\n    \treturn false; \r\n\t}); \r\n\t\r\n\t\$('#img.lb-close').on('live', function(e) {\r\n\t\t\$(this).attr('src','" . e_PLUGIN . "gallery/jslib/lightbox/images/close.png');\r\n\t}); \r\n\r\n\r\n\r\n});\r\n");
$text = e107::getParser()->parseTemplate("{GALLERY_SLIDESHOW}");
e107::getRender()->tablerender("Gallery", $text, 'gallery_slideshow');
unset($text);
unset($gp);