1
0
mirror of https://github.com/e107inc/e107.git synced 2025-03-25 23:02:34 +01:00

Merge pull request #47 from e107inc/master

.
This commit is contained in:
rica-carv 2017-08-02 12:54:43 +01:00 committed by GitHub
commit b45ee04b46
62 changed files with 895 additions and 536 deletions

View File

@ -764,6 +764,7 @@ if(!empty($pref['xurl']) && is_array($pref['xurl']))
define('XURL_FLICKR', vartrue($pref['xurl']['flickr'], false));
define('XURL_INSTAGRAM', vartrue($pref['xurl']['instagram'], false));
define('XURL_PINTEREST', vartrue($pref['xurl']['pinterest'], false));
define('XURL_STEAM', vartrue($pref['xurl']['steam'], false));
define('XURL_VIMEO', vartrue($pref['xurl']['vimeo'], false));
}
else
@ -777,6 +778,7 @@ else
define('XURL_FLICKR', false);
define('XURL_INSTAGRAM', false);
define('XURL_PINTEREST', false);
define('XURL_STEAM', false);
define('XURL_VIMEO', false);
}
@ -2503,7 +2505,7 @@ class e_http_header
if($this->compression_server_support == true && $this->compression_browser_support == true)
{
$this->compress_output = varset(e107::getPref('compress_output'),false);
$this->compress_output = (bool) varset(e107::getPref('compress_output'),false);
}
else
{
@ -2594,7 +2596,7 @@ class e_http_header
$text .=print_a($server,true);
if($this->compress_output == true)
if($this->compress_output === true)
{
$text = gzencode($text, $this->compression_level);
@ -2642,28 +2644,18 @@ class e_http_header
}
if($this->compress_output != false)
if($this->compress_output !== false)
{
// $this->setHeader("ETag: \"{$this->etag}-gzip\"");
$this->setHeader('ETag: "'.$this->etag.'-gzip"', true);
$this->setHeader('ETag: "'.$this->etag.'-gzip"', true);
$this->content = gzencode($this->content, $this->compression_level);
$this->length = strlen($this->content);
$this->setHeader('Content-Encoding: gzip', true);
$this->setHeader("Content-Length: ".$this->length, true);
}
else
{
/*
if($this->compression_browser_support ==true)
{
$this->setHeader('ETag: "'.$this->etag.'-gzip"', true);
}
else
{*/
$this->setHeader('ETag: "'.$this->etag.'"', true);
// }
$this->setHeader('ETag: "'.$this->etag.'"', true);
$this->setHeader("Content-Length: ".$this->length, true);
}

237
cron.php Normal file → Executable file
View File

@ -1,220 +1,41 @@
#!/usr/bin/php -q
<?php
/*
+ ----------------------------------------------------------------------------+
|| e107 website system
|
| Copyright (C) 2008-2014 e107 Inc
| http://e107.org
|
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
*/
// Usage: [full path to this script]cron.php --u=admin --p=password // use your admin login.
// test
/**
* e107 website system
*
* Copyright (C) 2008-2017 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* @file
* Handles incoming requests to fire off regularly-scheduled tasks (cron jobs).
*
* @example
* Using wget:
* /usr/bin/wget -O - -q http://example.com/cron.php?token=TOKEN > /dev/null 2>&1
* Using curl:
* /usr/bin/curl --silent --compressed http://example.com/cron.php?token=TOKEN > /dev/null 2>&1
* Using lynx:
* /usr/bin/lynx -source http://example.com/cron.php?token=TOKEN > /dev/null 2>&1
* Using PHP:
* /usr/bin/php -q /var/www/example.com/cron.php token=TOKEN
* /usr/bin/php -q /var/www/example.com/cron.php TOKEN
* Using as Shell script:
* /var/www/example.com/cron.php token=TOKEN
* /var/www/example.com/cron.php TOKEN
*/
$_E107['cli'] = true;
$_E107['debug'] = false;
$_E107['no_online'] = true;
$_E107['no_forceuserupdate'] = true;
$_E107['no_menus'] = true;
$_E107['allow_guest'] = true; // allow crons to run while in members-only mode.
$_E107['allow_guest'] = true; // allow crons to run while in members-only mode.
$_E107['no_maintenance'] = true;
// we allow theme init as cron jobs might need to access current theme templates (e.g. custom email templates)
require_once(realpath(dirname(__FILE__) . "/class2.php"));
require_once(e_HANDLER . "cron_class.php");
require_once(realpath(dirname(__FILE__)."/class2.php"));
$pwd = ($_E107['debug'] && $_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : trim($_SERVER['argv'][1]);
if(!empty($_GET['token']))
{
$pwd = e107::getParser()->filter($_GET['token']);
}
else
{
$pwd = str_replace('token=','',$pwd);
}
if(($pref['e_cron_pwd'] != $pwd) || empty($pref['e_cron_pwd']))
{
if(!empty($pwd))
{
require_once(e_HANDLER."mail.php");
$message = "Your Cron Schedule is not configured correctly. Your passwords do not match.
<br /><br />
Sent from cron: ".$pwd."<br />
Stored in e107: ".$pref['e_cron_pwd']."<br /><br />
You should regenerate the cron command in admin and enter it again in your server configuration.
";
$message .= "<h2>Debug Info</h2>";
$message .= "<h3>_SERVER</h3>";
$message .= print_a($_SERVER,true);
$message .= "<h3>_ENV</h3>";
$message .= print_a($_ENV,true);
$message .= "<h3>_GET</h3>";
$message .= print_a($_GET,true);
sendemail($pref['siteadminemail'], "e107 - Cron Schedule Misconfigured.", $message, $pref['siteadmin'],$pref['siteadminemail'], $pref['siteadmin']);
}
exit;
}
// e107::getCache()->CachePageMD5 = '_';
@file_put_contents(e_CACHE.'cronLastLoad.php',time());
// from the plugin directory:
// realpath(dirname(__FILE__)."/../../")."/";
$list = array();
$sql = e107::getDb();
if($sql->select("cron",'cron_function,cron_tab','cron_active =1'))
{
while($row = $sql->fetch())
{
list($class,$function) = explode("::",$row['cron_function'],2);
$key = $class."__".$function;
$list[$key] = array(
'path' => $class,
'active' => 1,
'tab' => $row['cron_tab'],
'function' => $function,
'class' => $class
);
}
}
// foreach($pref['e_cron_pref'] as $func=>$cron)
// {
// if($cron['active']==1)
// {
// $list[$func] = $cron;
// }
// }
if($_E107['debug'] && $_SERVER['QUERY_STRING'])
{
echo "<h1>Cron Lists</h1>";
print_a($list);
}
require_once(e_HANDLER."cron_class.php");
$cron = new CronParser();
require_once(e_HANDLER."mail.php");
foreach($list as $func=>$val)
{
$cron->calcLastRan($val['tab']);
$due = $cron->getLastRanUnix();
if($_E107['debug'])
{
echo "<br />Cron: ".$val['function'];
}
if($due > (time()-45))
{
if($_E107['debug']) { echo "<br />Running Now...<br />path: ".$val['path']; }
if(($val['path']=='_system') || is_readable(e_PLUGIN.$val['path']."/e_cron.php"))
{
if($val['path'] != '_system') // this is correct.
{
include_once(e_PLUGIN.$val['path']."/e_cron.php");
}
$classname = $val['class']."_cron";
if(class_exists($classname, false))
{
$obj = new $classname;
if(method_exists($obj,$val['function']))
{
// $mes->add("Executing config function <b>".$key." : ".$method_name."()</b>", E_MESSAGE_DEBUG);
if($_E107['debug']) { echo "<br />Method Found: ".$classname."::".$val['function']."()"; }
// Exception handling
$methodname = $val['function'];
$status = false;
try
{
$status = $obj->$methodname();
}
catch (Exception $e)
{
$errorMData = $e->getFile().' '.$e->getLine();
$errorMData .= "\n\n".$e->getCode().''.$e->getMessage();
$errorMData .= "\n\n".implode("\n", $e->getTrace());
//TODO log error in admin log. Pref for sending email to Administator
sendemail($pref['siteadminemail'], $pref['siteadmin'].": Cron Schedule Exception", $errorMData, $pref['siteadmin'],$pref['siteadminemail'], $pref['siteadmin']);
}
// $status = call_user_func(array($obj,$val['function']));
// If task returns value which is not boolean (bc), it'll be used as a message (send email, logs)
if($status && true !== $status)
{
//TODO log error in admin log. Pref for sending email to Administator
// echo "\nerror running the function ".$func.".\n"; // log the error.
if($_E107['debug']) { echo "<br />Method returned message: [{$classname}::".$val['function'].'] '.$status; }
sendemail($pref['siteadminemail'], $pref['siteadmin'].": Cron Schedule Task Report", "Method returned message: [{$classname}::".$val['function'].'] '.$status, $pref['siteadmin'], $pref['siteadminemail'], $pref['siteadmin']);
}
}
else
{
if($_E107['debug']) { echo "<br />Couldn't find method: ".$val['function']; }
}
}
else
{
if($_E107['debug']) { echo "<br />Couldn't find class: ".$classname; }
}
}
}
// echo "Cron Unix = ". $cron->getLastRanUnix();
// echo "<br />Now = ".time();
}
// echo "<br />Cron '$cron_str0' last due at: " . date('r', $cron->getLastRanUnix()) . "<p>";
// $cron->getLastRan() returns last due time in an array
// print_a($cron->getLastRan());
// echo "Debug:<br />" . nl2br($cron->getDebug());
/*
$cron_str1 = "3 12 * * *";
if ($cron->calcLastRan($cron_str1))
{
echo "<p>Cron '$cron_str1' last due at: " . date('r', $cron->getLastRanUnix()) . "<p>";
print_r($cron->getLastRan());
}
else
{
echo "Error parsing";
}
echo "Debug:<br />" . nl2br($cron->getDebug());
*/
exit;
?>
$cron = new cronScheduler();
$cron->run();

View File

@ -106,10 +106,12 @@
</ifmodule>
<FilesMatch "\.(js|css|ico|pdf|flv|jpg|jpeg|png|gif|swf|mp3|mp4|eot|otf|ttc|ttf|woff|woff2)$">
Header set Cache-Control "public"
Header unset Cookie
Header unset Set-Cookie
# Header set Access-Control-Allow-Origin "http://mydomain.com"
<IfModule mod_headers.c>
Header set Cache-Control "public"
Header unset Cookie
Header unset Set-Cookie
# Header set Access-Control-Allow-Origin "http://mydomain.com"
</IfModule>
</FilesMatch>

View File

@ -229,7 +229,8 @@ class admin_start
}
else
{
$mes->addWarning("Unable to create <b>".$dr."</b>. Please check your folder permissions.");
$message = e107::getParser()->lanVars(ADLAN_187,$dr,true);
$mes->addWarning($message);
}
}
}
@ -245,7 +246,8 @@ class admin_start
if(e107::getDate()->isValidTimezone($timezone) == false)
{
$mes->addWarning("Your timezone setting (".$timezone.") is invalid. It has been reset to UTC. To Modify, please go to Admin -> Preferences -> Date Display Options.", 'default', true);
$message = e107::getParser()->lanVars(ADLAN_188, $timezone);
$mes->addWarning($message, 'default', true);
e107::getConfig()->set('timezone','UTC')->save(false,true,false);
$this->refresh = true;
}
@ -522,7 +524,7 @@ TMPO;
if($inCompatText)
{
$text = "<ul>".$inCompatText."</ul>";
$mes->addWarning("The following plugins are not compatible with this version of e107 and should be uninstalled: ".$text."<a class='btn btn-default' href='".e_ADMIN."plugin.php'>uninstall</a>");
$mes->addWarning(ADLAN_189."&nbsp;".$text."<a class='btn btn-default' href='".e_ADMIN."plugin.php'>".LAN_UNINSTALL."</a>");
}
}

View File

