Best of joomla gives you news, joomla templates, tutorials and websites about Joomla , FireBoard and FireMessage official page.
| No account yet?   |
The FireBoard forum component development is still going on. In order to get better, FireBoard will be moved from the Best of Joomla website.
During this transition period, the forum in Best of Joomla will be closed to new posts.
Welcome, Guest
Please Login or Register.    Lost Password?
FireBoard Manual Latest release discussions Download FireBoard
Re:Loads forum page then reloads once again? (1 viewing) (1) Guest
TOPIC: Re:Loads forum page then reloads once again?
#10956
Re:Loads forum page then reloads once again? 1 Year, 7 Months ago  
Prutkar wrote:
[quote]
FireBoard guys should definitely get a rid of their own session table and use Joomla session table to identify visitor. Or do dual system, in case of joomla installation use joomla sessions, in case of stand alone installation use fireboard sessions.

I replaced mentioned code with quick and dirty fix (may be not too dirty). Code odes exactly same but "reload" is happening "on background":
[code:1]global $mosConfig_live_site;
$database->setQuery("UPDATE #__fb_sessions SET lasttime=$systime where userid=$my->id"«»);
$database->query();
mosRedirect($mosConfig_live_site.$_ENV["REQUEST_URI"]);[/code:1]Works very nice.[/quote]

Maybe this should be added in the next FB release?
jiakomo (User)
Junior Boarder
Posts: 25
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
Last Edit: 2007/06/09 11:39 By jiakomo.
 
 
#10961
Re:Loads forum page then reloads once again? 1 Year, 7 Months ago  
Prutkar wrote:
[quote]FB 1.0 has same line of code in fireboard.php file
[code:1]echo 'setTimeout("window.location.reload( true )",100);';[/code:1]I bet you find this in Simpleboard as well as in Joomlaboard.[/quote]

I ve found this line :

[code:1]echo 'setTimeout("window.location.reload( true )",100);';[/code:1]

I changed that whole line to :

[code:1]

global $mosConfig_live_site;

$database->setQuery("UPDATE #__fb_sessions SET lasttime=$systime where userid=$my->id"«»);

$database->query();

mosRedirect($mosConfig_live_site.$_ENV["REQUEST_URI"]);[/code:1]

when I went to "save" i ve got this msg

[quote]Not Acceptable
An appropriate representation of the requested resource /joomla//administrator/index2.php could not be found on this server.[/quote]

I am attaching my fireboard.php(remove ".jpg") ... Maybe you could explain it little better or just simply change this fireboard.php so everyone can just DL it and replace the original

tnx [img]http://www.bestofjoomla.com/components/com_fireboard/uploaded/images/fireboard-05b326687bbf56530c095de6910b21c5.jpg[/img]
Bojan1983 (User)
Fresh Boarder
Posts: 13
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
Last Edit: 2007/06/09 12:16 By Bojan1983.
 
 
#10976
Re:Loads forum page then reloads once again? 1 Year, 7 Months ago  
This message has nothing to do with changing some code in fireboard.php file under joomla_root//components/com_fireboard [code:1]Not Acceptable
An appropriate representation of the requested resource /joomla//administrator/index2.php could not be found on this server.[/code:1]Editing and then Saving file in any editor should not give you this error...it is unrelated message to proposed solution of replacing small piece of code.
Prutkar (User)
Fresh Boarder
Posts: 17
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
 
 
#11011
Re:Loads forum page then reloads once again? 1 Year, 7 Months ago  
I have try it and this works good
jack_34 (User)
Fresh Boarder
Posts: 11
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
 
#11078
Re:Loads forum page then reloads once again? 1 Year, 7 Months ago  
I have tried to change it with joomlaXplorer, but later I DLed file, and changed it with notepad without problem... Even now, when i uploded it again, when i try to edit and save it with joomlaXplorer i get same msg...

But now, what happen is following.

If you click on some link in "latest post" module, page reloads, but not the forum... Then if you click one more time everything looks ok. Also not good, but much better then before...

