Един мод помогнете

Marik

Registered
Значи този мод добавя уж стрелки за ASC и DESC сортиране на Topic , Views точно дето са таблиците в форума с тея имена .

Проблема е че в този мод са описани някакви работи , които не ги намирам и ако някой по разбира се ще съм му много благодарен ако го преработи мода , за да го сложа.

Код:
## Description:            This hack creates a better head row of forum tables in viewforum.php.
##                         With a click on a square of this raw the topics will be sorted according to
##			   the chosen criterion. With a repeated click the sorting will be reversed.
##                         The current status of the sorting is shown with an arrow down or up next to
##			   the headlines of the chosen column.
##                         Furthermore youґre able to fix a standard sorting for every forum, which will
##                         be shown while entering this.
##                         The standard sorting (if you donґt fix anything) is of course the
##                         sorting according to the date of the last posting.
## Grade of difficulty
## of installation:        easy
## Time of installation:   around 10 minutes
## Altered files:          viewforum.php
## Additional files:       sort_up.gif, sort_down.gif
########################################################
##
## Contact:                Hotschi
## E- mail:                the.dark.elf@web.de
## ICQ-UIN:                125472412
##
########################################################
##
## This tutorial is not yet tested.
## So please contact me for resonance.
##
########################################################



# Find in viewforum.php
#########################

<TABLE BORDER="0" CELLPADDING="1" CELLSPACING="0" ALIGN="CENTER" VALIGN="TOP" WIDTH="<?php echo $tablewidth?>"><TR><TD  BGCOLOR="<?php echo $table_bgcolor?>">
<TABLE BORDER="0" CELLPADDING="1" CELLSPACING="1" WIDTH="100%">
<TR BGCOLOR="<?php echo $color1?>" ALIGN="LEFT">
	<TD WIDTH=2%> </TD>

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



# Below add:
########################

<?php
if ($forum=="3")
{
if ($sortby=="") $sortby="topic";
}
else
{
if ($sortby=="") $sortby="date";
}
?>

########################
# In this example the standard for the forum with the id 3 is fixed.
# You can find out the id of each forum with looking at the link to this
# in your index ;-)



# If you donґt want to alter the standards then use only this code:
########################

<?php
{
if ($sortby=="") $sortby="date";
}
?>

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



# If you want to alter the standards of various forums then repeat
# the following lines with the corresponding changes.
########################

if ($forum=="3")
{
if ($sortby=="") $sortby="topic";
}

########################
# You can allocate sortby the following values:
#
# value		column		sequence
# 
# date		Date		decreasing
# date_x	Date		increasing
# views		Views		decreasing
# views_x	Views		increasing
# poster	Poster		increasing
# poster_x	Poster		decreasing
# topic		Title		increasing
# topic_x	Title		decreasing



# Find in viewforum.php
#########################

	<TD><font face="<?php echo $FontFace?>" size="<?php echo $FontSize1?>"><B> <?php echo $l_topic?></B></font></TD>
	<TD WIDTH=9% ALIGN="CENTER"><font face="<?php echo $FontFace?>" size="<?php echo $FontSize1?>"><B><?php echo $l_replies?></B></font></TD>
	<TD WIDTH=20% ALIGN="CENTER"><font face="<?php echo $FontFace?>" size="<?php echo $FontSize1?>"><B> <?php echo $l_poster?></B></font></TD>
	<TD WIDTH=8% ALIGN="CENTER"><font face="<?php echo $FontFace?>" size="<?php echo $FontSize1?>"><B><?php echo $l_views?></B></font></TD>
	<TD WIDTH=15% ALIGN="CENTER"><font face="<?php echo $FontFace?>" size="<?php echo $FontSize1?>"><B><?php echo $l_date?></B></font></TD>	

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