@ -56,7 +56,7 @@ if(ADMIN && e_AJAX_REQUEST && varset($_GET['mode']) == 'core' && ($_GET['type']
$text .= '
<div class="media">
<div class="media-body">
<h4 class="media-heading"><a href="'.$row['link'].'">'.$row['title'].'</a> <small> '.$row['pubDate'].'</small></h4>
<h4 class="media-heading"><a target="_blank" href="'.$row['link'].'">'.$row['title'].'</a> <small> '.$row['pubDate'].'</small></h4>
'.$tp->text_truncate($description,150).'
</div></div>';
$count++;
@ -103,7 +103,7 @@ if(ADMIN && (e_AJAX_REQUEST || deftrue('e_DEBUG_FEEDS')) && varset($_GET['mode']
$rows = e107::getXml()->parseXml($data, 'advanced');
// print_a($rows);
// exit;
$link = ($type == 'plugin') ? e_ADMIN."plugin.php?mode=online" : e_ADMIN."theme.php?mode=online";
$link = ($type == 'plugin') ? e_ADMIN."plugin.php?mode=online" : e_ADMIN."theme.php?mode=main&action=online";
$text = "<div style='margin-top:10px'>";
@ -471,4 +471,4 @@ if (!function_exists("parse_admin"))
}
}
}
}
}

View File

@ -665,13 +665,14 @@ class page_admin_ui extends e_admin_ui
}
if(vartrue($_POST['menu_delete'])) // Delete a Menu (or rather, remove it's data )
if(!empty($_POST['menu_delete'])) // Delete a Page/Menu combination (or rather, remove it's data )
{
$key = key($_POST['menu_delete']);
if($key)
{
e107::getDb()->update('page',"menu_name = '' WHERE page_id=".intval($key)." LIMIT 1");
//e107::getDb()->update('page',"menu_name = '' WHERE page_id=".intval($key)." LIMIT 1");
e107::getDb()->delete('page',"page_id=".intval($key));
}
}

View File

@ -50,7 +50,7 @@ require_once(e_ADMIN."auth.php");
Nuvolo Icons, PHPMailer, TCPDF, PHP UTF8
</p>
<div class="copyright">Copyright <a href="http://e107.org/content/About-Us:The-Team" title="e107 Team">e107 Inc.</a> 2008-2017</div>
<div class="copyright">Copyright <a target="_blank" href="http://e107.org/community" title="e107 Team">e107 Inc.</a> 2008-2017</div>
</div>
</div>
</div>
@ -63,4 +63,4 @@ require_once(e_ADMIN."footer.php");
exit;
?>
?>

View File

@ -53,62 +53,42 @@ if(!deftrue('e_MENUMANAGER_ACTIVE'))
function loadJSAddons()
{
if(deftrue('e_MENUMANAGER_ACTIVE'))
{
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);
// TODO use Library Manager. Remove unused libraries...
e107::css('core', 'bootstrap-select/bootstrap-select.min.css', 'jquery');
e107::js('footer', '{e_WEB}js/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);
// e107::css('core', 'bootstrap-multiselect/css/bootstrap-multiselect.css', 'jquery');
e107::js('footer', '{e_WEB}js/bootstrap-multiselect/js/bootstrap-multiselect.js', 'jquery', 2);
// TODO: remove typeahead.
e107::js('core', 'bootstrap-jasny/js/jasny-bootstrap.js', 'jquery', 2);
e107::js('footer', '{e_WEB}js/bootstrap-jasny/js/jasny-bootstrap.js', 'jquery', 2);
e107::css('core', 'bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css', 'jquery');
e107::js('core', 'bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js', 'jquery', 2);
e107::css('core', 'bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css', 'jquery');
e107::js('footer', '{e_WEB}js/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js', 'jquery', 2);
e107::js('core', 'jquery.h5validate.min.js','jquery',2);
e107::js('footer','{e_WEB}js/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::js('footer', '{e_WEB}js/jquery.elastic.js', 'jquery', 2);
e107::js('footer', '{e_WEB}js/jquery.at.caret.min.js', 'jquery', 2);
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::css('core', 'core/admin.jquery.css', 'jquery');
e107::css('core', 'core/all.jquery.css', 'jquery');
e107::js("core", "core/all.jquery.js","jquery",4); // Load all default functions.
e107::js('footer', '{e_WEB}js/core/admin.jquery.js', 'jquery', 5); // Load all default functions.
e107::js('footer', '{e_WEB}js/core/all.jquery.js', 'jquery', 5); // Load all default functions.
$plUpload = "plupload/i18n/".e_LAN.".js";
$plUpload = '{e_WEB}js/plupload/i18n/' . e_LAN . '.js';
if(e_LAN != 'en' && file_exists(e_WEB_JS.$plUpload))
if(e_LAN != 'en' && file_exists(e_WEB_JS . $plUpload))
{
e107::js('core', $plUpload);
e107::js('footer', $plUpload, 'jquery', 5);
}
}
// Load library dependencies.

View File

@ -621,7 +621,7 @@ class media_form_ui extends e_admin_form_ui
{
$text = $this->renderValue('options',$value,'',$id);
}
return "<div class='nowrap'>".$text."</div>";
}
@ -896,6 +896,8 @@ class media_admin_ui extends e_admin_ui
function init()
{
$this->prefs['youtube_apikey']['writeParms']['post'] = " <a target='_blank' href='https://code.google.com/apis/console/'>".LAN_MORE."</a>";
if(E107_DEBUG_LEVEL > 0)
@ -1021,10 +1023,11 @@ class media_admin_ui extends e_admin_ui
}
if($this->getQuery('iframe'))
{
// e107::js('tinymce4','plugins/compat3x/tiny_mce_popup.js');
$this->getResponse()->setIframeMod(); // disable header/footer menus etc.
@ -1050,9 +1053,8 @@ class media_admin_ui extends e_admin_ui
function navPage() // no functioning correctly - see e_AJAX_REQUEST above.
{
$bbcodeMode = ($this->getQuery('bbcode')=='img') ? 'bbcode=img' : FALSE;
$bbcodeMode = ($this->getQuery('bbcode') =='img' ) ? 'bbcode=img' : FALSE;
if($_GET['from'])
{
@ -1068,11 +1070,26 @@ class media_admin_ui extends e_admin_ui
}
public function ListAjaxObserver()
{
$cat = $this->getQuery('for');
$file = (preg_match('/_file(_[\d]{1,2})?$/',$cat)) ? true : false;
if($file === true) // Make sure dialog mode is used when ajax searches occur.
{
$this->setQuery('action','dialog');
$this->setFileListMode($cat);
}
$this->getTreeModel()->setParam('db_query', $this->_modifyListQry(false, false, 0, false, $this->listQry))->load();
}
function dialogPage() // Popup dialogPage for Image Selection.
{
$cat = $this->getQuery('for');
$file = (preg_match('/_file(_[\d]{1,2})?$/',$cat)) ? TRUE : FALSE;
$mes = e107::getMessage();
@ -1091,28 +1108,7 @@ class media_admin_ui extends e_admin_ui
if($file)
{
$cat = e107::getParser()->toDB($cat);
if(!isset($this->cats[$cat]))
{
return;
}
$this->listQry = "SELECT m.*,u.user_id,u.user_name FROM #core_media AS m LEFT JOIN #user AS u ON m.media_author = u.user_id WHERE m.media_category = '".$cat."' "; // without any Order or Limit.
unset($this->fields['checkboxes']);
$this->fields['options']['type'] = 'method';
$this->fields['media_category']['nolist'] = true;
$this->fields['media_userclass']['nolist'] = true;
$this->fields['media_dimensions']['nolist'] = true;
$this->fields['media_description']['nolist'] = true;
$this->fields['media_type']['nolist'] = true;
foreach($this->fields as $k=>$v)
{
$this->fields[$k]['filter'] = false;
}
$this->setFileListMode($cat);
echo $this->mediaSelectUpload('file');
@ -1121,7 +1117,6 @@ class media_admin_ui extends e_admin_ui
echo '<div class="media-select-file-footer"><a class="btn btn-danger e-media-select-file-none e-dialog-close" data-target="'.$tagid.'" data-target-label="'.LAN_CHOOSE_FILE.'" href="#" ><span><i class="fa fa-ban"></i> '.IMALAN_167.'</span></a></div>';
}
else
{
@ -1130,7 +1125,34 @@ class media_admin_ui extends e_admin_ui
}
private function setFileListMode($cat)
{
$cat = e107::getParser()->toDB($cat);
if(!isset($this->cats[$cat]))
{
return;
}
$this->listQry = "SELECT m.*,u.user_id,u.user_name FROM #core_media AS m LEFT JOIN #user AS u ON m.media_author = u.user_id WHERE FIND_IN_SET('".$cat."', m.media_category) "; // without any Order or Limit.
unset($this->fields['checkboxes']);
$this->fields['options']['type'] = 'method';
$this->fields['media_category']['nolist'] = true;
$this->fields['media_userclass']['nolist'] = true;
$this->fields['media_dimensions']['nolist'] = true;
$this->fields['media_description']['nolist'] = true;
$this->fields['media_type']['nolist'] = true;
$this->fields['media_url']['nolist'] = true;
$this->fields['media_sef']['nolist'] = true;
foreach($this->fields as $k=>$v)
{
$this->fields[$k]['filter'] = false;
}
}
function uploadTab()
@ -2545,7 +2567,7 @@ class media_admin_ui extends e_admin_ui
{
if(empty($f))
{
e107::getMessage()->addWarning("0 byte file found in: ".e_IMPORT."<br />Please remove before proceeding.");
e107::getMessage()->addWarning(IMALAN_180."&nbsp;".e_IMPORT."<br />".IMALAN_181);
////rename(e_IMPORT.$f['path'].$f['fname'],e_IMPOT.$f['path'].$f['fname']."-bad");
continue;
}

View File

@ -243,6 +243,7 @@ class mailout_admin extends e_admin_dispatcher
'sent/list' => array('caption'=> LAN_MAILOUT_192, 'perm' => 'W'),
'other2' => array('divider'=> true),
'prefs/prefs' => array('caption'=> LAN_PREFS, 'perm' => '0'),
'maint/maint' => array('caption'=> ADLAN_40, 'perm' => '0'),
'main/templates' => array('caption'=> LAN_MAILOUT_262, 'perm' => '0'),
);
@ -256,6 +257,19 @@ class mailout_admin extends e_admin_dispatcher
protected $adminMenuIcon = 'e-mail-24';
protected $menuTitle = LAN_MAILOUT_15;
function init()
{
$mailer = e107::getPref('bulkmailer');
if($mailer === 'smtp' )
{
$this->adminMenu['other3'] = array('divider'=> true);
$this->adminMenu['prefs/test'] =array('caption'=> LAN_MAILOUT_270, 'perm' => '0'); //TODO LAN
}
}
}
class mailout_main_ui extends e_admin_ui
@ -603,7 +617,7 @@ class mailout_main_ui extends e_admin_ui
$options = array('mailer'=>$pref['bulkmailer']);
if (!e107::getEmail($options)->sendEmail($sendto, LAN_MAILOUT_189, $eml))
if (e107::getEmail($options)->sendEmail($sendto, LAN_MAILOUT_189, $eml) !== true)
{
$mes->addError(($pref['bulkmailer'] == 'smtp') ? LAN_MAILOUT_67 : LAN_MAILOUT_106);
}
@ -961,8 +975,102 @@ class mailout_main_ui extends e_admin_ui
}
return $text;
}
}
/**
* @TODO Do NOT translate, this is for debugging ONLY.
*
*/
function testPage()
{
require_once(e_HANDLER. 'phpmailer/PHPMailerAutoload.php');
$smtp = new SMTP;
$smtp->do_debug = SMTP::DEBUG_CONNECTION;
$mes = e107::getMessage();
$pref = e107::getPref();
$username = $pref['smtp_username'];
$pwd = $pref['smtp_password'];
$port = ($pref['smtp_port'] != 465) ? $pref['smtp_port'] : 25;
// var_dump($pref['smtp_password']);
// print_a($pref['smtp_password']);
ob_start();
try
{
//Connect to an SMTP server
if(!$smtp->connect($pref['smtp_server'], $port))
{
$mes->addError('Connect failed');
}
//Say hello
if(!$smtp->hello(gethostname()))
{
$mes->addError('EHLO failed: ' . $smtp->getError()['error']);
}
//Get the list of ESMTP services the server offers
$e = $smtp->getServerExtList();
//If server can do TLS encryption, use it
if(is_array($e) && array_key_exists('STARTTLS', $e))
{
$mes->addSuccess("TLS is supported. ");
$tlsok = $smtp->startTLS();
if(!$tlsok)
{
$mes->addError('Failed to start encryption: ' . $smtp->getError()['error']);
}
//Repeat EHLO after STARTTLS
if(!$smtp->hello(gethostname()))
{
$mes->addError('EHLO (2) failed: ' . $smtp->getError()['error']);
}
//Get new capabilities list, which will usually now include AUTH if it didn't before
$e = $smtp->getServerExtList();
}
else
{
$mes->addWarning("TLS is not supported. ");
}
//If server supports authentication, do it (even if no encryption)
if(is_array($e) && array_key_exists('AUTH', $e))
{
if($smtp->authenticate($username, $pwd))
{
$mes->addSuccess("Connected ok!");
}
else
{
$msg = e107::getParser()->lanVars(LAN_MAILOUT_271,array('x'=>$username, 'y'=>$pwd), true);
$mes->addError($msg . $smtp->getError()['error']);
}
}
}
catch(Exception $e)
{
$mes->addError('SMTP error: ' . $e->getMessage());
}
//Whatever happened, close the connection.
$smtp->quit(true);
$content = ob_get_contents();
ob_end_clean();
print_a($content);
}
function sendPage()
{

View File

@ -1154,7 +1154,7 @@ $text .= "
<tr>
<td><label for='profanity-words'>".PRFLAN_43.":</label></td>
<td>
".$frm->tags('profanity_words', $pref['profanity_words'])."
".$frm->tags('profanity_words', $pref['profanity_words'], 250, array('maxItems'=>40))."
<div class='field-help'>".PRFLAN_44."</div>
</td>
</tr>

View File

@ -594,6 +594,20 @@ function update_core_database($type = '')
e107::getPlugin()->refresh('social');
}
if(empty($pref['themecss'])) // FIX
{
if($just_check)
{
return update_needed("Theme CSS pref value is blank.");
}
e107::getConfig()->set('themecss','style.css')->save(false,true,false);
}
return $just_check;
// List of changed menu locations.

