Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Raven's Collapsing Forums Block
Author Message
stuartbu
New Member
New Member



Joined: Apr 27, 2006
Posts: 2

PostPosted: Thu May 04, 2006 4:13 am Reply with quote

Hi could someone help me if its possible to remove some code so only the two quick links pill down menus appear without the collapsing last forum posts or anything else for that matter?? I use the last forum posts on my main page and im very happy with them but I think an extra block with just the pull down links would be a very nice addition!
 
View user's profile Send private message
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6432

PostPosted: Tue May 09, 2006 9:37 am Reply with quote

You want the links without the latest forum post?

_________________
I search, therefore I exist...
nukeSEO - nukeFEED - nukePIE - nukeSPAM - nukeWYSIWYG
 
View user's profile Send private message
stuartbu







PostPosted: Wed May 10, 2006 3:45 pm Reply with quote

yes pls all I want is the two drop down menues??

PLS
 
StuartB
New Member
New Member



Joined: Feb 12, 2006
Posts: 4

PostPosted: Sat May 27, 2006 5:44 pm Reply with quote

I have hacked this around, I have no clue of what im doing so I know you will think im think, but now I get an error on the main page, could someone steer me in the right way? [ Only registered users can see links on this board! Get registered or login! ] I will be updatiing the site soon to the raven distro and yes I will donate Wink
 
View user's profile Send private message
CodyG
Life Cycles Becoming CPU Cycles



Joined: Jan 02, 2003
Posts: 714
Location: Vancouver Island

PostPosted: Sun May 28, 2006 12:29 pm Reply with quote

I just removed the forum posts code and there is likely other code that isn't required. Not sure if you wanted to keep top posters, but if not just change the $showTopPosters variable to 0.


Code:


<?php
########################################################################
# This program is free software. You can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License.       #
# If you modify this, let me know for fun. =)                          #
########################################################################
# Raven modified (heavily) to use a collapsing table structure.        #
# Date Released: Original: 01/23/2004                                  #
#              : v2.0.0  : 07/14/2005                                  #
#              : v2.0.1  : 07/16/2005                                  #
#              : v2.1.0  : 08/21/2005                                  #
#              : v2.2.0  : 10/23/2005                                  #
#              : v2.3.0  : 01/19/2006                                  #
# Support: http://ravenphpscripts.com                                  #
# Hosting: http://ravenwebhosting.com                                  #
# Version: 2.3.0                                                       #
########################################################################
# Version 2.3.0                                                        #
# 11/27/2005  : Modified behavior of $showJumpBox to $showJumpBoxes    #
#             : Added setting ($showTickerMessage) to control ticker   #
# 11/13/2005  : Converted drop down boxes to use FieldSet              #
#             : Removed underlining of Jump To boxes                   #
#             : Added style tag for text color to optgroup             #
# 01/19/2006  : Added style sheet for show/hide button                 #
#             : Moved language defines to their own language folder    #
# Version 2.2.0                                                        #
# 10/23/2005  : Released.                                              #
# 10/23/2005  : Automated the recognizing of Admin and Moderators.     #
# 10/21/2005  : Restored some links that had been mistakenly GT'd.     #
# 10/20/2005  : Fixed links and titles for differentiatng forum, topic #
#               and last topic post.        .                          #
# 10/19/2005  : Added setting for number of posters/row and automated  #
#               the newline routine for same.                          #
# 10/15/2005  : Modified TopTenPoster verbiage and code to Top Posters.#
#               to allow for varying number to show.                   #
# 10/16/2005  : Modified code to not show hyper-links of profiles to   #
#               Anaonymous users.  This is for better SEO. It is       #
#               controllable through setting $hideLinksFromGuests      #
# Version 2.1.0                                                        #
# 08/21/2005  : Added routine to allow manual hiding of selected forums#
#               Renamed a few variables for standardization purposes.  #
# 08/20/2005  : Added routine to adjust displayed post time by profile #
# 08/13/2005  : Added border="0" to xmlicon - Thanks CurtisH           #
#               Added manual routines to recognise admins and mods in  #
#               order to hilite their roles when mousing over their    #
#               icons in the Top 10 posters. This could be automated,  #
#               but until that happens, this will suffice.             #
# Version 2.0.1                                                        #
# 07/16/2005  : Fixed layout of ticking message                        #
# Version 2.0.0                                                        #
# 07/14/2005  : Added a drop down box for a Jump-To Forum.  This was   #
#               suggested by ring_c. It has an optional switch.        #
#             : Converted several navigational links to drop down.     #
#             : Converted all text to language defines.                #
#             : Created some settings to make more flexible.           #
#             : Added ability to exclude user names from top ten list. #
# 06/19/2005  : Removed some not used code.                            #
#               Added top ten posters with avatars.  Made it optional. #
# 05/03/2005  : Added Watched Posts to header menu                     #
# 02/14/2004  : optimized sql for faster building                      #
# 05/25/2004  : Added code to identify the Forum and Section           #
# 06/28/2004  : Fixed code to show the Forum and Section when NOT in   #
#               hideViewReadOnly mode.                                 #
# 12/03/2004  : Added truncation to poster name and last replied name. #
########################################################################