btw, just to be sure, can someone plz upload modified fireboard.php?
Bojan1983 (User)
Fresh Boarder
Posts: 13
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
Last Edit: 2007/06/12 12:48 By Bojan1983.
 
 
#11082
Re:Loads forum page then reloads once again? 1 Year, 7 Months ago  
[code:1]getCfg("absolute_path"«») .'/administrator/components/com_fireboard/fireboard_config.php');

// Class structure should be used after this and all the common task should be moved to this class
require_once ($mainframe->getCfg("absolute_path"«») . "/components/com_fireboard/class.fireboard.php"«»);

// get right Language file
if (file_exists(JB_ABSADMPATH . '/language/' . JB_LANG . '.php'))
{
include_once (JB_ABSADMPATH . '/language/' . JB_LANG . '.php');
}
else
{
include_once (JB_ABSADMPATH . '/language/english.php');
}

// Include Clexus PM class file
if ($fbConfig['pm_component'] == "clexuspm"«»)
{
require_once ($mosConfig_absolute_path . '/components/com_mypms/class.mypms.php');
$ClexusPMconfig = new ClexusPMConfig();
}

//time format
include_once (JB_ABSSOURCESPATH . 'fb_timeformat.class.php');

$systime = time() + ($mainframe->getCfg('offset_user') * 3600);
$settings = $_COOKIE['fboard_settings'];

// set configuration dependent params
$str_FB_templ_path = JB_ABSPATH . '/template/' . $fbConfig['template'];
$board_title = $fbConfig['board_title'];
$fromBot = 0;
$prefview = $fbConfig['default_view'];