View File

@ -1771,7 +1771,7 @@ class users_admin_ui extends e_admin_ui
'rankName' => array('title' => USRLAN_208, 'type' => 'text', 'width' => 'auto', 'thclass' => 'left', 'class' => 'left'),
'lowThresh' => array('title' => USRLAN_209, 'type' => 'text', 'width' => 'auto', 'thclass' => 'left', 'class' => 'left'),
'langPrefix' => array('title' => USRLAN_210, 'type' => 'text', 'width' => 'auto', 'thclass' => 'left', 'class' => 'left'),
'rankImage' => array('title' => USRLAN_210, 'type' => 'text', 'width' => 'auto', 'thclass' => 'left', 'class' => 'left'),
'rankImage' => array('title' => USRLAN_211, 'type' => 'text', 'width' => 'auto', 'thclass' => 'left', 'class' => 'left'),
);

View File

@ -1087,7 +1087,7 @@ class news_shortcodes extends e_shortcode
{
if(trim($val))
{
$url = e107::getUrl()->create('news/list/tag',array('tag'=>$val)); // e_BASE."news.php?tag=".$val
$url = e107::getUrl()->create('news/list/tag',array('tag'=>rawurlencode($val))); // e_BASE."news.php?tag=".$val
$words[] = "<a class='".$class."' href='".$url."'>".$start.$val.$end."</a>";
}
}

View File