global $user_prefix, $db, $sitename, $admin, $user, $bgcolor1, $bgcolor2, $bgcolor5,$textcolor1, $textcolor2;

$hideLinksFromGuests                   = TRUE;
$hideTheseForums                     = '-1';  // use a comma delimited list of forum id's to hide like '1,5,8'
$tickerWidth                         = '100%';
$tickerBGColor                       = "$bgcolor2";
$tickDelay                           = 4000; // in miliseconds
$hideViewReadOnly                    = TRUE;
$lastNewTopics                       = 25; // Number of topics to show when list is expanded
$countTopics                         = 0;
$showClosedNum                                   = 1; // Number of messages that are visible when collapsed - NOT IMPLEMENTED YET
$showJumpBoxes                         = TRUE; // Display or don't display the 2 Jump Boxes
$showTopPosters                      = 1;  // 0=None, 1=Username - no avatar,  2=Username and avatar
$showTopPostersRanks       = 0;  // 0=None, 1=Admin only, 2=Moderator only, 3=Admin and Moderator, 4=All
$showTopPostersNum                        = 5;  // Total number of top posters to show
$showTopPostersPerRow      = 5;  // Number to show per line
$showTickerMessage         = FALSE; // show/hide the top ticker message
$skipTopPostersUserNames = "''"; // use a comma separated list with each name in single quotes, like 'user1','user2'.
$backendForumsXML          = 'backendforums.php';  //Filename of the xml script.  Assumed in root directory.

//////////////////////////////////////////////////////////////////
// THERE SHOULD BE NO NEED TO EDIT BELOW THIS LINE
if ( !defined('BLOCK_FILE') ) {
    Header("Location: ../index.php");
    die();
}

require('language/rwsforumcollapsing/lang-english.php');
$currentReporting = error_reporting();
error_reporting(0);
//
// The following should not be changed.  If you need to modify them, modify them in the language folder.
// These are strictly local scope
$bfcShowHide         = bfcSHOWHIDE;
$bfcJumpForum        = bfcJUMPFORUM;
$bfcJumpFunction     = bfcJUMPFUNCTION;
$bfcForum            = bfcFORUM;
$bfcTopic            = bfcTOPIC;
$bfcReplies          = bfcREPLIES;
$bfcAuthor           = bfcAUTHOR;
$bfcViews            = bfcVIEWS;
$bfcLastPost         = bfcLASTPOST;