# Replace with:
########################

	<TD><font face="<?php echo $FontFace?>" size="2"><B>
        <?php if ($sortby=="topic") { ?> <a href="viewforum.php?forum=<?php echo $forum ?>&sortby=topic_x"><?php echo $l_topic?></B></font></a> <img src="images/sort_up.gif"><?php }
        else { ?> <a href="viewforum.php?forum=<?php echo $forum ?>&sortby=topic"><?php echo $l_topic?></B></font></a><?php } ?>
        <? if ($sortby=="topic_x") { ?> <img src="images/sort_down.gif"><?php } ?>

	<TD WIDTH=15% ALIGN="CENTER"><font face="<?php echo $FontFace?>" size="2"><B>
        <?php if ($sortby=="replies") { ?> <a href="viewforum.php?forum=<?php echo $forum ?>&sortby=replies_x"><?php echo $l_replies?></B></font></a> <img src="images/sort_down.gif"><?php }
        else { ?> <a href="viewforum.php?forum=<?php echo $forum ?>&sortby=replies"><?php echo $l_replies?></B></font></a><?php } ?>
        <? if ($sortby=="replies_x") { ?> <img src="images/sort_up.gif"><?php } ?>

	<TD WIDTH=20% ALIGN="CENTER"><font face="<?php echo $FontFace?>" size="2"><B>
        <?php if ($sortby=="poster") { ?> <a href="viewforum.php?forum=<?php echo $forum ?>&sortby=poster_x"><?php echo $l_poster?></B></font></a> <img src="images/sort_up.gif"><?php }
        else { ?> <a href="viewforum.php?forum=<?php echo $forum ?>&sortby=poster"><?php echo $l_poster?></B></font></a><?php } ?>
        <? if ($sortby=="poster_x") { ?> <img src="images/sort_down.gif"><?php } ?>


	<TD WIDTH=8% ALIGN="CENTER"><font face="<?php echo $FontFace?>" size="2"><B>
        <?php if ($sortby=="views") { ?> <a href="viewforum.php?forum=<?php echo $forum ?>&sortby=views_x"><?php echo $l_views?></B></font></a> <img src="images/sort_down.gif"><?php }
        else { ?> <a href="viewforum.php?forum=<?php echo $forum ?>&sortby=views"><?php echo $l_views?></B></font></a><?php } ?>
        <? if ($sortby=="views_x") { ?> <img src="images/sort_up.gif"><?php } ?>

	<TD WIDTH=15% ALIGN="CENTER"><font face="<?php echo $FontFace?>" size="2"><B>
        <?php if ($sortby=="date") { ?> <a href="viewforum.php?forum=<?php echo $forum ?>&sortby=date_x"><?php echo $l_date?></B></font></a> <img src="images/sort_down.gif"><?php }
        else { ?> <a href="viewforum.php?forum=<?php echo $forum ?>&sortby=date"><?php echo $l_date?></B></font></a><?php } ?>
        <? if ($sortby=="date_x") { ?> <img src="images/sort_up.gif"><?php } ?>

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


# Find in viewforum.php:
########################

</TR>
<?php
if(!$start) $start = 0;
 
########################



# Below add:
########################

if ($sortby=="date") $sortby="topic_time DESC";
if ($sortby=="date_x") $sortby="topic_time ASC";
if ($sortby=="views") $sortby="topic_views DESC";
if ($sortby=="views_x") $sortby="topic_views ASC";
if ($sortby=="poster") $sortby="username ASC";
if ($sortby=="poster_x") $sortby="username DESC";
if ($sortby=="replies") $sortby="topic_replies DESC";
if ($sortby=="replies_x") $sortby="topic_replies ASC";
if ($sortby=="topic") $sortby="topic_title ASC";
if ($sortby=="topic_x") $sortby="topic_title DESC";
 
########################



# Find in viewforum.php:
########################

        ORDER BY topic_time DESC LIMIT $start, $topics_per_page";
 
########################



# Replace with:
########################

        ORDER BY $sortby LIMIT $start, $topics_per_page";

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

Back
Горе