1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 13:47:31 +02:00

Merge pull request #46 from e107inc/master

.
This commit is contained in:
rica-carv
2017-05-08 20:21:58 +01:00
committed by GitHub
22 changed files with 121 additions and 395 deletions

View File

@@ -535,7 +535,7 @@ TMPO;
if($us->passwordAPIExists() === true && $us->getDefaultHashType() !== PASSWORD_E107_PHP && e107::pref('core','password_CHAP')==0)
{
$message = "It is HIGHLY recommended that you [change your password encoding] to the PHP Default. (Password hashes will be automatically upgraded during user login.)";
$message = LAN_PASSWORD_WARNING;
$srch = array('[',']');
$repl = array("<a class='alert-link' href='".e_ADMIN."prefs.php#nav-core-prefs-security'>","</a>");
$mes->addWarning(str_replace($srch,$repl,$message));

View File

@@ -117,8 +117,8 @@ if(!empty($_GET['iframe']))
'adminlanguage' => array('title'=> LANG_LAN_50, 'type'=>'dropdown', 'data' => 'str','help'=>'', 'writeParms'=>array('useValues'=>1,"default" => LANG_LAN_14)),
'multilanguage' => array('title'=> LANG_LAN_12, 'type'=>'boolean', 'data' => 'int','help'=>''),
'noLanguageSubs' => array('title'=> LANG_LAN_26, 'type'=>'boolean', 'data'=>'int', 'help'=> LANG_LAN_27),
'multilanguage_subdomain' => array('title'=> LANG_LAN_18, 'type'=>'textarea', 'data'=>'str', 'help'=> LANG_LAN_19, 'writeParms'=>array('rows'=>3)),
'multilanguage_domain' => array('title'=> LANG_LAN_106, 'type'=>'method', 'data'=>'str', 'help'=> LANG_LAN_19),
'multilanguage_subdomain' => array('title'=> LANG_LAN_18, 'type'=>'textarea', 'data'=>'str', 'help'=> LANG_LAN_19, 'writeParms'=>array('rows'=>3, 'placeholder'=>'mydomain.com')),
'multilanguage_domain' => array('title'=> LANG_LAN_106, 'type'=>'method', 'data'=>'str', 'help'=> LANG_LAN_107),
'multilanguage_verify_errorsonly' => array('title'=> LANG_LAN_33, 'type'=>'boolean', 'data' => 'int','help'=>''),
);
@@ -1149,7 +1149,7 @@ function multilang_prefs()
<small>".LANG_LAN_19."</small>
</td>
<td>
<textarea name='multilanguage_subdomain' rows='5' cols='15'>{$pref['multilanguage_subdomain']}</textarea>
<textarea name='multilanguage_subdomain' rows='5' cols='15' placeholder='mydomain.com'>{$pref['multilanguage_subdomain']}</textarea>
<div class='smalltext field-help'>".LANG_LAN_20."</div>
</td>

View File

@@ -1411,7 +1411,7 @@ $text .= "
if(function_exists('password_verify')) // ie. php 5.5 or higher
{
$pwdEncodeOpts[3] = "PHP Default (Preferred)";
$pwdEncodeOpts[3] = PRFLAN_276;
}

View File

@@ -1230,7 +1230,7 @@ class admin_shortcodes
$type = empty($val['invert']) ? 'latest' : 'invert';
$class = admin_shortcodes::getBadge($val['total'], $type);
$link = "<a href='".$val['url']."'>".$val['icon']." ".str_replace(":"," ",$val['title'])." <span class='".$class."'>".$val['total']."</span></a>";
$text .= "<li class='list-group-item'>".$link."</li>\n";
$text .= "<li class='list-group-item clearfix'>".$link."</li>\n";
}
}
$text .= "</ul>";

View File