// Calculate posting time offset for user defined timezones
$serverTimeZone = date("Z")/3600;
if ($serverTimeZone >= 0) $serverTimeZone = "+".$serverTimeZone;
if (is_user($user)) {
        $userinfo     = getusrinfo($user);
        $userTimeZone = $userinfo['user_timezone'];
}
else {
        $sql  = "SELECT config_value FROM ".$user_prefix."_bbconfig WHERE config_name='board_timezone'";
        $result = $db->sql_query($sql);
        $rows = $db->sql_fetchrow($result);
        $userTimeZone = $rows['config_value'];
}
$userTimeZone = ($userTimeZone - $serverTimeZone)*3600;
if (!is_numeric($userTimeZone)) $userTimeZone = 0;
OpenTable3();
if ($showTopPosters==1 OR $showTopPosters==2) {
        $sql = "SELECT user_id, username, user_posts, user_avatar, user_level, rank_title, rank_id FROM ".$user_prefix."_users u LEFT JOIN ".$user_prefix."_bbranks r on u.user_rank=r.rank_id where username NOT IN ($skipTopPostersUserNames) ORDER BY user_posts DESC LIMIT 0,$showTopPostersNum";
        $result=$db->sql_query($sql);
//        $contentXML = '';
//        if (strlen($backendForumsXML)>0) $contentXML = '<center><a href="backendforums.php" title="'.bfcBACKENDTITLE.'"><img src="images/blocks/xmlicon.gif" alt="" border="0" /></a></center>';

        $content .= "<div align=\"center\"><b><u>".bfcTOPPOSTERS."</u></b><br /><br /><table class=\"outer\" cellpadding=\"0\" style=\"border-collapse: collapse; border-color:$textcolor2;\" cellspacing=\"1\" border=\"0\" background=\"images/forumsblock.jpg\">";
        $cycle = 1;
        $content .= "<tr class=\"even\" vAlign=\"middle\">";
        while(list($user_id, $username, $user_posts, $user_avatar, $user_level, $rank_title, $rank_id) = $db->sql_fetchrow($result)) {
                $staffTitle = '';
                if ($showTopPostersRanks==3)
                        if ($user_level==2||$user_level==3) $staffTitle = 'title="'.$rank_title.'"';
                        else $staffTitle = '';
                elseif ($showTopPostersRanks==4) $staffTitle = 'title="'.$rank_title.'"';
                elseif ($showTopPostersRanks==1)
                        if ($user_level==2) $staffTitle = 'title="'.$rank_title.'"';
                        else $staffTitle = '';
                elseif ($showTopPostersRanks==2)
                        if ($user_level==3) $staffTitle = 'title="'.$rank_title.'"';
                        else $staffTitle = '';

                $newLine = FALSE;
                if ($showTopPosters==2) {
                        $content .= "<td align=\"center\">";
                        if ($user_avatar=="") {
                                $content .= "&nbsp;&nbsp;<a href=\"profile-.html$user_id\" $staffTitle><img alt='' src=\"modules/Forums/images/avatars/noimage.gif\" border =\"0\" width=\"32\" /></a></td>";
                        }
                        elseif (eregi("http://", $user_avatar)) {
                                $content .= "&nbsp;&nbsp;<a href=\"profile-.html$user_id\" $staffTitle><img alt='' src=\"$user_avatar\" border =\"0\" width=\"32\" /></a></td>";
                        }
                        else $content .= "&nbsp;&nbsp;<a href=\"profile-.html$user_id\" $staffTitle><img alt='' src=\"modules/Forums/images/avatars/$user_avatar\" border =\"0\" width=\"32\" /></a></td>";
                }
                $content .= "<td align=\"center\">&nbsp;<a href=\"profile-.html$user_id\" $staffTitle><b>$username</b></a>&nbsp;<br>&nbsp;<!--a href=\"forums.html?file=search&mode=results&search_author=$username\" $staffTitle-->Posts:<!--/a-->";
                $content .= "&nbsp;<!--a href=\"forums.html?file=search&mode=results&search_author=$username\" $staffTitle-->$user_posts<!--/a-->&nbsp;</td>";
                if (!($cycle%$showTopPostersPerRow)) $content .= "</tr>";
                $cycle++;
        }
        $content .= "</table></div><br />";
}
if ($hideLinksFromGuests&&!(is_admin($admin)||is_user($user))) $content = strip_tags($content,'<br><tr><td><b><img><center><table><div><u>');
$content = $contentXML.$content;

if ($showJumpBoxes) {
                define('IN_PHPBB',TRUE);
                include_once('includes/constants.php');
                define('IN_PHPBB',FALSE);
                $sql = "SELECT c.cat_id, c.cat_title, c.cat_order
                        FROM " . $user_prefix . "_bbcategories c, " . $user_prefix . "_bbforums f
                        WHERE f.cat_id = c.cat_id
                        GROUP BY c.cat_id, c.cat_title, c.cat_order
                        ORDER BY c.cat_order";
                if ( !($result = $db->sql_query($sql)) )
                {
                        $content = bfcGETCATEGORYLISTERROR.bfcMYSQLSAID.mysql_error();
                }

                $category_rows = array();
                while ( $row = $db->sql_fetchrow($result) )
                {
                        $category_rows[] = $row;
                }

                if ( $total_categories = count($category_rows) )
                {
                        $sql = "SELECT *
                                FROM " . $user_prefix . "_bbforums
                                ORDER BY cat_id, forum_order";
                        if ( !($result = $db->sql_query($sql)) )
                        {
                                $content = bfcGETFORUMINFOERROR.bfcMYSQLSAID.mysql_error();
                        }

                        $boxstring = '<select name="' . POST_FORUM_URL . '" onchange="if(this.options[this.selectedIndex].value != -1){ top.location.href=this.options[this.selectedIndex].value }"><optgroup label="' . 'Select Forum' . '" style="color:'.$textcolor2.'"><option value="-1">&nbsp;</option></optgroup>';

                        $forum_rows = array();
                        while ( $row = $db->sql_fetchrow($result) )
                        {
                                $forum_rows[] = $row;
                        }

                        if ( $total_forums = count($forum_rows) )
                        {
                                for($i = 0; $i < $total_categories; $i++)
                                {
                                        $boxstring_forums = '';
                                        for($j = 0; $j < $total_forums; $j++)
                                        {
                                                if ( $forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && $forum_rows[$j]['auth_view'] <= AUTH_REG )

//                                        if ( $forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && $is_auth[$forum_rows[$j]['forum_id']]['auth_view']<= AUTH_REG )
                                        {
                                                        $selected = ( $forum_rows[$j]['forum_id'] == $match_forum_id ) ? 'selected="selected"' : '';
                                                        $boxstring_forums .=  '<option value="forums.html?file=viewforum&f=' . $forum_rows[$j]['forum_id'] . '"' . $selected . '>' . $forum_rows[$j]['forum_name'] . '</option>';
                                                }
                                        }

                                        if ( $boxstring_forums != '' )
                                        {
                                                $boxstring .= '<optgroup label="' . $category_rows[$i]['cat_title'] . '" style="color:'.$textcolor2.'">';
                                                $boxstring .= $boxstring_forums.'</optgroup>';
                                        }
                                }
                        }
                        $boxstring .= '</select>';
                }
                else
                {
                        $boxstring .= '<select name="' . POST_FORUM_URL . '" onchange="if(this.options[this.selectedIndex].value != -1){ top.location.href=this.options[this.selectedIndex].value }"></select>';
                }

                if ( !empty($SID) )
                {
                        $boxstring .= '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />';
                }
}