@ -31,18 +31,17 @@ e107::getTheme('current', true)->loadLibrary();
if(deftrue('BOOTSTRAP'))
{
e107::js('core', 'bootstrap-notify/js/bootstrap-notify.js','jquery');
e107::css('core', 'bootstrap-notify/css/bootstrap-notify.css','jquery');
e107::js('footer', '{e_WEB}js/bootstrap-notify/js/bootstrap-notify.js', 'jquery', 2);
e107::css('core', 'bootstrap-notify/css/bootstrap-notify.css', 'jquery');
}
// ------------------
// e107::js('core', 'jquery.elastic.js', 'jquery', 2);
e107::js('core', 'rate/js/jquery.raty.js', 'jquery', 2);
e107::css('core', 'core/all.jquery.css', 'jquery');
e107::js('footer', '{e_WEB}js/rate/js/jquery.raty.js', 'jquery', 2);
e107::css('core', 'core/all.jquery.css', 'jquery');
e107::js("core", "core/front.jquery.js","jquery",5); // Load all default functions.
e107::js("core", "core/all.jquery.js","jquery",5); // Load all default functions.
e107::js('footer', '{e_WEB}js/core/front.jquery.js', 'jquery', 5); // Load all default functions.
e107::js('footer', '{e_WEB}js/core/all.jquery.js', 'jquery', 5); // Load all default functions.
$js_body_onload = array(); // Legacy array of code to load with page.
@ -163,7 +162,8 @@ if ($e_headers && is_array($e_headers))
}
unset($e_headers);
echo e107::getUrl()->response()->renderMeta()."\n"; // render all the e107::meta() entries.
// echo e107::getUrl()->response()->renderMeta()."\n"; // render all the e107::meta() entries.
echo e107::getSingleton('eResponse')->renderMeta()."\n";
echo "<title>".(defined('e_PAGETITLE') ? e_PAGETITLE.' - ' : (defined('PAGE_NAME') ? PAGE_NAME.' - ' : "")).SITENAME."</title>\n\n";
@ -490,8 +490,15 @@ function render_meta($type)
}
// legay meta-tag checks.
/*
$isKeywords = e107::getUrl()->response()->getMetaKeywords();
$isDescription = e107::getUrl()->response()->getMetaDescription();
*/
$isKeywords = e107::getSingleton('eResponse')->getMetaKeywords();
$isDescription = e107::getSingleton('eResponse')->getMetaDescription();
if(empty($isKeywords))
{
echo (defined("META_KEYWORDS")) ? "\n<meta name=\"keywords\" content=\"".$key_merge.META_KEYWORDS."\" />\n" : render_meta('keywords');

View File

@ -1208,7 +1208,7 @@ City, State, Country
<item>
<field name="category_id">1</field>
<field name="category_name">Misc</field>
<field name="category_sef"></field>
<field name="category_sef">misc</field>
<field name="category_meta_description"></field>
<field name="category_meta_keywords"></field>
<field name="category_manager">254</field>

View File

@ -6663,7 +6663,7 @@ class e_admin_form_ui extends e_form
<span class='form-group has-feedback has-feedback-left'>
".$this->text('searchquery', $current_query[0], 50, $input_options)."
<i class='fa fa-search searchquery form-control-feedback form-control-feedback-left'></i>
<span>
</span>
".$this->select_open('filter_options', array('class' => 'form-control e-tip tbox select filter', 'id' => false, 'title'=>LAN_FILTER))."
".$this->option(LAN_FILTER_LABEL_DISPLAYALL, '')."
".$this->option(LAN_FILTER_LABEL_CLEAR, '___reset___')."
@ -6731,13 +6731,12 @@ class e_admin_form_ui extends e_form
",'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)
// 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)... use behaviors and call e107.attachBehaviors();
e107::js('footer-inline',"
var filterRunning = false, request;
var applyAfterAjax = function(context) {
\$('.e-hideme', context).hide();
\$('.e-expandit', context).show();
\$('.e-expandit', context).click(function () {
var href = (\$(this).is('a')) ? \$(this).attr('href') : '';
if(href == '' && \$(this).attr('data-target'))
@ -6786,7 +6785,10 @@ class e_admin_form_ui extends e_form
return;
}
cont.html(data).css({ opacity: 1 });
// TODO remove applyAfterAjax() and use behaviors!
applyAfterAjax(cont);
// Attach behaviors to the newly loaded contents.
e107.attachBehaviors();
}, 700);
}, 'html')
.error(function() {
@ -7256,6 +7258,7 @@ class e_admin_form_ui extends e_form
*/
public function getController()
{
return $this->_controller;
}
}

View File

@ -389,7 +389,8 @@ class eFront
$router = new eRouter();
$this->setRouter($router);
$response = new eResponse();
// $response = new eResponse();
$response = e107::getSingleton('eResponse');
$this->setResponse($response);
return $this;
@ -4273,8 +4274,8 @@ class eResponse
$attrData = '';
e107::getEvent()->trigger('system_meta_pre');
foreach ($this->_meta as $attr)
foreach ($this->_meta as $attr)
{
$attrData .= '<meta';
foreach ($attr as $p => $v)

View File

@ -920,4 +920,324 @@ class CronParser
}
}
?>
/**
* Class cronScheduler.
*
* @see cron.php
*
* TODO:
* - Log error in admin log.
* - Pref for sending email to Administrator.
* - LANs
*/
class cronScheduler
{
/**
* Cron parser class.
*
* @var \CronParser.
*/
private $cron;
/**
* Debug mode.
*
* @var bool
*/
private $debug;
/**
* System preferences.
*
* @var array|mixed
*/
private $pref;
/**
* Constructor.
*/
public function __construct()
{
global $_E107, $pref;
$this->cron = new CronParser();
$this->debug = $_E107['debug'];
$this->pref = $pref;
}
/**
* Runs all cron jobs.
*
* @return bool
*/
public function run()
{
$valid = $this->validateToken();
if(!$valid)
{
return false;
}
@file_put_contents(e_CACHE . 'cronLastLoad.php', time());
// Get active cron jobs.
$cron_jobs = $this->getCronJobs(true);
if($this->debug && $_SERVER['QUERY_STRING'])
{
echo "<h1>Cron Lists</h1>";
print_a($cron_jobs);
}
foreach($cron_jobs as $job)
{
$this->runJob($job);
}
}
/**
* Runs a cron job.
*
* @param array $job
* Contains the current cron job. Each element is an array with following
* properties:
* - 'path' string '_system' or plugin name.
* - 'active' int 1 if active, 0 if inactive
* - 'tab' string cron tab
* - 'function' string function name
* - 'class' string class name
*
* @return bool $status
*/
public function runJob($job)
{
$status = false;
if(empty($job['active']))
{
return $status;
}
// Calculate the last due time before this moment.
$this->cron->calcLastRan($job['tab']);
$due = $this->cron->getLastRanUnix();
if($this->debug)
{
echo "<br />Cron: " . $job['function'];
}
if($due <= (time() - 45))
{
return $status;
}
if($job['path'] != '_system' && !is_readable(e_PLUGIN . $job['path'] . "/e_cron.php"))
{
return $status;
}
if($this->debug)
{
echo "<br />Running Now...<br />path: " . $job['path'];
}
// This is correct.
if($job['path'] != '_system')
{
include_once(e_PLUGIN . $job['path'] . "/e_cron.php");
}
$class = $job['class'] . "_cron";
if(!class_exists($class, false))
{
if($this->debug)
{
echo "<br />Couldn't find class: " . $class;
}
return $status;
}
$obj = new $class;
if(!method_exists($obj, $job['function']))
{
if($this->debug)
{
echo "<br />Couldn't find method: " . $job['function'];
}
return $status;
}
if($this->debug)
{
echo "<br />Method Found: " . $class . "::" . $job['function'] . "()";
}
// Exception handling.
$method = $job['function'];
try
{
$status = $obj->$method();
} catch(Exception $e)
{
$msg = $e->getFile() . ' ' . $e->getLine();
$msg .= "\n\n" . $e->getCode() . '' . $e->getMessage();
$msg .= "\n\n" . implode("\n", $e->getTrace());
$mail = array(
'to_mail' => $this->pref['siteadminemail'],
'to_name' => $this->pref['siteadmin'],
'from_mail' => $this->pref['siteadminemail'],
'from_name' => $this->pref['siteadmin'],
'message' => $msg,
'subject' => 'e107 - Cron Schedule Exception',
);
$this->sendMail($mail);
}
// If task returns value which is not boolean (BC), it will be used as a
// message (send email, logs).
if($status && true !== $status)
{
if($this->debug)
{
echo "<br />Method returned message: [{$class}::" . $job['function'] . '] ' . $status;
}
$msg = 'Method returned message: [{' . $class . '}::' . $job['function'] . '] ' . $status;
$mail = array(
'to_mail' => $this->pref['siteadminemail'],
'to_name' => $this->pref['siteadmin'],
'from_mail' => $this->pref['siteadminemail'],
'from_name' => $this->pref['siteadmin'],
'message' => $msg,
'subject' => 'e107 - Cron Schedule Task Report',
);
$this->sendMail($mail);
}
return $status;
}
/**
* Validate Cron Token.
*
* @return bool
*/
public function validateToken()
{
$pwd = ($this->debug && $_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : trim($_SERVER['argv'][1]);
if(!empty($_GET['token']))
{
$pwd = e107::getParser()->filter($_GET['token']);
}
else
{
$pwd = str_replace('token=', '', $pwd);
}
if(($this->pref['e_cron_pwd'] != $pwd) || empty($this->pref['e_cron_pwd']))
{
if(!empty($pwd))
{
$msg = "Your Cron Schedule is not configured correctly. Your passwords do not match.";
$msg .= "<br /><br />";
$msg .= "Sent from cron: " . $pwd;
$msg .= "<br />";
$msg .= "Stored in e107: " . $this->pref['e_cron_pwd'];
$msg .= "<br /><br />";
$msg .= "You should regenerate the cron command in admin and enter it again in your server configuration.";
$msg .= "<h2>" . "Debug Info" . "</h2>";
$msg .= "<h3>_SERVER</h3>";
$msg .= print_a($_SERVER, true);
$msg .= "<h3>_ENV</h3>";
$msg .= print_a($_ENV, true);
$msg .= "<h3>_GET</h3>";
$msg .= print_a($_GET, true);
$mail = array(
'to_mail' => $this->pref['siteadminemail'],
'to_name' => $this->pref['siteadmin'],
'from_mail' => $this->pref['siteadminemail'],
'from_name' => $this->pref['siteadmin'],
'message' => $msg,
'subject' => 'e107 - Cron Schedule Misconfigured',
);
$this->sendMail($mail);
}
return false;
}
return true;
}
/**
* Get available Cron jobs.
*
* @param bool $only_active
* Set to TRUE for active cron jobs.
*
* @return array
* Array contains cron jobs.
*/
public function getCronJobs($only_active = false)
{
$list = array();
$sql = e107::getDb();
$where = '1';
if($only_active === true)
{
$where = 'cron_active = 1';
}
if($sql->select("cron", 'cron_function,cron_tab,cron_active', $where))
{
while($row = $sql->fetch())
{
list($class, $function) = explode("::", $row['cron_function'], 2);
$key = $class . "__" . $function;
$list[$key] = array(
'path' => $class,
'active' => $row['cron_active'],
'tab' => $row['cron_tab'],
'function' => $function,
'class' => $class,
);
}
}
return $list;
}
/**
* Helper method to send email message.
*
* @param array $mail
*/
public function sendMail($mail)
{
require_once(e_HANDLER . "mail.php");
sendemail($mail['to_mail'], $mail['subject'], $mail['message'], $mail['to_name'], $mail['from_mail'], $mail['from_name']);
}
}

View File

@ -2276,17 +2276,20 @@ class e107
*/
public static function meta($name = null, $content = null, $extended = array())
{
$response = self::getSingleton('eResponse');
if($name === 'description')
{
self::getUrl()->response()->addMetaDescription($content); //Cam: TBD
$response->addMetaDescription($content); //Cam: TBD
}
if($name === 'keywords')
{
self::getUrl()->response()->addMetaKeywords($content); //Cam: TBD
$response->addMetaKeywords($content); //Cam: TBD
}
return self::getUrl()->response()->addMeta($name, $content, $extended);
return $response->addMeta($name, $content, $extended);
// return self::getUrl()->response()->addMeta($name, $content, $extended);
}
/**

View File

@ -852,13 +852,11 @@ class e_form
$mlength = vartrue($maxlength) ? "maxlength=".$maxlength : "";
$min = varset($options['min']) ? 'min="'.$options['min'].'"' : '';
$max = vartrue($options['max']) ? 'max="'.$options['max'].'"' : '';
$min = isset($options['min']) ? 'min="'.$options['min'].'"' : '';
$max = isset($options['max']) ? 'max="'.$options['max'].'"' : '';
$options = $this->format_options('text', $name, $options);
//never allow id in format name-value for text fields
if(THEME_LEGACY === false)
{
@ -1028,7 +1026,7 @@ class e_form
if($localonly == true)
{
$text = "<input class='tbox' style='width:80%' id='{$idinput}' type='hidden' name='image' value='{$curVal}' />";
$text .= "<img src='".$img."' id='{$previnput}' class='img-rounded rounded e-expandit e-tip avatar' style='cursor:pointer; width:".$pref['im_width']."px; height:".$pref['im_height']."px' title='".LAN_EFORM_001."' alt='Click on the avatar to change it' />";
$text .= "<img src='".$img."' id='{$previnput}' class='img-rounded rounded e-expandit e-tip avatar' style='cursor:pointer; width:".$pref['im_width']."px; height:".$pref['im_height']."px' title='".LAN_EFORM_001."' alt='".LAN_EFORM_001."' />";
}
else
{
@ -1205,9 +1203,12 @@ class e_form
{
$ret = "<div class='imgselector-container' style='display:block;width:64px;min-height:64px'>";
$thpath = isset($sc_parameters['nothumb']) || vartrue($hide) ? $default : $default_thumb;
$label = "<div id='{$name_id}_prev' class='text-center well well-small image-selector' >";
$label .= $tp->toIcon($default_url);
$label = "<div id='{$name_id}_prev' class='text-center well well-small image-selector img-responsive img-fluid' >";
$label .= $tp->toIcon($default_url,array('class'=>'img-responsive img-fluid'));
//$label = "<div id='{$name_id}_prev' class='text-center well well-small image-selector' >";
//$label .= $tp->toIcon($default_url);
$label .= "
</div>";
@ -1428,11 +1429,10 @@ class e_form
$text .= "<input type='{$ftype}' name='{$name}' id='{$id}' value='{$hiddenValue}' />";
}
// Load it in the footer.
// FIXME use Library Manager (e107::library()) instead?
// TODO use Library Manager...
e107::css('core', 'bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css', 'jquery');
e107::js('core', 'bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js', 'jquery', 2);
e107::js('core', 'bootstrap-datetimepicker/js/bootstrap-datetimepicker.init.js', 'jquery', 2);
e107::js('footer', '{e_WEB}js/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js', 'jquery', 4);
e107::js('footer', '{e_WEB}js/bootstrap-datetimepicker/js/bootstrap-datetimepicker.init.js', 'jquery', 5);
if(e_LANGUAGE !== 'English')
{
@ -1835,7 +1835,7 @@ class e_form
public function pagination($url='', $total=0, $from=0, $perPage=10, $options=array())
{
if(empty($total))
if(empty($total) || empty($perPage))
{
return '';
}
@ -2709,9 +2709,9 @@ class e_form
if(is_array($filter))
if(is_array($filterArray))
{
$text .= $this->selectbox($$filterName, $filterArray, $filterVal);
$text .= $this->selectbox($filterName, $filterArray, $filterVal);
}
// $text .= $this->admin_button($submitName,LAN_SEARCH,'search');
@ -4129,9 +4129,16 @@ class e_form
}
*/
$sf = $this->getController()->getSortField();
if(!isset($parms['sort']) && !empty($sf))
{
$parms['sort'] = true;
}
$value = "<div class='btn-group'>";
if(!empty($parms['sort']) && empty($attributes['grid']))//FIXME use a global variable such as $fieldpref
if(!empty($parms['sort']) && empty($attributes['grid']))
{
$mode = preg_replace('/[^\w]/', '', vartrue($_GET['mode'], ''));
$from = intval(vartrue($_GET['from'],0));
@ -5670,8 +5677,9 @@ class e_form
else
{
$lenabled = vartrue($parms['enabled'], 'LAN_ON');
$ldisabled = vartrue($parms['disabled'], 'LAN_OFF');
$ldisabled = (!empty($parms['disabled']) && is_string($parms['disabled'])) ? $parms['disabled'] : 'LAN_OFF';
}
unset($parms['enabled'], $parms['disabled'], $parms['label']);
$ret = vartrue($parms['pre']).$this->radio_switch($key, $value, defset($lenabled, $lenabled), defset($ldisabled, $ldisabled),$parms).vartrue($parms['post']);
break;

View File

@ -297,11 +297,11 @@ class e107Email extends PHPMailer
{
case 'TLS' :
$this->SMTPSecure = 'tls';
$this->Port = $smtpPort; // Can also use port 587, and maybe even 25
$this->Port = ($smtpPort != 465) ? $smtpPort : 25; // Can also use port 587, and maybe even 25
break;
case 'SSL' :
$this->SMTPSecure = 'ssl';
$this->Port = $smtpPort;
$this->Port = ($smtpPort != 587) ? $smtpPort : 465;
break;
default :
if ($this->debug) echo "Invalid option: {$smtp_options['secure']}<br />";
@ -1071,10 +1071,13 @@ class e107Email extends PHPMailer
if(!empty($eml['SMTPDebug']))
{
e107::getMessage()->addError($this->ErrorInfo);
$tmp = $this;
$tmp->pref = array();
e107::getMessage()->addDebug(print_a($tmp,true));
}
}
$this->clearAddresses(); // In case we send another email
$this->clearCustomHeaders();

View File

@ -231,7 +231,7 @@ class e107MailManager
$this->mailOverrides = $overrides;
if(deftrue('e_DEBUG'))
if(deftrue('e_DEBUG_BULKMAIL'))
{
$this->debugMode = true;
}

View File

@ -2679,7 +2679,7 @@ class e_db_mysql
$header = "-- e107 Database Backup File \n";
$header .= "-- Host: ".$_SERVER['SERVER_NAME']."\n";
$header .= "-- Generation Time: ".date('r')."\n";
$header .= "-- Encoding: ANSI\n\n\n";
$header .= "-- Encoding: UTF-8\n\n\n";
file_put_contents($backupFile,$header, FILE_APPEND);
@ -2710,12 +2710,12 @@ class e_db_mysql
$d = array();
foreach($fields as $val)
{
$d[] = is_numeric($row[$val]) ? $row[$val] : "'".mysqli_real_escape_string($row[$val])."'";
$d[] = is_numeric($row[$val]) ? $row[$val] : "'".$this->escape($row[$val])."'";
}
$data_array = "(".implode(", ",$d).");\n";
file_put_contents($backupFile, $data_array, FILE_APPEND); // Do this here to save memory.
}
$text = "\n\n\n";

View File

@ -272,8 +272,8 @@ class news {
$tmp = array();
$tmp['caticon'] = defset('ICONSTYLE');
$tmp['commentoffstring'] = defset('COMMENTOFFSTRING');
$tmp['commentlink'] = defset('COMMENTLINK');
$tmp['commentoffstring'] = defset('COMMENTOFFSTRING', '');
$tmp['commentlink'] = defset('COMMENTLINK', e107::getParser()->toGlyph('fa-comment'));
$tmp['trackbackstring'] = defset('TRACKBACKSTRING');
$tmp['trackbackbeforestring'] = defset('TRACKBACKBEFORESTRING');
$tmp['trackbackafterstring'] = defset('TRACKBACKAFTERSTRING');

View File

@ -31,7 +31,7 @@ class PHPMailer
* The PHPMailer Version number.
* @var string
*/
public $Version = '5.2.21';
public $Version = '5.2.23';
/**
* Email priority.
@ -2492,6 +2492,7 @@ class PHPMailer
/**
* Add an attachment from a path on the filesystem.
* Never use a user-supplied path to a file!
* Returns false if the file could not be found or read.
* @param string $path Path to the attachment.
* @param string $name Overrides the attachment name.
@ -3017,6 +3018,7 @@ class PHPMailer
* displayed inline with the message, not just attached for download.
* This is used in HTML messages that embed the images
* the HTML refers to using the $cid value.
* Never use a user-supplied path to a file!
* @param string $path Path to the attachment.
* @param string $cid Content ID of the attachment; Use this to reference
* the content when using an embedded image in HTML.
@ -3380,12 +3382,14 @@ class PHPMailer
* Create a message body from an HTML string.
* Automatically inlines images and creates a plain-text version by converting the HTML,
* overwriting any existing values in Body and AltBody.
* $basedir is used when handling relative image paths, e.g. <img src="images/a.png">
* Do not source $message content from user input!
* $basedir is prepended when handling relative URLs, e.g. <img src="/images/a.png"> and must not be empty
* will look for an image file in $basedir/images/a.png and convert it to inline.
* If you don't want to apply these transformations to your HTML, just set Body and AltBody yourself.
* If you don't provide a $basedir, relative paths will be left untouched (and thus probably break in email)
* If you don't want to apply these transformations to your HTML, just set Body and AltBody directly.
* @access public
* @param string $message HTML message string
* @param string $basedir base directory for relative paths to images
* @param string $basedir Absolute path to a base directory to prepend to relative paths to images
* @param boolean|callable $advanced Whether to use the internal HTML to text converter
* or your own custom converter @see PHPMailer::html2text()
* @return string $message The transformed message Body
@ -3394,6 +3398,10 @@ class PHPMailer
{
preg_match_all('/(src|background)=["\'](.*)["\']/Ui', $message, $images);
if (array_key_exists(2, $images)) {
if (strlen($basedir) > 1 && substr($basedir, -1) != '/') {
// Ensure $basedir has a trailing /
$basedir .= '/';
}
foreach ($images[2] as $imgindex => $url) {
// Convert data URIs into embedded images
if (preg_match('#^data:(image[^;,]*)(;base64)?,#', $url, $match)) {
@ -3411,18 +3419,24 @@ class PHPMailer
$message
);
}
} elseif (substr($url, 0, 4) !== 'cid:' && !preg_match('#^[a-z][a-z0-9+.-]*://#i', $url)) {
// Do not change urls for absolute images (thanks to corvuscorax)
continue;
}
if (
// Only process relative URLs if a basedir is provided (i.e. no absolute local paths)
!empty($basedir)
// Ignore URLs containing parent dir traversal (..)
&& (strpos($url, '..') === false)
// Do not change urls that are already inline images
&& substr($url, 0, 4) !== 'cid:'
// Do not change absolute URLs, including anonymous protocol
&& !preg_match('#^[a-z][a-z0-9+.-]*:?//#i', $url)
) {
$filename = basename($url);
$directory = dirname($url);
if ($directory == '.') {
$directory = '';
}
$cid = md5($url) . '@phpmailer.0'; // RFC2392 S 2
if (strlen($basedir) > 1 && substr($basedir, -1) != '/') {
$basedir .= '/';
}
if (strlen($directory) > 1 && substr($directory, -1) != '/') {
$directory .= '/';
}

View File

@ -34,7 +34,7 @@ class POP3
* @var string
* @access public
*/
public $Version = '5.2.21';
public $Version = '5.2.23';
/**
* Default POP3 port number.

View File

@ -30,7 +30,7 @@ class SMTP
* The PHPMailer SMTP version number.
* @var string
*/
const VERSION = '5.2.21';
const VERSION = '5.2.23';
/**
* SMTP line break constant.
@ -81,7 +81,7 @@ class SMTP
* @deprecated Use the `VERSION` constant instead
* @see SMTP::VERSION
*/
public $Version = '5.2.21';
public $Version = '5.2.23';
/**
* SMTP server port number.
@ -150,16 +150,16 @@ class SMTP
*/
public $Timelimit = 300;
/**
* @var array patterns to extract smtp transaction id from smtp reply
* Only first capture group will be use, use non-capturing group to deal with it
* Extend this class to override this property to fulfil your needs.
*/
protected $smtp_transaction_id_patterns = array(
'exim' => '/[0-9]{3} OK id=(.*)/',
'sendmail' => '/[0-9]{3} 2.0.0 (.*) Message/',
'postfix' => '/[0-9]{3} 2.0.0 Ok: queued as (.*)/'
);
/**
* @var array patterns to extract smtp transaction id from smtp reply
* Only first capture group will be use, use non-capturing group to deal with it
* Extend this class to override this property to fulfil your needs.
*/
protected $smtp_transaction_id_patterns = array(
'exim' => '/[0-9]{3} OK id=(.*)/',
'sendmail' => '/[0-9]{3} 2.0.0 (.*) Message/',
'postfix' => '/[0-9]{3} 2.0.0 Ok: queued as (.*)/'
);
/**
* The socket for the server connection.
@ -231,8 +231,7 @@ class SMTP
preg_replace('/[\r\n]+/', '', $str),
ENT_QUOTES,
'UTF-8'
)
. "<br>\n";
) . "<br>\n";
break;
case 'echo':
default:
@ -242,7 +241,7 @@ class SMTP
"\n",
"\n \t ",
trim($str)
)."\n";
) . "\n";
}
}
@ -276,7 +275,8 @@ class SMTP
}
// Connect to the SMTP server
$this->edebug(
"Connection: opening to $host:$port, timeout=$timeout, options=".var_export($options, true),
"Connection: opening to $host:$port, timeout=$timeout, options=" .
var_export($options, true),
self::DEBUG_CONNECTION
);
$errno = 0;
@ -362,14 +362,14 @@ class SMTP
}
// Begin encrypted connection
if (!stream_socket_enable_crypto(
set_error_handler(array($this, 'errorHandler'));
$crypto_ok = stream_socket_enable_crypto(
$this->smtp_conn,
true,
$crypto_method
)) {
return false;
}
return true;
);
restore_error_handler();
return $crypto_ok;
}
/**
@ -398,8 +398,7 @@ class SMTP
}
if (array_key_exists('EHLO', $this->server_caps)) {
// SMTP extensions are available. Let's try to find a proper authentication method
// SMTP extensions are available; try to find a proper authentication method
if (!array_key_exists('AUTH', $this->server_caps)) {
$this->setError('Authentication is not allowed at this stage');
// 'at this stage' means that auth may be allowed after the stage changes
@ -424,7 +423,7 @@ class SMTP
$this->setError('No supported authentication methods found');
return false;
}
self::edebug('Auth method selected: '.$authtype, self::DEBUG_LOWLEVEL);
self::edebug('Auth method selected: ' . $authtype, self::DEBUG_LOWLEVEL);
}
if (!in_array($authtype, $this->server_caps['AUTH'])) {
@ -550,7 +549,7 @@ class SMTP
* Works like hash_hmac('md5', $data, $key)
* in case that function is not available
* @param string $data The data to hash
* @param string $key The key to hash with
* @param string $key The key to hash with
* @access protected
* @return string
*/
@ -893,7 +892,8 @@ class SMTP
$code_ex = (count($matches) > 2 ? $matches[2] : null);
// Cut off error code from each response line
$detail = preg_replace(
"/{$code}[ -]".($code_ex ? str_replace('.', '\\.', $code_ex).' ' : '')."/m",
"/{$code}[ -]" .
($code_ex ? str_replace('.', '\\.', $code_ex) . ' ' : '') . "/m",
'',
$this->last_reply
);
@ -1105,7 +1105,7 @@ class SMTP
// Now check if reads took too long
if ($endtime and time() > $endtime) {
$this->edebug(
'SMTP -> get_lines(): timelimit reached ('.
'SMTP -> get_lines(): timelimit reached (' .
$this->Timelimit . ' sec)',
self::DEBUG_LOWLEVEL
);
@ -1208,42 +1208,44 @@ class SMTP
* Reports an error number and string.
* @param integer $errno The error number returned by PHP.
* @param string $errmsg The error message returned by PHP.
* @param string $errfile The file the error occurred in
* @param integer $errline The line number the error occurred on
*/
protected function errorHandler($errno, $errmsg)
protected function errorHandler($errno, $errmsg, $errfile = '', $errline = 0)
{
$notice = 'Connection: Failed to connect to server.';
$notice = 'Connection failed.';
$this->setError(
$notice,
$errno,
$errmsg
);
$this->edebug(
$notice . ' Error number ' . $errno . '. "Error notice: ' . $errmsg,
$notice . ' Error #' . $errno . ': ' . $errmsg . " [$errfile line $errline]",
self::DEBUG_CONNECTION
);
}
/**
* Will return the ID of the last smtp transaction based on a list of patterns provided
* in SMTP::$smtp_transaction_id_patterns.
* If no reply has been received yet, it will return null.
* If no pattern has been matched, it will return false.
* @return bool|null|string
*/
public function getLastTransactionID()
{
$reply = $this->getLastReply();
/**
* Will return the ID of the last smtp transaction based on a list of patterns provided
* in SMTP::$smtp_transaction_id_patterns.
* If no reply has been received yet, it will return null.
* If no pattern has been matched, it will return false.
* @return bool|null|string
*/
public function getLastTransactionID()
{
$reply = $this->getLastReply();
if (empty($reply)) {
return null;
}
if (empty($reply)) {
return null;
}
foreach($this->smtp_transaction_id_patterns as $smtp_transaction_id_pattern) {
if(preg_match($smtp_transaction_id_pattern, $reply, $matches)) {
return $matches[1];
}
}
foreach ($this->smtp_transaction_id_patterns as $smtp_transaction_id_pattern) {
if (preg_match($smtp_transaction_id_pattern, $reply, $matches)) {
return $matches[1];
}
}
return false;
return false;
}
}

View File

@ -469,10 +469,10 @@ class e_pref extends e_front_model
$id = $this->prefid;
$data = $force ? false : $this->getPrefCache(true);
if($data !== false)
if(!empty($data))
{
$this->pref_cache = e107::getArrayStorage()->WriteArray($data, false); //runtime cache
$this->loadData($data, false);
$this->loadData((array) $data, false);
return $this;
}

View File

@ -814,7 +814,8 @@ class e_parse_shortcode
if(isset($this->editableCodes['perms']) && getperms($this->editableCodes['perms']))
{
e107::js('core', 'jquery.contenteditable.js', 'jquery');
// TODO use Library Manager...
e107::js('footer', '{e_WEB}js/jquery.contenteditable.js', 'jquery', 2);
$_SESSION['editable'][e_TOKEN] = $this->editableCodes;

View File

@ -198,6 +198,9 @@ define("ADLAN_171", "Install Site Stats Plugin");
define("ADLAN_185", "Toggle Sidebar");
define("ADLAN_186", "The following old files can be safely deleted from your system:");
define("ADLAN_187", "Unable to create [x]. Please check your folder permissions.");
define("ADLAN_188", "Your timezone setting [x] is invalid. It has been reset to UTC. To Modify, please go to Admin -> Preferences -> Date Display Options.");
define("ADLAN_189", "The following plugins are not compatible with this version of e107 and should be uninstalled: ");
// define("ADLAN_CL_1", "Settings");
define("ADLAN_CL_2", "Users");
@ -516,6 +519,7 @@ define("LAN_PERSONALIZE", "Personalize");
define("LAN_SETTINGS_NOT_SAVED_NO_CHANGES_MADE", "Settings not saved as no changes were made.");
define("LAN_DASHBOARD_LAYOUT", "Dashboard Layout");
define("LAN_UNAVAILABLE", "Unavailable");
define("LAN_UNINSTALL", "Uninstall");
define("LAN_NO_LABEL_PROVIDED", "No Label Provided");
define("LAN_NOT_FOUND", "Not Found!");
define("LAN_FIELD", "Field");

View File

@ -199,5 +199,6 @@ define("IMALAN_177", "Click here for more information and to enter your api key"
define("IMALAN_178", "Avatars Folder (user selectable)");
define("IMALAN_179", "Avatars Folder (private)");
define('IMALAN_180', "0 byte file found in:");
define("IMALAN_181", "Please remove before proceeding.");

View File

@ -291,4 +291,10 @@ define("LAN_MAILOUT_267", "Generate Public/Private keys");
define("LAN_MAILOUT_268", "Developer Mode Only");
define("LAN_MAILOUT_269", "Send Later");
?>
define("LAN_MAILOUT_270", "Test SMTP Connection");
define("LAN_MAILOUT_271", "Authentication failed with username ([x]) and password ([y]):");
?>

View File

@ -160,3 +160,4 @@ define("LAN_SIGNUP_117", "Send a Test Activation");
define("LAN_SIGNUP_118", "To [x]");
define("LAN_SIGNUP_119", "Don't send email");
define("LAN_SIGNUP_120", "OR");
define("LAN_SIGNUP_121", "Use a different email address");

View File

@ -21,8 +21,12 @@ if (!e107::isInstalled('download'))
e107::lan('download',false, true); // Loads e_PLUGIN.'download/languages/'.e_LANGUAGE.'/English_front.php'
$bcList = array(
'LAN_dl_19' => 'LAN_CATEGORY',
'LAN_dl_7' => 'LAN_DESCRIPTION',
'LAN_dl_10' => 'LAN_SIZE',
'LAN_dl_11' => 'LAN_IMAGE',
'LAN_dl_17' => 'LAN_FILES',
'LAN_dl_18' => 'LAN_PLUGIN_DOWNLOAD_NAME',
'LAN_dl_19' => 'LAN_CATEGORY',
"LAN_dl_20" => "LAN_FILES",
"LAN_dl_21" => "LAN_SIZE",
"LAN_dl_22" => "LAN_DATE",
@ -31,7 +35,9 @@ if (!e107::isInstalled('download'))
"LAN_dl_25" => "LAN_ASCENDING",
"LAN_dl_26" => "LAN_DESCENDING",
"LAN_dl_27" => "LAN_GO",
"LAN_dl_28" => "LAN_NAME"
"LAN_dl_28" => "LAN_NAME",
'LAN_dl_32' => "LAN_DOWNLOAD",
'LAN_dl_35' => "LAN_BACK",
);
e107::getLanguage()->bcDefs($bcList);

View File

@ -38,10 +38,10 @@ class fb_admin extends e_admin_dispatcher
);
protected $adminMenu = array(
'main/list' => array('caption'=> 'Featurebox List', 'perm' => 'P'),
'main/list' => array('caption'=> LAN_MANAGE, 'perm' => 'P'),
'main/create' => array('caption'=> LAN_CREATE, 'perm' => 'P'),
'category/list' => array('caption'=> LAN_CATEGORIES, 'perm' => 'P'),
'category/create' => array('caption'=> "Create Category", 'perm' => 'P'),
'category/create' => array('caption'=> LAN_CREATE_CATEGORY, 'perm' => 'P'),
'main/prefs' => array('caption'=> LAN_PREFS, 'perm' => '0'),
// 'main/custom' => array('caption'=> 'Custom Page', 'perm' => '0')
);
@ -68,11 +68,11 @@ class fb_category_ui extends e_admin_ui
'fb_category_id' => array('title'=> LAN_ID, 'type' => 'number', 'data' => 'int', 'width' =>'5%', 'forced'=> TRUE),
'fb_category_icon' => array('title'=> LAN_ICON, 'type' => 'icon', 'data' => 'str', 'width' => '5%', 'thclass' => 'center', 'class'=>'center'),
'fb_category_title' => array('title'=> LAN_TITLE, 'type' => 'text', 'data' => 'str', 'inline'=>true, 'width' => 'auto', 'help' => 'up to 200 characters', 'thclass' => 'left', 'writeParms'=>'size=xlarge'),
'fb_category_template' => array('title'=> 'Category template', 'type' => 'layouts', 'inline'=>true, 'data' => 'str', 'width' => 'auto', 'thclass' => 'left', 'writeParms' => 'plugin=featurebox&id=featurebox_category&merge=1', 'filter' => true),
'fb_category_random' => array('title'=> 'Random', 'type' => 'boolean', 'data' => 'int', 'width' => '5%', 'thclass' => 'center', 'class' => 'center', 'batch' => true, 'filter' => true),
'fb_category_template' => array('title'=> FBLAN_30, 'type' => 'layouts', 'inline'=>true, 'data' => 'str', 'width' => 'auto', 'thclass' => 'left', 'writeParms' => 'plugin=featurebox&id=featurebox_category&merge=1', 'filter' => true),
'fb_category_random' => array('title'=> FBLAN_31, 'type' => 'boolean', 'data' => 'int', 'width' => '5%', 'thclass' => 'center', 'class' => 'center', 'batch' => true, 'filter' => true),
'fb_category_class' => array('title'=> LAN_VISIBILITY, 'type' => 'userclass', 'data' => 'int', 'inline'=>true, 'width' => 'auto', 'filter' => true, 'batch' => true),
'fb_category_limit' => array('title'=> 'Limit', 'type' => 'number', 'data' => 'int', 'width' => '5%', 'thclass' => 'left', 'help' => 'number of items to be shown, 0 - show all'),
'fb_category_parms' => array('title'=> 'Parameters (optional)', 'type' => 'textarea', 'data' => 'str', 'width' => 'auto', 'thclass' => 'left', 'class' => 'left','writeParms' => 'expand=Advanced&help=Optional Javascript Parameters (format subject to change)'),
'fb_category_limit' => array('title'=> LAN_LIMIT, 'type' => 'number', 'data' => 'int', 'width' => '5%', 'thclass' => 'left', 'help' => 'number of items to be shown, 0 - show all'),
'fb_category_parms' => array('title'=> FBLAN_32, 'type' => 'textarea', 'data' => 'str', 'width' => 'auto', 'thclass' => 'left', 'class' => 'left','writeParms' => array('expand'=>LAN_ADVANCED), 'help'=>FBLAN_33),
'options' => array('title'=> LAN_OPTIONS, 'type' => null, 'width' => '10%', 'forced'=>TRUE, 'thclass' => 'center last', 'class' => 'center')
);
@ -209,13 +209,13 @@ class fb_main_ui extends e_admin_ui
'fb_id' => array('title'=> LAN_ID, 'type' => 'number', 'data'=> 'int', 'width' =>'5%', 'forced'=> TRUE),
'fb_category' => array('title'=> LAN_CATEGORY, 'type' => 'dropdown', 'inline'=>true, 'data'=> 'int', 'width' => '10%', 'filter'=>TRUE, 'batch'=>TRUE),
'fb_title' => array('title'=> LAN_TITLE, 'type' => 'text', 'inline'=>true, 'width' => 'auto', 'thclass' => 'left'),
'fb_image' => array('title'=> "Image/Video", 'type' => 'image', 'width' => '100px', 'readParms'=>'thumb=60&thumb_urlraw=0&thumb_aw=60','writeParms'=>'size=xxlarge&media=featurebox&video=1'),
'fb_image' => array('title'=> FBLAN_26, 'type' => 'image', 'width' => '100px', 'readParms'=>'thumb=60&thumb_urlraw=0&thumb_aw=60','writeParms'=>'size=xxlarge&media=featurebox&video=1'),
'fb_text' => array('title'=> FBLAN_08, 'type' => 'bbarea', 'width' => '30%', 'readParms' => 'expand=...&truncate=50&bb=1','writeParms'=>'template=admin'),
//DEPRECATED 'fb_mode' => array('title'=> FBLAN_12, 'type' => 'dropdown', 'data'=> 'int', 'width' => '5%', 'filter'=>TRUE, 'batch'=>TRUE),
//DEPRECATED 'fb_rendertype' => array('title'=> FBLAN_22, 'type' => 'dropdown', 'data'=> 'int', 'width' => 'auto', 'noedit' => TRUE),
'fb_template' => array('title'=> LAN_TEMPLATE, 'type' => 'layouts', 'data'=> 'str', 'width' => 'auto', 'writeParms' => 'plugin=featurebox', 'filter' => true, 'batch' => true), // Photo
'fb_imageurl' => array('title'=> "Image Link", 'type' => 'url', 'width' => 'auto','writeParms'=>'size=xxlarge'),
'fb_imageurl' => array('title'=> FBLAN_27, 'type' => 'url', 'width' => 'auto','writeParms'=>'size=xxlarge'),
'fb_class' => array('title'=> LAN_VISIBILITY, 'type' => 'userclass', 'data' => 'int', 'inline'=>true, 'width' => 'auto', 'filter' => true, 'batch' => true), // User id
'fb_order' => array('title'=> LAN_ORDER, 'type' => 'number', 'data'=> 'int','width' => '5%' ),
'options' => array('title'=> LAN_OPTIONS, 'type' => null, 'forced'=>TRUE, 'width' => '10%', 'thclass' => 'center last', 'class' => 'center', 'readParms'=>'sort=1')
@ -224,7 +224,7 @@ class fb_main_ui extends e_admin_ui
protected $fieldpref = array('checkboxes', 'fb_id', 'fb_category', 'fb_title', 'fb_template', 'fb_class', 'fb_order', 'options');
protected $prefs = array(
'menu_category' => array('title'=> "Featurebox Menu Category", 'type'=>'dropdown', 'help' => 'Category to use for the featurebox menu')
'menu_category' => array('title'=> FBLAN_28, 'type'=>'dropdown', 'help' => FBLAN_29)
);
@ -270,4 +270,4 @@ e107::getAdminUI()->runPage();
require_once(e_ADMIN."footer.php");
exit;
?>
?>

View File

@ -8,13 +8,14 @@
if (!defined('e107_INIT')) { exit; }
// e107::Lan('featurebox', 'front');
e107::includeLan(e_PLUGIN.'featurebox/languages/'.e_LANGUAGE.'_admin_featurebox.php'); // This line added to admin warning
$type = vartrue(e107::getPlugPref('featurebox','menu_category'),'bootstrap_carousel');
$text = e107::getParser()->parseTemplate("{FEATUREBOX|".$type."}");
if(!$text)
{
echo "<div class='alert alert-block alert-warning'>There are no featurebox items assigned to the ".$type." template</div>";
echo "<div class='alert alert-block alert-warning'>".$message = e107::getParser()->lanVars(FBLAN_25, array('x'=>$type))."</div>";
// e107::getMessage()->addDebug("There are no featurebox items using the ".$type." template");
}

View File

@ -37,8 +37,14 @@ define("FBLAN_14", "Show this message only");
define("FBLAN_22", "Render type");
define("FBLAN_23", "In theme box");
define("FBLAN_24", "Plain");
//define("FBLAN_25", "Template"); //FIXME LAN - use generic.
//define("FBLAN_26", "you can use a different template for each message, add templates to e107_plugins/featurebox/templates/ folder");
define("FBLAN_25", "There are no featurebox items assigned to the [x] template.");
define("FBLAN_26", "Image/Video");
define("FBLAN_27", "Image Link");
define("FBLAN_28", "Featurebox Menu Category");
define("FBLAN_29", "Category to use for the featurebox menu");
define("FBLAN_30", "Category template");
define("FBLAN_31", "Random");
define("FBLAN_32", "Parameters (optional)");
define("FBLAN_33", "Optional Javascript Parameters (format subject to change)");
?>
?>

View File

@ -999,11 +999,11 @@ function fadminoptions($thread_info)
$text .= "<li class='text-right'><a href='".e_REQUEST_URI."' data-forum-action='delete' data-forum-thread='".$id."'>".LAN_DELETE." ".$tp->toGlyph('trash');
$text .= "<li class='text-right'><a href='".e_REQUEST_URI."' data-forum-action='delete' data-forum-thread='".$id."'>".LAN_DELETE." ".$tp->toGlyph('trash')."</a></li>";
$text .= "<li class='text-right'><a href='".e_REQUEST_URI."' data-forum-action='".$stickUnstick."' data-forum-thread='".$id."'>".$lan[$stickUnstick]." ".$icon[$stickUnstick]."</a></li>";
$text .= "<li class='text-right'><a href='".e_REQUEST_URI."' data-forum-action='".$lockUnlock."' data-forum-thread='".$id."'>".$lan[$lockUnlock]." ".$icon[$lockUnlock]."</a></li>";
$text .= "<li class='text-right'><a href='{$moveUrl}'>".LAN_FORUM_2042." ".$tp->toGlyph('move')."</i></a></li>";
$text .= "<li class='text-right'><a href='{$moveUrl}'>".LAN_FORUM_2042." ".$tp->toGlyph('move')."</a></li>";
if(e_DEVELOPER)
{

View File

@ -181,7 +181,7 @@ class forum_shortcodes extends e_shortcode
<input type='hidden' name='forum' value='all' />
<input class='tbox form-control' type='text' name='q' size='20' value='' maxlength='50' />
<span class='input-group-btn'>
<button class='btn btn-default button' type='submit' name='s' value='search' />".$srchIcon."</button>
<button class='btn btn-default button' type='submit' name='s' value='search' >".$srchIcon."</button>
</span>
</div>

View File

@ -772,7 +772,7 @@
if($type == 'thread')
{
$url = e107::url('forum', 'move', array('thread_id' => $this->postInfo['post_thread']));
$text .= "<li class='text-right'><a href='" . $url . "'>" . LAN_FORUM_2042 . " " . $tp->toGlyph('move') . "</a></a></li>";
$text .= "<li class='text-right'><a href='" . $url . "'>" . LAN_FORUM_2042 . " " . $tp->toGlyph('move') . "</a></li>";
}
elseif(e_DEVELOPER === true) //TODO
{

View File

@ -307,21 +307,19 @@ $FORUM_VIEWFORUM_TEMPLATE['header'] = "<div class=' row-fluid'><div>{BREADCRU
$FORUM_VIEWFORUM_TEMPLATE['item'] = "<tr>
<td>{ICON}</td>
<td>
<div class='row'>
<div class='col-xs-12 col-md-9'>
{THREADNAME}
<div><small>".LAN_FORUM_1004.": {POSTER} {THREADTIMELAPSE} &nbsp;</small></div>
</div><div class='col-xs-12 col-md-3 text-right'> {PAGESX}</div>
</div>
<div class='row'>
<td>{ICON}</td>
<td>
<div class='row'>
<div class='col-xs-12 col-md-9'>
{THREADNAME}
<div><small>".LAN_FORUM_1004.": {POSTER} {THREADTIMELAPSE} &nbsp;</small></div>
</div><div class='col-xs-12 col-md-3 text-right'> {PAGESX}</div>
</div>
</td>
<td class='text-center'>{REPLIESX}</td><td class='hidden-xs text-center'>{VIEWSX}</td>
<td class='hidden-xs'><small>{LASTPOSTUSER} {LASTPOSTDATE} </small><div class='span2 right pull-right'>{ADMINOPTIONS}</div></td>
</tr>\n";
</td>
</div>
<td class='text-center'>{REPLIESX}</td><td class='hidden-xs text-center'>{VIEWSX}</td>
<td class='hidden-xs'><small>{LASTPOSTUSER} {LASTPOSTDATE} </small><div class='span2 right pull-right'>{ADMINOPTIONS}</div></td>
</tr>\n";
$FORUM_VIEWFORUM_TEMPLATE['item-sticky'] = $FORUM_VIEWFORUM_TEMPLATE['item'] ; // "<tr><td>{THREADNAME}</td></tr>\n";
$FORUM_VIEWFORUM_TEMPLATE['item-announce'] = $FORUM_VIEWFORUM_TEMPLATE['item'] ; // "<tr><td>{THREADNAME}</td></tr>\n";

View File

@ -85,7 +85,7 @@ e107::getLanguage()->bcDefs($bcDefs);
// If logging in with email address - ignore pref and increase to 100 chars.
$maxLength = ($this->allowEmailLogin == 1 || $this->allowEmailLogin) ? 100 : varset($pref['loginname_maxlength'],30);
return "<input class='form-control tbox login user' type='text' name='username' placeholder='".$this->usernameLabel."' required='required' id='username' size='15' value='' maxlength='".$maxLength."' />\n";
return "<input class='form-control tbox login user' type='text' name='username' placeholder='".$this->usernameLabel."' required='required' id='".vartrue( $parm['idprefix'] )."username' size='15' value='' maxlength='".$maxLength."' />\n";
}
@ -98,7 +98,7 @@ e107::getLanguage()->bcDefs($bcDefs);
function sc_lm_password_input($parm='')
{
$pref = e107::getPref();
$t_password = "<input class='form-control tbox login pass' type='password' placeholder='".LAN_PASSWORD."' required='required' name='userpass' id='userpass' size='15' value='' maxlength='30' />\n";
$t_password = "<input class='form-control tbox login pass' type='password' placeholder='".LAN_PASSWORD."' required='required' name='userpass' id='".vartrue( $parm['idprefix'] )."userpass' size='15' value='' maxlength='30' />\n";
if (!USER && e107::getSession()->is('challenge') && varset($pref['password_CHAP'],0)) $t_password .= "<input type='hidden' name='hashchallenge' id='hashchallenge' value='".e107::getSession()->get('challenge')."' />\n\n";
return $t_password;
}

View File

@ -163,7 +163,7 @@ class news_front
}
$this->action = $action;
$this->subAction= $sub_action;
$this->subAction= e107::getParser()->filter($sub_action);
}
@ -461,11 +461,11 @@ class news_front
$tmp = explode(",", $iurl);
foreach($tmp as $mimg)
{
if(substr($mimg,-8) == '.youtube')
if(substr($mimg,-8) == '.youtube' || empty($mimg))
{
continue;
}
e107::meta('og:image',$tp->thumbUrl($tmp[0],'w=500',false,true) );
e107::meta('og:image',$tp->thumbUrl($mimg,'w=500',false,true) );
// e107::meta('og:image',$mimg);
}
@ -1529,6 +1529,11 @@ class news_front
{
$news = $newsAr[$i];
if(!isset($this->newsUrlparms['category_sef']) && !empty($news['category_sef']))
{
$this->newsUrlparms['category_sef'] = $news['category_sef'];
}
// Set the Values for the social shortcode usage.
if($socialInstalled == true)
{
@ -1580,6 +1585,7 @@ class news_front
$amount = ITEMVIEW;
$nitems = defined('NEWS_NEXTPREV_NAVCOUNT') ? '&navcount='.NEWS_NEXTPREV_NAVCOUNT : '' ;
$url = rawurlencode(e107::getUrl()->create($this->route, $this->newsUrlparms));
// Example of passing route data instead building the URL outside the shortcode - for a reference only
// $url = rawurlencode('url::'.$newsRoute.'::'.http_build_query($newsUrlparms, null, '&'));
$parms = 'tmpl_prefix='.deftrue('NEWS_NEXTPREV_TMPL', 'default').'&total='.$news_total.'&amount='.$amount.'&current='.$this->from.$nitems.'&url='.$url;

View File

@ -93,7 +93,7 @@ $ONLINE_MENU_TEMPLATE['extended']['online_member_newest'] = "{SETIMAGE
$ONLINE_MENU_WRAPPER['extended']['ONLINE_GUESTS'] = "<li class='online-menu-extended-label'>".LAN_ONLINE_1."<span class='label label-primary pull-right'>{---}</span></li>";
$ONLINE_MENU_WRAPPER['extended']['ONLINE_MEMBERS'] = "<li class='online-menu-extended-label'>".LAN_ONLINE_2."<span class='label label-primary pull-right'>{---}</span></li>";
$ONLINE_MENU_WRAPPER['extended']['ONLINE_MEMBERS_LIST'] = "<ul>{---}</ul>";
$ONLINE_MENU_WRAPPER['extended']['ONLINE_MEMBERS_LIST_EXTENDED'] = "<ul class='unstyled list-unstyled'>{---}</ul>";
$ONLINE_MENU_WRAPPER['extended']['ONLINE_MEMBERS_LIST_EXTENDED'] = "<li><ul class='unstyled list-unstyled'>{---}</ul></li>";
$ONLINE_MENU_WRAPPER['extended']['ONLINE_ONPAGE'] = "<li>".LAN_ONLINE_3."<span class='label label-default pull-right'>{---}</span></li>";
$ONLINE_MENU_WRAPPER['extended']['ONLINE_MEMBERS_TOTAL'] = "<li>".LAN_ONLINE_2."<span class='label label-default pull-right'>{---}</span></li>";
$ONLINE_MENU_WRAPPER['extended']['ONLINE_MEMBER_NEWEST'] = "<li class='online-menu-extended-label'>".LAN_ONLINE_6."</li><li><ul class='unstyled list-unstyled'>{---}</ul></li>";
@ -101,5 +101,5 @@ $ONLINE_MENU_WRAPPER['extended']['ONLINE_MOST'] = "<a class=
$ONLINE_MENU_WRAPPER['extended']['ONLINE_MOST_MEMBERS'] = LAN_ONLINE_2."{---}";
$ONLINE_MENU_WRAPPER['extended']['ONLINE_MOST_GUESTS'] = LAN_ONLINE_1."{---}";
$ONLINE_MENU_WRAPPER['extended']['ONLINE_MOST_DATESTAMP'] = "{---}";
$ONLINE_MENU_WRAPPER['extended']['ONLINE_MEMBERS_REGISTERED'] = "<li class='online-menu-extended-label'>".LAN_ONLINE_11."<span class='label label-default pull-right'>{---}</li>";
$ONLINE_MENU_WRAPPER['extended']['ONLINE_MEMBERS_REGISTERED'] = "<li class='online-menu-extended-label'>".LAN_ONLINE_11."<span class='label label-default pull-right'>{---}</span></li>";
$ONLINE_MENU_WRAPPER['extended']['ONLINE_MEMBER_PAGE'] = LAN_ONLINE_7." {---}";

View File

@ -238,7 +238,9 @@
$PM_INBOX['end'] = $this->updateTemplate($PM_INBOX_FOOTER);
}
if(empty($PM_INBOX))
if(empty($PM_INBOX['item']))
{
$PM_INBOX = e107::getTemplate('pm', 'pm', 'inbox');
}
@ -270,6 +272,7 @@
{
$rec['pm_subject'] = '[' . LAN_PM_61 . ']';
}
$sc->setVars($rec);
$txt .= $tp->parseTemplate($PM_INBOX['item'], true, $sc);
}
@ -311,7 +314,7 @@
$PM_OUTBOX['end'] = $this->updateTemplate($PM_OUTBOX_FOOTER);
}
if(empty($PM_OUTBOX))
if(empty($PM_OUTBOX['item']))
{
$PM_OUTBOX = e107::getTemplate('pm', 'pm', 'outbox');
}
@ -682,7 +685,7 @@
}
function breadcrumb($type = '', $other)
function breadcrumb($type = '', $other='')
{
if(!deftrue('BOOTSTRAP'))
{
@ -701,7 +704,7 @@
$array[1] = $type;
}
if($other)
if(!empty($other))
{
$array[2] = array('text' => $other, 'url' => null);
}

View File

@ -632,7 +632,7 @@ if(!class_exists('plugin_pm_pm_shortcodes'))
// pm_id is mapped insisde the config to id key
$ret = "
<form method='post' action='".$this->url('action/reply', $this->var)."'>
<input type='checkbox' name='quote' /> ".LAN_PM_54." &nbsp;&nbsp;&nbsp<input class='btn btn-primary button' type='submit' name='reply' value='".LAN_PM_55."' />
<input type='checkbox' name='quote' /> ".LAN_PM_54." &nbsp;&nbsp;&nbsp;<input class='btn btn-primary button' type='submit' name='reply' value='".LAN_PM_55."' />
</form>
";
return $ret;

View File

@ -84,7 +84,7 @@ $PM_WRAPPER['PM_ATTACHMENTS']= "<div class='alert alert-block alert-info'>{---}<
$PM_WRAPPER['PM_EMOTES']= "<tr><td class='forumheader3'>".LAN_PM_7.": </td><td class='forumheader3'>{---}</td></tr>";
$PM_WRAPPER['PM_ATTACHMENT']= "<tr><td class='forumheader3'>".LAN_PM_8.": </td><td class='forumheader3'>{---}</td></tr>";
$PM_WRAPPER['PM_RECEIPT']= "<tr><td class='forumheader3'>".LAN_PM_9.": </td><td class='forumheader3'>{---}</td></tr>";
$PM_WRAPPER['PM_REPLY']= "<tr><td class='forumheader' style='text-align:center' colspan='2'>{---}</td></tr>";
$PM_WRAPPER['PM_REPLY']= "<tr><td class='forumheader' style='text-align:center'>{---}</td></tr>";
//$PM_SEND_PM = "<div id='pm-send-pm'>
$PM_TEMPLATE['send'] = "<div id='pm-send-pm'>
@ -272,7 +272,7 @@ $PM_TEMPLATE['show'] =
"<div class='pm-show' style='text-align: center'>
<table class='table table-bordered table-striped fborder'>
<tr>
<td class='fcaption text-left' colspan='2'>
<td class='fcaption text-left'>
<h3>{PM_SUBJECT} <small class='pull-right'>{PM_DATE}</small></h3>
<small>{PM_FROM_TO}</small>
<small class='pull-right' >{PM_READ} {PM_DELETE}</small></td>

View File

@ -46,7 +46,7 @@ define("POLLAN_19", "User ID (only members can vote)");
//define("POLLAN_25", "Clear form");//LAN_CLEAR
//define("POLLAN_26", "votes");//NOT USED
// define("POLLAN_27", "Comments");
define("POLLAN_28", "Previous polls");
define("POLLAN_28", "All Previous polls");
//define("POLLAN_29", "posted by");//NOT USED
//define("POLLAN_30", "Submit");//NOT USED
define("POLLAN_31", "Votes");
@ -66,6 +66,8 @@ define("POLLAN_43", "You do not have the required permissions to vote in this po
//define("POLLAN_45", "Poll successfully updated");//NOT USED
//define("POLLAN_46", "Field(s) left blank");
define("POLLAN_50", "Active from [x] to [y]");
// TODO NEED TO BE RENAMED!

View File

@ -51,7 +51,7 @@ if(e_QUERY)
$text .= "
<div class='smalltext text-right'>
<small>".LAN_POSTED_BY." ".$userlink."<br /> ".LAN_ACTIVE.": ".LAN_FROM." ".$start_datestamp." ".LAN_TO." ".$end_datestamp."</small></div>
<small>".LAN_POSTED_BY." ".$userlink."<br /> ".$tp->lanVars(POLLAN_50, array('x'=>$start_datestamp, 'y'=> $end_datestamp))."</small></div>
";
@ -82,23 +82,7 @@ if(e_QUERY)
}
*/
$query = "SELECT c.*, u.* FROM #comments AS c
LEFT JOIN #user AS u ON c.comment_author_id = u.user_id
WHERE comment_item_id=".intval($row['poll_id'])." AND comment_type='4' ORDER BY comment_datestamp";
if ($comment_total = $sql->gen($query))
{
$text .= "<hr /><div>";
while ($row2 = $sql->fetch())
{
$text .= e107::getComment()->render_comment($row2, 'poll', 'comment');
}
$text .= "</div>";
}
// $text .= "</table>";
$text .= e107::getComment()->compose_comment('poll', 'comment', intval( $row['poll_id'] ), null, '', false, 'html');
$ns->tablerender(LAN_PLUGIN_POLL_NAME." #".$row['poll_id'], $text);
echo "<hr />";
}
@ -159,7 +143,7 @@ if(e_QUERY)
$text .= "<tr>
<td class='forumheader3' style='width: 55%;'><a href='".e_SELF."?".$row['poll_id']."'>{$poll_title}</a></td>
<td class='forumheader3' style='width: 15%;'>".$userlink."</td>
<td class='forumheader3' style='width: 30%;'>".$from." ".LAN_TO." ".$to."</td>
<td class='forumheader3' style='width: 30%;'>".$tp->lanVars(POLLAN_50, array('x'=>$from, 'y'=> $to))."</td>
</tr>\n";
}