@@ -1120,7 +1120,15 @@ class news_shortcodes extends e_shortcode
function sc_newsmetadiz($parm=null)
{
return e107::getParser()->toHtml($this->news_item['news_meta_description'],true);
$text = e107::getParser()->toHtml($this->news_item['news_meta_description'],true);
if(!empty($parm['limit']))
{
$text = e107::getParser()->text_truncate($text, $parm['limit']);
}
return $text;
}
}

View File

@@ -1597,7 +1597,7 @@ class e_jsmanager
foreach($match[1] as $k=>$v)
{
if(substr($v,5) == 'data:' || substr($v,4) == 'http')
if(strpos($v,'data:') === 0 || strpos($v,'http') === 0)
{
unset($match[0][$k]);
continue;

View File

@@ -332,6 +332,7 @@ define("LAN_OPTIONAL", "optional");
define("LAN_INACTIVE","Inactive");
define("LAN_ACTIVATE","Activate");
define("LAN_ACCEPT","Accept");
define("LAN_PASSWORD_WARNING", "It is HIGHLY recommended that you [change your password encoding] to the PHP Default. (Password hashes will be automatically upgraded during user login.)");
define("LAN_PENDING","Pending");
define("LAN_SUBMITTED","Submitted");
define("LAN_POSTED_BY_X","Posted by [x] [y]");

View File

@@ -294,3 +294,4 @@ define("PRFLAN_272", "Session Lifetime");
define("PRFLAN_273", "Lifetime in seconds. 0 = until the browser is closed. ");
define("PRFLAN_274", "Contact form will only be visible to this userclass group.");
define("PRFLAN_275", "View this page using https (SSL) to modify this option");
define("PRFLAN_276", "PHP Default (Preferred)");

View File

@@ -83,8 +83,6 @@ class download_setup
$bld = new eRouter;
$bld->buildGlobalConfig();
}
return $this->upgradeFilePaths($needed);

View File

@@ -781,7 +781,14 @@ class download_shortcodes extends e_shortcode
function sc_download_report_link()
{
$pref = e107::getPref();
return (check_class($pref['download_reportbroken'])) ? "<a href='".e_PLUGIN_ABS."download/download.php?action=report&id=".$this->var['download_id']."'>".LAN_dl_45."</a>" : "";
if(check_class($pref['download_reportbroken']))
{
//$url = e_PLUGIN_ABS."download/download.php?action=report&id=".$this->var['download_id'];
$url = e107::url('download','report', $this->var);
return "<a href='".$url."'>".LAN_dl_45."</a>";
}
return '';
}
function sc_download_view_caption()

View File

@@ -114,6 +114,13 @@ class download_url // plugin-folder + '_url'
'redirect' => '{e_PLUGIN}download/request.php?id=$1', // file-path of what to load when the regex returns true.
);
$config['report'] = array(
'regex' => '^{alias}/report/([\d]*)/(.*)$',
'sef' => '{alias}/report/{download_id}/{download_sef}',
'redirect' => '{e_PLUGIN}download/download.php?action=report&id=$1', // file-path of what to load when the regex returns true.
);
$config['image'] = array(
'regex' => '^{alias}/image/([\d]*)/(.*)$',
'sef' => '{alias}/image/{download_id}/{download_sef}',

View File

@@ -781,12 +781,21 @@ class download
$dlrow = $sql->fetch();
extract($dlrow);
// extract($dlrow);
$download_name = $tp->toDB($dlrow['download_name']);
$download_id = (int) $dlrow['download_id'];
$breadcrumb = array();
$breadcrumb[] = array('text' => LAN_PLUGIN_DOWNLOAD_NAME, 'url' => e107::url('download','index', $dlrow));
$breadcrumb[] = array('text' => $dlrow['download_category_name'], 'url' => e107::url('download','category', $dlrow)); // e_SELF."?action=list&id=".$dlrow['download_category_id']);
$breadcrumb[] = array('text' => $dlrow['download_name'], 'url' => e107::url('download','item', $dlrow)); //e_SELF."?action=view&id=".$dlrow['download_id']);
$breadcrumb[] = array('text' => LAN_dl_45, 'url' => null);
if (isset($_POST['report_download']))
{
$report_add = $tp->toDB($_POST['report_add']);
$download_name = $tp->toDB($download_name);
$user = USER ? USERNAME : LAN_GUEST;
if ($pref['download_email'])
@@ -798,36 +807,38 @@ class download
sendemail(SITEADMINEMAIL, $subject, $report);
}
$sql->insert('generic', "0, 'Broken Download', ".time().",'".USERID."', '{$download_name}', {$id}, '{$report_add}'");
$sql->insert('generic', "0, 'Broken Download', ".time().",'".USERID."', '{$download_name}', {$download_id}, '{$report_add}'");
define("e_PAGETITLE", LAN_PLUGIN_DOWNLOAD_NAME." / ".LAN_dl_47);
define("e_PAGETITLE", LAN_PLUGIN_DOWNLOAD_NAME." / ".LAN_dl_45);
$text = $frm->breadcrumb($breadcrumb);
$text = LAN_dl_48."<br /><br /><a href='".e_PLUGIN."download/download.php?action=view&id=".$download_id."'>".LAN_dl_49."</a>";
$text .= "<div class='alert alert-success'>".LAN_dl_48."</div>
<a class='btn btn-primary' href='".e107::url('download','item', $dlrow)."'>".LAN_dl_49."</a>";
return $ns->tablerender(LAN_PLUGIN_DOWNLOAD_NAME, $text, 'download-report', true);
}
else
{
define("e_PAGETITLE", LAN_PLUGIN_DOWNLOAD_NAME." / ".LAN_dl_51." ".$download_name);
define("e_PAGETITLE", LAN_PLUGIN_DOWNLOAD_NAME." / ".LAN_dl_45." ".$download_name);
// require_once(HEADERF);
$breadcrumb = array();
$breadcrumb[] = array('text' => LAN_PLUGIN_DOWNLOAD_NAME, 'url' => e_SELF);
$breadcrumb[] = array('text' => $dlrow['download_category_name'], 'url' => e_SELF."?action=list&id=".$dlrow['download_category_id']);
$breadcrumb[] = array('text' => $dlrow['download_name'], 'url' => e_SELF."?action=view&id=".$dlrow['download_id']);
$breadcrumb[] = array('text' => LAN_dl_50, 'url' => null);
$text = $frm->breadcrumb($breadcrumb);
$text .= "<form action='".e_SELF."?report.{$download_id}' method='post'>
<div>
".LAN_DOWNLOAD.": <a href='".e_PLUGIN."download/download?action=view&id={$download_id}'>".$download_name."</a>
</div>
<div>".LAN_dl_54."<br />".LAN_dl_55."</div>
<div> ".$frm->textarea('report_add')."</div>
<div class='text-center'>
$formUrl = e107::url('download', 'report', $dlrow);
$fileUrl = e107::url('download', 'view', $dlrow);
$text .= "<form action='".$formUrl."' method='post'>
<div class='form-group'>
<p> ".LAN_DOWNLOAD.": <a href='".$fileUrl."'>".$download_name."</a></p>
<p>".LAN_dl_54."<br />".LAN_dl_55."</p>
</div>
<div class='form-group clearfix'> ".$frm->textarea('report_add', '')."</div>
<div class='form-group text-center'>
".$frm->button('report_download',LAN_dl_45,'submit')."
</div>
</form>";

View File

@@ -136,7 +136,7 @@ if ($type == "file")
{
$row = $sql->fetch();
$row['download_url'] = $tp->replaceConstants($row['download_url'],'abs');
$row['download_url'] = $tp->replaceConstants($row['download_url']); // must be relative file-path.
if (check_class($row['download_category_class']) && check_class($row['download_class']))
{

View File

@@ -80,7 +80,7 @@ class forum_setup
$sql = e107::getDb();
if(!$sql->isTable('forum_t')) // no table, so run a default plugin install procedure.
if(!$sql->isTable('forum_t') || !$sql->isEmpty('forum_thread')) // no table, so run a default plugin install procedure.
{
return false;
// e107::getSingleton('e107plugin')->refresh('forum');
@@ -98,6 +98,30 @@ class forum_setup
{
$sql = e107::getDb();
$config = e107::getPref('url_config');
if(!empty($config['forum']))
{
e107::getConfig()
->removePref('url_config/forum')
->removePref('url_locations/forum')
->save(false,true);
if(file_exists(e_PLUGIN."forum/url/url.php"))
{
@unlink(e_PLUGIN."forum/url/url.php");
@unlink(e_PLUGIN."forum/url/rewrite_url.php");
}
$bld = new eRouter;
$bld->buildGlobalConfig();
}
if($sql->isEmpty('forum_thread') === true && $sql->isTable('forum_t') && $sql->isEmpty('forum_t') === false)
{
$mes = e107::getMessage();

View File

@@ -626,8 +626,8 @@ class forumStats
$POSTER = $row['thread_user_anon'];
}
$LINKTOTHREAD = e107::url('forum/thread/view', array('id' =>$row['thread_id'])); //$e107->url->getUrl('forum', 'thread', "func=view&id={$row['thread_id']}");
$LINKTOFORUM = e107::url('forum/forum/view', array('id' => $row['thread_forum_id'])); //$e107->url->getUrl('forum', 'forum', "func=view&id={$row['thread_forum_id']}");
// $LINKTOTHREAD = e107::url('forum/thread/view', array('id' =>$row['thread_id'])); //$e107->url->getUrl('forum', 'thread', "func=view&id={$row['thread_id']}");
// $LINKTOFORUM = e107::url('forum/forum/view', array('id' => $row['thread_forum_id'])); //$e107->url->getUrl('forum', 'forum', "func=view&id={$row['thread_forum_id']}");
$lastpost_datestamp = $gen->convert_date($row['thread_lastpost'], 'forum');

View File

@@ -646,9 +646,12 @@ function showmodoptions()
$forum_id = $thread->threadInfo['forum_id'];
if ($postInfo['thread_start'])
{
$type = 'Thread';
// XXX _URL_ thread name?
$ret = "<form method='post' action='" . $e107->url->create('forum/thread/view', array('id' => $postInfo['post_thread']))."' id='frmMod_{$postInfo['post_forum']}_{$postInfo['post_thread']}'>";
// $formUrl = $e107->url->create('forum/thread/view', array('id' => $postInfo['post_thread']));
$formUrl = e_REQUEST_URI; // e107::url('forum', 'topic',
$ret = "<form method='post' action='" . $formUrl."' id='frmMod_{$postInfo['post_forum']}_{$postInfo['post_thread']}'>";
$delId = $postInfo['post_thread'];
}
else
@@ -674,7 +677,9 @@ function showmodoptions()
}
else
{
$ret .= "<a href='" . $e107->url->create('forum/thread/split', array('id' => $postInfo['post_id']))."'>" . defset('IMAGE_admin_split') . '</a>';
// $splitUrl = $e107->url->create('forum/thread/split', array('id' => $postInfo['post_id']));
$splitUrl = e107::url('forum','split', array('thread_id'=>$postInfo['post_thread'], 'post_id'=>$postInfo['post_id']));
$ret .= "<a href='" .$splitUrl ."'>" . defset('IMAGE_admin_split') . '</a>';
}
$ret .= "

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<e107Plugin name="Forum" lan="LAN_PLUGIN_FORUM_NAME" version="2.0" date="2012-08-01" compatibility="2.0" installRequired="true">
<e107Plugin name="Forum" lan="LAN_PLUGIN_FORUM_NAME" version="2.1" date="2012-08-01" compatibility="2.0" installRequired="true">
<author name="e107 Inc." url="http://e107.org" />
<description lan="LAN_PLUGIN_FORUM_DESC">This plugin is a fully featured forum system</description>
<category>content</category>

View File

@@ -554,7 +554,10 @@
{
// global $gen;
$tmp = explode('.', $this->var['forum_lastpost_info']);
$lp_thread = "<a href='" . e107::getUrl()->create('forum/thread/last', array('id' => $tmp[1])) . "'>" . IMAGE_post2 . '</a>';
// $lp_url = e107::getUrl()->create('forum/thread/last', array('id' => $tmp[1]));
$lp_url = $threadUrl = e107::url('forum','topic',$this->var, array('query'=>array('last'=>1)));
$lp_thread = "<a href='" . $lp_url . "'>" . IMAGE_post2 . '</a>';
$lp_date = $this->gen->convert_date($tmp[0], 'forum');
/*--

View File

@@ -1,172 +0,0 @@
<?php
/*
* Copyright (C) 2008-2011 e107 Inc (e107.org), Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
* $Id$
*
* Forum SEF URL configuration
* TODO - UNDER DEVELOPMENT
*/
class plugin_forum_rewrite_url extends eUrlConfig
{
public function config()
{
return array(
'config' => array(
'noSingleEntry' => true, // [optional] default false; disallow this module to be shown via single entry point when this config is used
'legacy' => '{e_PLUGIN}forum/forum.php', // this config won't work in single entry point mod (legacy not used at all), so just set this to default plugin file to notify router it's legacy module
'format' => 'get', // get|path - notify core for the current URL format, if set to 'get' rules will be ignored
'selfParse' => false, // [optional] default false; use only this->parse() method, no core routine URL parsing
'selfCreate' => true, // [optional] default false; use only this->create() method, no core routine URL creating
'defaultRoute' => 'forum/main', // [optional] default empty; route (no leading module) used when module is found with no additional controller/action information e.g. /news/
'legacyQuery' => '' // default legacy query string template, null to disable, empty - use current QUERY_STRING
),
// rule set array
'rules' => array()
);
}
/**
* NOTE we have double 'forum' but this is the best way to map new-old forum URLs to the new routing engine
* Additionally, 'forum' controller is descriptive, and leading 'forum' module name could be easiely changed (URL aliases administration page)
*/
public function create($route, $params = array(), $options = array())
{
$amp = varset($options['encode']) ? '&amp;' : '&';
if(is_string($route)) $route = explode('/', $route, 2);
if(!varset($route[0]) || 'index' == $route[0]) $route[0] = 'forum';
if(!varset($route[1])) $route[1] = 'main';
$base = e107::getInstance()->getFolder('plugins').'forum/';
//var_dump($options, $route, $params);
if($route[0] == 'forum')
{
if(!isset($params['id']) && isset($params['forum_id'])) $params['id'] = $params['forum_id'];
// if(isset($params['forum_name'])) $params['name'] = $params['forum_name']; - not used in this config
switch($route[1])
{
case 'view':
$page = (varset($params['page']) ? $amp.'p='.$params['page'] : '');
return $base."forum_viewforum.php?id={$params['id']}{$page}";
break;
case 'track':
return $base.'forum.php?track';
break;
case 'index':
case 'main':
return $base.'forum.php';
break;
case 'post':
return $base."forum_post.php?f={$params['type']}}id={$params['id']}";
break;
case 'rules':
return $base.'forum.php?f=rules';
break;
case 'mfar':
return $base.'forum.php?f=mfar'.$amp.'id='.$params['id'];
break;
}
}
elseif($route[0] == 'thread')
{
if(!isset($params['id']) && isset($params['thread_id'])) $params['id'] = $params['thread_id'];
// if(isset($params['thread_name'])) $params['name'] = $params['thread_name']; - not used in this config
switch($route[1])
{
case 'new':
return $base."forum_post.php?f=nt{$amp}id={$params['id']}";
break;
case 'reply':
return $base."forum_post.php?f=rp{$amp}id={$params['id']}";
break;
case 'view':
$page = (varset($params['page']) ? $amp.'p='.$params['page'] : '');
return $base."forum_viewtopic.php?id={$params['id']}{$page}";
break;
case 'last':
return $base."forum_viewtopic.php?id={$params['id']}{$amp}last=1";
break;
case 'post':
return $base."forum_viewtopic.php?f=post{$amp}id={$params['id']}";
break;
case 'report':
$page = (isset($params['page']) ? (int)$params['page'] : 0 );
return $base."forum_viewtopic.php?f=report{$amp}id={$params['id']}{$amp}post={$params['post']}{$amp}p={$page}";
break;
case 'edit':
return $base."forum_post.php?f=edit{$amp}id={$params['id']}";
break;
case 'move':
return $base."forum_conf.php?f=move{$amp}id={$params['id']}";
break;
case 'split':
return $base."forum_conf.php?f=split{$amp}id={$params['id']}";
break;
case 'quote':
return $base."forum_post.php?f=quote{$amp}id={$params['id']}";
break;
case 'next':
return $base."forum_viewtopic.php?f=next{$amp}id={$params['id']}";
break;
case 'prev':
return $base."forum_viewtopic.php?f=prev{$amp}id={$params['id']}";
break;
case 'track':
return $base."forum_viewtopic.php?f=track{$amp}id={$params['id']}";
break;
case 'untrack':
return $base."forum_viewtopic.php?f=untrack{$amp}id={$params['id']}";
break;
case 'track_toggle':
return $base."forum_viewtopic.php?f=track_toggle{$amp}id={$params['id']}";
break;
}
}
return false;
}
/**
* Admin callback
* Language file not loaded as all language data is inside the lan_eurl.php (loaded by default on administration URL page)
*/
public function admin()
{
// static may be used for performance
/*
e107::plugLan('forum', 'lan_forum_url');
static $admin = array(
'labels' => array(
'name' => LAN_PLUGIN_FORUM_NAME, // Module name
'label' => FORUM_LAN_URL_REWRITE_LABEL, // Current profile name
'description' => FORUM_LAN_URL_REWRITE_DESCR, //
'examples' => array("{e_PLUGIN_ABS}forum/forum.php")
),
'form' => array(), // Under construction - additional configuration options
'callbacks' => array(), // Under construction - could be used for e.g. URL generator functionallity
);
return $admin;*/
}
}

View File

@@ -1,174 +0,0 @@
<?php
/*
* Copyright (C) 2008-2011 e107 Inc (e107.org), Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
* $Id$
*
* Forum Default URL configuration
* TODO - SEF URL configuration
*/
class plugin_forum_url extends eUrlConfig
{
public function config()
{
return array(
'config' => array(
'noSingleEntry' => true, // [optional] default false; disallow this module to be shown via single entry point when this config is used
'legacy' => '{e_PLUGIN}forum/forum.php', // this config won't work in single entry point mod (legacy not used at all), so just set this to default plugin file to notify router it's legacy module
'format' => 'get', // get|path - notify core for the current URL format, if set to 'get' rules will be ignored
'selfParse' => false, // [optional] default false; use only this->parse() method, no core routine URL parsing
'selfCreate' => true, // [optional] default false; use only this->create() method, no core routine URL creating
'defaultRoute' => 'forum/main', // [optional] default empty; route (no leading module) used when module is found with no additional controller/action information e.g. /news/
'legacyQuery' => '' // default legacy query string template, null to disable, empty - use current QUERY_STRING
),
// rule set array
'rules' => array()
);
}
/**
* NOTE we have double 'forum' but this is the best way to map new-old forum URLs to the new routing engine
* Additionally, 'forum' controller is descriptive, and leading 'forum' module name could be easiely changed (URL aliases administration page)
*/
public function create($route, $params = array(), $options = array())
{
$amp = varset($options['encode']) ? '&amp;' : '&';
if(is_string($route)) $route = explode('/', $route, 2);
if(!varset($route[0]) || 'index' == $route[0]) $route[0] = 'forum';
if(!varset($route[1])) $route[1] = 'main';
$base = e107::getInstance()->getFolder('plugins').'forum/';
//var_dump($options, $route, $params);
if($route[0] == 'forum')
{
if(!isset($params['id']) && isset($params['forum_id'])) $params['id'] = $params['forum_id'];
// if(isset($params['forum_name'])) $params['name'] = $params['forum_name']; - not used in this config
switch($route[1])
{
case 'view':
$page = (varset($params['page']) ? $amp.'p='.$params['page'] : '');
return $base."forum_viewforum.php?id={$params['id']}{$page}";
break;
case 'track':
return $base.'forum.php?track';
break;
case 'index':
case 'main':
return $base.'forum.php';
break;
case 'post':
return $base."forum_post.php?f={$params['type']}{$amp}id={$params['id']}";
break;
case 'rules':
return $base.'forum.php?f=rules';
break;
case 'mfar':
return $base.'forum.php?f=mfar'.$amp.'id='.$params['id'];
break;
}
}
elseif($route[0] == 'thread')
{
if(!isset($params['id']) && isset($params['thread_id'])) $params['id'] = $params['thread_id'];
// if(isset($params['thread_name'])) $params['name'] = $params['thread_name']; - not used in this config
switch($route[1])
{
case 'new':
return $base."forum_post.php?f=nt{$amp}id={$params['id']}";
break;
case 'reply':
return $base."forum_post.php?f=rp{$amp}id={$params['id']}";
break;
case 'view':
$page = (varset($params['page']) ? $amp.'p='.$params['page'] : '');
return $base."forum_viewtopic.php?id={$params['id']}{$page}";
break;
case 'last':
return $base."forum_viewtopic.php?id={$params['id']}{$amp}last=1";
break;
case 'post':
return $base."forum_viewtopic.php?f=post{$amp}id={$params['id']}";
break;
case 'report':
$page = (isset($params['page']) ? (int)$params['page'] : 0 );
return $base."forum_viewtopic.php?f=report{$amp}id={$params['id']}{$amp}post={$params['post']}{$amp}p={$page}";
break;
case 'edit':
return $base."forum_post.php?f=edit{$amp}id={$params['id']}{$amp}post={$params['post']}";
break;
case 'move':
return $base."forum_conf.php?f=move{$amp}id={$params['id']}";
break;
case 'split':
return $base."forum_conf.php?f=split{$amp}id={$params['id']}";
break;
case 'quote':
return $base."forum_post.php?f=quote{$amp}id={$params['id']}{$amp}post={$params['post']}";
break;
case 'next':
return $base."forum_viewtopic.php?f=next{$amp}id={$params['id']}";
break;
case 'prev':
return $base."forum_viewtopic.php?f=prev{$amp}id={$params['id']}";
break;
case 'track':
return $base."forum_viewtopic.php?f=track{$amp}id={$params['id']}";
break;
case 'untrack':
return $base."forum_viewtopic.php?f=untrack{$amp}id={$params['id']}";
break;
case 'track_toggle':
return $base."forum_viewtopic.php?f=track_toggle{$amp}id={$params['id']}";
break;
}
}
return false;
}
/**
* Admin callback
* Language file not loaded as all language data is inside the lan_eurl.php (loaded by default on administration URL page)
*/
public function admin()
{
return false; // whole file deprecated.
/*
// static may be used for performance
e107::plugLan('forum', 'lan_forum_url');
static $admin = array(
'labels' => array(
'name' => LAN_PLUGIN_FORUM_NAME, // Module name
'label' => FORUM_LAN_URL_DEFAULT_LABEL, // Current profile name
'description' => FORUM_LAN_URL_DEFAULT_DESCR, //
'examples' => array("{e_PLUGIN_ABS}forum/forum_viewtopic.php?id=3&p=2")
),
'form' => array(), // Under construction - additional configuration options
'callbacks' => array(), // Under construction - could be used for e.g. URL generator functionallity
);
*/
return $admin;
}
}

View File

@@ -215,11 +215,11 @@ class gallery_shortcodes extends e_shortcode
* Amount per row differs according to device, so they are not set here, only the amount.
* @example {GALLERY_PORTFOLIO: placeholder=1&category=2}
*/
function sc_gallery_portfolio($parms = '')
function sc_gallery_portfolio($parm=null)
{
$ns = e107::getRender();
$tp = e107::getParser();
$parm = eHelper::scParams($parms);
// $parm = eHelper::scParams($parms);
$cat = (!empty($parm['category'])) ? $parm['category'] : vartrue(e107::getPlugPref('gallery', 'slideshow_category'), false); //TODO Separate pref?
$tmpl = e107::getTemplate('gallery', 'gallery');

View File

@@ -25,15 +25,22 @@
if (!defined('e107_INIT')) { exit; }
//define('PM_INBOX_ICON', "<img src='".e_PLUGIN_ABS."pm/images/mail_get.png' class='icon S16' alt='".LAN_PLUGIN_PM_INBOX."' title='".LAN_PLUGIN_PM_INBOX."' />");
define('PM_INBOX_ICON', e107::getParser()->toGlyph('fa-inbox'));
//define('PM_OUTBOX_ICON', "<img src='".e_PLUGIN_ABS."pm/images/mail_send.png' class='icon S16' alt='".LAN_PLUGIN_PM_OUTBOX."' title='".LAN_PLUGIN_PM_OUTBOX."' />");
// Icon candidate to stacked fontawesome icons...
define('PM_OUTBOX_ICON', e107::getParser()->toGlyph('fa-inbox').e107::getParser()->toGlyph('fa-arrow-up'));
if(deftrue('BOOTSTRAP') && deftrue('FONTAWESOME'))
{
define('PM_INBOX_ICON', e107::getParser()->toGlyph('fa-inbox'));
// Icon candidate to stacked fontawesome icons...
define('PM_OUTBOX_ICON', e107::getParser()->toGlyph('fa-inbox').e107::getParser()->toGlyph('fa-arrow-up'));
// Icon candidate to animated fontawesome icons...
define('NEWPM_ANIMATION', e107::getParser()->toGlyph('fa-envelope'));
}
else
{
if (!defined('PM_INBOX_ICON')) define('PM_INBOX_ICON', "<img src='".e_PLUGIN_ABS."pm/images/mail_get.png' class='icon S16' alt='".LAN_PLUGIN_PM_INBOX."' title='".LAN_PLUGIN_PM_INBOX."' />");
if (!defined('PM_OUTBOX_ICON')) define('PM_OUTBOX_ICON', "<img src='".e_PLUGIN_ABS."pm/images/mail_send.png' class='icon S16' alt='".LAN_PLUGIN_PM_OUTBOX."' title='".LAN_PLUGIN_PM_OUTBOX."' />");
if (!defined('NEWPM_ANIMATION')) define('NEWPM_ANIMATION', "<img src='".e_PLUGIN_ABS."pm/images/newpm.gif' alt='' />");
}
//define('PM_SEND_LINK', LAN_PLUGIN_PM_NEW);
//define('NEWPM_ANIMATION', "<img src='".e_PLUGIN_ABS."pm/images/newpm.gif' alt='' />");
// Icon candidate to animated fontawesome icons...
define('NEWPM_ANIMATION', e107::getParser()->toGlyph('fa-envelope'));
/*
$sc_style['PM_SEND_PM_LINK']['pre'] = "<br /><br />";
$sc_style['PM_SEND_PM_LINK']['post'] = "";