Folders Icons
Posted by Matt
|
Folders Icons March 22, 2001 09:32PM |
Hi
I have hacked 3.2.11 so it has folders (animated for busy threads) like UBB.
If any one wants me to post the code please let me know (and where i put it)
[www.brightonlife.com]
Also using pretty much all the emotion icons that come with MSN messenger -> thats using the bult in plug in though -- so no hacking by me there!
Matt
I have hacked 3.2.11 so it has folders (animated for busy threads) like UBB.
If any one wants me to post the code please let me know (and where i put it)
[www.brightonlife.com]
Also using pretty much all the emotion icons that come with MSN messenger -> thats using the bult in plug in though -- so no hacking by me there!
Matt
|
Re: Folders Icons March 22, 2001 10:08PM |
|
Re: Folders Icons March 22, 2001 10:14PM |
|
Re: Folders Icons June 26, 2001 01:13PM |
|
Is this a mysterious Secret??? July 20, 2001 11:53PM |
|
Re: Folders Ikons September 17, 2001 07:22AM |
|
Re: Folders Icons August 10, 2002 07:42AM |
Registered: 24 years ago Posts: 15 |
|
Re: Folders Icons August 10, 2002 07:43AM |
Registered: 24 years ago Posts: 15 |
|
Re: Folders Icons August 24, 2002 10:04AM |
Registered: 24 years ago Posts: 25 |
|
Re: Folders Icons November 02, 2002 11:03AM |
Registered: 24 years ago Posts: 11 |
|
Re: Folders Icons January 14, 2003 03:48PM |
Registered: 24 years ago Posts: 18 |
|
asif
Re: Folders Icons February 18, 2004 10:24AM |
|
Re: Folders Icons March 02, 2004 08:51AM |
|
MattyC
here's the code March 02, 2004 09:26AM |
file: include/threads.php (this is original hack from v3.4.4-dev)
You will need to create the folder images and upload them to phorum/images directory.
hot_red_folder.gif
red_folder.gif
hot_folder.gif
folder.gif
and also set the variable $hot_folder top the hot threshold level (i.e. number of posts before u get a flaming folder ;)
<?php
if ( !defined( "_COMMON_PHP" ) ) return;
settype($read, "boolean");
if (!isset($$phcollapse)) {
$$phcollapse=0;
}
?>
<table class="PhorumListTable" width="<?php echo $ForumTableWidth; ?>" cellspacing="0" cellpadding="0" border="0">
<tr>
<td class="PhorumListHeader" <?php echo bgcolor($ForumTableHeaderColor); ?>><FONT color="<?php echo $ForumTableHeaderFontColor; ?>"> <?php echo $lTopics;?><img src="images/trans.gif" border=0 width=1 height=24 align="absmiddle"></font></td>
<td class="PhorumListHeader" <?php echo bgcolor($ForumTableHeaderColor); ?> nowrap="nowrap"><FONT color="<?php echo $ForumTableHeaderFontColor; ?>"><?php echo $lAuthor;?> </font></td>
<?php if ( empty($read) && $$phcollapse != 0) { ?>
<td class="PhorumListHeader" align="center" <?php echo bgcolor($ForumTableHeaderColor); ?> nowrap="nowrap"><FONT color="<?php echo $ForumTableHeaderFontColor; ?>"><?php echo $lReplies;?> </font></td>
<td class="PhorumListHeader" <?php echo bgcolor($ForumTableHeaderColor); ?> nowrap="nowrap"><FONT color="<?php echo $ForumTableHeaderFontColor; ?>"><?php echo $lLatest;?></font></td>
<?php }else{ ?>
<td nowrap="nowrap" class="PhorumListHeader" <?php echo bgcolor($ForumTableHeaderColor); ?>><FONT color="<?php echo $ForumTableHeaderFontColor; ?>"><?php echo $lDate;?></font></td>
<?php } ?>
</tr>
<?php
$x=0;
$loc=0;
@reset($headers);
$message = @current($headers);
if(empty($read) && !empty($message)){
$trec=$threads[$message["thread"]];
}
while (is_array($message)){
if(($x%2)==0){
$bgcolor=$ForumTableBodyColor1;
$fcolor=$ForumTableBodyFontColor1;
}
else{
$bgcolor=$ForumTableBodyColor2;
$fcolor=$ForumTableBodyFontColor2;
}
$t_id=$message["id"];
$t_thread=$message["thread"];
$t_subject=chop($message["subject"]);
if(!empty($users[$message["userid"]])){
$t_author=$users[$message["userid"]]["username"];
if(isset($moderators[$message["userid"]])){
$t_author="<strong>$t_author</strong>";
}
} else {
$t_author=chop($message["author"]);
}
$t_datestamp = date_format($message["datestamp"]);
if( ($$phcollapse != 0) && (empty($read)) ){
$t_latest=date_format($trec["latest"]);
$t_maxid=$trec["maxid"];
}
$message = next($headers);
if($t_thread!=$t_id){
$img = '<img src="images/l.gif" border=0 width=12 align="top">';
if(is_array($message)){
if($t_thread==$message["thread"]){
$img='<img src="images/t.gif" border=0 width=12 align="top">';
}
}
}
else{
$img="<img src=\"images/trans.gif\" border=0 width=1 height=21 align=\"absmiddle\">";
$loc=0;
}
if($read==true && $id==$t_id){
$t_subject = "<strong>$t_subject</strong>";
$t_author = "<strong>$t_author</strong>";
$t_datestamp = "<strong>$t_datestamp</strong>";
}
else{
$t_subject="<a href=\"$read_page.$ext?f=$num&i=$t_id&t=$t_thread$GetVars\">$t_subject</a>";
}
$color=bgcolor($bgcolor);
echo "<tr style=\"cursor:hand\" onClick=\"document.location='$read_page.$ext?f=$num&i=$t_id&t=$t_thread$GetVars';\" onMouseOver=\"this.bgColor='#FFFFFF';\" onMouseOut=\"this.bgColor='';\">";
// echo ' <td class="PhorumListRow" '.$color.'><FONT color="'.$fcolor.'"> '.$img.' '.$t_subject." </font>";
if($UseCookies){
$isnew=false;
if($$phcollapse != 0 && empty($read)){
// collapsed code
if($use_haveread){
if ($old_message<$t_maxid) {
if(!in_array($t_maxid, $haveread)) {
$isnew=true;
}
}
}
elseif($old_message<$t_maxid){
$isnew=true;
}
} else {
// expanded code
if ($use_haveread) {
if ($old_message<$t_id) {
if(!in_array($t_id, $haveread)) {
$isnew=true;
}
}
} elseif ($old_message<$t_id) {
$isnew=true;
}
}
if($isnew){
if(($trec["tcount"]-1) >= $hot_folder){
$folder_img = "$forum_url/images/hot_red_folder.gif";
}
else{
$folder_img = "$forum_url/images/red_folder.gif";
}
}
else{
if(($trec["tcount"]-1) >= $hot_folder){
$folder_img = "$forum_url/images/hot_folder.gif";
}
else{
$folder_img = "$forum_url/images/folder.gif";
}
}
}
// HERE GOES THE NEW CODE
echo ' <td height="20" '.$color.'>';
echo ' <table border="0" cellspacing="0" cellpadding="0">';
echo ' <tr valign="top">';
echo ' <td><img src="'.$folder_img.'" width="13" height="16" hspace="5"></td>';
echo ' <td>';
echo ' <FONT color="'.$fcolor.'">'.$img.''.$t_subject." </font>";
echo "</td>\n</tr>\n</table>\n</td>\n";
echo ' <td class="PhorumListRow" '.$color.' nowrap="nowrap"><FONT color="'.$fcolor.'">'.$t_author.' </font></td>'."\n";
if( $$phcollapse != 0 && empty($read) ){
$t_count=$trec["tcount"]-1;
if(!empty($message)) $trec=$threads[$message["thread"]];
echo ' <td class="PhorumListRow" align="center" '.$color.' nowrap="nowrap"><FONT color="'.$fcolor.'">'.$t_count." </font></td>\n";
echo ' <td class="PhorumListRow" '.$color.' nowrap="nowrap"><FONT color="'.$fcolor.'">'.$t_latest." </font></td>\n";
}
else{
echo ' <td class="PhorumListRow" '.$color.' nowrap="nowrap"><FONT color="'.$fcolor.'">'.$t_datestamp.' </font></td>'."\n";
}
echo "</tr>\n";
$x++;
$loc++;
} // end while
?>
</table>
You will need to create the folder images and upload them to phorum/images directory.
hot_red_folder.gif
red_folder.gif
hot_folder.gif
folder.gif
and also set the variable $hot_folder top the hot threshold level (i.e. number of posts before u get a flaming folder ;)
<?php
if ( !defined( "_COMMON_PHP" ) ) return;
settype($read, "boolean");
if (!isset($$phcollapse)) {
$$phcollapse=0;
}
?>
<table class="PhorumListTable" width="<?php echo $ForumTableWidth; ?>" cellspacing="0" cellpadding="0" border="0">
<tr>
<td class="PhorumListHeader" <?php echo bgcolor($ForumTableHeaderColor); ?>><FONT color="<?php echo $ForumTableHeaderFontColor; ?>"> <?php echo $lTopics;?><img src="images/trans.gif" border=0 width=1 height=24 align="absmiddle"></font></td>
<td class="PhorumListHeader" <?php echo bgcolor($ForumTableHeaderColor); ?> nowrap="nowrap"><FONT color="<?php echo $ForumTableHeaderFontColor; ?>"><?php echo $lAuthor;?> </font></td>
<?php if ( empty($read) && $$phcollapse != 0) { ?>
<td class="PhorumListHeader" align="center" <?php echo bgcolor($ForumTableHeaderColor); ?> nowrap="nowrap"><FONT color="<?php echo $ForumTableHeaderFontColor; ?>"><?php echo $lReplies;?> </font></td>
<td class="PhorumListHeader" <?php echo bgcolor($ForumTableHeaderColor); ?> nowrap="nowrap"><FONT color="<?php echo $ForumTableHeaderFontColor; ?>"><?php echo $lLatest;?></font></td>
<?php }else{ ?>
<td nowrap="nowrap" class="PhorumListHeader" <?php echo bgcolor($ForumTableHeaderColor); ?>><FONT color="<?php echo $ForumTableHeaderFontColor; ?>"><?php echo $lDate;?></font></td>
<?php } ?>
</tr>
<?php
$x=0;
$loc=0;
@reset($headers);
$message = @current($headers);
if(empty($read) && !empty($message)){
$trec=$threads[$message["thread"]];
}
while (is_array($message)){
if(($x%2)==0){
$bgcolor=$ForumTableBodyColor1;
$fcolor=$ForumTableBodyFontColor1;
}
else{
$bgcolor=$ForumTableBodyColor2;
$fcolor=$ForumTableBodyFontColor2;
}
$t_id=$message["id"];
$t_thread=$message["thread"];
$t_subject=chop($message["subject"]);
if(!empty($users[$message["userid"]])){
$t_author=$users[$message["userid"]]["username"];
if(isset($moderators[$message["userid"]])){
$t_author="<strong>$t_author</strong>";
}
} else {
$t_author=chop($message["author"]);
}
$t_datestamp = date_format($message["datestamp"]);
if( ($$phcollapse != 0) && (empty($read)) ){
$t_latest=date_format($trec["latest"]);
$t_maxid=$trec["maxid"];
}
$message = next($headers);
if($t_thread!=$t_id){
$img = '<img src="images/l.gif" border=0 width=12 align="top">';
if(is_array($message)){
if($t_thread==$message["thread"]){
$img='<img src="images/t.gif" border=0 width=12 align="top">';
}
}
}
else{
$img="<img src=\"images/trans.gif\" border=0 width=1 height=21 align=\"absmiddle\">";
$loc=0;
}
if($read==true && $id==$t_id){
$t_subject = "<strong>$t_subject</strong>";
$t_author = "<strong>$t_author</strong>";
$t_datestamp = "<strong>$t_datestamp</strong>";
}
else{
$t_subject="<a href=\"$read_page.$ext?f=$num&i=$t_id&t=$t_thread$GetVars\">$t_subject</a>";
}
$color=bgcolor($bgcolor);
echo "<tr style=\"cursor:hand\" onClick=\"document.location='$read_page.$ext?f=$num&i=$t_id&t=$t_thread$GetVars';\" onMouseOver=\"this.bgColor='#FFFFFF';\" onMouseOut=\"this.bgColor='';\">";
// echo ' <td class="PhorumListRow" '.$color.'><FONT color="'.$fcolor.'"> '.$img.' '.$t_subject." </font>";
if($UseCookies){
$isnew=false;
if($$phcollapse != 0 && empty($read)){
// collapsed code
if($use_haveread){
if ($old_message<$t_maxid) {
if(!in_array($t_maxid, $haveread)) {
$isnew=true;
}
}
}
elseif($old_message<$t_maxid){
$isnew=true;
}
} else {
// expanded code
if ($use_haveread) {
if ($old_message<$t_id) {
if(!in_array($t_id, $haveread)) {
$isnew=true;
}
}
} elseif ($old_message<$t_id) {
$isnew=true;
}
}
if($isnew){
if(($trec["tcount"]-1) >= $hot_folder){
$folder_img = "$forum_url/images/hot_red_folder.gif";
}
else{
$folder_img = "$forum_url/images/red_folder.gif";
}
}
else{
if(($trec["tcount"]-1) >= $hot_folder){
$folder_img = "$forum_url/images/hot_folder.gif";
}
else{
$folder_img = "$forum_url/images/folder.gif";
}
}
}
// HERE GOES THE NEW CODE
echo ' <td height="20" '.$color.'>';
echo ' <table border="0" cellspacing="0" cellpadding="0">';
echo ' <tr valign="top">';
echo ' <td><img src="'.$folder_img.'" width="13" height="16" hspace="5"></td>';
echo ' <td>';
echo ' <FONT color="'.$fcolor.'">'.$img.''.$t_subject." </font>";
echo "</td>\n</tr>\n</table>\n</td>\n";
echo ' <td class="PhorumListRow" '.$color.' nowrap="nowrap"><FONT color="'.$fcolor.'">'.$t_author.' </font></td>'."\n";
if( $$phcollapse != 0 && empty($read) ){
$t_count=$trec["tcount"]-1;
if(!empty($message)) $trec=$threads[$message["thread"]];
echo ' <td class="PhorumListRow" align="center" '.$color.' nowrap="nowrap"><FONT color="'.$fcolor.'">'.$t_count." </font></td>\n";
echo ' <td class="PhorumListRow" '.$color.' nowrap="nowrap"><FONT color="'.$fcolor.'">'.$t_latest." </font></td>\n";
}
else{
echo ' <td class="PhorumListRow" '.$color.' nowrap="nowrap"><FONT color="'.$fcolor.'">'.$t_datestamp.' </font></td>'."\n";
}
echo "</tr>\n";
$x++;
$loc++;
} // end while
?>
</table>
|
MattyC
here's the code March 02, 2004 09:29AM |
Sorry, only registered users may post in this forum.