View File

@ -11,6 +11,7 @@
if (!defined('e107_INIT')) { exit; }
e107::includeLan(e_PLUGIN.'poll/languages/'.e_LANGUAGE.'.php');
e107::includeLan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_admin.php');
define('POLLCLASS', TRUE);
define('POLL_MODE_COOKIE', 0);
define('POLL_MODE_IP', 1);
@ -333,8 +334,20 @@ class poll
$ns = e107::getRender();
$tp = e107::getParser();
$sql = e107::getDb();
$sc = e107::getScBatch('poll');
global $POLLSTYLE;
if ($type == 'preview')
{
$POLLMODE = 'notvoted';
$sc->pollType = $type;
}
elseif ($type == 'forum')
{
$sc->pollPreview = true;
}
switch ($POLLMODE)
{
@ -359,6 +372,9 @@ class poll
$POLLMODE = 'results';
break;
case 'notvoted':
break;
default:
if(ADMIN)
{
@ -452,7 +468,6 @@ class poll
}
$sc = e107::getScBatch('poll');
$sc->setVars($pollArray);
if ($pollArray['poll_comment']) // Only get comments if they're allowed on poll. And we only need the count ATM
@ -466,14 +481,7 @@ class poll
$sc->pollRenderType = $type;
if ($type == 'preview')
{
$POLLMODE = 'notvoted';
}
elseif ($type == 'forum')
{
$sc->pollPreview = true;
}
$text = '';

View File

@ -454,6 +454,7 @@ class social_ui extends e_admin_ui
'flickr' => array('label'=>"Flickr", "placeholder"=>""),
'instagram' => array('label'=>"Instagram", "placeholder"=>""),
'pinterest' => array('label'=>"Pinterest", "placeholder"=>""),
'steam' => array('label'=>"Steam", "placeholder"=>"eg. http://steamcommunity.com"),
'vimeo' => array('label'=>"Vimeo", "placeholder"=>""),
);

