mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 04:40:44 +02:00
Sitelinks for plugins using {e_XXX} weren't always decoded properly. Notice removal.
This commit is contained in:
@@ -11,8 +11,8 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_handlers/e_parse_class.php,v $
|
||||
| $Revision: 1.9 $
|
||||
| $Date: 2007-04-30 20:16:55 $
|
||||
| $Revision: 1.10 $
|
||||
| $Date: 2007-05-16 20:24:30 $
|
||||
| $Author: e107steved $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
@@ -276,6 +276,7 @@ class e_parse
|
||||
$pos = 0;
|
||||
$curlen = 0;
|
||||
$tmp_pos = 0;
|
||||
$intag = FALSE;
|
||||
while($curlen < $len && $curlen < strlen($text))
|
||||
{
|
||||
switch($text{$pos})
|
||||
@@ -699,9 +700,17 @@ class e_parse
|
||||
$search[] = "{e_ADMIN}";
|
||||
}
|
||||
if ($all) {
|
||||
if (USER)
|
||||
{ // Can only replace with valid number for logged in users
|
||||
$replace_relative[] = USERID;
|
||||
$replace_absolute[] = USERID;
|
||||
$search[] = "{USERID}";
|
||||
}
|
||||
else
|
||||
{
|
||||
$replace_relative[] = '';
|
||||
$replace_absolute[] = '';
|
||||
}
|
||||
$search[] = "{USERID}";
|
||||
}
|
||||
$replace = ((string)$nonrelative == "full" ) ? $replace_absolute : $replace_relative;
|
||||
return str_replace($search,$replace,$text);
|
||||
|
@@ -12,9 +12,9 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_handlers/sitelinks_class.php,v $
|
||||
| $Revision: 1.6 $
|
||||
| $Date: 2007-03-16 13:47:59 $
|
||||
| $Author: mcfly_e107 $
|
||||
| $Revision: 1.7 $
|
||||
| $Date: 2007-05-16 20:24:30 $
|
||||
| $Author: e107steved $
|
||||
+---------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
@@ -183,7 +183,8 @@ class sitelinks
|
||||
$indent = ($style['linkdisplay'] != 3) ? $style['subindent'] : "";
|
||||
}
|
||||
|
||||
$linkInfo['link_url'] = $tp -> replaceConstants($linkInfo['link_url'], '', TRUE); // replace {e_xxxx}
|
||||
// Convert any {e_XXX} to absolute URLs (relative ones sometimes get broken by adding e_HTTP at the front)
|
||||
$linkInfo['link_url'] = $tp -> replaceConstants($linkInfo['link_url'], TRUE, TRUE); // replace {e_xxxx}
|
||||
|
||||
if(strpos($linkInfo['link_url'],"{") !== FALSE){
|
||||
$linkInfo['link_url'] = $tp->parseTemplate($linkInfo['link_url'], TRUE); // shortcode in URL support - dynamic urls for multilanguage.
|
||||
@@ -290,9 +291,13 @@ function hilite($link,$enabled=''){
|
||||
|
||||
// --------------- highlighting for 'HOME'. ----------------
|
||||
global $pref;
|
||||
list($fp,$fp_q) = explode("?",$pref['frontpage']['all']."?");
|
||||
if(strpos(e_SELF,"/".$pref['frontpage']['all'])!== FALSE && $fp_q == $tmp[1] && $link == e_HTTP."index.php"){
|
||||
if (isset($pref['frontpage']['all']))
|
||||
{
|
||||
list($fp,$fp_q) = explode("?",$pref['frontpage']['all']."?");
|
||||
if (strpos(e_SELF,"/".$pref['frontpage']['all'])!== FALSE && $fp_q == $tmp[1] && $link == e_HTTP."index.php")
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
// --------------- highlighting for plugins. ----------------
|
||||
|
@@ -11,9 +11,9 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/forum/forum_class.php,v $
|
||||
| $Revision: 1.1.1.1 $
|
||||
| $Date: 2006-12-02 04:35:13 $
|
||||
| $Author: mcfly_e107 $
|
||||
| $Revision: 1.2 $
|
||||
| $Date: 2007-05-16 20:24:37 $
|
||||
| $Author: e107steved $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
@@ -230,6 +230,7 @@ class e107forum
|
||||
|
||||
function forum_newflag_list()
|
||||
{
|
||||
if (!USER) return FALSE; // Can't determine new threads for non-logged in users
|
||||
global $sql;
|
||||
$viewed = "";
|
||||
if(USERVIEWED)
|
||||
@@ -810,7 +811,7 @@ class e107forum
|
||||
return FORLAN_9;
|
||||
}
|
||||
}
|
||||
else
|
||||
if($type == 'make_inactive')
|
||||
{
|
||||
$pruned = $sql->db_Update("forum_t", "thread_active=0 WHERE thread_lastpost < $prunedate AND thread_parent=0 AND thread_forum_id IN ({$forumList})");
|
||||
return FORLAN_8." ".$pruned." ".FORLAN_91;
|
||||
|
@@ -11,9 +11,9 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_themes/lamb/forum_template.php,v $
|
||||
| $Revision: 1.1.1.1 $
|
||||
| $Date: 2006-12-02 04:35:57 $
|
||||
| $Author: mcfly_e107 $
|
||||
| $Revision: 1.2 $
|
||||
| $Date: 2007-05-16 20:24:44 $
|
||||
| $Author: e107steved $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
@@ -29,22 +29,27 @@ $FORUM_MAIN_FORUM = "<tr>\n<td style='width:5%; text-align:center' class='nforum
|
||||
|
||||
$FORUM_MAIN_END = "</table></div>\n<div class='spacer'>\n<table style='width:100%' class='nforumholder' cellspacing='1'>\n<tr>\n<td colspan='2' style='width:60%' class='nforumcaption2'>{INFOTITLE}</td>\n</tr>\n<tr>\n<td rowspan='4' style='width:5%; text-align:center' class='nforumthread'>{LOGO}</td>\n<td style='width:auto' class='nforumthread'>{USERINFO}</td>\n</tr>\n<tr>\n<td style='width:95%' class='nforumthread'>{INFO}</td>\n</tr><tr>\n<td style='width:95%' class='nforumthread'>{FORUMINFO}</td>\n</tr>\n<tr>\n<td style='width:95%' class='nforumthread'>{USERLIST}<br />{STATLINK}</td>\n</tr>\n</table>\n</div>\n<div class='spacer'>\n<table class='fborder' style='width:100%'>\n<tr>\n<td class='nforumthread' style='text-align:center; width:33%'>{ICONKEY}</td>\n<td style='text-align:center; width:33%' class='nforumthread'>{SEARCH}</td>\n<td style='width:33%; text-align:center; vertical-align:middle' class='nforumthread'><span class='smallblacktext'>{PERMS}</span>\n</td>\n</tr>\n</table>\n</div>\n</div>";
|
||||
|
||||
if(!$FORUM_NEWPOSTS_START){
|
||||
if(!isset($FORUM_NEWPOSTS_START))
|
||||
{
|
||||
$FORUM_NEWPOSTS_START = "<div style='text-align:center'>\n<div class='spacer'>\n<table style='width:95%' class='fborder'>\n<tr>\n<td style='width:3%' class='fcaption'> </td>\n<td style='width:60%' class='fcaption'>{NEWTHREADTITLE}</td>\n<td style='width:27%; text-align:center' class='fcaption'>{POSTEDTITLE}</td>\n</tr>";
|
||||
}
|
||||
|
||||
if(!$FORUM_NEWPOSTS_MAIN){
|
||||
$FORUM_NEWPOSTS_MAIN .= "<tr>\n<td style='width:3%' class='forumheader3'>{NEWIMAGE}</td>\n<td style='width:60%' class='forumheader3'>{NEWSPOSTNAME}</td>\n<td style='width:27%; text-align:center' class='forumheader3'>{STARTERTITLE}</td>\n</tr>";
|
||||
if(!isset($FORUM_NEWPOSTS_MAIN))
|
||||
{
|
||||
$FORUM_NEWPOSTS_MAIN = "<tr>\n<td style='width:3%' class='forumheader3'>{NEWIMAGE}</td>\n<td style='width:60%' class='forumheader3'>{NEWSPOSTNAME}</td>\n<td style='width:27%; text-align:center' class='forumheader3'>{STARTERTITLE}</td>\n</tr>";
|
||||
}
|
||||
|
||||
if(!$FORUM_NEWPOSTS_END){
|
||||
$FORUM_NEWPOSTS_END .= "</table></div></div>";
|
||||
if(!isset($FORUM_NEWPOSTS_END))
|
||||
{
|
||||
$FORUM_NEWPOSTS_END = "</table></div></div>";
|
||||
}
|
||||
|
||||
if(!$FORUM_TRACK_START){
|
||||
if(!isset($FORUM_TRACK_START))
|
||||
{
|
||||
$FORUM_TRACK_START = "<div style='text-align:center'>\n<div class='spacer'>\n<table style='width:95%' class='fborder'>\n<tr>\n<td colspan='3' style='width:60%' class='fcaption'>{TRACKTITLE}</td>\n</tr>\n";
|
||||
|
||||
if(!$FORUM_TRACK_MAIN){
|
||||
if(!isset($FORUM_TRACK_MAIN))
|
||||
{
|
||||
$FORUM_TRACK_MAIN = "<tr>
|
||||
<td style='text-align:center; vertical-align:middle; width:6%' class='forumheader3'>{NEWIMAGE}</td>
|
||||
<td style='vertical-align:middle; text-align:left; width:70%' class='forumheader3'><span class='mediumtext'>{TRACKPOSTNAME}</span></td>
|
||||
@@ -53,7 +58,8 @@ $FORUM_MAIN_END = "</table></div>\n<div class='spacer'>\n<table style='width:100
|
||||
}
|
||||
}
|
||||
|
||||
if(!$FORUM_TRACK_END){
|
||||
if(!isset($FORUM_TRACK_END))
|
||||
{
|
||||
$FORUM_TRACK_END = "</table>\n</div>\n</div>";
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user