diff --git a/class2.php b/class2.php index a9b59ca9c..40bbe74e8 100644 --- a/class2.php +++ b/class2.php @@ -1603,6 +1603,7 @@ function init_session() define('GUEST', true); define('USERCLASS', ''); define('USEREMAIL', ''); + define('USERSIGNATURE', ''); if($user->hasSessionError()) { @@ -1623,6 +1624,7 @@ function init_session() define('USERPHOTO', $user->get('user_sess')); define('USERJOINED', $user->get('user_join')); define('USERVISITS', $user->get('user_visits')); + define('USERSIGNATURE', $user->get('user_signature')); define('ADMIN', $user->isAdmin()); define('ADMINID', $user->getAdminId()); diff --git a/e107_plugins/forum/forum.php b/e107_plugins/forum/forum.php index 60f0fa130..63ee2403f 100644 --- a/e107_plugins/forum/forum.php +++ b/e107_plugins/forum/forum.php @@ -213,7 +213,7 @@ if (!isset($FORUM_MAIN_START)) include(e_PLUGIN.'forum/templates/forum_template.php'); -if(is_array($FORUM_TEMPLATE)) // new v2.x format. +if(is_array($FORUM_TEMPLATE) && (e_BOOTSTRAP === true)) // new v2.x format. { $FORUM_MAIN_START = $FORUM_TEMPLATE['main-start']; diff --git a/e107_plugins/forum/forum_class.php b/e107_plugins/forum/forum_class.php index 32a72c553..52ef91a5c 100644 --- a/e107_plugins/forum/forum_class.php +++ b/e107_plugins/forum/forum_class.php @@ -176,7 +176,7 @@ class e107forum $postInfo['user_name'] = USERNAME; $postInfo['user_email'] = USEREMAIL; $postInfo['user_image'] = USERIMAGE; - $postInfo['user_signature'] = USERSIG; + $postInfo['user_signature'] = USERSIGNATURE; if($_POST['insert'] == 1) { diff --git a/e107_plugins/forum/forum_post.php b/e107_plugins/forum/forum_post.php index e1686874f..9f8f3c35b 100644 --- a/e107_plugins/forum/forum_post.php +++ b/e107_plugins/forum/forum_post.php @@ -352,6 +352,9 @@ if (isset($_POST['newthread']) || isset($_POST['reply'])) require_once(e_PLUGIN."forum/templates/forum_posted_template.php"); } } + + + echo (isset($_POST['newthread']) ? $FORUMTHREADPOSTED : $FORUMREPLYPOSTED); require_once(FOOTERF); @@ -503,6 +506,11 @@ if (!vartrue($FORUMPOST)) } } +if(isset($FORUMPOST_TEMPLATE) && (e_BOOTSTRAP === true)) +{ + $FORUMPOST = $FORUMPOST_TEMPLATE['form']; + $FORUMPOST_REPLY = $FORUMPOST_TEMPLATE['form']; +} if($action == 'rp') { diff --git a/e107_plugins/forum/forum_viewforum.php b/e107_plugins/forum/forum_viewforum.php index 4b3bf960a..ca2133ea7 100644 --- a/e107_plugins/forum/forum_viewforum.php +++ b/e107_plugins/forum/forum_viewforum.php @@ -86,21 +86,21 @@ if (!vartrue($FORUM_VIEW_START)) } -if(is_array($FORUM_VIEWFORUM_TEMPLATE)) // New Template. +if(is_array($FORUM_VIEWFORUM_TEMPLATE) && (e_BOOTSTRAP === true)) // New v2.x bootstrap Template. { -$FORUM_VIEW_START_CONTAINER = $FORUM_VIEWFORUM_TEMPLATE['start']; -$FORUM_VIEW_START = $FORUM_VIEWFORUM_TEMPLATE['header']; -$FORUM_VIEW_FORUM = $FORUM_VIEWFORUM_TEMPLATE['item']; -$FORUM_VIEW_FORUM_STICKY = $FORUM_VIEWFORUM_TEMPLATE['item-sticky']; -$FORUM_VIEW_FORUM_ANNOUNCE = $FORUM_VIEWFORUM_TEMPLATE['item-announce']; -$FORUM_VIEW_END = $FORUM_VIEWFORUM_TEMPLATE['footer']; -$FORUM_VIEW_END_CONTAINER = $FORUM_VIEWFORUM_TEMPLATE['end']; -$FORUM_VIEW_SUB_START = $FORUM_VIEWFORUM_TEMPLATE['sub-header']; -$FORUM_VIEW_SUB = $FORUM_VIEWFORUM_TEMPLATE['sub-item']; -$FORUM_VIEW_SUB_END = $FORUM_VIEWFORUM_TEMPLATE['sub-footer']; -$FORUM_IMPORTANT_ROW = $FORUM_VIEWFORUM_TEMPLATE['divider-important']; -$FORUM_NORMAL_ROW = $FORUM_VIEWFORUM_TEMPLATE['divider-normal']; + $FORUM_VIEW_START_CONTAINER = $FORUM_VIEWFORUM_TEMPLATE['start']; + $FORUM_VIEW_START = $FORUM_VIEWFORUM_TEMPLATE['header']; + $FORUM_VIEW_FORUM = $FORUM_VIEWFORUM_TEMPLATE['item']; + $FORUM_VIEW_FORUM_STICKY = $FORUM_VIEWFORUM_TEMPLATE['item-sticky']; + $FORUM_VIEW_FORUM_ANNOUNCE = $FORUM_VIEWFORUM_TEMPLATE['item-announce']; + $FORUM_VIEW_END = $FORUM_VIEWFORUM_TEMPLATE['footer']; + $FORUM_VIEW_END_CONTAINER = $FORUM_VIEWFORUM_TEMPLATE['end']; + $FORUM_VIEW_SUB_START = $FORUM_VIEWFORUM_TEMPLATE['sub-header']; + $FORUM_VIEW_SUB = $FORUM_VIEWFORUM_TEMPLATE['sub-item']; + $FORUM_VIEW_SUB_END = $FORUM_VIEWFORUM_TEMPLATE['sub-footer']; + $FORUM_IMPORTANT_ROW = $FORUM_VIEWFORUM_TEMPLATE['divider-important']; + $FORUM_NORMAL_ROW = $FORUM_VIEWFORUM_TEMPLATE['divider-normal']; } @@ -185,6 +185,12 @@ if($forum->checkPerm($forumId, 'post')) $fVars->NEWTHREADBUTTONX = newthreadjump($e107->url->create('forum/thread/new', array('id' => $forumId))); // "New Thread"; } +if(e_BOOTSTRAP !== true) +{ + $fVars->NEWTHREADBUTTONX = $fVars->NEWTHREADBUTTON; +} + + if(substr($forumInfo['forum_name'], 0, 1) == '*') { $forum_info['forum_name'] = substr($forum_info['forum_name'], 1); @@ -570,6 +576,14 @@ function parse_thread($thread_info) $_TEMPLATE = "".substr($_TEMPLATE,4); } + if(e_BOOTSTRAP !== true) + { + $tVars->REPLIESX = $tVars->REPLIES; + $tVars->VIEWSX = $tVars->VIEWS; + $tVars->ADMINOPTIONS = $tVars->ADMIN_ICONS; + } + + return $tp->simpleParse($_TEMPLATE, $tVars); } diff --git a/e107_plugins/forum/forum_viewtopic.php b/e107_plugins/forum/forum_viewtopic.php index 5d00e1318..d2f46c149 100644 --- a/e107_plugins/forum/forum_viewtopic.php +++ b/e107_plugins/forum/forum_viewtopic.php @@ -168,7 +168,7 @@ if (!vartrue($FORUMSTART)) // New in v2.x -if(is_array($FORUM_VIEWTOPIC_TEMPLATE)) +if(is_array($FORUM_VIEWTOPIC_TEMPLATE) && (e_BOOTSTRAP === true)) { $FORUMSTART = $FORUM_VIEWTOPIC_TEMPLATE['start']; $FORUMTHREADSTYLE = $FORUM_VIEWTOPIC_TEMPLATE['thread']; diff --git a/e107_plugins/forum/templates/forum_post_template.php b/e107_plugins/forum/templates/forum_post_template.php index 7eb7ef423..6e57c1438 100644 --- a/e107_plugins/forum/templates/forum_post_template.php +++ b/e107_plugins/forum/templates/forum_post_template.php @@ -225,21 +225,22 @@ $THREADTOPIC_REPLY = " } +// New in v2.x - requires a bootstrap theme be loaded. -$FORUMPOST_TEMPLATE['form'] = " +$FORUMPOST_TEMPLATE['form'] = "
{FORMSTART} - +
- {USERBOX} {SUBJECTBOX} - - + {POLL} - {FILEATTACH} + {FILEATTACH} - @@ -262,9 +263,6 @@ $FORUMPOST_TEMPLATE['form'] = " $FORUMPOST_TEMPLATE['reply'] = ""; -$FORUMPOST = $FORUMPOST_TEMPLATE['form']; - - $FORUM_CRUMB['sitename']['value'] = "{SITENAME}"; $FORUM_CRUMB['sitename']['sep'] = " :: "; diff --git a/e107_plugins/forum/templates/forum_template.php b/e107_plugins/forum/templates/forum_template.php index f570e0439..c5c54634b 100644 --- a/e107_plugins/forum/templates/forum_template.php +++ b/e107_plugins/forum/templates/forum_template.php @@ -79,12 +79,16 @@ $FORUM_TRACK_MAIN = "
TRACK-MAIN"; $FORUM_TRACK_END = "
TRACK-END"; */ +// New in v2.x - requires a bootstrap theme be loaded. + + $FORUM_TEMPLATE['main-start'] = "
-
- {SEARCH} -
- -
{BACKLINK} + {BACKLINK}
{POSTTYPE} + {POSTTYPE} {POSTBOX}
{EMAILNOTIFY}
{NOEMOTES}
@@ -247,10 +248,10 @@ $FORUMPOST_TEMPLATE['form'] = "
+ {BUTTONS}
+
+ {SEARCH} +
+ + +
diff --git a/e107_plugins/forum/templates/forum_viewforum_template.php b/e107_plugins/forum/templates/forum_viewforum_template.php index db15a2366..c99ae7025 100644 --- a/e107_plugins/forum/templates/forum_viewforum_template.php +++ b/e107_plugins/forum/templates/forum_viewforum_template.php @@ -15,7 +15,7 @@ if (!defined('e107_INIT')) { exit; } if(!defined("USER_WIDTH")){ define("USER_WIDTH","width:95%"); } -/* + if (!$FORUM_VIEW_START) { $FORUM_VIEW_START = " @@ -257,7 +257,7 @@ if (!$FORUM_NORMAL_ROW) { } -*/ + @@ -278,7 +278,7 @@ $FORUM_CRUMB['forum']['value'] = "{FORUM_TITLE}"; -// New in v2.x - replaces all of the above $FORUM_VIEW_xxxx etc. +// New in v2.x - requires a bootstrap theme be loaded. // {BREADCRUMB} //FIXME Breadcrumb looks crummy diff --git a/e107_plugins/forum/templates/forum_viewtopic_template.php b/e107_plugins/forum/templates/forum_viewtopic_template.php index 35a43105b..2c9821dd8 100644 --- a/e107_plugins/forum/templates/forum_viewtopic_template.php +++ b/e107_plugins/forum/templates/forum_viewtopic_template.php @@ -33,7 +33,7 @@ $sc_style['USER_EXTENDED']['location.text_value']['post'] = "
"; -/* + $FORUMSTART = "
@@ -287,7 +287,7 @@ $FORUMDELETEDSTYLE = ""; -*/ + $FORUM_CRUMB['sitename']['value'] = "{SITENAME}"; $FORUM_CRUMB['sitename']['sep'] = " :: "; @@ -305,92 +305,8 @@ $FORUM_CRUMB['forum']['value'] = "{FORU // {MODERATORS} {THREADSTATUS} -/* -$FORUM_VIEWTOPIC_TEMPLATE['start'] = " - -
-
{BACKLINK}
-
- -
-

{THREADNAME}

{BUTTONSX}
-
- - {MESSAGE} - -
- - - - - - - - - - "; - - - -$FORUM_VIEWTOPIC_TEMPLATE['end'] = "
".LAN_402."".LAN_403."
- - -
-
{GOTOPAGES}
-
{QUICKREPLY}
-
{BUTTONSX}
-
- -
- "; - - -$FORUM_VIEWTOPIC_TEMPLATE['thread'] =" - - {NEWFLAG} {USERCOMBO}{ANON_IP} - {THREADDATESTAMP=relative} - {POSTOPTIONS} - - - - - {CUSTOMTITLE} - {AVATAR} -
- - {LEVEL=badge} {LEVEL=pic} - -
- - - - {POLL} - {POST} - - - - - - -   - - - {ATTACHMENTS} - {LASTEDIT}{LASTEDITBY=link} - {SIGNATURE} - - - - - - - - - - - "; -*/ +// New in v2.x - requires a bootstrap theme be loaded. $FORUM_VIEWTOPIC_TEMPLATE['start'] = "