View File

@ -76,6 +76,7 @@ class social_shortcodes extends e_shortcode
'flickr' => array('href'=> deftrue('XURL_FLICKR'), 'title'=>'Flickr'),
'instagram' => array('href'=> deftrue('XURL_INSTAGRAM'), 'title'=>'Instagram'),
'youtube' => array('href'=> deftrue('XURL_YOUTUBE'), 'title'=>'YouTube'),
'steam' => array('href'=> deftrue('XURL_STEAM'), 'title'=>'Steam'),
'vimeo' => array('href'=> deftrue('XURL_VIMEO'), 'title'=>'Vimeo')
);
@ -234,7 +235,8 @@ class social_shortcodes extends e_shortcode
$defaultUrl = vartrue($this->var['url'], e_REQUEST_URL);
$defaultTitle = vartrue($this->var['title'], deftrue('e_PAGETITLE'). " | ". SITENAME);
$defaultDiz = vartrue($this->var['description'], e107::getUrl()->response()->getMetaDescription());
// $defaultDiz = vartrue($this->var['description'], e107::getUrl()->response()->getMetaDescription());
$defaultDiz = vartrue($this->var['description'], e107::getSingleton('eResponse')->getMetaDescription());
$defaultTags = vartrue($this->var['tags'],'');
$tp = e107::getParser();