$links = '<select onchange="if(this.options[this.selectedIndex].value != -1){ top.location.href=this.options[this.selectedIndex].value }"><optgroup style="color:'.$textcolor2.';" label="'.bfcSELECT.'"><option value="-1">&nbsp;</option>';
$links .= "<option value=\"forums.html?file=search&search_id=unanswered\">".bfcVIEWUNANSWEREDPOSTS."</option>";
$links .= "<option value=\"forums.html\">".bfcFORUMINDEX."</option>";
$links .= "<option value=\"forums.html?file=search\">".bfcSEARCHFORUMS."</option>";
if (is_user($user)) {
        $links  .= "<option value=\"forums.html?file=search&search_id=newposts\">".bfcVIEWPOSTSSINCELASTVISIT."</option>";
        $links  .= "<option value=\"forums.html?file=search&search_id=egosearch\">".bfcVIEWYOURPOSTS."</option>";
        $links .= "<option value=\"WatchedTopics\">".bfcWATCHEDTOPICS."</option>";
        $links .= "<option value=\"forums.html?file=profile&mode=editprofile\">".bfcPROFILE."</option>";
        $links .= "<option value=\"modules.php?name=Private_Messages&amp;file=index&amp;folder=inbox\">".bfcPRIVATEMESSAGES."</option>";
}
$links .= "</optgroup></select>";
if ($showJumpBoxes) $content .= <<<_JS_
<center><table align="center" width="100%"><tr><td align="center" ><b>$bfcJumpFunction</b></td><td align="center"><b>$bfcJumpForum</b></td></tr>
                                        <tr><td align="center">$links</td><td align="center">$boxstring</td></tr>
                        </table>
<br />
_JS_;

//$content .= <<<_JS_
//<table><tr><th height="25" align="center" nowrap width="49%"><font color="$textcolor1"><strong><i>[$bfcForum]</i>&nbsp;$bfcTopic</strong></font></th><th width="3%" align="center" nowrap><font color="$textcolor1"><strong>&nbsp;$bfcReplies&nbsp;</strong></font></th><th width="17%" align="center" nowrap><font color="$textcolor1"><strong>&nbsp;$bfcAuthor&nbsp;</strong></font></th><th width="3%" align="center" nowrap><font color="$textcolor1"><strong>&nbsp;$bfcViews&nbsp;</strong></font></th><th align="center" nowrap><font color="$textcolor1"><strong>&nbsp;$bfcLastPost&nbsp;</strong></font></th></tr></table></center>
//_JS_;
CloseTable3();
?>

_________________
"We want to see if life is ubiquitous." D.Goldin 
View user's profile Send private message
StuartB







PostPosted: Sun May 28, 2006 3:22 pm Reply with quote

wow nice 1 fella! I really do apriciate it!
 
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Sun May 28, 2006 3:44 pm Reply with quote

Fella?
Oops!!
 
View user's profile Send private message Send e-mail
StuartB







PostPosted: Sun May 28, 2006 5:37 pm Reply with quote

Sorry guardian did I say something wrong?
 
Guardian2003







PostPosted: Sun May 28, 2006 5:56 pm Reply with quote

No, not at all. I forgot that 'fella' is usually a slang term used in the UK Midlands which is meant as an alternative to 'mate', 'friend', buddy' etc and not neccesarily as an indicator of someones gender.
Wink Smile
 
CodyG







PostPosted: Sun May 28, 2006 6:15 pm Reply with quote

Just don't call me late for lunch. Smile
 
Guardian2003







PostPosted: Sun May 28, 2006 6:44 pm Reply with quote

Me neither, I love my food Wink
 
StuartB







PostPosted: Fri Jun 02, 2006 3:17 pm Reply with quote

sorry you have lost me, fella is a street word for buddy oo and buddy sounds dodgy here! lol sorry if it has offended or it has touched a nerve?
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Raven's Collapsing Forums Block

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©