// JOOMLA STYLE CHECK
if ($fbConfig['joomlaStyle'] addCustomHeadTag('');
$mainframe->addCustomHeadTag('
//1: show, 0 : hide
jr_expandImg_url = "' . JB_URLIMAGESPATH . '";');
$mainframe->addCustomHeadTag('');
if ($fbConfig['joomlaStyle'] addCustomHeadTag('');
} else {
$mainframe->addCustomHeadTag('');
}

// WHOIS ONLINE IN FORUM
if (file_exists(JB_ABSTMPLTPATH . '/plugin/who/who.class.php'))
{
include (JB_ABSTMPLTPATH . '/plugin/who/who.class.php');
}
else
{
include (JB_ABSPATH . '/template/default/plugin/who/who.class.php');
}

// include required libraries
if (file_exists(JB_ABSTMPLTPATH . '/fb_layout.php'))
{
require_once (JB_ABSTMPLTPATH . '/fb_layout.php');
}
else
{
require_once (JB_ABSPATH . '/template/default/fb_layout.php');
}

require_once (JB_ABSSOURCESPATH . 'fb_permissions.php');
require_once (JB_ABSSOURCESPATH . 'fb_category.class.php');

if ($catid != '')
{
$thisCat = new jbCategory($database, $catid);
}

if (defined('JPATH_BASE'))
{
jimport ('pattemplate.patTemplate');
}
else
{
require_once (JB_JABSPATH . '/includes/patTemplate/patTemplate.php');
}

$obj_FB_tmpl = new patTemplate();
$obj_FB_tmpl->setBasedir($str_FB_templ_path);

// Permissions: Check for administrators and moderators
if ($my->id != 0)
{
$aro_group = $acl->getAroGroup($my->id);
$is_admin = (strtolower($aro_group->name) == 'super administrator' || strtolower($aro_group->name) == 'administrator');
}
else
{
$aro_group = 0;
$is_admin = 0;
}

$is_moderator = fb_has_moderator_permission($database, $thisCat, $my->id, $is_admin);

// TODO: both rss and pdf are totally broken atm, need to fix!
//intercept the RSS request; we should stop afterwards
if ($func == 'fb_rss')
{
include (JB_ABSSOURCESPATH . 'fb_rss.php');
die();
}

if ($func == 'fb_pdf')
{
include (JB_ABSSOURCESPATH . 'fb_pdf.php');
die();
}


// Include the Community Builder language file if necessary and set CB itemid value
$cbitemid = 0;

if ($fbConfig['cb_profile'])
{
// $cbitemid = JBgetCBprofileItemid();
// Include CB language files
$UElanguagePath = $mainframe->getCfg('absolute_path') . '/components/com_comprofiler/plugin/language';
$UElanguage = $mainframe->getCfg('lang');

if (!file_exists($UElanguagePath . '/' . $mosConfig_lang . '/' . $mosConfig_lang . '.php'))
{
$UElanguage = 'default_language';
}

include_once ($UElanguagePath . '/' . $UElanguage . '/' . $UElanguage . '.php');
}

// fireboard Current Template Icons Pack
// See if there's an icon pack installed
$useIcons = 0; //init
$fbIcons = 0;

if (file_exists(JB_ABSTMPLTPATH . '/icons.php'))
{
include_once (JB_ABSTMPLTPATH . '/icons.php');
$useIcons = 1;
}
else
{
include_once (JB_ABSPATH . '/template/default/icons.php');
}

//Get the userid; sometimes the new var works whilst $my->id doesn't..?!?
$my_id = $my->id;

if ($fbConfig['regonly'] && !$my->id)
{
echo _FORUM_UNAUTHORIZIED . "";
echo _FORUM_UNAUTHORIZIED2;
}
else if ($fbConfig['board_offline'] && !$is_admin)
{
echo $fbConfig['offline_message'];
}
else
{
//Initial settings; lots of cookie baking things and session tracking...
//Note: extremely ugly code here!
// ob_start();
$new_fb_user = 0;
$previousVisit = 0;
/* Session administration. For security reasons, we will want to initialize it with every
* Access to fireboard. If we'd pass it with posts or pass it through cookies, we would
* introduce the risk that someone starts 'leeching' on other sessions... we do not want that.
* After a perion of 30 minutes if inactivity, the priviliges are reset.
*/
//try to get an existing sessions to recycle - if n/a this is a new user
$database->setQuery("SELECT * from #__fb_sessions where userid=" . $my->id);
$fbSessionArray = $database->loadObjectList();
$fbSession = $fbSessionArray[0];

if ($fbSession->userid == ""«»)
{
//new session, first access
$previousVisit = time() - 1314000; //minus 1 year; you gotta draw the line somewhere...
$new_fb_user = 1;
}
else
{
$previousVisit = $fbSession->lasttime;
} //user has been here before; this was the last time

if ($new_fb_user != 1)
{ //get session information, update last time timestamp.
$inactivePeriod = ($fbSession->lasttime)+1800;

if ($inactivePeriod setQuery("UPDATE #__fb_sessions SET allowed='na', readtopics='' where userid=$my->id"«»);
$database->query();
setcookie("fboard_settings[prevvisit]", $fbSession->lasttime, time() + 31536000, '/');

// do not reload the page if user is posting
if ($func != "post"«»)
{
global $mosConfig_live_site;
$database->setQuery("UPDATE #__fb_sessions SET lasttime=$systime where userid=$my->id"«»);
$database->query();
mosRedirect($mosConfig_live_site.$_ENV["REQUEST_URI"]);
}
}

$database->setQuery("UPDATE #__fb_sessions SET lasttime=$systime where userid=$my->id"«»);
$database->query();
}

//Some things should only occur once so first check if we got a new user
//(user switched to another userid) or a totally new user who just logged on
//(in both cases the member_id cookie doesn't match the actual user... check..
//pseudo: if (empty cookie or cookie_id isn't userid) then new user
if ($settings[member_id] == "" || $settings[member_id] != $my->id)
{
//other or new user
$new_fb_user = 1;
$allowed_forums = "";
}

//New User: Set who this is in a session cookie:
//pseudo: if (empty_cookie or new user) then set cookie
if ($settings[member_id] == "" || $new_fb_user == 1 || $markaction == "allread"«»)
{
setcookie("fboard_settings[member_id]", $my->id, time() + 31536000, '/');
//$previousVisit=$previousVisit+($fbConfig['board_ofset']*3600);
setcookie("fboard_settings[prevvisit]", $previousVisit, time() + 31536000, '/');

// BEGIN: MARK ALL READ FIX

// get all already read topics
$database->setQuery("SELECT readtopics FROM #__fb_sessions WHERE userid=$my->id"«»);

$allreadyReadx = $database->loadResult();
/* Mark all these topics read */
$database->setQuery("SELECT thread FROM #__fb_messages WHERE thread not in ('$allreadyReadx') GROUP BY THREAD"«»);
$readForumx = $database->loadObjectList();
$readTopicsx = '--';

foreach ($readForumx as $rfx)
{
$readTopicsx = $readTopicsx . ',' . $rfx->thread;
}

$readTopicsx = str_replace('--,', '', $readTopicsx);

if ($allreadyReadx != ""«»)
{
$readTopicsx = $readTopicsx . ',' . $allreadyReadx;
}

$database->setQuery("UPDATE #__fb_sessions set readtopics='$readTopicsx' WHERE userid=$my->id"«»);
$database->query();

// FINISH: MARK ALL READ FIX

if ($markaction == "allread"«»)
{
echo " alert('" . _GEN_ALL_MARKED . "'); window.location='" . sefRelToAbs(JB_LIVEURLREL) . "';n";
}
}

//Initial:: get the user's profile if (s)he's registered. If there's no profile
//for a registered user, we assume (s)he's here for the first time, so we
//create one. This should only occur once every session!
//pseudo: if (new user and ( userid isn't empty or userid isn't zero)
if ($new_fb_user == 1 && ("" != $my->id || 0 != $my->id))
{
$prefview = ""; //reset value
$database->setQuery("select view from #__fb_users where userid=$my->id"«»);
$prefview = $database->loadResult();

if ($prefview == ""«»)
{
//assume there's no profile; set userid and the default view type as prefered view type.
if ($fbConfig['default_view'] == "threaded"«»)
{
if ($fbConfig['cb_profile'])
{
$database->setQuery("update #__comprofiler set fbviewtype='_UE_FB_VIEWTYPE_THREADED' where user_id=$my->id"«»);
}

$database->setQuery("insert into #__fb_users (userid,view) values ('$my->id','threaded')"«»);

if (!$database->query())
{
echo _PROBLEM_CREATING_PROFILE;
}
}
else
{
if ($fbConfig['cb_profile'])
{
$database->setQuery("update #__comprofiler set fbviewtype='_UE_FB_VIEWTYPE_FLAT' where user_id=$my->id"«»);
}

$database->setQuery("insert into #__fb_users (userid,view) values ('$my->id','flat')"«»);

if (!$database->query())
{
echo _PROBLEM_CREATING_PROFILE;
}
}

$prefview = $fbConfig['default_view'];

if ($is_admin)
{ //admin is always a moderator on fireboard
$database->setQuery("UPDATE #__fb_users SET moderator='1' WHERE userid='$my->id'"«»);
$database->query();
}

setcookie("fboard_settings[current_view]", $prefview, time() + 31536000, '/');
}

//initialize the user session tracking
if ($fbSession->userid == ""«»)
{
$database->setQuery("INSERT INTO #__fb_sessions (userid,allowed,lasttime,readtopics) values ($my->id, 'na', $systime,'')"«»);

if (!$database->query())
{
die ("Serious db problem:" . $database->getErrorMsg());
}
}
else
{
$database->setQuery("UPDATE #__fb_sessions SET allowed='na', lasttime=$systime, readtopics='' where userid=$my->id"«»);

if (!$database->query())
{
die ("Serious db problem:" . $database->getErrorMsg());
}
}
}

if ($fbConfig['cb_profile'] && ("" != $my->id || 0 != $my->id))
{
$database->setQuery("select fbviewtype from #__comprofiler where user_id=$my->id"«»);
$fbviewtype = $database->loadResult();

if ($fbviewtype == "_UE_FB_VIEWTYPE_THREADED"«»)
{
$prefview = "threaded";
}
else
{
$prefview = "flat";
}

setcookie("fboard_settings[current_view]", $prefview, time() + 31536000, '/');
}

//Initial:: determining what kind of view to use... from profile, cookie or default settings.
//pseudo: if (no view is set and the cookie_view is not set)
if ($view == "" && $settings[current_view] == ""«»)
{
//pseudo: if there's no prefered type, use FB's default view otherwise use prefered view from profile
//and then set the cookie right
$view = $prefview == "" ? $default_view : $prefview;
setcookie("fboard_settings[current_view]", $view, time() + 31536000, '/');
}
//pseudo: otherwise if (no view set but cookie isn't empty use view as set in cookie
else if ($view == "" && $settings[current_view] != ""«»)
{
$view = $settings[current_view];
}

//get previous visit time from cookie; if there's no cookie yet, use database stored value
if ($settings[prevvisit] == 0 && $previousVisit != 0)
{
$prevCheck = $previousVisit;
}
else
{
$prevCheck = $settings[prevvisit];
}

//Get the max# of posts for any one user
$database->setQuery("SELECT max(posts) from #__fb_users"«»);
$maxPosts = $database->loadResult();

/* _|/_
(o o)
+----oOO-{_}-OOo--------------------------------+
| Until this section we have included the |
| necessary files and gathered the required |
| variables. Now let's start processing |
| them |
+----------------------------------------------*/



//Check if the catid requested is a parent category, because if it is
//the only thing we can do with it is 'listcat' and nothing else
if ($func == "showcat" || $func == "view" || $func == "post"«»)
{
$database->setQuery("SELECT parent FROM #__fb_categories WHERE id=$catid"«»);
$strCatParent = $database->loadResult();

if ($catid == '' || $strCatParent == 0)
{
$func = 'listcat';
}
}

switch ($func)
{
case 'view':
$fbMenu = jb_get_menu(FB_CB_ITEMID, $fbConfig, $fbIcons, $my->id, 3, $view, $catid, $id, $thread);

break;

case 'showcat':
//get number of pending messages
$database->setQuery("SELECT count(*) FROM #__fb_messages WHERE catid=$catid and hold=1"«»);
$numPending = $database->loadResult();

$fbMenu = jb_get_menu(FB_CB_ITEMID, $fbConfig, $fbIcons, $my->id, 2, $view, $catid, $id, $thread, $is_moderator, $numPending);
break;

default:
$fbMenu = jb_get_menu(FB_CB_ITEMID, $fbConfig, $fbIcons, $my->id, 1);
break;
}

// display header
$obj_FB_tmpl->readTemplatesFromFile("header.html"«»);
$obj_FB_tmpl->addVar('jb-header', 'menu', $fbMenu);
$obj_FB_tmpl->addVar('jb-header', 'board_title', $board_title);
$obj_FB_tmpl->addVar('jb-header', 'css_path', JB_DIRECTURL . '/template/' . $fbConfig['template'] . '/forum.css');
$obj_FB_tmpl->addVar('jb-header', 'offline_message', $fbConfig['board_offline'] ? '' . _FORUM_IS_OFFLINE . '' : '');
$obj_FB_tmpl->addVar('jb-header', 'searchbox', getSearchBox());
$obj_FB_tmpl->addVar('jb-header', 'pb_imgswitchurl', JB_URLIMAGESPATH . "shrink.gif"«»);
$obj_FB_tmpl->displayParsedTemplate('jb-header');

//BEGIN: PROFILEBOX
if (file_exists(JB_ABSTMPLTPATH . '/plugin/profilebox/profilebox.php'))
{
include (JB_ABSTMPLTPATH . '/plugin/profilebox/profilebox.php');
}
else
{
include (JB_ABSPATH . '/template/default/plugin/profilebox/profilebox.php');
}
//FINISH: PROFILEBOX

switch ( strtolower($func) )
{
case 'who':
if (file_exists(JB_ABSTMPLTPATH . '/plugin/who/who.php'))
{
include (JB_ABSTMPLTPATH . '/plugin/who/who.php');
}
else
{
include (JB_ABSPATH . '/template/default/plugin/who/who.php');
}

break;

#########################################################################################
case 'announcement':
if (file_exists(JB_ABSTMPLTPATH . '/plugin/announcement/announcement.php'))
{
include (JB_ABSTMPLTPATH . '/plugin/announcement/announcement.php');
}
else
{
include (JB_ABSPATH . '/template/default/plugin/announcement/announcement.php');
}

break;

#########################################################################################
case 'stats':
if (file_exists(JB_ABSTMPLTPATH . '/plugin/stats/stats.class.php'))
{
include (JB_ABSTMPLTPATH . '/plugin/stats/stats.class.php');
}
else
{
include (JB_ABSPATH . '/template/default/plugin/stats/stats.class.php');
}

if (file_exists(JB_ABSTMPLTPATH . '/plugin/stats/stats.php'))
{
include (JB_ABSTMPLTPATH . '/plugin/stats/stats.php');
}
else
{
include (JB_ABSPATH . '/template/default/plugin/stats/stats.php');
}

break;

#########################################################################################
case 'fbprofile':
if (file_exists(JB_ABSTMPLTPATH . '/plugin/fbprofile/fbprofile.php'))
{
include (JB_ABSTMPLTPATH . '/plugin/fbprofile/fbprofile.php');
}
else
{
include (JB_ABSPATH . '/template/default/plugin/fbprofile/fbprofile.php');
}

break;

#########################################################################################
case 'userlist':
if (file_exists(JB_ABSTMPLTPATH . '/plugin/userlist/userlist.php'))
{
include (JB_ABSTMPLTPATH . '/plugin/userlist/userlist.php');
}
else
{
include (JB_ABSPATH . '/template/default/plugin/userlist/userlist.php');
}

break;

#########################################################################################
case 'post':
if (file_exists(JB_ABSTMPLTPATH . '/smile.class.php'))
{
include (JB_ABSTMPLTPATH . '/smile.class.php');
}
else
{
include (JB_ABSPATH . '/template/default/smile.class.php');
}

if (file_exists(JB_ABSTMPLTPATH . '/post.php'))
{
include (JB_ABSTMPLTPATH . '/post.php');
}
else
{
include (JB_ABSPATH . '/template/default/post.php');
}

break;

#########################################################################################
case 'view':
if (file_exists(JB_ABSTMPLTPATH . '/smile.class.php'))
{
include (JB_ABSTMPLTPATH . '/smile.class.php');
}
else
{
include (JB_ABSPATH . '/template/default/smile.class.php');
}

if (file_exists(JB_ABSTMPLTPATH . '/view.php'))
{
include (JB_ABSTMPLTPATH . '/view.php');
}
else
{
include (JB_ABSPATH . '/template/default/view.php');
}

break;

#########################################################################################
case 'faq':
if (file_exists(JB_ABSTMPLTPATH . '/faq.php'))
{
include (JB_ABSTMPLTPATH . '/faq.php');
}
else
{
include (JB_ABSPATH . '/template/default/faq.php');
}

break;

#########################################################################################
case 'showcat':
if (file_exists(JB_ABSTMPLTPATH . '/smile.class.php'))
{
include (JB_ABSTMPLTPATH . '/smile.class.php');
}
else
{
include (JB_ABSPATH . '/template/default/smile.class.php');
}

if (file_exists(JB_ABSTMPLTPATH . '/showcat.php'))
{
include (JB_ABSTMPLTPATH . '/showcat.php');
}
else
{
include (JB_ABSPATH . '/template/default/showcat.php');
}

break;

#########################################################################################
case 'listcat':
if (file_exists(JB_ABSTMPLTPATH . '/listcat.php'))
{
include (JB_ABSTMPLTPATH . '/listcat.php');
}
else
{
include (JB_ABSPATH . '/template/default/listcat.php');
}

break;

#########################################################################################
case 'review':
if (file_exists(JB_ABSTMPLTPATH . '/smile.class.php'))
{
include (JB_ABSTMPLTPATH . '/smile.class.php');
}
else
{
include (JB_ABSPATH . '/template/default/smile.class.php');
}

if (file_exists(JB_ABSTMPLTPATH . '/moderate_messages.php'))
{
include (JB_ABSTMPLTPATH . '/moderate_messages.php');
}
else
{
include (JB_ABSPATH . '/template/default/moderate_messages.php');
}

break;

#########################################################################################
case 'rules':
include (JB_ABSSOURCESPATH . 'fb_rules.php');

break;

#########################################################################################

// TODO: Will be delete
case 'userprofile':
if (file_exists(JB_ABSTMPLTPATH . '/smile.class.php'))
{
include (JB_ABSTMPLTPATH . '/smile.class.php');
}
else
{
include (JB_ABSPATH . '/template/default/smile.class.php');
}

if (file_exists(JB_ABSTMPLTPATH . '/plugin/myprofile/myprofile.php'))
{
include (JB_ABSTMPLTPATH . '/plugin/myprofile/myprofile.php');
}
else
{
include (JB_ABSPATH . '/template/default/plugin/myprofile/myprofile.php');
}
break;

#########################################################################################
case 'myprofile':
if (file_exists(JB_ABSTMPLTPATH . '/smile.class.php'))
{
include (JB_ABSTMPLTPATH . '/smile.class.php');
}
else
{
include (JB_ABSPATH . '/template/default/smile.class.php');
}

if (file_exists(JB_ABSTMPLTPATH . '/plugin/myprofile/myprofile.php'))
{
include (JB_ABSTMPLTPATH . '/plugin/myprofile/myprofile.php');
}
else
{
include (JB_ABSPATH . '/template/default/plugin/myprofile/myprofile.php');
}
break;


#########################################################################################
case 'uploadavatar':
if (file_exists(JB_ABSTMPLTPATH . '/plugin/myprofile/myprofile_avatar_upload.php'))
{
include (JB_ABSTMPLTPATH . '/plugin/myprofile/myprofile_avatar_upload.php');
}
else
{
include (JB_ABSPATH . '/template/default/plugin/myprofile/myprofile_avatar_upload.php');
}

break;

#########################################################################################
case 'latest':
if (file_exists(JB_ABSTMPLTPATH . '/latestx.php'))
{
include (JB_ABSTMPLTPATH . '/latestx.php');
}
else
{
include (JB_ABSPATH . '/template/default/latestx.php');
}

break;

#########################################################################################
case 'search':
require_once (JB_ABSSOURCESPATH . 'fb_search.class.php');

$searchword = mosGetParam($_REQUEST, 'searchword', '');

$obj_FB_search = &new jbSearch($database, $searchword, $my->id, $limitstart, $fbConfig['messages_per_page_search']);
$obj_FB_search->show();
break;

//needs work ... still in progress
case 'advsearch':
if (file_exists(JB_ABSTMPLTPATH . '/plugin/advancedsearch/advsearch.php'))
{
include (JB_ABSTMPLTPATH . '/plugin/advancedsearch/advsearch.php');
}
else
{
include (JB_ABSPATH . '/template/default/plugin/advancedsearch/advsearch.php');
}

break;

case 'advsearchresult':
if (file_exists(JB_ABSTMPLTPATH . '/plugin/advancedsearch/advsearchresult.php'))
{
include (JB_ABSTMPLTPATH . '/plugin/advancedsearch/advsearchresult.php');
}
else
{
include (JB_ABSPATH . '/template/default/plugin/advancedsearch/advsearchresult.php');
}

break;

#########################################################################################
case 'markthisread':
// get all already read topics
$database->setQuery("SELECT readtopics FROM #__fb_sessions WHERE userid=$my->id"«»);

$allreadyRead = $database->loadResult();
/* Mark all these topics read */
$database->setQuery("SELECT thread FROM #__fb_messages WHERE catid=$catid and thread not in ('$allreadyRead') GROUP BY THREAD"«»);
$readForum = $database->loadObjectList();
$readTopics = '--';

foreach ($readForum as $rf)
{
$readTopics = $readTopics . ',' . $rf->thread;
}

$readTopics = str_replace('--,', '', $readTopics);

if ($allreadyRead != ""«»)
{
$readTopics = $readTopics . ',' . $allreadyRead;
}

$database->setQuery("UPDATE #__fb_sessions set readtopics='$readTopics' WHERE userid=$my->id"«»);
$database->query();
echo " alert('" . _GEN_FORUM_MARKED . "'); window.history.go(-1); n";
break;

#########################################################################################
case 'karma':
include (JB_ABSSOURCESPATH . 'fb_karma.php');

break;

######################

/* template chooser */
case "templatechooser":
$fb_user_template = strval(mosGetParam($_COOKIE, 'fb_user_template', ''));

$fb_user_img_template = strval(mosGetParam($_REQUEST, 'fb_user_img_template', $fb_user_img_template));
$fb_change_template = strval(mosGetParam($_REQUEST, 'fb_change_template', $fb_user_template));
$fb_change_img_template = strval(mosGetParam($_REQUEST, 'fb_change_img_template', $fb_user_img_template));

if ($fb_change_template)
{
// clean template name
$fb_change_template = preg_replace('#W#', '', $fb_change_template);

if (strlen($fb_change_template) >= 40)
{
$fb_change_template = substr($fb_change_template, 0, 39);
}

// check that template exists in case it was deleted
if (file_exists($mosConfig_absolute_path . '/components/com_fireboard/template/' . $fb_change_template . '/forum.css'))
{
$lifetime = 60 * 10;
$fb_current_template = $fb_change_template;
setcookie('fb_user_template', "$fb_change_template", time() + $lifetime);
}
else
{
setcookie('fb_user_template', '', time() - 3600);
}
}

if ($fb_change_img_template)
{
// clean template name
$fb_change_img_template = preg_replace('#W#', '', $fb_change_img_template);

if (strlen($fb_change_img_template) >= 40)
{
$fb_change_img_template = substr($fb_change_img_template, 0, 39);
}

// check that template exists in case it was deleted
if (file_exists($mosConfig_absolute_path . '/components/com_fireboard/template/' . $fb_change_img_template . '/forum.css'))
{
$lifetime = 60 * 10;
$fb_current_img_template = $fb_change_img_template;
setcookie('fb_user_img_template', "$fb_change_img_template", time() + $lifetime);
}
else
{
setcookie('fb_user_img_template', '', time() - 3600);
}
}

mosRedirect (sefRelToAbs(JB_LIVEURLREL));
break;

#########################################################################################
default:
if (file_exists(JB_ABSTMPLTPATH . '/listcat.php'))
{
include (JB_ABSTMPLTPATH . '/listcat.php');
}
else
{
include (JB_ABSPATH . '/template/default/listcat.php');
}

break;
} //hctiws

// Bottom Module
if (mosCountModules('fb_bottom'))
{
?>



readTemplatesFromFile("footer.html"«»);
$obj_FB_tmpl->displayParsedTemplate('fb-footer');
} //else

$mtime = microtime();
$mtime = explode(" ",$mtime);
$mtime = $mtime[1] + $mtime[0];
$tend = $mtime;
$tpassed = ($tend - $tstart);
echo $tpassed;
?>[/code:1]
here you are
dragontje124 (User)
Senior Boarder
Posts: 178
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
 
#11088
Re:Loads forum page then reloads once again? 1 Year, 7 Months ago  
tnx
Bojan1983 (User)
Fresh Boarder
Posts: 13
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
Last Edit: 2007/06/10 15:21 By Bojan1983.
 
 
#11091
Re:Loads forum page then reloads once again? 1 Year, 7 Months ago  
I copy pasted it to notepad. saved it as fireboard.php and it doesnt work, cant you just upload the file?
Bojan1983 (User)
Fresh Boarder
Posts: 13
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
 
#11214
Re:Loads forum page then reloads once again? 1 Year, 7 Months ago  
Good hack, this should be added to the core.
notzippy (User)
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
 
#11270
Re:Loads forum page then reloads once again? 1 Year, 7 Months ago  
As I mentioned before:

FireBoard should use Joomla sessions. Right now FireBoard's own session handling and processing is adding an overhead in request processing time, not utilizing what Joomla is already offering. (FireBoard should keep their own session handling for stand alone installations only)

This is just a fix of very unlucky implementation and yes, should be added to the core if before mentioned proposal is not going to be implemented.
Prutkar (User)
Fresh Boarder
Posts: 17
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
Last Edit: 2007/06/11 13:23 By Prutkar.
 
 
 
Go to top