mirror of
https://github.com/e107inc/e107.git
synced 2025-10-12 21:45:11 +02:00
@@ -226,7 +226,7 @@ e107_require_once($tmp.'/e107_class.php');
|
||||
unset($tmp);
|
||||
|
||||
$e107_paths = compact('ADMIN_DIRECTORY', 'FILES_DIRECTORY', 'IMAGES_DIRECTORY', 'THEMES_DIRECTORY', 'PLUGINS_DIRECTORY', 'HANDLERS_DIRECTORY', 'LANGUAGES_DIRECTORY', 'HELP_DIRECTORY', 'DOWNLOADS_DIRECTORY','UPLOADS_DIRECTORY','SYSTEM_DIRECTORY', 'MEDIA_DIRECTORY','CACHE_DIRECTORY','LOGS_DIRECTORY', 'CORE_DIRECTORY', 'WEB_DIRECTORY');
|
||||
$sql_info = compact('mySQLserver', 'mySQLuser', 'mySQLpassword', 'mySQLdefaultdb', 'mySQLprefix');
|
||||
$sql_info = compact('mySQLserver', 'mySQLuser', 'mySQLpassword', 'mySQLdefaultdb', 'mySQLprefix', 'mySQLport');
|
||||
$e107 = e107::getInstance()->initCore($e107_paths, realpath(dirname(__FILE__)), $sql_info, varset($E107_CONFIG, array()));
|
||||
|
||||
e107::getSingleton('eIPHandler'); // This auto-handles bans etc
|
||||
|
@@ -447,68 +447,6 @@ $page = $ehd->getOutput();
|
||||
echo $page;
|
||||
|
||||
|
||||
/*
|
||||
|
||||
|
||||
$etag = md5($page);
|
||||
|
||||
if (isset($_SERVER['HTTP_IF_NONE_MATCH']))
|
||||
{
|
||||
$IF_NONE_MATCH = str_replace('"','',$_SERVER['HTTP_IF_NONE_MATCH']);
|
||||
|
||||
$data = "IF_NON_MATCH = ".$IF_NONE_MATCH;
|
||||
$data .= "\nEtag = ".$etag;
|
||||
//file_put_contents(e_ADMIN."etag_log.txt",$data);
|
||||
|
||||
|
||||
if($IF_NONE_MATCH == $etag || ($IF_NONE_MATCH == ($etag."-gzip")))
|
||||
{
|
||||
header('HTTP/1.1 304 Not Modified');
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
header("Cache-Control: max-age=5,no-cache",true); // XXX testing 'always on' state for now.
|
||||
if(!defined('e_NOCACHE'))
|
||||
{
|
||||
// header("Cache-Control: must-revalidate");
|
||||
}
|
||||
|
||||
|
||||
$pref['compression_level'] = 6;
|
||||
if (strstr(varset($_SERVER["HTTP_ACCEPT_ENCODING"], ""), "gzip"))
|
||||
{
|
||||
// $browser_support = true;
|
||||
}
|
||||
if (ini_get("zlib.output_compression") == false && function_exists("gzencode"))
|
||||
{
|
||||
// $server_support = true;
|
||||
}
|
||||
if (varset($pref['compress_output'], false) && $server_support == true && $browser_support == true)
|
||||
{
|
||||
$level = intval($pref['compression_level']);
|
||||
header("ETag: \"{$etag}-gzip\"");
|
||||
$page = gzencode($page, $level);
|
||||
header("Content-Encoding: gzip", true);
|
||||
header("Content-Length: ".strlen($page), true);
|
||||
echo $page;
|
||||
}
|
||||
else
|
||||
{
|
||||
if($browser_support==TRUE)
|
||||
{
|
||||
header("ETag: \"{$etag}-gzip\"");
|
||||
}
|
||||
else
|
||||
{
|
||||
header("ETag: \"{$etag}\"");
|
||||
}
|
||||
|
||||
header("Content-Length: ".strlen($page), true);
|
||||
echo $page;
|
||||
}*/
|
||||
|
||||
unset($In_e107_Footer);
|
||||
$e107_Clean_Exit = TRUE; // For registered shutdown function -- let it know all is well!
|
||||
?>
|
@@ -1478,7 +1478,7 @@ class media_admin_ui extends e_admin_ui
|
||||
|
||||
$data = array();
|
||||
$data['items'][0]['id']['videoId'] = $searchQry;
|
||||
$data['items'][0]['snippet']['thumbnails']['medium']['url'] = "http://i.ytimg.com/vi/".$searchQry."/mqdefault.jpg";
|
||||
$data['items'][0]['snippet']['thumbnails']['medium']['url'] = "https://i.ytimg.com/vi/".$searchQry."/mqdefault.jpg";
|
||||
$data['items'][0]['snippet']['title'] = 'Specified Video';
|
||||
}
|
||||
elseif(substr($searchQry,0,9) == 'playlist:') // playlist
|
||||
@@ -1633,7 +1633,7 @@ class media_admin_ui extends e_admin_ui
|
||||
}
|
||||
|
||||
|
||||
$fileName = str_replace('%','',$fileName);
|
||||
$fileName = str_replace(array('%','+'),'',$fileName);
|
||||
|
||||
// remove script extensions.
|
||||
if(substr($fileName,-4) == ".php" || substr($fileName,-4) == ".htm" || substr($fileName,-5) == ".html" || substr($fileName,-4) == ".asp")
|
||||
|
@@ -79,7 +79,7 @@ $text = "
|
||||
<tr>
|
||||
<td>".LAN_DESCRIPTION."</td>
|
||||
<td>";
|
||||
$text .= $frm->textarea('meta_description',$tp->toForm(varset($meta_diz[e_LANGUAGE])),3);
|
||||
$text .= $frm->textarea('meta_description',$tp->toForm(varset($meta_diz[e_LANGUAGE])),3,80, array('size'=>'xxlarge'));
|
||||
// $text .= "<textarea class='tbox textarea e-autoheight' id='meta_description' name='meta_description' cols='70' rows='4'>".$tp->toForm(varset($meta_diz[e_LANGUAGE]))."</textarea>";
|
||||
$text .= "</td>
|
||||
</tr>
|
||||
|
@@ -3887,6 +3887,7 @@ $text .= "
|
||||
public function customPage()
|
||||
{
|
||||
\$text = 'Hello World!';
|
||||
\$otherField = \$this->getController()->getFieldVar('other_field_name');
|
||||
return \$text;
|
||||
|
||||
}
|
||||
|
@@ -560,12 +560,12 @@ class news_shortcodes extends e_shortcode
|
||||
$breaks = array('<br />','<br>');
|
||||
$text = str_replace($breaks,"\n",$text);
|
||||
$text = strip_tags($text);
|
||||
$tmp = preg_split('/(\.\s|!|\r|\n|\?)/i', trim($text));
|
||||
$tmp = preg_split('/(\.\s|!|\r|\n|\?)/i', trim($text), 2, PREG_SPLIT_DELIM_CAPTURE);
|
||||
$tmp = array_filter($tmp);
|
||||
|
||||
|
||||
if($tmp[0])
|
||||
{
|
||||
$text = trim($tmp[0]);
|
||||
$text = trim($tmp[0]).trim($tmp[1]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -612,6 +612,7 @@ class news_shortcodes extends e_shortcode
|
||||
{
|
||||
$src = $vThumb;
|
||||
$_src = '#';
|
||||
$dimensions = e107::getParser()->thumbDimensions();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -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='')
|
||||
@@ -534,8 +549,13 @@ class cpage_shortcodes extends e_shortcode
|
||||
{
|
||||
$array['types'] = 'page,news';
|
||||
}
|
||||
|
||||
return e107::getForm()->renderRelated($array, $this->var['page_metakeys'], array('page'=>$this->var['page_id']));
|
||||
|
||||
$templateID = vartrue($this->var['page_template'],'default');
|
||||
|
||||
$template = e107::getCoreTemplate('page', $templateID);
|
||||
|
||||
|
||||
return e107::getForm()->renderRelated($array, $this->var['page_metakeys'], array('page'=>$this->var['page_id']), $template['related']);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -141,8 +141,10 @@ else
|
||||
|
||||
if(vartrue($pref['meta_copyright'][e_LANGUAGE])) e107::meta('dcterms.rights',$pref['meta_copyright'][e_LANGUAGE]);
|
||||
if(vartrue($pref['meta_author'][e_LANGUAGE])) e107::meta('author',$pref['meta_author'][e_LANGUAGE]);
|
||||
if($pref['sitebutton']) e107::meta('og:image',$tp->replaceConstants($pref['sitelogo'],'full'));
|
||||
if(defined("VIEWPORT")) e107::meta('viewport',VIEWPORT); //BC ONLY
|
||||
$siteButton = (strpos($pref['sitelogo'],'{e_MEDIA') !== false) ? $tp->thumbUrl($pref['sitelogo'],'w=800',false, true) : $tp->replaceConstants($pref['sitelogo'],'full');
|
||||
if($pref['sitebutton']) e107::meta('og:image',$siteButton);
|
||||
if(defined("VIEWPORT")) e107::meta('viewport',VIEWPORT); //BC ONLY
|
||||
unset($siteButton);
|
||||
|
||||
|
||||
// Load Plugin Header Files, allow them to load CSS/JSS/Meta via JS Manager early enouhg
|
||||
|
@@ -97,13 +97,13 @@ $NAVIGATION_TEMPLATE['main']['submenu_end'] = '</ul>';
|
||||
$NAVIGATION_TEMPLATE['side']['start'] = '<ul class="nav nav-list"><li class="nav-header">Sidebar</li>
|
||||
';
|
||||
|
||||
$NAVIGATION_TEMPLATE['side']['item'] = '<li><a href="{LINK_URL}"{LINK_OPEN}>{LINK_ICON}{LINK_NAME}</a></li>
|
||||
$NAVIGATION_TEMPLATE['side']['item'] = '<li><a href="{LINK_URL}"{LINK_OPEN} title="{LINK_DESCRIPTION}">{LINK_ICON}{LINK_NAME}</a></li>
|
||||
';
|
||||
|
||||
$NAVIGATION_TEMPLATE['side']['item_submenu'] = '<li class="nav-header">{LINK_ICON}{LINK_NAME}{LINK_SUB}</li>
|
||||
';
|
||||
|
||||
$NAVIGATION_TEMPLATE['side']['item_active'] = '<li class="active"{LINK_OPEN}><a href="{LINK_URL}">{LINK_ICON}{LINK_NAME}</a></li>
|
||||
$NAVIGATION_TEMPLATE['side']['item_active'] = '<li class="active"{LINK_OPEN}><a href="{LINK_URL}" title="{LINK_DESCRIPTION}">{LINK_ICON}{LINK_NAME}</a></li>
|
||||
';
|
||||
|
||||
$NAVIGATION_TEMPLATE['side']['end'] = '</ul>
|
||||
@@ -128,9 +128,9 @@ $NAVIGATION_TEMPLATE['side']['submenu_end'] = '';
|
||||
// Footer links. - ie. 3 columns of links.
|
||||
|
||||
$NAVIGATION_TEMPLATE["footer"]["start"] = "<ul class='list-unstyled nav-footer row'>\n";
|
||||
$NAVIGATION_TEMPLATE["footer"]["item"] = "<li class='col-md-4'><a href='{LINK_URL}'{LINK_OPEN}>{LINK_ICON}{LINK_NAME}</a></li>\n";
|
||||
$NAVIGATION_TEMPLATE["footer"]["item"] = "<li class='col-md-4'><a href='{LINK_URL}'{LINK_OPEN} title=\"{LINK_DESCRIPTION}\">{LINK_ICON}{LINK_NAME}</a></li>\n";
|
||||
$NAVIGATION_TEMPLATE["footer"]["item_submenu"] = "<li class='nav-header col-md-4'>{LINK_ICON}{LINK_NAME}{LINK_SUB}</li>\n";
|
||||
$NAVIGATION_TEMPLATE["footer"]["item_active"] = "<li class='active'{LINK_OPEN}><a href='{LINK_URL}'>{LINK_ICON}{LINK_NAME}</a></li>\n";
|
||||
$NAVIGATION_TEMPLATE["footer"]["item_active"] = "<li class='active'{LINK_OPEN}><a href='{LINK_URL}' title=\"{LINK_DESCRIPTION}\">{LINK_ICON}{LINK_NAME}</a></li>\n";
|
||||
$NAVIGATION_TEMPLATE["footer"]["end"] = "</ul>\n";
|
||||
$NAVIGATION_TEMPLATE["footer"]["submenu_start"] = "<ul class='list-unstyled'>";
|
||||
$NAVIGATION_TEMPLATE["footer"]["submenu_item"] = "<li><a href='{LINK_URL}'{LINK_OPEN}>{LINK_ICON}{LINK_NAME}</a></li>\n";
|
||||
|
@@ -94,8 +94,18 @@ $sc_style['CPAGENAV|default']['post'] = '</div>';
|
||||
// define different tablerender mode here
|
||||
$PAGE_TEMPLATE['default']['tableRender'] = 'cpage';
|
||||
|
||||
|
||||
|
||||
$PAGE_TEMPLATE['default']['related']['start'] = '{SETIMAGE: w=350&h=350&crop=1}<h2 class="caption">{LAN=LAN_RELATED}</h2><div class="row">';
|
||||
$PAGE_TEMPLATE['default']['related']['item'] = '<div class="col-md-4"><a href="{RELATED_URL}">{RELATED_IMAGE}</a><h3><a href="{RELATED_URL}">{RELATED_TITLE}</a></h3></div>';
|
||||
$PAGE_TEMPLATE['default']['related']['end'] = '</div>';
|
||||
|
||||
|
||||
|
||||
|
||||
#### No table render example template ####
|
||||
|
||||
|
||||
$PAGE_TEMPLATE['custom']['start'] = '<div id="{CPAGESEF}" class="cpage-body">';
|
||||
$PAGE_TEMPLATE['custom']['body'] = '';
|
||||
$PAGE_TEMPLATE['custom']['authorize'] = '
|
||||
|
@@ -2773,6 +2773,31 @@ class e_admin_controller_ui extends e_admin_controller
|
||||
return $this->_model;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Alias for getModel()->get and getListModel()->get().
|
||||
* May be used inside field-method in read/write mode.
|
||||
*
|
||||
* @param string $key
|
||||
* @return mixed|null - current value of the chosen db field.
|
||||
*/
|
||||
public function getFieldVar($key = null)
|
||||
{
|
||||
if(empty($key))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if($this->getAction() == 'list')
|
||||
{
|
||||
return $this->getListModel()->get($key);
|
||||
}
|
||||
|
||||
return $this->getModel()->get($key);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set controller model
|
||||
* @param e_admin_model $model
|
||||
|
@@ -201,6 +201,13 @@ class db_verify
|
||||
|
||||
$this->currentTable = $selection;
|
||||
|
||||
if(!isset($this->tables[$selection])) // doesn't have an SQL file.
|
||||
{
|
||||
// e107::getMessage()->addDebug("No SQL File for ".$selection);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if(empty($this->tables[$selection]['tables']))
|
||||
{
|
||||
//$this->internalError = true;
|
||||
|
@@ -157,6 +157,298 @@ class e_form
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Render a country drop-down list.
|
||||
* @param string $name
|
||||
* @param string $value
|
||||
* @param array $options
|
||||
* @return string
|
||||
*/
|
||||
public function country($name, $value, $options=array())
|
||||
{
|
||||
|
||||
$arr = $this->getCountry();
|
||||
|
||||
$placeholder = isset($options['placeholder']) ? $options['placeholder'] : ' ';
|
||||
|
||||
return $this->select($name, $arr, $value, $options, $placeholder);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get a list of countries.
|
||||
* @param null $iso
|
||||
*/
|
||||
public function getCountry($iso=null) // move to parser?
|
||||
{
|
||||
|
||||
$c = array();
|
||||
|
||||
$c['af'] = "Afghanistan";
|
||||
$c['al'] = "Albania";
|
||||
$c['dz'] = "Algeria";
|
||||
$c['as'] = "American Samoa";
|
||||
$c['ad'] = "Andorra";
|
||||
$c['ao'] = "Angola";
|
||||
$c['ai'] = "Anguilla";
|
||||
$c['aq'] = "Antarctica";
|
||||
$c['ag'] = "Antigua and Barbuda";
|
||||
$c['ar'] = "Argentina";
|
||||
$c['am'] = "Armenia";
|
||||
$c['aw'] = "Aruba";
|
||||
$c['au'] = "Australia";
|
||||
$c['at'] = "Austria";
|
||||
$c['az'] = "Azerbaijan";
|
||||
$c['bs'] = "Bahamas";
|
||||
$c['bh'] = "Bahrain";
|
||||
$c['bd'] = "Bangladesh";
|
||||
$c['bb'] = "Barbados";
|
||||
$c['by'] = "Belarus";
|
||||
$c['be'] = "Belgium";
|
||||
$c['bz'] = "Belize";
|
||||
$c['bj'] = "Benin";
|
||||
$c['bm'] = "Bermuda";
|
||||
$c['bt'] = "Bhutan";
|
||||
$c['bo'] = "Bolivia";
|
||||
$c['ba'] = "Bosnia-Herzegovina";
|
||||
$c['bw'] = "Botswana";
|
||||
$c['bv'] = "Bouvet Island";
|
||||
$c['br'] = "Brazil";
|
||||
$c['io'] = "British Indian Ocean Territory";
|
||||
$c['bn'] = "Brunei Darussalam";
|
||||
$c['bg'] = "Bulgaria";
|
||||
$c['bf'] = "Burkina Faso";
|
||||
$c['bi'] = "Burundi";
|
||||
$c['kh'] = "Cambodia";
|
||||
$c['cm'] = "Cameroon";
|
||||
$c['ca'] = "Canada";
|
||||
|
||||
$c['cv'] = "Cape Verde";
|
||||
$c['ky'] = "Cayman Islands";
|
||||
$c['cf'] = "Central African Republic";
|
||||
$c['td'] = "Chad";
|
||||
$c['cl'] = "Chile";
|
||||
$c['cn'] = "China";
|
||||
$c['cx'] = "Christmas Island";
|
||||
$c['cc'] = "Cocos (Keeling) Islands";
|
||||
$c['co'] = "Colombia";
|
||||
$c['km'] = "Comoros";
|
||||
$c['cg'] = "Congo";
|
||||
$c['cd'] = "Congo (Dem.Rep)";
|
||||
$c['ck'] = "Cook Islands";
|
||||
$c['cr'] = "Costa Rica";
|
||||
$c['hr'] = "Croatia";
|
||||
$c['cu'] = "Cuba";
|
||||
$c['cy'] = "Cyprus";
|
||||
$c['cz'] = "Czech Republic";
|
||||
$c['dk'] = "Denmark";
|
||||
$c['dj'] = "Djibouti";
|
||||
$c['dm'] = "Dominica";
|
||||
$c['do'] = "Dominican Republic";
|
||||
$c['tp'] = "East Timor";
|
||||
$c['ec'] = "Ecuador";
|
||||
$c['eg'] = "Egypt";
|
||||
$c['sv'] = "El Salvador";
|
||||
$c['gq'] = "Equatorial Guinea";
|
||||
$c['er'] = "Eritrea";
|
||||
$c['ee'] = "Estonia";
|
||||
$c['et'] = "Ethiopia";
|
||||
$c['fk'] = "Falkland Islands";
|
||||
$c['fo'] = "Faroe Islands";
|
||||
$c['fj'] = "Fiji";
|
||||
$c['fi'] = "Finland";
|
||||
// $c['cs'] = "Former Czechoslovakia";
|
||||
// $c['su'] = "Former USSR";
|
||||
$c['fr'] = "France";
|
||||
// $c['fx'] = "France (European Territory)";
|
||||
$c['gf'] = "French Guyana";
|
||||
$c['tf'] = "French Southern Territories";
|
||||
$c['ga'] = "Gabon";
|
||||
$c['gm'] = "Gambia";
|
||||
$c['ge'] = "Georgia";
|
||||
$c['de'] = "Germany";
|
||||
$c['gh'] = "Ghana";
|
||||
$c['gi'] = "Gibraltar";
|
||||
$c['gr'] = "Greece";
|
||||
$c['gl'] = "Greenland";
|
||||
$c['gd'] = "Grenada";
|
||||
$c['gp'] = "Guadeloupe (French)";
|
||||
$c['gu'] = "Guam (USA)";
|
||||
$c['gt'] = "Guatemala";
|
||||
$c['gn'] = "Guinea";
|
||||
$c['gw'] = "Guinea Bissau";
|
||||
$c['gy'] = "Guyana";
|
||||
$c['ht'] = "Haiti";
|
||||
$c['hm'] = "Heard and McDonald Islands";
|
||||
$c['hn'] = "Honduras";
|
||||
$c['hk'] = "Hong Kong";
|
||||
$c['hu'] = "Hungary";
|
||||
$c['is'] = "Iceland";
|
||||
$c['in'] = "India";
|
||||
$c['id'] = "Indonesia";
|
||||
$c['ir'] = "Iran";
|
||||
$c['iq'] = "Iraq";
|
||||
$c['ie'] = "Ireland";
|
||||
$c['il'] = "Israel";
|
||||
$c['it'] = "Italy";
|
||||
$c['ci'] = "Ivory Coast (Cote D'Ivoire)";
|
||||
$c['jm'] = "Jamaica";
|
||||
$c['jp'] = "Japan";
|
||||
$c['jo'] = "Jordan";
|
||||
$c['kz'] = "Kazakhstan";
|
||||
$c['ke'] = "Kenya";
|
||||
$c['ki'] = "Kiribati";
|
||||
$c['kp'] = "Korea (North)";
|
||||
$c['kr'] = "Korea (South)";
|
||||
$c['kw'] = "Kuwait";
|
||||
$c['kg'] = "Kyrgyzstan";
|
||||
$c['la'] = "Laos";
|
||||
$c['lv'] = "Latvia";
|
||||
$c['lb'] = "Lebanon";
|
||||
$c['ls'] = "Lesotho";
|
||||
$c['lr'] = "Liberia";
|
||||
$c['ly'] = "Libya";
|
||||
$c['li'] = "Liechtenstein";
|
||||
$c['lt'] = "Lithuania";
|
||||
$c['lu'] = "Luxembourg";
|
||||
$c['mo'] = "Macau";
|
||||
$c['mk'] = "Macedonia";
|
||||
$c['mg'] = "Madagascar";
|
||||
$c['mw'] = "Malawi";
|
||||
$c['my'] = "Malaysia";
|
||||
$c['mv'] = "Maldives";
|
||||
$c['ml'] = "Mali";
|
||||
$c['mt'] = "Malta";
|
||||
$c['mh'] = "Marshall Islands";
|
||||
$c['mq'] = "Martinique (French)";
|
||||
$c['mr'] = "Mauritania";
|
||||
$c['mu'] = "Mauritius";
|
||||
$c['yt'] = "Mayotte";
|
||||
$c['mx'] = "Mexico";
|
||||
$c['fm'] = "Micronesia";
|
||||
$c['md'] = "Moldavia";
|
||||
$c['mc'] = "Monaco";
|
||||
$c['mn'] = "Mongolia";
|
||||
$c['me'] = "Montenegro";
|
||||
$c['ms'] = "Montserrat";
|
||||
$c['ma'] = "Morocco";
|
||||
$c['mz'] = "Mozambique";
|
||||
$c['mm'] = "Myanmar";
|
||||
$c['na'] = "Namibia";
|
||||
$c['nr'] = "Nauru";
|
||||
$c['np'] = "Nepal";
|
||||
$c['nl'] = "Netherlands";
|
||||
$c['an'] = "Netherlands Antilles";
|
||||
// $c['net'] = "Network";
|
||||
|
||||
$c['nc'] = "New Caledonia (French)";
|
||||
$c['nz'] = "New Zealand";
|
||||
$c['ni'] = "Nicaragua";
|
||||
$c['ne'] = "Niger";
|
||||
$c['ng'] = "Nigeria";
|
||||
$c['nu'] = "Niue";
|
||||
$c['nf'] = "Norfolk Island";
|
||||
|
||||
$c['mp'] = "Northern Mariana Islands";
|
||||
$c['no'] = "Norway";
|
||||
// $c['arpa'] = "Old style Arpanet";
|
||||
$c['om'] = "Oman";
|
||||
$c['pk'] = "Pakistan";
|
||||
$c['pw'] = "Palau";
|
||||
$c['pa'] = "Panama";
|
||||
$c['pg'] = "Papua New Guinea";
|
||||
$c['py'] = "Paraguay";
|
||||
$c['pe'] = "Peru";
|
||||
$c['ph'] = "Philippines";
|
||||
$c['pn'] = "Pitcairn Island";
|
||||
$c['pl'] = "Poland";
|
||||
$c['pf'] = "Polynesia (French)";
|
||||
$c['pt'] = "Portugal";
|
||||
$c['pr'] = "Puerto Rico";
|
||||
$c['ps'] = "Palestine";
|
||||
$c['qa'] = "Qatar";
|
||||
$c['re'] = "Reunion (French)";
|
||||
$c['ro'] = "Romania";
|
||||
$c['ru'] = "Russia";
|
||||
$c['rw'] = "Rwanda";
|
||||
$c['gs'] = "S. Georgia & S. Sandwich Isls.";
|
||||
$c['sh'] = "Saint Helena";
|
||||
$c['kn'] = "Saint Kitts & Nevis";
|
||||
$c['lc'] = "Saint Lucia";
|
||||
$c['pm'] = "Saint Pierre and Miquelon";
|
||||
$c['st'] = "Saint Tome (Sao Tome) and Principe";
|
||||
$c['vc'] = "Saint Vincent & Grenadines";
|
||||
$c['ws'] = "Samoa";
|
||||
$c['sm'] = "San Marino";
|
||||
$c['sa'] = "Saudi Arabia";
|
||||
$c['sn'] = "Senegal";
|
||||
$c['rs'] = "Serbia";
|
||||
$c['sc'] = "Seychelles";
|
||||
$c['sl'] = "Sierra Leone";
|
||||
$c['sg'] = "Singapore";
|
||||
$c['sk'] = "Slovak Republic";
|
||||
$c['si'] = "Slovenia";
|
||||
$c['sb'] = "Solomon Islands";
|
||||
$c['so'] = "Somalia";
|
||||
$c['za'] = "South Africa";
|
||||
|
||||
$c['es'] = "Spain";
|
||||
$c['lk'] = "Sri Lanka";
|
||||
$c['sd'] = "Sudan";
|
||||
$c['sr'] = "Suriname";
|
||||
$c['sj'] = "Svalbard and Jan Mayen Islands";
|
||||
$c['sz'] = "Swaziland";
|
||||
$c['se'] = "Sweden";
|
||||
$c['ch'] = "Switzerland";
|
||||
$c['sy'] = "Syria";
|
||||
$c['tj'] = "Tadjikistan";
|
||||
$c['tw'] = "Taiwan";
|
||||
$c['tz'] = "Tanzania";
|
||||
$c['th'] = "Thailand";
|
||||
$c['ti'] = "Tibet";
|
||||
$c['tg'] = "Togo";
|
||||
$c['tk'] = "Tokelau";
|
||||
$c['to'] = "Tonga";
|
||||
$c['tt'] = "Trinidad and Tobago";
|
||||
$c['tn'] = "Tunisia";
|
||||
$c['tr'] = "Turkey";
|
||||
$c['tm'] = "Turkmenistan";
|
||||
$c['tc'] = "Turks and Caicos Islands";
|
||||
$c['tv'] = "Tuvalu";
|
||||
$c['ug'] = "Uganda";
|
||||
$c['ua'] = "Ukraine";
|
||||
$c['ae'] = "United Arab Emirates";
|
||||
$c['gb'] = "United Kingdom";
|
||||
$c['us'] = "United States";
|
||||
$c['uy'] = "Uruguay";
|
||||
$c['um'] = "US Minor Outlying Islands";
|
||||
$c['uz'] = "Uzbekistan";
|
||||
$c['vu'] = "Vanuatu";
|
||||
$c['va'] = "Vatican City State";
|
||||
$c['ve'] = "Venezuela";
|
||||
$c['vn'] = "Vietnam";
|
||||
$c['vg'] = "Virgin Islands (British)";
|
||||
$c['vi'] = "Virgin Islands (USA)";
|
||||
$c['wf'] = "Wallis and Futuna Islands";
|
||||
$c['eh'] = "Western Sahara";
|
||||
$c['ye'] = "Yemen";
|
||||
|
||||
// $c['zr'] = "(deprecated) Zaire";
|
||||
$c['zm'] = "Zambia";
|
||||
$c['zw'] = "Zimbabwe";
|
||||
|
||||
|
||||
if(!empty($iso) && !empty($c[$iso]))
|
||||
{
|
||||
return $c[$iso];
|
||||
}
|
||||
|
||||
|
||||
return $c;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get required field markup string
|
||||
* @return string
|
||||
@@ -312,21 +604,28 @@ class e_form
|
||||
$text ='
|
||||
<!-- Carousel -->
|
||||
|
||||
<div id="'.$name.'" class="carousel slide" data-ride="carousel" '.$interval.' '.$wrap.' '.$pause.'>
|
||||
<!-- Indicators -->
|
||||
<ol class="carousel-indicators">
|
||||
';
|
||||
<div id="'.$name.'" class="carousel slide" data-ride="carousel" '.$interval.' '.$wrap.' '.$pause.'>';
|
||||
|
||||
$c = 0;
|
||||
foreach($array as $key=>$tab)
|
||||
if(count($array) > 1)
|
||||
{
|
||||
$active = ($c == $act) ? ' class="active"' : '';
|
||||
$text .= '<li data-target="#'.$name.'" data-slide-to="'.$c.'" '.$active.'></li>';
|
||||
$c++;
|
||||
$text .= '
|
||||
<!-- Indicators -->
|
||||
<ol class="carousel-indicators">
|
||||
';
|
||||
|
||||
$c = 0;
|
||||
foreach($array as $key=>$tab)
|
||||
{
|
||||
$active = ($c == $act) ? ' class="active"' : '';
|
||||
$text .= '<li data-target="#'.$name.'" data-slide-to="'.$c.'" '.$active.'></li>';
|
||||
$c++;
|
||||
}
|
||||
|
||||
$text .= '
|
||||
</ol>';
|
||||
}
|
||||
|
||||
|
||||
$text .= '
|
||||
</ol>
|
||||
|
||||
<div class="carousel-inner">
|
||||
';
|
||||
@@ -350,15 +649,18 @@ class e_form
|
||||
|
||||
$text .= '
|
||||
</div>';
|
||||
|
||||
$text .= '
|
||||
<a class="left carousel-control" href="#'.$name.'" role="button" data-slide="prev">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span>
|
||||
</a>
|
||||
<a class="right carousel-control" href="#'.$name.'" role="button" data-slide="next">
|
||||
<span class="glyphicon glyphicon-chevron-right"></span>
|
||||
</a>';
|
||||
|
||||
|
||||
if(count($array) > 1)
|
||||
{
|
||||
$text .= '
|
||||
<a class="left carousel-control" href="#'.$name.'" role="button" data-slide="prev">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span>
|
||||
</a>
|
||||
<a class="right carousel-control" href="#'.$name.'" role="button" data-slide="next">
|
||||
<span class="glyphicon glyphicon-chevron-right"></span>
|
||||
</a>';
|
||||
}
|
||||
|
||||
$text .= '</div><!-- End Carousel -->';
|
||||
|
||||
return $text;
|
||||
@@ -3463,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))
|
||||
{
|
||||
@@ -4242,7 +4544,7 @@ class e_form
|
||||
}
|
||||
else
|
||||
{
|
||||
$false = ($value === '') ? "□" : "✗";
|
||||
$false = ($value === '') ? "□" : "✗";
|
||||
}
|
||||
|
||||
$true = varset($parms['true'],'✓'); // custom representation for 'true'. (supports font-awesome when set by css)
|
||||
@@ -4253,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']))
|
||||
|
@@ -69,9 +69,10 @@ class e_db_mysql
|
||||
{
|
||||
// TODO switch to protected vars where needed
|
||||
public $mySQLserver;
|
||||
public $mySQLuser;
|
||||
public $mySQLuser;
|
||||
protected $mySQLpassword;
|
||||
protected $mySQLdefaultdb;
|
||||
protected $mySQLport = 3306;
|
||||
public $mySQLPrefix;
|
||||
protected $mySQLaccess;
|
||||
public $mySQLresult;
|
||||
@@ -83,7 +84,7 @@ class e_db_mysql
|
||||
protected $mySQLlastQuery = '';
|
||||
|
||||
public $mySQLcurTable;
|
||||
public $mySQLlanguage;
|
||||
public $mySQLlanguage;
|
||||
public $mySQLinfo;
|
||||
public $tabset;
|
||||
public $mySQLtableList = array(); // list of all Db tables.
|
||||
@@ -99,6 +100,7 @@ class e_db_mysql
|
||||
|
||||
private $pdo = false; // using PDO or not.
|
||||
|
||||
|
||||
/**
|
||||
* Constructor - gets language options from the cookie or session
|
||||
* @access public
|
||||
@@ -113,11 +115,16 @@ class e_db_mysql
|
||||
{
|
||||
$this->pdo = true;
|
||||
}
|
||||
|
||||
|
||||
e107::getSingleton('e107_traffic')->BumpWho('Create db object', 1);
|
||||
|
||||
$this->mySQLPrefix = MPREFIX; // Set the default prefix - may be overridden
|
||||
|
||||
if($port = e107::getMySQLConfig('port'))
|
||||
{
|
||||
$this->mySQLport = intval($port);
|
||||
}
|
||||
|
||||
/*$langid = (isset($pref['cookie_name'])) ? 'e107language_'.$pref['cookie_name'] : 'e107language_temp';
|
||||
if (isset($pref['user_tracking']) && ($pref['user_tracking'] == 'session'))
|
||||
{
|
||||
@@ -182,7 +189,7 @@ class e_db_mysql
|
||||
{
|
||||
try
|
||||
{
|
||||
$this->mySQLaccess = new PDO("mysql:host=".$this->mySQLserver."; port=3306", $this->mySQLuser, $this->mySQLpassword, array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));
|
||||
$this->mySQLaccess = new PDO("mysql:host=".$this->mySQLserver."; port=".$this->mySQLport, $this->mySQLuser, $this->mySQLpassword, array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));
|
||||
|
||||
}
|
||||
catch(PDOException $ex)
|
||||
@@ -266,12 +273,17 @@ class e_db_mysql
|
||||
$this->mySQLuser = $mySQLuser;
|
||||
$this->mySQLpassword = $mySQLpassword;
|
||||
$this->mySQLerror = false;
|
||||
|
||||
if(strpos($mySQLserver,':')!==false)
|
||||
{
|
||||
list($this->mySQLserver,$this->mySQLport) = explode(':',$mySQLserver,2);
|
||||
}
|
||||
|
||||
if($this->pdo) // PDO
|
||||
{
|
||||
try
|
||||
{
|
||||
$this->mySQLaccess = new PDO("mysql:host=".$this->mySQLserver."; port=3306", $this->mySQLuser, $this->mySQLpassword, array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));
|
||||
$this->mySQLaccess = new PDO("mysql:host=".$this->mySQLserver."; port=".$this->mySQLport, $this->mySQLuser, $this->mySQLpassword, array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));
|
||||
}
|
||||
catch(PDOException $ex)
|
||||
{
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -1826,6 +1826,14 @@ class navigation_shortcodes extends e_shortcode
|
||||
*/
|
||||
function sc_link_description($parm='')
|
||||
{
|
||||
$toolTipEnabled = e107::pref('core', 'linkpage_screentip', false);
|
||||
|
||||
if($toolTipEnabled == false || empty($this->var['link_description']))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
return e107::getParser()->toAttribute($this->var['link_description']);
|
||||
}
|
||||
|
||||
|
@@ -43,6 +43,7 @@ define("LAN_NEWS_85", "Back to category overview");
|
||||
define("LAN_NEWS_86", "Older News");
|
||||
define("LAN_NEWS_87", "Newer News");
|
||||
define("LAN_NEWS_462", "No news items for specified month");
|
||||
define("LAN_NEWS_463", "There are no news items for the specified category - please check back soon.");
|
||||
|
||||
// Following used by alt_news
|
||||
// define("LAN_NEWS_99", "Comments");
|
||||
|
@@ -91,8 +91,9 @@ class banner_shortcodes extends e_shortcode
|
||||
$src = e_IMAGE_ABS.'banners/'.$row['banner_image'];
|
||||
$style = "'border:0'";
|
||||
}
|
||||
// Somehow, can't use vartrue core function when referencing $parm['class'], gives bug....
|
||||
$ban_ret = $tp->toImage($src, array('class'=>($parm['class'] == ''?"e-banner img-responsive img-rounded":$parm['class']) , 'alt'=>$row['banner_clickurl'], 'style'=>$style));
|
||||
// Somehow, can't use vartrue core function when referencing $parm['class'], gives bug...
|
||||
$class = empty($parm['class']) ? "e-banner img-responsive" : $parm['class'];
|
||||
$ban_ret = $tp->toImage($src, array('class'=> $class , 'alt'=>$row['banner_clickurl'], 'style'=>$style));
|
||||
|
||||
break;
|
||||
}
|
||||
|
@@ -1699,7 +1699,7 @@ $columnInfo = array(
|
||||
$dlInfo['download_comment'] = $tp->toDB($_POST['download_comment']);
|
||||
$dlInfo['download_class'] = $tp->toDB($_POST['download_class']);
|
||||
$dlInfo['download_visible'] = $tp->toDB($_POST['download_visible']);
|
||||
$dlInfo['download_datestamp'] = e107::getDate()->convert($_POST['download_datestamp'],'inputdate');
|
||||
$dlInfo['download_datestamp'] = intval($_POST['download_datestamp']);
|
||||
|
||||
|
||||
if($_POST['update_datestamp'])
|
||||
|
@@ -473,6 +473,10 @@ $i = $thread->page;
|
||||
//---- Moved upwards, to enclose $tVars...
|
||||
//---- $sc = e107::getScBatch('view', 'forum');
|
||||
|
||||
$mes = e107::getMessage();
|
||||
// $sc->setVars($thread->threadInfo);
|
||||
//--->$forend = $tp->simpleParse($FORUMEND, $tVars);
|
||||
$forend = $tp->parseTemplate($FORUMEND, true, $sc);
|
||||
|
||||
|
||||
foreach ($postList as $c => $postInfo)
|
||||
@@ -538,6 +542,7 @@ foreach ($postList as $c => $postInfo)
|
||||
}
|
||||
unset($loop_uid);
|
||||
|
||||
/*---->
|
||||
if ($forum->checkPerm($thread->threadInfo['thread_forum_id'], 'post') && $thread->threadInfo['thread_active'])
|
||||
{
|
||||
//XXX Show only on the last page??
|
||||
@@ -578,11 +583,14 @@ if ($forum->checkPerm($thread->threadInfo['thread_forum_id'], 'post') && $thread
|
||||
$tVars->QUICKREPLY = $forum_quickreply;
|
||||
}
|
||||
}
|
||||
<----*/
|
||||
|
||||
|
||||
/*--->
|
||||
$mes = e107::getMessage();
|
||||
$forend = $tp->simpleParse($FORUMEND, $tVars);
|
||||
|
||||
$sc->setVars($thread->threadInfo);
|
||||
//--->$forend = $tp->simpleParse($FORUMEND, $tVars);
|
||||
$forend = $tp->parseTemplate($FORUMEND, true, $sc);
|
||||
<---*/
|
||||
$forumstring = $forstr . $forthr . vartrue($forrep) . $forend;
|
||||
|
||||
//If last post came after USERLV and not yet marked as read, mark the thread id as read
|
||||
@@ -899,7 +907,7 @@ class e107ForumThread
|
||||
$ns = e107::getRender();
|
||||
$sql = e107::getDb();
|
||||
$tp = e107::getParser();
|
||||
$frm = e107::getForm();
|
||||
//Orphan $frm variable???? $frm = e107::getForm();
|
||||
|
||||
if (empty($_GET['f']))
|
||||
{
|
||||
|
@@ -885,5 +885,51 @@ function sc_message()
|
||||
return $thread->message;
|
||||
}
|
||||
|
||||
function sc_quickreply()
|
||||
{
|
||||
global $forum, $forum_quickreply;
|
||||
|
||||
if ($forum->checkPerm($this->var['thread_forum_id'], 'post') && $this->var['thread_active'])
|
||||
{
|
||||
//XXX Show only on the last page??
|
||||
if (!vartrue($forum_quickreply))
|
||||
{
|
||||
$ajaxInsert = ($thread->pages == $thread->page || $thread->pages == 0) ? 1 : 0;
|
||||
// $ajaxInsert = 1;
|
||||
// echo "AJAX-INSERT=".$ajaxInsert ."(".$thread->pages." vs ".$thread->page.")";
|
||||
//Orphan $frm variable???? $frm = e107::getForm();
|
||||
|
||||
$urlParms = array('f'=>'rp','id'=>$this->var['thread_id'], 'post'=>$this->var['thread_id']);
|
||||
$url = e107::url('forum','post', null, array('query'=>$urlParms));; // ."?f=rp&id=".$thread->threadInfo['thread_id']."&post=".$thread->threadInfo['thread_id'];
|
||||
|
||||
return "
|
||||
<form action='" . $url . "' method='post'>
|
||||
<div class='form-group'>
|
||||
<textarea cols='80' placeholder='".LAN_FORUM_2007."' rows='4' id='forum-quickreply-text' class='tbox input-xxlarge form-control' name='post' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'></textarea>
|
||||
</div>
|
||||
<div class='center text-center form-group'>
|
||||
<input type='submit' data-token='".e_TOKEN."' data-forum-insert='".$ajaxInsert."' data-forum-post='".$this->var['thread_forum_id']."' data-forum-thread='".$this->var['thread_id']."' data-forum-action='quickreply' name='reply' value='".LAN_FORUM_2006. "' class='btn btn-success button' />
|
||||
<input type='hidden' name='thread_id' value='".$this->var['thread_id']."' />
|
||||
</div>
|
||||
|
||||
</form>";
|
||||
|
||||
if(E107_DEBUG_LEVEL > 0)
|
||||
{
|
||||
// echo "<div class='alert alert-info'>Thread id: ".$threadId."</div>";
|
||||
// print_a($this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Preview should be reserved for the full 'Post reply' page. <input type='submit' name='fpreview' value='" . Preview . "' />
|
||||
}
|
||||
//---- else
|
||||
//---- {
|
||||
return $forum_quickreply;
|
||||
//---- }
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
@@ -13,19 +13,21 @@ if(!defined('e107_INIT'))
|
||||
|
||||
if(USER_AREA)
|
||||
{
|
||||
// Work-around for indent issue. see: https://github.com/twitter/bootstrap/issues/4890
|
||||
e107::css('inline', "
|
||||
/* Gallery CSS */
|
||||
.thumbnails .span2:nth-child(6n+1) {
|
||||
margin-left:0;
|
||||
}", 'jquery');
|
||||
}
|
||||
// Work-around for indent issue. see: https://github.com/twitter/bootstrap/issues/4890
|
||||
e107::css('inline', "
|
||||
/* Gallery CSS */
|
||||
.thumbnails .span2:nth-child(6n+1) {
|
||||
margin-left:0;
|
||||
}", 'jquery');
|
||||
|
||||
$plugPrefs = e107::getPlugConfig('gallery')->getPref();
|
||||
|
||||
if(vartrue($plugPrefs['pp_global'], false))
|
||||
{
|
||||
e107_require_once(e_PLUGIN . 'gallery/includes/gallery_load.php');
|
||||
// Load prettyPhoto settings and files.
|
||||
gallery_load_prettyphoto();
|
||||
$plugPrefs = e107::getPlugConfig('gallery')->getPref();
|
||||
|
||||
if(vartrue($plugPrefs['pp_global'], false))
|
||||
{
|
||||
e107_require_once(e_PLUGIN . 'gallery/includes/gallery_load.php');
|
||||
// Load prettyPhoto settings and files.
|
||||
gallery_load_prettyphoto();
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -19,7 +19,7 @@ global $sc_style;
|
||||
$NEWS_MENU_TEMPLATE['category']['start'] = '<ul class="nav nav-list news-menu-category">';
|
||||
$NEWS_MENU_TEMPLATE['category']['end'] = '</ul>';
|
||||
$NEWS_MENU_TEMPLATE['category']['item'] = '
|
||||
<li><a class="e-menu-link newscats{active}" href="{NEWS_CATEGORY_URL}">{NEWS_CATEGORY_TITLE} {NEWS_CATEGORY_NEWS_COUNT}</a></li>
|
||||
<li><a class="e-menu-link newscats{active}" href="{NEWS_CATEGORY_URL}">{NEWS_CATEGORY_TITLE} <span>{NEWS_CATEGORY_NEWS_COUNT}</span></a></li>
|
||||
';
|
||||
|
||||
$NEWS_MENU_WRAPPER['category']['NEWS_CATEGORY_NEWS_COUNT'] = "({---})"; // Wrap brackets around the news count when value is returned.
|
||||
@@ -34,7 +34,7 @@ $NEWS_MENU_WRAPPER['category']['NEWS_CATEGORY_NEWS_COUNT'] = "({---})"; // Wrap
|
||||
$NEWS_MENU_TEMPLATE['months']['start'] = '<ul class="nav nav-list news-menu-months">';
|
||||
$NEWS_MENU_TEMPLATE['months']['end'] = '</ul>';
|
||||
$NEWS_MENU_TEMPLATE['months']['item'] = '
|
||||
<li><a class="e-menu-link newsmonths{active}" href="{url}">{month} ({count})</a></li>
|
||||
<li><a class="e-menu-link newsmonths{active}" href="{url}">{month} <span>({count})</span></a></li>
|
||||
';
|
||||
//$NEWS_MENU_TEMPLATE['months']['separator'] = '<br />';
|
||||
|
||||
@@ -46,7 +46,7 @@ $NEWS_MENU_TEMPLATE['months']['item'] = '
|
||||
// latest menu
|
||||
$NEWS_MENU_TEMPLATE['latest']['start'] = '<ul class="nav nav-list news-menu-latest">';
|
||||
$NEWS_MENU_TEMPLATE['latest']['end'] = '</ul>'; // Example: $NEWS_MENU_TEMPLATE['latest']['end'] '<br />{currentTotal} from {total}';
|
||||
$NEWS_MENU_TEMPLATE['latest']['item'] = '<li><a class="e-menu-link newsmonths" href="{NEWSURL}">{NEWSTITLE} {NEWSCOMMENTCOUNT}</a></li>';
|
||||
$NEWS_MENU_TEMPLATE['latest']['item'] = '<li><a class="e-menu-link newsmonths" href="{NEWSURL}">{NEWSTITLE} <span>{NEWSCOMMENTCOUNT}</span></a></li>';
|
||||
|
||||
$NEWS_MENU_WRAPPER['latest']['NEWSCOMMENTCOUNT'] = "({---})";
|
||||
|
||||
|
@@ -65,10 +65,22 @@ class page_sitelink // include plugin-folder in the name.
|
||||
'description' => "A list of all chapters from the book ".$row['chapter_name']
|
||||
);
|
||||
}
|
||||
|
||||
$chaps = $sql->retrieve("SELECT * FROM #page_chapters WHERE chapter_parent !=0 ORDER BY chapter_order ASC" , true);
|
||||
|
||||
foreach($chaps as $row)
|
||||
{
|
||||
$links[] = array(
|
||||
'name' => "All Pages from ".$row['chapter_name'],
|
||||
'function' => "pagesFromChapter",
|
||||
'parm' => $row['chapter_id'],
|
||||
'description' => "A list of all pages from the chapter ".$row['chapter_name']
|
||||
);
|
||||
}
|
||||
|
||||
$links[] = array(
|
||||
'name' => "All Pages",
|
||||
'function' => "pageNav",
|
||||
'function' => "pageList",
|
||||
'parm' => "",
|
||||
'description' => "A list of all pages"
|
||||
);
|
||||
@@ -83,7 +95,66 @@ class page_sitelink // include plugin-folder in the name.
|
||||
{
|
||||
return $this->pageNav('book=0');
|
||||
}
|
||||
|
||||
|
||||
public function pagesFromChapter($id)
|
||||
{
|
||||
|
||||
return $this->pageList($id);
|
||||
}
|
||||
|
||||
|
||||
private function pageList($parm)
|
||||
{
|
||||
$sql = e107::getDb();
|
||||
$arr = array();
|
||||
|
||||
|
||||
if(!empty($parm))
|
||||
{
|
||||
$query = "SELECT * FROM `#page` WHERE page_class IN (".USERCLASS_LIST.") AND page_chapter = ".intval($parm)." ORDER BY page_order ASC" ;
|
||||
}
|
||||
else
|
||||
{
|
||||
$query = "SELECT * FROM `#page` WHERE page_class IN (".USERCLASS_LIST.") ORDER BY page_order ASC" ;
|
||||
}
|
||||
|
||||
$pages = $sql->retrieve($query, true);
|
||||
|
||||
foreach($pages as $row)
|
||||
{
|
||||
$chapter_parent = $this->getParent($row['page_chapter']);
|
||||
|
||||
$row['book_sef'] = $this->getSef($chapter_parent);
|
||||
|
||||
$row['chapter_sef'] = $this->getSef($row['page_chapter']);
|
||||
|
||||
if(!vartrue($row['chapter_sef']))
|
||||
{
|
||||
// $row['chapter_sef'] = '--sef-not-assigned--';
|
||||
}
|
||||
|
||||
$arr[] = array(
|
||||
'link_id' => $row['page_id'],
|
||||
'link_name' => $row['page_title'] ? $row['page_title'] : 'No title', // FIXME lan
|
||||
'link_url' => e107::getUrl()->create('page/view', $row, array('allow' => 'page_sef,page_title,page_id,chapter_sef,book_sef')),
|
||||
'link_description' => '',
|
||||
// 'link_button' => $row['menu_image'],
|
||||
'link_category' => '',
|
||||
'link_order' => $row['page_order'],
|
||||
'link_parent' => $row['page_chapter'],
|
||||
'link_open' => '',
|
||||
'link_class' => intval($row['page_class']),
|
||||
'link_active' => (isset($options['cpage']) && $row['page_id'] == $options['cpage']),
|
||||
'link_identifier' => 'page-nav-'.intval($row['page_id']) // used for css id.
|
||||
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
return $arr;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a list of all chapters from a sepcific book.
|
||||
*/
|
||||
|
BIN
e107_plugins/social/font/fontello.woff2
Normal file
BIN
e107_plugins/social/font/fontello.woff2
Normal file
Binary file not shown.
@@ -19,7 +19,7 @@ class tinymce4_setup
|
||||
{
|
||||
$list = e107::getConfig()->get('e_meta_list');
|
||||
|
||||
if(in_array('tinymce4',$list))
|
||||
if(!empty($list) && in_array('tinymce4',$list))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@@ -21,4 +21,6 @@ mark { text-decoration: underline; color:#FF0000; font-weight:bold; }
|
||||
.list-unstyled { list-style: outside none none; }
|
||||
|
||||
#login-template { width:60%; max-width:350px; margin-right:auto;margin-left:auto; }
|
||||
div.form-group { padding-top: 5px }
|
||||
div.form-group { padding-top: 5px }
|
||||
|
||||
div.news-empty { text-align:center; font-weight: bold }
|
18
news.php
18
news.php
@@ -411,7 +411,7 @@ e107::getDebug()->log("PageTitle: ".e_PAGETITLE);
|
||||
}
|
||||
else // No News - empty.
|
||||
{
|
||||
$text .= "<div class='alert alert-info'>".(strstr(e_QUERY, "month") ? LAN_NEWS_462 : LAN_NEWS_83)."</div>";
|
||||
$text .= "<div class='news-empty'><div class='alert alert-info'>".(strstr(e_QUERY, "month") ? LAN_NEWS_462 : LAN_NEWS_83)."</div></div>";
|
||||
}
|
||||
|
||||
if(vartrue($template['end']))
|
||||
@@ -624,6 +624,8 @@ $order = $tp -> toDB($order, true); /// @todo - try not to use toDB() - trigge
|
||||
|
||||
$interval = $pref['newsposts'];
|
||||
|
||||
|
||||
|
||||
switch ($action)
|
||||
{
|
||||
case "list" :
|
||||
@@ -639,6 +641,8 @@ switch ($action)
|
||||
AND n.news_start < ".time()." AND (n.news_end=0 || n.news_end>".time().")
|
||||
AND n.news_category={$sub_action}
|
||||
ORDER BY n.news_sticky DESC,".$order." DESC LIMIT ".intval($newsfrom).",".ITEMVIEW;
|
||||
|
||||
$noNewsMessage = LAN_NEWS_463;
|
||||
break;
|
||||
|
||||
|
||||
@@ -669,8 +673,11 @@ switch ($action)
|
||||
WHERE n.news_id={$sub_action} AND n.news_class REGEXP '".e_CLASS_REGEXP."' AND NOT (n.news_class REGEXP ".$nobody_regexp.")
|
||||
AND n.news_start < ".time()." AND (n.news_end=0 || n.news_end>".time().")";
|
||||
}
|
||||
|
||||
$noNewsMessage = LAN_NEWS_83;
|
||||
break;
|
||||
|
||||
|
||||
case "month" :
|
||||
case "day" :
|
||||
$item = $tp -> toDB($sub_action).'20000101';
|
||||
@@ -700,6 +707,9 @@ switch ($action)
|
||||
AND n.news_start < ".time()." AND (n.news_end=0 || n.news_end>".time().")
|
||||
AND (FIND_IN_SET('0', n.news_render_type) OR FIND_IN_SET(1, n.news_render_type)) AND n.news_datestamp BETWEEN {$startdate} AND {$enddate}
|
||||
ORDER BY ".$order." DESC LIMIT ".intval($newsfrom).",".ITEMVIEW;
|
||||
|
||||
$noNewsMessage = LAN_NEWS_462;
|
||||
|
||||
break;
|
||||
|
||||
case 'default' :
|
||||
@@ -743,6 +753,8 @@ switch ($action)
|
||||
AND (FIND_IN_SET('0', n.news_render_type) OR FIND_IN_SET(1, n.news_render_type))
|
||||
ORDER BY n.news_sticky DESC, ".$order." DESC LIMIT ".intval($newsfrom).",".ITEMVIEW;
|
||||
}
|
||||
|
||||
$noNewsMessage = LAN_NEWS_83;
|
||||
} // END - switch($action)
|
||||
|
||||
|
||||
@@ -780,10 +792,10 @@ if($newsCachedPage = checkCache($cacheString)) // normal news front-page - with
|
||||
}
|
||||
|
||||
|
||||
if (!($news_total = $sql->db_Select_gen($query)))
|
||||
if (!($news_total = $sql->gen($query)))
|
||||
{ // No news items
|
||||
require_once(HEADERF);
|
||||
echo "<br /><br /><div style='text-align:center'><b>".(strstr(e_QUERY, "month") ? LAN_NEWS_462 : LAN_NEWS_83)."</b></div><br /><br />";
|
||||
echo "<div class='news-empty'><div class='alert alert-info' style='text-align:center'>".$noNewsMessage."</div></div>";
|
||||
require_once(FOOTERF);
|
||||
exit;
|
||||
}
|
||||
|
Reference in New Issue
Block a user