|
Re:Primezilla integration 1 Year ago
|
|
Glad to hear the success story 
|
|
|
|
|
|
Developing FB-Poll System, FB-Joomap plugin, FB-OpenSEF extension and FB-Primezilla Hacker.
Vote my site - GigaHertZ
|
|
|
The administrator has disabled public write access.
|
|
|
Re:Primezilla integration 1 Year ago
|
|
By the way, dannykilla, to find the itemid just add primezilla as a menu item on one of your menus. You should see the itemid in the Menu Manager for that menu, between "Access" and "Type".
Please note, although no boardcode and smiley buttons are shown, they are still useable
I tried this and it still wont work the item id was 61 and i typed this into the code and it still isnt working
Can anyone help please
Thanks
Danny
|
|
|
|
|
|
|
The administrator has disabled public write access.
|
|
|
Re:Primezilla integration 1 Year ago
|
|
|
[file] Just tried again what Suzie suggested to do and I again get the same outcome the URL looks like this
http://test.manchesters-armed-defenders.co.uk/index.php?option=com_pms&page=new&id=bzrk&title=
and I get the msg "The page you are trying to access does not exist.
Please select a page from the main menu."
Someone please help :)
Danny
|
|
|
|
|
|
|
Last Edit: 2007/06/27 06:27 By dannykilla.
|
|
|
The administrator has disabled public write access.
|
|
|
Re:Primezilla integration 1 Year ago
|
|
Here is my View.php
setQuery("SELECT userid FROM #__fb_moderation WHERE catid='$catid' and userid='$my->id'" ;
if ($database->loadResult()) {
$is_Mod = 1;
}
}
else {
$is_Mod = 1;
} //superadmins always are
if (!$is_Mod)
{
//check Access Level Restrictions but don't bother for Moderators
unset ($allow_forum);
$allow_forum = array ();
//get all the info on this forum:
$database->setQuery("SELECT id,pub_access,pub_recurse,admin_access,admin_recurse FROM #__fb_categories where id=$catid" ;
$row = $database->loadObjectList();
if ($fbSession->allowed != "na" && !$new_fb_user) {
$allow_forum = explode(',', $fbSession->allowed);
}
else {
$allow_forum = array ();
}
//Do user identification based upon the ACL
$letPass = 0;
$letPass = fb_auth::validate_user($row[0], $allow_forum, $aro_group->group_id, $acl);
}
if ($letPass || $is_Mod)
{
$view = $view == "" ? $settings[current_view] : $view;
setcookie("fboard_settings[current_view]", $view, time() + 31536000, '/' ;
?>
setQuery("SELECT * FROM #__fb_messages AS a LEFT JOIN #__fb_messages_text AS b ON a.id=b.mesid WHERE a.id='$id' and a.hold=0" ;
$database->query();
if ($database->getNumRows() == 0) {
echo '' . _MODERATION_INVALID_ID . '\n';
}
else
{
$database->loadObject($this_message);
$thread = $this_message->parent == 0 ? $this_message->id : $this_message->thread;
if ($my->id != 0)
{
//mark this topic as read
$readTopics = "";
$database->setQuery("SELECT readtopics FROM #__fb_sessions WHERE userid=$my->id" ;
$readTopics = $database->loadResult();
if ($readTopics == ""
{
$readTopics = $thread;
$read_topics = array ();
$read_topics = ("$thread" ;
}
else
{
//get all readTopics in an array
$read_topics = explode(',', $readTopics);
if (!in_array($thread, $read_topics)) {
$readTopics = $readTopics . "," . $thread;
}
}
$database->setQuery("UPDATE #__fb_sessions set readtopics='$readTopics' WHERE userid=$my->id" ;
$database->query();
}
//update the hits counter for this topic
$database->setQuery("UPDATE #__fb_messages SET hits=hits+1 WHERE id=$thread AND parent=0" ;
$database->query();
// changed to 0 to fix the missing post when the thread splits over multiple pages
$i = 0;
if ($fbConfig['cb_profile'] && $my->id != 0)
{
$database->setQuery("SELECT fbordering from #__comprofiler where user_id=$my->id" ;
$fbordering = $database->loadResult();
if ($fbordering == "_UE_FB_ORDERING_OLDEST" {
$orderingNum = 0;
}
else {
$orderingNum = 1;
}
}
else
{
$database->setQuery("SELECT ordering from #__fb_users where userid=$my->id" ;
$orderingNum = $database->loadResult();
}
$ordering = $orderingNum ? 'DESC' : 'ASC';
$database->setQuery("SELECT * FROM #__fb_messages AS a "
."\n LEFT JOIN #__fb_messages_text AS b ON a.id=b.mesid WHERE (a.thread='$thread' OR a.id='$thread' AND a.hold=0 AND a.catid='$catid' ORDER BY a.time $ordering" ;
if ($view != "flat"
$flat_messages[] = $this_message;
foreach ($database->loadObjectList()as $message)
{
if ($view == "flat"
{
$flat_messages[] = $message;
if ($id == $message->id) {
$idmatch = $i;
}
$i++;
}
else {
$messages[$message->parent][] = $message;
}
}
if ($view == "flat"
{
//prepare threading
$limit = $fbConfig['messages_per_page'];
if ($idmatch > $limit) {
$limitstart = (floor($idmatch / $limit)) * $limit;
}
else {
$limitstart = 0;
}
$limitstart = intval(mosGetParam($_REQUEST, 'limitstart', $limitstart));
$total = count($flat_messages);
if ($total > $limit)
{
require_once (JB_JABSPATH . '/includes/pageNavigation.php' ;
$pageNav = new mosPageNav($total, $limitstart, $limit);
// slice out elements based on limits
$flat_messages = array_slice($flat_messages, $pageNav->limitstart, $pageNav->limit);
}
else {
$total = 0;
}
}
//Get the category name for breadcrumb
$database->setQuery("SELECT name, parent from #__fb_categories where id='$catid'" ;
$database->loadObject($objCatInfo);
//Get Parent's cat.name for breadcrumb
$database->setQuery("SELECT name,id from #__fb_categories WHERE id='$objCatInfo->parent'" ;
$database->loadObject($objCatParentInfo);
//data ready display now
?>
.switchcontent
{
display: none;
}
jQuery(function()
{
jQuery(".fb_qr_fire" .click(function()
{
jQuery("#sc" + (jQuery(this).attr("id" .split("__" [1])).toggle();
});
jQuery(".fb_qm_cncl_btn" .click(function()
{
jQuery("#sc" + (jQuery(this).attr("id" .split("__" [1])).toggle();
});
});
';
} else {
echo ' ';
} ?>
">
name;?>
getTemplate().'/images/arrow.png' ) {
echo ' getTemplate().'/images/arrow.png" alt="" /> ';
} else {
echo ' ';
} ?>
name;?>
-->
setQuery("SELECT thread from #__fb_subscriptions where userid=$my_id and thread='$thread'" ;
$fb_subscribed = $database->loadResult();
if ($fb_subscribed == "" {
$fb_cansubscribe = 1;
}
else {
$fb_cansubscribe = 0;
}
}
if ($my_id != 0 && $fbConfig['allowsubscriptions'] == 1 && $fb_cansubscribe == 1)
{
?>
setQuery("SELECT thread from #__fb_favorites where userid=$my_id and thread='$thread'" ;
$fb_favorited = $database->loadResult();
if ($fb_favorited == "" {
$fb_canfavorite = 1;
}
else {
$fb_canfavorite = 0;
}
}
if ($my_id != 0 && $fbConfig['allowfavorites'] == 1 && $fb_canfavorite == 1)
{
?>
setQuery("SELECT COUNT(*) FROM #__fb_favorites where thread='$thread'" ;
$fb_totalfavorited = $database->loadResult();
echo '';
echo _FB_TOTALFAVORITE;
echo $fb_totalfavorited;
echo '';
?>
Page:
writePagesLinks("index.php?option=com_fireboard&Itemid=$Itemid&func=view&id=$id&catid=$catid" ;
?>
setQuery("SELECT a.userid FROM #__fb_users AS a" . "\n LEFT JOIN #__fb_moderation AS b" . "\n ON b.userid=a.userid" . "\n WHERE b.catid='$catid'" ;
$catModerators = $database->loadResultArray();
if (count($flat_messages) > 0)
{
foreach ($flat_messages as $fmessage)
{
$k = 1 - $k;
$mmm++;
if ($fmessage->parent == 0) {
$fb_thread = $fmessage->id;
}
else {
$fb_thread = $fmessage->thread;
}
//filter out clear html
$fmessage->name = htmlspecialchars($fmessage->name);
$fmessage->email = htmlspecialchars($fmessage->email);
$fmessage->subject = htmlspecialchars($fmessage->subject);
//set page title if on Mambo 4.5.2+
if ($leaf->parent == 0) {
$mainframe->setPageTitle($fmessage->subject . ' - ' . $fbConfig['board_title']);
}
//Get userinfo needed later on, this limits the amount of queries
$userinfo = "";
$database->setQuery("SELECT a.posts,a.karma,a.signature,a.avatar,b.name,b.username,b.gid FROM #__fb_users as a LEFT JOIN #__users as b on b.id=a.userid where a.userid='$fmessage->userid'" ;
$database->loadObject($userinfo);
//get the username:
$fb_username = "";
if ($fbConfig['username']) {
$fb_queryName = "username";
}
else {
$fb_queryName = "name";
}
$fb_username = $userinfo->$fb_queryName;
if ($fb_username == "" || $fbConfig['changename']) {
$fb_username = $fmessage->name;
}
$msg_id = $fmessage->id;
$lists["userid"] = $fmessage->userid;
$msg_username = $fmessage->email != "" && $my_id > 0 && $fbConfig['showemail'] == '1' ? "email) . "\">" . stripslashes($fb_username) . "" : stripslashes($fb_username);
if ($fbConfig['allowAvatar'])
{
$Avatarname = $userinfo->username;
if ($fbConfig['avatar_src'] == "clexuspm" {
$msg_avatar = 'userid) . '" />';
}
elseif ($fbConfig['avatar_src'] == "cb"
{
$database->setQuery("SELECT avatar FROM #__comprofiler WHERE user_id='$fmessage->userid' AND avatarapproved='1'" ;
$avatar = $database->loadResult();
if ($avatar != ''
{
//added or modified by mambojoe
//This now has the right path to the upload directory and also handles the thumbnail and gallery photos.
$imgpath = JB_JLIVEURL . '/images/comprofiler/';
if (eregi("gallery/", $avatar) == false)
$imgpath .= "tn" . $avatar;
else
$imgpath .= $avatar;
$msg_avatar = '';
//added or modified by mambojoe
}
}
else
{
$avatar = $userinfo->avatar;
if ($avatar != '' {
$msg_avatar = '';
}
}
}
if ($fbConfig['showstats'])
{
//user type determination
$ugid = $userinfo->gid;
$uIsMod = 0;
$uIsAdm = 0;
$uIsMod = in_array($fmessage->userid, $catModerators);
if ($ugid > 0) { //only get the groupname from the ACL if we're sure there is one
$agrp = strtolower($acl->get_group_name($ugid, 'ARO' );
}
if ($ugid == 0) {
$msg_usertype = _VIEW_VISITOR;
}
else
{
if (strtolower($agrp) == "administrator" || strtolower($agrp) == "superadministrator" || strtolower($agrp) == "super administrator"
{
$msg_usertype = _VIEW_ADMIN;
$uIsAdm = 1;
}
elseif ($uIsMod) {
$msg_usertype = _VIEW_MODERATOR;
}
else {
$msg_usertype = _VIEW_USER;
}
}
//done usertype determination, phew...
//# of post for this user and ranking
if ($fmessage->userid)
{
$numPosts = (int)$userinfo->posts;
//ranking
$rText = "";
$rImg = "";
if ($fbConfig['showranking'])
{
if ($numPosts >= 0 && $numPosts = (int)$fbConfig['rank1'] && $numPosts = (int)$fbConfig['rank2'] && $numPosts = (int)$fbConfig['rank3'] && $numPosts = (int)$fbConfig['rank4'] && $numPosts = (int)$fbConfig['rank5'])
{
$rText = $fbConfig['rank6txt'];
$rImg = JB_URLRANKSPATH . 'rank6.gif';
}
if ($uIsMod)
{
$rText = _RANK_MODERATOR;
$rImg = JB_URLRANKSPATH . 'rankmod.gif';
}
if ($uIsAdm)
{
$rText = _RANK_ADMINISTRATOR;
$rImg = JB_URLRANKSPATH . 'rankadmin.gif';
}
if ($fbConfig['rankimages']) {
$msg_userrankimg = '';
}
$msg_userrank = $rText;
}
$useGraph = 0; //initialization
if (!$fbConfig['postStats'])
{
$msg_posts = $numPosts;
$useGraph = 0;
}
else
{
$myGraph = new phpGraph;
//$myGraph->SetGraphTitle(_POSTS);
$myGraph->AddValue(_POSTS, $numPosts);
$myGraph->SetRowSortMode(0);
$myGraph->SetBarImg(JB_URLGRAPHPATH . "col" . $fbConfig['statsColor'] . "m.png" ;
$myGraph->SetBarImg2(JB_URLEMOTIONSPATH . "graph.gif" ;
$myGraph->SetMaxVal($maxPosts);
$myGraph->SetShowCountsMode(2);
$myGraph->SetBarWidth(4); //height of the bar
$myGraph->SetBorderColor("#333333" ;
$myGraph->SetBarBorderWidth(0);
$myGraph->SetGraphWidth(64); //should match column width in the above -5 pixels
//$myGraph->BarGraphHoriz();
$useGraph = 1;
}
}
}
//karma points and buttons
if ($fbConfig['showkarma'] && $fmessage->userid != '0'
{
$karmaPoints = $userinfo->karma;
$karmaPoints = (int)$karmaPoints;
$msg_karma = "" . _KARMA . ": $karmaPoints";
if ($my->id != '0' && $my->id != $fmessage->userid)
{
$msg_karmaminus
= "userid . '&pid=' . $fmessage->id . '&catid=' . $catid . '' . "\">";
$msg_karmaplus
= "userid . '&pid=' . $fmessage->id . '&catid=' . $catid . '' . "\">";
}
}
/*let's see if we should use Missus integration */
if ($fbConfig['pm_component'] == "missus" && $fmessage->userid && $my->id)
{
//we should offer the user a Missus link
//first get the username of the user to contact
$PMSName = $userinfo->username;
$msg_pms
= "userid . '&subject=' . _GEN_FORUM . ': ' . urlencode(utf8_encode($fmessage->subject))) . "\">";
}
/*let's see if we should use JIM integration */
if ($fbConfig['pm_component'] == "jim" && $fmessage->userid && $my->id)
{
//we should offer the user a JIM link
//first get the username of the user to contact
$PMSName = $userinfo->username;
$msg_pms = "subject) . "\">";
}
/*let's see if we should use uddeIM integration */
if ($fbConfig['pm_component'] == "uddeim" && $fmessage->userid && $my->id)
{
//we should offer the user a PMS link
//first get the username of the user to contact
$PMSName = $userinfo->username;
$msg_pms = "userid) . "\">";
}
/*let's see if we should use myPMS2 integration */
if ($fbConfig['pm_component'] == "pms" && $fmessage->userid && $my->id)
{
//we should offer the user a PMS link
//first get the username of the user to contact
$PMSName = $userinfo->username;
$msg_pms="";
}
// online - ofline status
if ($fmessage->userid > 0)
{
$sql = "SELECT count(userid) FROM #__session WHERE userid=" . $fmessage->userid;
$database->setQuery($sql);
$isonline = $database->loadResult();
if ($isonline) {
$msg_online .= $fbIcons['onlineicon'] ? '' : ' ';
}
else {
$msg_online .= $fbIcons['offlineicon'] ? '' : ' ';
}
}
/* ClexusPM integration */
if ($fbConfig['pm_component'] == "clexuspm" && $fmessage->userid && $my->id)
{
//we should offer the user a PMS link
//first get the username of the user to contact
$PMSName = $userinfo->aid;
$msg_pms = "userid . '&title=' . $fmessage->subject) . "\">";
//mypms pro profile link
$msg_profile = "userid) . "\">";
//mypms add buddy link
$msg_buddy = "";
$database->setQuery("SELECT icq,ym,msn,aim,website,location FROM #__mypms_profiles WHERE user='" . $PMSName . "'" ;
$mostables = $database->loadObjectList();
foreach ($mostables as $mostables)
{
if ($mostables->aim)
$msg_aim = "aim) . "\">";
if ($mostables->icq)
$msg_icq = "icq . "\">";
if ($mostables->msn)
$msg_msn = "";
if ($mostables->ym)
$msg_yahoo = "ym . "&.src=pg\">ym . "&m=g&t=0\" border=0>";
if ($mostables->location)
$msg_loc = $mostables->location;
}
unset ($mostables);
}
//Check if the Community Builder settings are on, and set the variables accordingly.
if ($fbConfig['fb_profile'] == "cb"
{
if ($fbConfig['cb_profile'] && $fmessage->userid > 0)
{
$msg_prflink = sefRelToAbs('index.php?option=com_comprofiler&task=userProfile&user=' . $fmessage->userid . '' ;
$msg_profile = "userid . '' . "\"> ";
}
}
else if ($fbConfig['fb_profile'] == "clexuspm"
{
//mypms pro profile link
$msg_prflink = MyPMSTools::getProfileLink($fmessage->userid);
$msg_profile = "userid) . "\">";
}
else
{
//FireBoard Profile link.
$msg_prflink = sefRelToAbs('index.php?option=com_fireboard&func=fbprofile&task=showprf&userid=' . $fmessage->userid . '&Itemid=' . $Itemid);
$msg_profile = "userid . '&Itemid=' . $Itemid) . "\"> ";
}
//Show admins the IP address of the user:
if ($is_admin || $is_moderator)
{
$msg_ip = 'IP: ' . $fmessage->ip;
$msg_ip_link = 'ip . '&f=2" target="_blank">';
}
$fb_subject_txt = $fmessage->subject;
$table = array_flip(get_html_translation_table(HTML_ENTITIES));
$fb_subject_txt = strtr($fb_subject_txt, $table);
$fb_subject_txt = smile::fbHtmlSafe($fb_subject_txt);
$fb_subject_txt = stripslashes($fb_subject_txt);
$msg_subject = stripslashes($fb_subject_txt);
$msg_date = date(_DATETIME, $fmessage->time);
$fb_message_txt = $fmessage->message;
$fb_message_txt = stripslashes(smile: mileReplace($fb_message_txt, 0, $fbConfig['disemoticons']));
$fb_message_txt = str_replace("\n", "", $fb_message_txt);
//$fb_message_txt = nl2br($fb_message_txt);
//$fb_message_txt = str_replace(" ","",$fb_message_txt);
//$fb_message_txt = str_replace("","",$fb_message_txt);
//$fb_message_txt = str_replace("","",$fb_message_txt);
//filter bad words
if ($fbConfig['badwords']) {
$badwords = Badword::filter($fb_message_txt, $my);
}
//wordwrap:
$fb_message_txt = smile::htmlwrap($fb_message_txt, $fbConfig['wrap']);
//this doesn't work for code... need to find something else..
//restore the \n (were replaced with _CTRL_) occurences inside code tags, but only after we have stripslashes; otherwise they will be stripped again
$msg_text = str_replace("_CRLF_", "\\n", stripslashes($fb_message_txt));
//add notification that the message was filtered for bad words
if ($badwords == "true" {
$msg_text = _COM_A_BADWORDS_NOTICE;
}
if ($fbConfig['cb_profile'])
{
$database->setQuery("select fbsignature from #__comprofiler where user_id=$fmessage->userid" ;
$signature = $database->loadResult();
}
else {
$signature = $userinfo->signature;
}
if ($signature != ""
{
$signature = stripslashes(smile: mileReplace($signature, 0, $fbConfig['disemoticons']));
$signature = str_replace("\n", "", $signature);
$signature = str_replace(" ", "", $signature);
$signature = str_replace("", "", $signature);
$signature = str_replace("", "", $signature);
//wordwrap:
$signature = smile::htmlwrap($signature, $fbConfig['wrap']);
//restore the \n (were replaced with _CTRL_) occurences inside code tags, but only after we have striplslashes; otherwise they will be stripped again
$signature = str_replace("_CRLF_", "\\n", stripslashes($signature));
$msg_signature = $signature;
}
//echo "fmessage=".var_dump($fmessage);
//check if topic is locked
$database->setQuery("select thread from #__fb_messages where id='$fmessage->id'" ;
$topicID = $database->loadResult();
if ($topicID != 0)
{
//message replied to is not the topic post; check if the topic post itself is locked
$database->setQuery("select locked from #__fb_messages where id='$topicID'" ;
$topicLock = $database->loadResult();
$lockedWhat = _TOPIC_NOT_ALLOWED;
}
else
{ //message replied to is the topic post; check if that's locked
$database->setQuery("select locked from #__fb_messages where id='$fmessage->id'" ;
$topicLock = $database->loadResult();
$lockedWhat = _TOPIC_NOT_ALLOWED;
}
if ($topicLock == 0)
{ //topic not locked; check if forum is locked
$database->setQuery("select locked from #__fb_categories where id='$fmessage->catid'" ;
$topicLock = $database->loadResult();
$lockedWhat = _FORUM_NOT_ALLOWED;
}
if ((($fbConfig['pubwrite'] == 0 && $my_id != 0) || $fbConfig['pubwrite'] == 1) && ($topicLock == 0 || ($topicLock == 1 && $is_moderator)))
{
//user is allowed to reply/quote
$msg_reply = "id . '&catid=' . $catid) . "\">";
if ($fbIcons['reply']) {
$msg_reply .= '";
}
else {
$msg_reply .= _GEN_REPLY;
}
$msg_reply .= "";
$msg_quote = "id . '&catid=' . $catid) . "\">";
if ($fbIcons['quote']) {
$msg_quote .= '";
}
else {
$msg_quote .= _GEN_QUOTE;
}
$msg_quote .= "";
}
else
{
//user is not allowed to write a post
if ($topicLock == 1) {
$msg_closed = _POST_LOCK_SET;
}
else {
$msg_closed = _VIEW_DISABLED;
}
}
$showedEdit = 0; //reset this value
//Offer an moderator the delete link
if ($is_moderator)
{
$msg_delete = "id . '&catid=' . $catid) . "\">";
if ($fbIcons['delete']) {
$msg_delete .= '";
}
else {
$msg_delete .= _GEN_DELETE;
}
$msg_delete .= "";
}
if ($fbConfig['useredit'] == 1 && $my_id != ""
{
//Now, if the viewer==author and the viewer is allowed to edit his/her own post then offer an 'edit' link
if ($my_id == $fmessage->userid)
{
$msg_edit = "id . '&catid=' . $catid) . "\">";
if ($fbIcons['edit'])
{
$msg_edit .= '";
$showedEdit = 1;
}
else
{
$msg_edit .= _GEN_EDIT;
$showedEdit = 1;
}
$msg_edit .= "";
}
}
if ($is_moderator && $showedEdit != 1)
{
//Offer a moderator always the edit link except when it is already showing..
$msg_edit = "id . '&catid=' . $catid) . "\">";
if ($fbIcons['edit']) {
$msg_edit .= '";
}
else {
$msg_edit .= _GEN_EDIT;
}
$msg_edit .= "";
}
if ($is_moderator && $fmessage->parent == '0'
{
// offer the moderator always the move link to relocate a topic to another forum
// and the (un)sticky bit links
// and the (un)lock links
// but ONLY when it is a topic and not a reply
$msg_move = "id . '&catid=' . $catid . '&name=' . $fmessage->name) . "\">";
if ($fbIcons['move']) {
$msg_move .= '";
}
else {
$msg_move .= _GEN_MOVE;
}
$msg_move .= "";
if ($fmessage->ordering == 0)
{
$msg_sticky = "id . '&catid=' . $catid) . "\">";
if ($fbIcons['sticky']) {
$msg_sticky .= '";
}
else {
$msg_sticky .= _GEN_STICKY;
}
$msg_sticky .= "";
}
else
{
$msg_sticky = "id . '&catid=' . $catid) . "\">";
if ($fbIcons['unsticky']) {
$msg_sticky .= '";
}
else {
$msg_sticky .= _GEN_UNSTICKY;
}
$msg_sticky .= "";
}
if ($fmessage->locked == 0)
{
$msg_lock = "id . '&catid=' . $catid) . "\">";
if ($fbIcons['lock']) {
$msg_lock .= '";
}
else {
$msg_lock .= _GEN_LOCK;
}
$msg_lock .= "";
}
else
{
$msg_lock = "id . '&catid=' . $catid) . "\">";
if ($fbIcons['unlock']) {
$msg_lock .= '";
}
else {
$msg_lock .= _GEN_UNLOCK;
}
$msg_lock .= "";
}
}
//(JJ)
if (file_exists(JB_ABSTMPLTPATH . '/message.php' ) {
include (JB_ABSTMPLTPATH . '/message.php' ;
}
else {
include (JB_ABSPATH . '/template/default/message.php' ;
}
unset($msg_id, $msg_username, $msg_avatar, $msg_usertype, $msg_userrank, $msg_userrankimg, $msg_posts, $msg_move, $msg_karma, $msg_karmaplus, $msg_karmaminus, $msg_ip, $msg_ip_link, $msg_date, $msg_subject, $msg_text,
$msg_signature, $msg_reply,
$msg_quote, $msg_edit, $msg_closed, $msg_delete, $msg_sticky, $msg_lock, $msg_aim, $msg_icq, $msg_msn, $msg_yahoo, $msg_buddy, $msg_profile, $msg_online, $msg_pms, $msg_loc, $msg_regdate, $msg_prflink, $myGraph);
$useGraph = 0;
} // end for
}
?>
setQuery("SELECT thread from #__fb_subscriptions where userid=$my_id and thread='$fb_thread'" ;
$fb_subscribed = $database->loadResult();
if ($fb_subscribed == "" {
$fb_cansubscribe = 1;
}
else {
$fb_cansubscribe = 0;
}
}
if ($my_id != 0 && $fbConfig['allowsubscriptions'] == 1 && $fb_cansubscribe == 1)
{
?>
setQuery("SELECT thread from #__fb_favorites where userid=$my_id and thread='$fb_thread'" ;
$fb_favorited = $database->loadResult();
if ($fb_favorited == "" {
$fb_canfavorite = 1;
}
else {
$fb_canfavorite = 0;
}
}
if ($my_id != 0 && $fbConfig['allowfavorites'] == 1 && $fb_canfavorite == 1)
{
?>
Page:
writePagesLinks("index.php?option=com_fireboard&Itemid=$Itemid&func=view&id=$id&catid=$catid" ;
?>
getTemplate() . '/images/arrow.png' ) {
echo ' getTemplate() . '/images/arrow.png" alt="" /> ';
}
else {
echo ' ';
}
?>
&& $my->id != 0)
{
$database->setQuery("SELECT fbordering from #__comprofiler where user_id=$my->id" ;
$fbordering = $database->loadResult();
if ($fbordering == "_UE_FB_ORDERING_OLDEST" {
$orderingNum = 0;
}
else {
$orderingNum = 1;
}
}
else
{
$database->setQuery("SELECT ordering from #__fb_users where userid=$my->id" ;
$orderingNum = $database->loadResult();
}
$ordering = $orderingNum ? 'DESC' : 'ASC';
$database->setQuery("SELECT * FROM #__fb_messages AS a "
."\n LEFT JOIN #__fb_messages_text AS b ON a.id=b.mesid WHERE (a.thread='$thread' OR a.id='$thread' AND a.hold=0 AND a.catid='$catid' ORDER BY a.time $ordering" ;
if ($view != "flat"
$flat_messages[] = $this_message;
foreach ($database->loadObjectList()as $message)
{
if ($view == "flat"
{
$flat_messages && $my->id != 0)
{
$database->setQuery("SELECT fbordering from #__comprofiler where user_id=$my->id" ;
$fbordering = $database->loadResult();
if ($fbordering == "_UE_FB_ORDERING_OLDEST" {
$orderingNum = 0;
}
else {
$orderingNum = 1;
}
}
else
{
$database->setQuery("SELECT ordering from #__fb_users where userid=$my->id" ;
$orderingNum = $database->loadResult();
}
$ordering = $orderingNum ? 'DESC' : 'ASC';
$database->setQuery("SELECT * FROM #__fb_messages AS a "
."\n LEFT JOIN #__fb_messages_text AS b ON a.id=b.mesid WHERE (a.thread='$thread' OR a.id='$thread' AND a.hold=0 AND a.catid='$catid' ORDER BY a.time $ordering" ;
if ($view != "flat"
$flat_messages[] = $this_message;
foreach ($database->loadObjectList()as $message)
{
if ($view == "flat"
{
$flat_messages[] = $message;
if ($id == $message->id) {
$idmatch = $i;
}
$i++;
}
else {
$messages[$message->parent][] = $message;
}
}
if ($view == "flat"
{
//prepare threading
$limit = $fbConfig['messages_per_page'];
if ($idmatch > $limit) {
$limitstart = (floor($idmatch / $limit)) * $limit;
}
else {
$limitstart = 0;
}
$limitstart = intval(mosGetParam($_REQUEST, 'limitstart', $limitstart));
$total = count($flat_messages);
if ($total > $limit)
{
require_once (JB_JABSPATH . '/includes/pageNavigation.php' ;
$pageNav = new mosPageNav($total, $limitstart, $limit);
// slice out elements based on limits
$flat_messages = array_slice($flat_messages, $pageNav->limitstart, $pageNav->limit);
}
else {
$total = 0;
}
}
//Get the category name for breadcrumb
$database->setQuery("SELECT name, parent from #__fb_categories where id='$catid'" ;
$database->loadObject($objCatInfo);
//Get Parent's cat.name for breadcrumb
$database->setQuery("SELECT name,id from #__fb_categories WHERE id='$objCatInfo->parent'" ;
$database->loadObject($objCatParentInfo);
//data ready display now
?>
.switchcontent
{
display: none;
}
jQuery(function()
{
jQuery(".fb_qr_fire" .click(function()
{
jQuery("#sc" + (jQuery(this).attr("id" .split("__" [1])).toggle();
});
jQuery(".fb_qm_cncl_btn" .click(function()
{
jQuery("#sc" + (jQuery(this).attr("id" .split("__" [1])).toggle();
});
});
';
} else {
echo ' ';
} ?>
">
name;?>
getTemplate().'/images/arrow.png' ) {
echo ' getTemplate().'/images/arrow.png" alt="" /> ';
} else {
echo ' ';
} ?>
name;?>
-->
setQuery("SELECT thread from #__fb_subscriptions where userid=$my_id and thread='$thread'" ;
$fb_subscribed = $database->loadResult();
if ($fb_subscribed == "" {
$fb_cansubscribe = 1;
}
else {
$fb_cansubscribe = 0;
}
}
if ($my_id != 0 && $fbConfig['allowsubscriptions'] == 1 && $fb_cansubscribe == 1)
{
?>
setQuery("SELECT thread from #__fb_favorites where userid=$my_id and thread='$thread'" ;
$fb_favorited = $database->loadResult();
if ($fb_favorited == "" {
$fb_canfavorite = 1;
}
else {
$fb_canfavorite = 0;
}
}
if ($my_id != 0 && $fbConfig['allowfavorites'] == 1 && $fb_canfavorite == 1)
{
?>
setQuery("SELECT COUNT(*) FROM #__fb_favorites where thread='$thread'" ;
$fb_totalfavorited = $database->loadResult();
echo '';
echo _FB_TOTALFAVORITE;
echo $fb_totalfavorited;
echo '';
?>
Page:
writePagesLinks("index.php?option=com_fireboard&Itemid=$Itemid&func=view&id=$id&catid=$catid" ;
?>
setQuery("SELECT a.userid FROM #__fb_users AS a" . "\n LEFT JOIN #__fb_moderation AS b" . "\n ON b.userid=a.userid" . "\n WHERE b.catid='$catid'" ;
$catModerators = $database->loadResultArray();
if (count($flat_messages) > 0)
{
foreach ($flat_messages as $fmessage)
{
$k = 1 - $k;
$mmm++;
if ($fmessage->parent == 0) {
$fb_thread = $fmessage->id;
}
else {
$fb_thread = $fmessage->thread;
}
//filter out clear html
$fmessage->name = htmlspecialchars($fmessage->name);
$fmessage->email = htmlspecialchars($fmessage->email);
$fmessage->subject = htmlspecialchars($fmessage->subject);
//set page title if on Mambo 4.5.2+
if ($leaf->parent == 0) {
$mainframe->setPageTitle($fmessage->subject . ' - ' . $fbConfig['board_title']);
}
//Get userinfo needed later on, this limits the amount of queries
$userinfo = "";
$database->setQuery("SELECT a.posts,a.karma,a.signature,a.avatar,b.name,b.username,b.gid FROM #__fb_users as a LEFT JOIN #__users as b on b.id=a.userid where a.userid='$fmessage->userid'" ;
$database->loadObject($userinfo);
//get the username:
$fb_username = "";
if ($fbConfig['username']) {
$fb_queryName = "username";
}
else {
$fb_queryName = "name";
}
$fb_username = $userinfo->$fb_queryName;
if ($fb_username == "" || $fbConfig['changename']) {
$fb_username = $fmessage->name;
}
$msg_id = $fmessage->id;
$lists["userid"] = $fmessage->userid;
$msg_username = $fmessage->email != "" && $my_id > 0 && $fbConfig['showemail'] == '1' ? "email) . "\">" . stripslashes($fb_username) . "" : stripslashes($fb_username);
if ($fbConfig['allowAvatar'])
{
$Avatarname = $userinfo->username;
if ($fbConfig['avatar_src'] == "clexuspm" {
$msg_avatar = 'userid) . '" />';
}
elseif ($fbConfig['avatar_src'] == "cb"
{
$database->setQuery("SELECT avatar FROM #__comprofiler WHERE user_id='$fmessage->userid' AND avatarapproved='1'" ;
$avatar = $database->loadResult();
if ($avatar != ''
{
//added or modified by mambojoe
//This now has the right path to the upload directory and also handles the thumbnail and gallery photos.
$imgpath = JB_JLIVEURL . '/images/comprofiler/';
if (eregi("gallery/", $avatar) == false)
$imgpath .= "tn" . $avatar;
else
$imgpath .= $avatar;
$msg_avatar = '';
//added or modified by mambojoe
}
}
else
{
$avatar = $userinfo->avatar;
if ($avatar != '' {
$msg_avatar = '';
}
}
}
if ($fbConfig['showstats'])
{
//user type determination
$ugid = $userinfo->gid;
$uIsMod = 0;
$uIsAdm = 0;
$uIsMod = in_array($fmessage->userid, $catModerators);
if ($ugid > 0) { //only get the groupname from the ACL if we're sure there is one
$agrp = strtolower($acl->get_group_name($ugid, 'ARO' );
}
if ($ugid == 0) {
$msg_usertype = _VIEW_VISITOR;
}
else
{
if (strtolower($agrp) == "administrator" || strtolower($agrp) == "superadministrator" || strtolower($agrp) == "super administrator" | | |