View File

@ -1345,6 +1345,7 @@ li.rssRow > div {
.selectize-control div.item { border-radius:3px; }
.selectize-control div.item .remove { margin-top:3px }
.selectize-input.focus { box-shadow: inherit; }
.form-control.selectize-input { min-height:38px; height:auto; }
/*

View File

@ -52,7 +52,7 @@ 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('COMMENTLINK', e107::getParser()->toGlyph('fa-comment'));
define('COMMENTOFFSTRING', '');
define('PRE_EXTENDEDSTRING', '<br />');

View File

@ -137,8 +137,8 @@ class theme_shortcodes extends e_shortcode
$text .='
<form method="post" onsubmit="hashLoginPassword(this);return true" action="'.e_REQUEST_HTTP.'" accept-charset="UTF-8">
<p>{LM_USERNAME_INPUT}</p>
<p>{LM_PASSWORD_INPUT}</p>
<p>{LM_USERNAME_INPUT: idprefix=bs3-}</p>
<p>{LM_PASSWORD_INPUT: idprefix=bs3-}</p>
<div class="form-group"></div>
@ -147,10 +147,10 @@ class theme_shortcodes extends e_shortcode
<div class="checkbox">
<label class="string optional" for="autologin"><input style="margin-right: 10px;" type="checkbox" name="autologin" id="autologin" value="1">
<label class="string optional" for="bs3-autologin"><input style="margin-right: 10px;" type="checkbox" name="autologin" id="bs3-autologin" value="1">
'.LAN_LOGINMENU_6.'</label>
</div>
<input class="btn btn-primary btn-block" type="submit" name="userlogin" id="userlogin" value="'.LAN_LOGINMENU_51.'">
<input class="btn btn-primary btn-block" type="submit" name="userlogin" id="bs3-userlogin" value="'.LAN_LOGINMENU_51.'">
';
$text .= '
@ -195,8 +195,14 @@ class theme_shortcodes extends e_shortcode
$text = '
<ul class="nav navbar-nav navbar-right'.$direction.'">
<li class="dropdown">{PM_NAV}</li>
<ul class="nav navbar-nav navbar-right'.$direction.'">';
if( e107::isInstalled('pm') )
{
$text .= '<li class="dropdown">{PM_NAV}</li>';
}
$text .= '
<li class="dropdown dropdown-avatar"><a href="#" class="dropdown-toggle" data-toggle="dropdown">{SETIMAGE: w=30} {USER_AVATAR: shape=circle} '. $userNameLabel.' <b class="caret"></b></a>
<ul class="dropdown-menu">
<li>

View File

@ -41,6 +41,8 @@ ul.breadcrumb li span.divider { padding-left:5px; }
.img-responsive { max-width:100%; }
.logo.img-responsive { height: auto; }
table.table { width: 100% }
.media-list {
padding-left: 0;
list-style: none;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -207,6 +207,8 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
{
$(context).find('.e-expandit').once('e-expandit').each(function ()
{
$(this).show();
// default 'toggle'.
$(this).click(function ()
{
@ -254,8 +256,7 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
if(href === "#" || href == "")
{
var idt = $(this).nextAll("div");
$(idt).slideToggle("slow");
$(this).nextAll("div").slideToggle("slow");
return true;
}
@ -315,6 +316,21 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
}
};
/**
* Behavior to hide elements.
*
* @type {{attach: e107.behaviors.eHideMe.attach}}
*/
e107.behaviors.eHideMe = {
attach: function (context, settings)
{
$(context).find('.e-hideme').once('e-hide-me').each(function ()
{
$(this).hide();
});
}
};
/**
* Check if the selector is valid.
*
@ -715,12 +731,6 @@ $.ajaxSetup({
$(document).ready(function()
{
$(".e-hideme").hide();
$(".e-expandit").show();
// $(".e-spinner").spinner(); //FIXME breaks tooltips
//check all
$("#check-all").click(function(event){
var val = $(this).val(), selector = '.field-spacer';

View File

@ -313,8 +313,12 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
var $preview = $('#preview');
var $path = $('#path');
$this.addClass("media-select-active");
$this.closest("img").addClass("active");
// Remove "selected" class from elements.
$('.e-media-select').removeClass('media-select-active');
// Add "selected" class to clicked element.
$this.addClass('media-select-active');
$this.closest('img').addClass('active');
if(bbcode == "file") // not needed for Tinymce
{
@ -540,19 +544,22 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
$('#e-modal-loading', window.parent.document).show();
$('iframe', window.parent.document).attr('scrolling', 'no'); // hide the scrollbar.
// TODO use loading screen instead?
$(id).hide('slide', {direction: outDir}, 1500, function ()
{
});
$.get(src, function (data)
{
$(id).html(data);
newVal = $('#admin-ui-media-select-count-hidden').text();
$('#admin-ui-media-select-count').text(newVal).fadeIn();
$(id).show('slide', {direction: inDir}, 500, function ()
$.get(src, function (data)
{
$('#e-modal-loading', window.parent.document).hide();
$(id).html(data);
newVal = $('#admin-ui-media-select-count-hidden').text();
$('#admin-ui-media-select-count').text(newVal).fadeIn();
$(id).show('slide', {direction: inDir}, 500, function ()
{
$('#e-modal-loading', window.parent.document).hide();
});
// We need to attach behaviors to the newly loaded contents.
e107.attachBehaviors();
});
});

View File

@ -71,7 +71,7 @@ else
{
//$con = new convert;
$query = "SELECT n.*,c.* FROM `#news` AS n LEFT JOIN `#news_category` AS c ON n.news_category = c.category_id WHERE n.news_id=".intval($parms);
$query = "SELECT n.*, c.*, u.user_id, u.user_name FROM `#news` AS n LEFT JOIN `#news_category` AS c ON n.news_category = c.category_id LEFT JOIN `#user` AS u ON n.news_author = u.user_id WHERE n.news_id = " . intval($parms);
//$sql->db_Select("news", "*", "news_id='{$parms}'");
$sql = e107::getDb();

View File

@ -280,7 +280,7 @@ class signup
}
else
{
e107::getMessage()->setTitle(LAN_ERROR,E_MESSAGE_SUCCESS)->addSuccess(LAN_SIGNUP_44." ".$row['user_email']." - ".LAN_SIGNUP_45);
e107::getMessage()->setTitle(LAN_SIGNUP_61,E_MESSAGE_SUCCESS)->addSuccess(LAN_SIGNUP_44." ".$row['user_email']." - ".LAN_SIGNUP_45);
$ns->tablerender(null,e107::getMessage()->render());
$do_log['signup_result'] = LAN_SIGNUP_61;
}
@ -308,7 +308,7 @@ class signup
<tr>
<td class='forumheader3' style='width:30%'>".LAN_SIGNUP_48."</td>
<td class='forumheader3'>".$frm->text('resend_email','',80)."
<a class='e-expandit' href='#different'>Use a different email address</a></td>
<a class='e-expandit' href='#different'>".LAN_SIGNUP_121."</a></td>
</tr>
</table>