|
Unofficial modifications nieoficjalne modyfikacje for?w phpBB by Przemo |
|
Modyfikacje mniejsze - Hide/Show All Adverts
warna - Pią 25 Sie, 2006 Temat postu: Hide/Show All Adverts Kod | #################################################################
## Mod Title: Hide/Show All Adverts
## Mod Author: warna (http://zagubieni.pl) <warnaa@gmail.com>
## Mod Version: 0.1
## Mod description: Dodaje przyciski "Ukryj wszystkie", "Poka? wszystkie z boku" i "Poka? wszystkie na dole"
##
## Installation Level: Easy
## Installation Time: 1 Minutes
##
## Files To Edit: 2
## admin/admin_advert.php
## templates/subSilver/admin/admin_advert.tpl
################################################################# |
Niestety minusem tej modyfikacji jest to, ?e "nie pami?ta" gdzie by?y reklamy przed ukryciem i mo?liwe jest tylko pokazanie wszystkich z boku/na dole.
#
#-----[ OPEN ]----------
#
admin/admin_advert.php
#
#-----[ FIND ]----------
#
$sql = "SELECT *
FROM " . ADV_TABLE . "
ORDER by porder";
#
#-----[ BEFORE ADD ]----------
#
if( isset($HTTP_POST_VARS['hideall']) )
{
$sql = "UPDATE " . ADV_TABLE . " SET `position` = '0'";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Error!', '', __LINE__, __FILE__, $sql);
}
$message = Zaktualizowano . "<br /><br />" . sprintf($lang['Click_return_config'], "<a href=\"" . append_sid("admin_advert.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
}
if( isset($HTTP_POST_VARS['showall1']) )
{
$sql = "UPDATE " . ADV_TABLE . " SET `position` = '1'";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Error!', '', __LINE__, __FILE__, $sql);
}
$message = Zaktualizowano . "<br /><br />" . sprintf($lang['Click_return_config'], "<a href=\"" . append_sid("admin_advert.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
}
if( isset($HTTP_POST_VARS['showall12']) )
{
$sql = "UPDATE " . ADV_TABLE . " SET `position` = '2'";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Error!', '', __LINE__, __FILE__, $sql);
}
$message = Zaktualizowano . "<br /><br />" . sprintf($lang['Click_return_config'], "<a href=\"" . append_sid("admin_advert.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
}
#
#-----[ OPEN ]----------
#
templates/styl/admin/admin_advert.tpl
#
#-----[ FIND ]----------
#
<td class="catBottom" align="center" colspan="3"></td>
#
#-----[ REPLACE WITH ]----------
#
<td class="catBottom" align="center" colspan="3">
<form method="post" name="post" action="{S_ACTION}#{list.ID}">
<input type="submit" name="hideall" value="Ukryj wszystkie" class="mainoption" />
<input type="submit" name="showall1" value="Poka? wszystkie na dole" class="mainoption" />
<input type="submit" name="showall2" value="Poka? wszystkie z boku" class="mainoption" />
</form>
</td>
onlinegamez - Pią 25 Sie, 2006
a wog?le jak mog? umie?ci? w stylu FryCan takie reklamy w?a?nie tak jak Wy macie obok ?
kidzior - Pią 25 Sie, 2006
onlinegamez napisał/a | a wog?le jak mog? umie?ci? w stylu FryCan takie reklamy w?a?nie tak jak Wy macie obok ? |
PA > Reklamy i wybierasz z boku.
|
|