[FINAL] Album - AddOn --> CONTEST MOD <--
Ich habe ihn immer noch nicht eingebaut (hab erst seit ein paar Tagen den Album CH bzw. das Full Pack drin). :rolleyes:
[center].: Web Relax .::. Essen mit Freude .::. AmigaLink.de :.
______________________________________
Kein Support per PM, ICQ oder eMail!!![/center]
______________________________________
Kein Support per PM, ICQ oder eMail!!![/center]
- Bootenks
- Beiträge: 1836
- Registriert: Sa 29.Mai, 2004 23:36
- Wohnort: G?rlitz (?stlichste Stadt Deutschlands)
So habe noch ein paar Fehlerchen in der Pro beseitigt und hier ist der Fix.
Notwendig sind alldings auch einge Dateien vom ersten Post dieses Treads.
Fehler die behoben wurden:
* Auswahlmenü der Kategorien des Albums in der posting.php verbessert
* Kontest wurde nicht korrekt entfernt wenn man den Tread gelöscht hatte
Der Mod funktioniert auch einwandfrei mit dem phpBB 2.0.17 ;-)
Notwendig sind alldings auch einge Dateien vom ersten Post dieses Treads.
Code: Alles auswählen
# UPLOAD: language/lang_german/lang_contest.php
# language/lang_english/lang_contest.php
# templates/subSilver/contest_menu_body.tpl
#
#
#-----[ OPEN ]------------------------------------------------
#
posting.php
#
#-----[ FIND ]------------------------------------------------
#
delete_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id);
#
#-----[ IN-LINE FIND ]------------------------------------------------
#
);
#
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------
#
, $cont_album_id
#
#-----[ FIND ]------------------------------------------------
#
$sql = "SELECT cat_id, cat_title
FROM ". ALBUM_CAT_TABLE ."";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query category information', '', __LINE__, __FILE__, $sql);
}
$ci = 0;
while( $row = $db->sql_fetchrow($result) )
{
if ( ( $row['cat_user_id'] == 0 ) || ( $row['cat_parent'] != 0 ) )
{
$cat_id[$ci] = $row['cat_id'];
$cat_title[$ci] = '-' . $row['cat_title'];
$ci++;
}
}
$db->sql_freeresult($result);
#
#-----[ REPLACE WITH ]------------------------------------------------
#
$sql = "SELECT cat_id, cat_title, cat_parent, cat_user_id
FROM ". ALBUM_CAT_TABLE ."";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query category information', '', __LINE__, __FILE__, $sql);
}
$ci = 0;
while( $row = $db->sql_fetchrow($result) )
{
if ( ( $row['cat_user_id'] == 0 ) || ( $row['cat_parent'] != 0 ) )
{
$cat_id[$ci] = $row['cat_id'];
$cat_title[$ci] = '-' . $row['cat_title'];
$cat_parent[$ci] = $row['cat_parent'];
$ci++;
}
}
$db->sql_freeresult($result);
#
#-----[ FIND ]------------------------------------------------
#
if ($cat_sort[$i][2] == 0)
#
#-----[ REPLACE WITH ]------------------------------------------------
#
if ( ( $cat_sort[$i][2] == 0 ) && isset($cat_sort[$i][2]) )
#
#-----[ FIND ]------------------------------------------------
#
$select_album_cat .= '<option value="' . $cont_album_id . '">' . ( ($cont_album_id != 0) ? ' --> ' . $co_title . ' <--' : $lang['cont_category'] );
#
#-----[ REPLACE WITH ]------------------------------------------------
#
$select_album_cat .= '<option value="' . $cont_album_id . '">' . ( ($cont_album_id != 0) ? ' --> ' . $co_title . ' <--' : $lang['cont_categories'] );
#
#-----[ OPEN ] --------------------------------------------------------
#
includes/functions_post.php
#
#-----[ FIND ]------------------------------------------------
#
function delete_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id)
#
#-----[ IN-LINE FIND ]------------------------------------------------
#
)
#
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------
#
, &$cont_album_id
#
#-----[ FIND ]------------------------------------------------
#
$forum_update_sql .= ', forum_topics = forum_topics - 1';
$sql = "DELETE FROM " . TOPICS_TABLE . "
WHERE topic_id = $topic_id
OR topic_moved_id = $topic_id";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
}
#
#-----[ BEFORE, ADD ]------------------------------------------------
#
if ( $post_data['has_cont'] )
{
$sql = "DELETE FROM " . ALBUM_CONTEST_TABLE . "
WHERE topic_id = $topic_id";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in deleting contest', '', __LINE__, __FILE__, $sql);
}
$sql = "UPDATE " . ALBUM_TABLE . " SET pic_cont_act = 0
WHERE pic_cat_id = $cont_album_id";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in update cont_activation', '', __LINE__, __FILE__, $sql);
}
}
#
#-----[ FIND ]------------------------------------------------
#
$sql = "UPDATE " . ALBUM_CONTEST_HIST_TABLE . "
SET cont_deleted = 1
WHERE contest_id = $contest_id_mark";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in deleting poll', '', __LINE__, __FILE__, $sql);
}
#
#-----[ REPLACE WITH ]------------------------------------------------
#
if ( isset ($contest_id_mark) )
{
$sql = "UPDATE " . ALBUM_CONTEST_HIST_TABLE . "
SET cont_deleted = 1
WHERE contest_id = $contest_id_mark";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in deleting poll', '', __LINE__, __FILE__, $sql);
}
}
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM* Auswahlmenü der Kategorien des Albums in der posting.php verbessert
* Kontest wurde nicht korrekt entfernt wenn man den Tread gelöscht hatte
Der Mod funktioniert auch einwandfrei mit dem phpBB 2.0.17 ;-)
Nur ein Informatik Student. ^^
- Bootenks
- Beiträge: 1836
- Registriert: Sa 29.Mai, 2004 23:36
- Wohnort: G?rlitz (?stlichste Stadt Deutschlands)
[center]Album Contest Mod PRO 1.0.3 IS RELEASED[/center]
Code: Alles auswählen
UPDATE 1.0.2 TO 1.0.3
Upload the following files
album_cont_act.php
templates/subSilver/contest_menu_body.tpl
That's all. ;)
Zuletzt geändert von Bootenks am Fr 12.Aug, 2005 01:14, insgesamt 1-mal geändert.
Nur ein Informatik Student. ^^
- Bootenks
- Beiträge: 1836
- Registriert: Sa 29.Mai, 2004 23:36
- Wohnort: G?rlitz (?stlichste Stadt Deutschlands)
[center]Album Contest Mod LITE 1.0.2 IS RELEASED[/center]
Code: Alles auswählen
#############################################
# UPDATE ALBUM CONTEST LITE 1.0.1 TO 1.0.2
#############################################
#
# Upload this files
#
# album_cont_act.php
# templates/subSilver/contest_menu_body.tpl
#
#############################################
#
#-----[ OPEN ]------------------------------------------------
#
posting.php
#
#-----[ FIND ]------------------------------------------------
#
delete_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id);
#
#-----[ IN-LINE FIND ]------------------------------------------------
#
);
#
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------
#
, $cont_album_id
#
#-----[ OPEN ] --------------------------------------------------------
#
includes/functions_post.php
#
#-----[ FIND ]------------------------------------------------
#
function delete_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id)
#
#-----[ IN-LINE FIND ]------------------------------------------------
#
)
#
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------
#
, &$cont_album_id
#
#-----[ FIND ]------------------------------------------------
#
$forum_update_sql .= ', forum_topics = forum_topics - 1';
$sql = "DELETE FROM " . TOPICS_TABLE . "
WHERE topic_id = $topic_id
OR topic_moved_id = $topic_id";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
}
#
#-----[ BEFORE, ADD ]------------------------------------------------
#
if ( $post_data['has_cont'] )
{
$sql = "DELETE FROM " . ALBUM_CONTEST_TABLE . "
WHERE topic_id = $topic_id";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in deleting contest', '', __LINE__, __FILE__, $sql);
}
$sql = "UPDATE " . ALBUM_TABLE . " SET pic_cont_act = 0
WHERE pic_cat_id = $cont_album_id";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in update cont_activation', '', __LINE__, __FILE__, $sql);
}
}
#
#-----[ FIND ]------------------------------------------------
#
$sql = "UPDATE " . ALBUM_CONTEST_HIST_TABLE . "
SET cont_deleted = 1
WHERE contest_id = $contest_id_mark";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in deleting poll', '', __LINE__, __FILE__, $sql);
}
#
#-----[ REPLACE WITH ]------------------------------------------------
#
if ( isset ($contest_id_mark) )
{
$sql = "UPDATE " . ALBUM_CONTEST_HIST_TABLE . "
SET cont_deleted = 1
WHERE contest_id = $contest_id_mark";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in deleting poll', '', __LINE__, __FILE__, $sql);
}
}
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoMNur ein Informatik Student. ^^
Bekomme leider immer noch diese Meldung:
Gruss Jörg
Code: Alles auswählen
Warning: Missing argument 16 for prepare_post() in /storearea1/home/joerg_gierth/public_html/phpBB2/includes/functions_post.php on line 453
Warning: Missing argument 17 for prepare_post() in /storearea1/home/joerg_gierth/public_html/phpBB2/includes/functions_post.php on line 453
Warning: Missing argument 18 for prepare_post() in /storearea1/home/joerg_gierth/public_html/phpBB2/includes/functions_post.php on line 453
Warning: Missing argument 19 for prepare_post() in /storearea1/home/joerg_gierth/public_html/phpBB2/includes/functions_post.php on line 453
Warning: Missing argument 20 for prepare_post() in /storearea1/home/joerg_gierth/public_html/phpBB2/includes/functions_post.php on line 453
Warning: Missing argument 21 for prepare_post() in /storearea1/home/joerg_gierth/public_html/phpBB2/includes/functions_post.php on line 453
Warning: Missing argument 22 for prepare_post() in /storearea1/home/joerg_gierth/public_html/phpBB2/includes/functions_post.php on line 453
Warning: Missing argument 23 for prepare_post() in /storearea1/home/joerg_gierth/public_html/phpBB2/includes/functions_post.php on line 453
Warning: Missing argument 26 for submit_post() in /storearea1/home/joerg_gierth/public_html/phpBB2/includes/functions_post.php on line 585
Warning: Missing argument 27 for submit_post() in /storearea1/home/joerg_gierth/public_html/phpBB2/includes/functions_post.php on line 585
Warning: Missing argument 28 for submit_post() in /storearea1/home/joerg_gierth/public_html/phpBB2/includes/functions_post.php on line 585
Warning: Missing argument 29 for submit_post() in /storearea1/home/joerg_gierth/public_html/phpBB2/includes/functions_post.php on line 585
Warning: Missing argument 30 for submit_post() in /storearea1/home/joerg_gierth/public_html/phpBB2/includes/functions_post.php on line 585
Warning: Missing argument 31 for submit_post() in /storearea1/home/joerg_gierth/public_html/phpBB2/includes/functions_post.php on line 585
Warning: Missing argument 32 for submit_post() in /storearea1/home/joerg_gierth/public_html/phpBB2/includes/functions_post.php on line 585
Warning: Missing argument 33 for submit_post() in /storearea1/home/joerg_gierth/public_html/phpBB2/includes/functions_post.php on line 585
Warning: Missing argument 34 for submit_post() in /storearea1/home/joerg_gierth/public_html/phpBB2/includes/functions_post.php on line 585Um den Contest Mod ( Pro Version ) zu testen, habe ich im Album extra eine Kategorie ( Nur für MODs und Admins ) angelegt. Bei Auswahl der Kategorie steht diese leider nicht mehr zur Verfügung. Ursprünglich hat dies aber mal funtioniert, da ich vor den Updates schon mal einen Test gemacht habe.
Woran liegt das?
lg vossi
Woran liegt das?
lg vossi
- Bootenks
- Beiträge: 1836
- Registriert: Sa 29.Mai, 2004 23:36
- Wohnort: G?rlitz (?stlichste Stadt Deutschlands)
ja diesen Bug musste ich in der neusten fixen... um es zu ändern musst du in phpMyAdmin noch manuel den Contest in der ADtenbank löschen... ansonsten blockiert der alles... ~.~
Zuletzt geändert von Bootenks am Sa 13.Aug, 2005 14:32, insgesamt 1-mal geändert.
Nur ein Informatik Student. ^^
ja ist wirklich komisch, da ich ja in dieser Kategorie ( vor den Updates ) schonmal einen Kontest gemacht habe. Diesen habe ich aber heute wieder gelöscht. Ist aber wie gesagt nicht die einzigste Kategorie, die nicht angezeigt wird. In der anderen wurde noch kein Kontest gestartet. Sind übrigens die letzten beiden Kategorien, die ich angelegt habe.
Zuletzt geändert von vossibaer am Sa 13.Aug, 2005 22:53, insgesamt 1-mal geändert.
- Bootenks
- Beiträge: 1836
- Registriert: Sa 29.Mai, 2004 23:36
- Wohnort: G?rlitz (?stlichste Stadt Deutschlands)
Nachdem mir vossibaer sein Problem mit der Anzeige im Pulldown der Pro Version geschildert hatte, habe ich mich gleich dran gesetzt und geschaut ob es ein spezifisches oder allgemeines Problem war. ^^ Und Resultat war: Es ist ein Aallgemeines. Aus diesem Grunde veröffentlich ich nun hier die 1.0.4 Pro Version meines Album Contest Mods. Bevor ich allerdings die Version endgültig festsetze bitte ich euch hier nochmals die neue Version zu testen. Es ist möglich das ich beim Fixen irgendwelche veränderten Stellen nicht in die Update.txt aufgenommen habe... ~.~ Also gebt mir bescheid. ^^ Danke.
Code: Alles auswählen
#
# Update: 1.0.3 -> 1.0.4 (Album Contest Pro)
#
# UPLOAD: language/lang_german/lang_contest.php
# album_mod/album_contest.php
# templates/subSilver/contest_menu_body.tpl
#
#-----[ SQL ]------------------------------------------
#
ALTER TABLE phpbb_album_cat ADD cat_cont_act tinyint (1) UNSIGNED NOT NULL default '0';
#
#-----[ OPEN ]------------------------------------------------
#
album_cat.php
#
#-----[ FIND ]------------------------------------------------
# (2 times) this is the first presence
case 'comments':
$sort_method = 'comments';
break;
case 'new_comment':
$sort_method = 'new_comment';
break;
#
#-----[ AFTER, ADD ]------------------------------------------
#
case 'pic_cont_act':
$sort_method = 'pic_cont_act';
break;
#
#-----[ FIND ]------------------------------------------------
# (2 times) this is the second presence
case 'comments':
$sort_method = 'comments';
break;
case 'new_comment':
$sort_method = 'new_comment';
break;
#
#-----[ AFTER, ADD ]------------------------------------------
#
case 'pic_cont_act':
$sort_method = 'pic_cont_act';
break;
#
#-----[ FIND & DELETE ]---------------------------------------
#
if( $album_config['rate'] == 1 )
{
$sort_rating_option = '<option value="rating" ';
$sort_rating_option .= ($sort_method == 'rating') ? 'selected="selected"' : '';
$sort_rating_option .= '>' . $lang['Rating'] .'</option>';
}
#
#-----[ FIND ]------------------------------------------------
#
// ------------------------------------
// Set Language File
// ------------------------------------
$userlang = ( $userdata['user_lang'] ) ? $userdata['user_lang'] : $board_config['default_lang'];
include($phpbb_root_path . 'language/lang_' . $userlang . '/lang_contest.' . $phpEx );
#
#-----[ AFTER, ADD ]------------------------------------------
#
if( $album_config['rate'] == 1 && !isset($contest_album_id) )
{
$sort_rating_option = '<option value="rating" ';
$sort_rating_option .= ($sort_method == 'rating') ? 'selected="selected"' : '';
$sort_rating_option .= '>' . $lang['Rating'] .'</option>';
}
if( $contest_album_id )
{
$sort_contest_option = '<option value="pic_cont_act" ';
$sort_contest_option .= ($sort_method == 'pic_cont_act') ? 'selected="selected"' : '';
$sort_contest_option .= '>' . $lang['cont_contest'] .'</option>';
}
#
#-----[ FIND ]------------------------------------------------
#
'S_ALBUM_ACTION' => append_sid(album_append_uid("album_cat.$phpEx?cat_id=$cat_id")),
#
#-----[ REPLACE WITH ]------------------------------------------
#
'S_ALBUM_ACTION' => append_sid(album_append_uid("album_cat.$phpEx?start=$start&cat_id=$cat_id")),
#
#-----[ FIND ]------------------------------------------------
#
'SORT_NEW_COMMENT_OPTION' => $sort_new_comment_option,
'SORT_USERNAME_OPTION' => $sort_username_option,
#
#-----[ AFTER, ADD ]------------------------------------------
#
'SORT_CONTEST_OPTION' => $sort_contest_option,
#
#-----[ OPEN ]------------------------------------------------
#
posting.php
#
#-----[ FIND ]------------------------------------------------
#
define('IN_PHPBB', true);
#
#-----[ AFTER, ADD ]------------------------------------------
#
define('IN_POSTING', true);
#
#-----[ FIND ]------------------------------------------------
#
$phpbb_root_path = './';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$album_root_path = $phpbb_root_path . 'album_mod/';
#
#-----[ FIND ]------------------------------------------------
#
$template->assign_vars(array(
'TOPIC_TITLE' => $preview_subject,
'POST_SUBJECT' => $preview_subject,
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
if ( $cont_title ) $cont_0 = 1;
#
#-----[ FIND ]------------------------------------------------
#
//
// BEGIN CONTEST
//
if ( (!empty ($is_auth['auth_contest'])) && ($post_info['topic_first_post_id'] == $post_id ) )
{
// ------------------------------------
// Set Language File (Contest)
// ------------------------------------
$userlang = ( $userdata['user_lang'] ) ? $userdata['user_lang'] : $board_config['default_lang'];
include($phpbb_root_path . 'language/lang_' . $userlang . '/lang_contest.' . $phpEx );
if ($mode == 'editpost' && $post_data['has_cont'])
{
if (!empty ($is_auth['auth_cont_edit']) )
{
$cont_0 = 1;
}
if (!empty ($is_auth['auth_cont_delete']) )
{
$cont_del_check = ( $cont_delete == 1 ) ? 'checked="checked"' : '';
$input_c_delete = '<input type="checkbox" name="cont_delete" ' . $cont_del_check . '> <span class="gen">' . $lang['cont_delete_desc'] . '</span>';
}
}
else
$cont_0 = (isset ($cont_0) ? $cont_0 : $HTTP_POST_VARS['con_0']);
$sql = "SELECT contest_album_id, cont_app, cont_date, cont_post_time
FROM " . ALBUM_CONTEST_TABLE . "";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query category information', '', __LINE__, __FILE__, $sql);
}
$ci = 0;
while( $row = $db->sql_fetchrow($result) )
{
$cont_album_ids[$ci] = $row['contest_album_id'];
$cont_finish_time[$ci] = $row['cont_app'] + $row['cont_date'] + $row['cont_post_time'];
$ci++;
}
$db->sql_freeresult($result);
$sql = "SELECT cat_id, cat_title, cat_parent, cat_user_id
FROM ". ALBUM_CAT_TABLE ."";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query category information', '', __LINE__, __FILE__, $sql);
}
$ci = 0;
while( $row = $db->sql_fetchrow($result) )
{
if ( ( $row['cat_user_id'] == 0 ) || ( $row['cat_parent'] != 0 ) )
{
$cat_id[$ci] = $row['cat_id'];
$cat_title[$ci] = '-' . $row['cat_title'];
$cat_parent[$ci] = $row['cat_parent'];
$ci++;
}
}
$db->sql_freeresult($result);
$x = 0;
for($i=0; $i < $ci; $i++)
{
if ($cont_album_id == $cat_id[$i])
{
$co_title = $cat_title[$i];
}
for($j=0; $j < $ci; $j++)
{
if ( $cat_parent[$i] == 0 )
{
if (!isset($cat_sort[$x][0]))
{
$cat_sort[$x][0] = $cat_id[$i];
$cat_sort[$x][1] = '| ' . $cat_title[$i];
$cat_sort[$x][2] = $cat_parent[$i];
$s = $x;
}
if ( $cat_sort[$s][0] == $cat_parent[$j] )
{
$x += 1;
$cat_sort[$x][0] = $cat_id[$j];
$cat_sort[$x][1] = '|-- ' . $cat_title[$j];
$cat_sort[$x][2] = $cat_parent[$j];
}
}
if ( ($cat_sort[$i][0] == $cont_album_ids[$j]) && ($cont_finish_time[$j] >= time()) )
{
$cat_sort[$i][0] = '';
$cat_sort[$i][1] = '';
}
}
$x += 1;
}
$select_album_cat = '<select name="cont_album_id">';
$select_album_cat .= '<option value="' . $cont_album_id . '">' . ( ($cont_album_id != 0) ? ' --> ' . $co_title . ' <--' : $lang['cont_categories'] );
for($i=0; $i < $ci; $i++)
{
if ( ( $cat_sort[$i][2] == 0 ) && isset($cat_sort[$i][2]) )
$select_album_cat .= '<option value="0">----------------------------';
if (($cont_album_id != $cat_sort[$i][0]) && ($cat_sort[$i][0] != '' ))
$select_album_cat .= '<option value="' . $cat_sort[$i][0] . '">' . $cat_sort[$i][1];
}
$select_album_cat .= '</select>';
$template->assign_vars(array(
'CONTEST_TITLE' => $cont_title,
'L_CONT_SUBJECT' => $lang['cont_title'],
'L_CONT_DESC' => $lang['cont_desc'],
'L_CONT_NUMBER' => $lang['cont_number'],
'L_CONT_ALBUM_ID' => $lang['cont_album_id'],
'L_CONT_APP' => $lang['cont_app'],
'L_CONT_DATE' => $lang['cont_date'],
'L_CONT_DAYS' => $lang['Days'],
'L_CONT_HOURS' => $lang['Hours'],
'L_CONT_MINUTES' => $lang['Minutes'],
'L_CONT_PIC_DB' => $lang['cont_pic_db'],
'L_CONT_ACTIVATION' => $lang['cont_activation_desc'],
'L_YES' => $lang['Yes'],
'L_NO' => $lang['No'],
'C_TITLE' => $cont_title,
'C_DESC' => $cont_desc,
'C_NUMBER' => $cont_number,
'C_ALBUM_ID' => $select_album_cat,
'C_DATE_MIN' => $contest_date_min,
'C_DATE_HOU' => $contest_date_hou,
'C_DATE_DAY' => $contest_date_day,
'C_APP_MIN' => $cont_app_min,
'C_APP_HOU' => $cont_app_hou,
'C_APP_DAY' => $cont_app_day,
'C_PIC_DB_YES' => ($cont_pic_db) ? 'checked="checked"' : '',
'C_PIC_DB_NO' => (!$cont_pic_db) ? 'checked="checked"' : '',
'C_ACTIVATION_YES' => ($cont_activation) ? 'checked="checked"' : '',
'C_ACTIVATION_NO' => (!$cont_activation) ? 'checked="checked"' : '',
'C_CONT_OPEN' => $lang['contest_open'],
'C_CONTEST' => $lang['cont_contest'],
'INPUT_C_DELETE' => $input_c_delete)
);
if( $cont_0 == 1 )
{
$template->assign_var_from_handle('CONTEST', 'contestbody');
}
else if ( $mode == 'newtopic' && (!empty ($is_auth['auth_cont_add'])) )
{
$template->assign_block_vars('want_contest_on', array());
}
}
// END CONTEST
#
#-----[ REPLACE, WITH ]------------------------------------------------
#
//
// BEGIN CONTEST
//
if ( (!empty ($is_auth['auth_contest'])) && ($post_info['topic_first_post_id'] == $post_id ) )
{
// ------------------------------------
// Set Language File (Contest)
// ------------------------------------
$userlang = ( $userdata['user_lang'] ) ? $userdata['user_lang'] : $board_config['default_lang'];
include($phpbb_root_path . 'language/lang_' . $userlang . '/lang_contest.' . $phpEx );
if ($mode == 'editpost' && $post_data['has_cont'])
{
if (!empty ($is_auth['auth_cont_edit']) )
{
$cont_0 = 1;
}
if (!empty ($is_auth['auth_cont_delete']) )
{
$cont_del_check = ( $cont_delete == 1 ) ? 'checked="checked"' : '';
$input_c_delete = '<input type="checkbox" name="cont_delete" ' . $cont_del_check . '> <span class="gen">' . $lang['cont_delete_desc'] . '</span>';
}
}
else
{
$cont_0 = $HTTP_POST_VARS['con_0'];
}
if ( $mode == 'newtopic' )
{
//
// Get general album information
//
include($album_root_path . 'album_common.'.$phpEx);
album_read_tree(ALBUM_PUBLIC_GALLERY);
$select_album_cat = '<select name="cont_album_id">';
$select_album_cat .= album_get_tree_option();
$select_album_cat .= '</select>';
}
else
{
$sql = "SELECT cat_id, cat_title FROM ". ALBUM_CAT_TABLE ." WHERE cat_id = ".intval($cont_album_id);
if( !($result = $db->sql_query($sql)) )
message_die(GENERAL_ERROR, 'Could not query category information', '', __LINE__, __FILE__, $sql);
if( $row = $db->sql_fetchrow($result) ) $cat_title = $row['cat_title'];
$db->sql_freeresult($result);
$select_album_cat = "<select name=\"cont_album_id\"><option value=\"$cont_album_id\">$cat_title</select>";
}
$template->assign_vars(array(
'CONTEST_TITLE' => $cont_title,
'L_CONT_SUBJECT' => $lang['cont_title'],
'L_CONT_DESC' => $lang['cont_desc'],
'L_CONT_NUMBER' => $lang['cont_number'],
'L_CONT_ALBUM_ID' => $lang['cont_album_id'],
'L_CONT_APP' => $lang['cont_app'],
'L_CONT_DATE' => $lang['cont_date'],
'L_CONT_DAYS' => $lang['Days'],
'L_CONT_HOURS' => $lang['Hours'],
'L_CONT_MINUTES' => $lang['Minutes'],
'L_CONT_PIC_DB' => $lang['cont_pic_db'],
'L_CONT_ACTIVATION' => $lang['cont_activation_desc'],
'L_YES' => $lang['Yes'],
'L_NO' => $lang['No'],
'C_TITLE' => $cont_title,
'C_DESC' => $cont_desc,
'C_NUMBER' => $cont_number,
'C_ALBUM_ID' => $select_album_cat,
'C_DATE_MIN' => $contest_date_min,
'C_DATE_HOU' => $contest_date_hou,
'C_DATE_DAY' => $contest_date_day,
'C_APP_MIN' => $cont_app_min,
'C_APP_HOU' => $cont_app_hou,
'C_APP_DAY' => $cont_app_day,
'C_PIC_DB_YES' => ($cont_pic_db) ? 'checked="checked"' : '',
'C_PIC_DB_NO' => (!$cont_pic_db) ? 'checked="checked"' : '',
'C_ACTIVATION_YES' => ($cont_activation) ? 'checked="checked"' : '',
'C_ACTIVATION_NO' => (!$cont_activation) ? 'checked="checked"' : '',
'C_CONT_OPEN' => $lang['contest_open'],
'C_CONTEST' => $lang['cont_contest'],
'INPUT_C_DELETE' => $input_c_delete)
);
if( $cont_0 == 1 )
{
$template->assign_var_from_handle('CONTEST', 'contestbody');
}
else if ( $mode == 'newtopic' && (!empty ($is_auth['auth_cont_add'])) )
{
$template->assign_block_vars('want_contest_on', array());
}
}
// END CONTEST
#
#-----[ OPEN ] --------------------------------------------------------
# just if you have installed the sp addon
album_mod/album_common.php
#
#-----[ FIND ]------------------------------------------------
#
include($album_root_path . 'clown_album_functions.' . $phpEx);
#
#-----[ REPLACE, WITH ]------------------------------------------------
#
if( !defined('IN_POSTING') )
include($album_root_path . 'clown_album_functions.' . $phpEx);
#
#-----[ OPEN ] --------------------------------------------------------
#
album_mod/album_hierarchy_sql.php
#
#-----[ FIND ]------------------------------------------------
#
// Public galleries
$sql = "SELECT c.*, COUNT(p.pic_id) AS count, '' AS username
FROM " . ALBUM_CAT_TABLE . " AS c
LEFT JOIN " . ALBUM_TABLE . " AS p ON c.cat_id = p.pic_cat_id
WHERE cat_id <> 0 AND c.cat_user_id = 0
GROUP BY cat_id " . album_get_sql_category_sort();
#
#-----[ REPLACE, WITH ]------------------------------------------------
#
$cont_sql = (defined ('IN_POSTING')) ? 'AND c.cat_cont_act = 0' : '';
// Public galleries
$sql = "SELECT c.*, COUNT(p.pic_id) AS count, '' AS username
FROM " . ALBUM_CAT_TABLE . " AS c
LEFT JOIN " . ALBUM_TABLE . " AS p ON c.cat_id = p.pic_cat_id
WHERE cat_id <> 0 AND c.cat_user_id = 0 $cont_sql
GROUP BY cat_id " . album_get_sql_category_sort();
#
#-----[ OPEN ] --------------------------------------------------------
#
includes/functions_post.php
#
#-----[ FIND ]------------------------------------------------
#
$sql = ( !$post_data['has_cont'] ) ? "INSERT INTO " . ALBUM_CONTEST_TABLE . " (topic_id, desc_cont, title_cont, number_cont, contest_album_id, cont_date, cont_app, cont_pic_db, cont_post_time, cont_activation)
VALUES ($topic_id, '$cont_desc', '$cont_title', '$cont_number', '$cont_album_id', '$cont_date', '$cont_app', '$cont_pic_db', '$current_time', '$cont_activation')" : "UPDATE " . ALBUM_CONTEST_TABLE . " SET desc_cont = '$cont_desc', title_cont = '$cont_title', number_cont = '$cont_number', contest_album_id = '$cont_album_id', cont_date = '$cont_date', cont_app = '$cont_app', cont_pic_db = '$cont_pic_db', cont_activation = '$cont_activation' WHERE topic_id = $topic_id";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
}
#
#-----[ AFTER, ADD ]------------------------------------------------
#
$sql = "UPDATE " . ALBUM_CAT_TABLE . " SET cat_cont_act = 1 WHERE cat_id = $cont_album_id";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in album category', '', __LINE__, __FILE__, $sql);
}
#
#-----[ FIND ]------------------------------------------
#
$sql = "DELETE FROM " . ALBUM_CONTEST_TABLE . "
WHERE topic_id = $topic_id";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in deleting contest', '', __LINE__, __FILE__, $sql);
}
#
#-----[ AFTER, ADD ]------------------------------------------------
#
$sql = "UPDATE " . ALBUM_CAT_TABLE . " SET cat_cont_act = 0 WHERE cat_id = $cont_album_id";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in album category', '', __LINE__, __FILE__, $sql);
}
#
#-----[ FIND ]------------------------------------------------
#
$sql = "DELETE FROM " . ALBUM_CONTEST_TABLE . "
WHERE topic_id = $topic_id";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in deleting contest', '', __LINE__, __FILE__, $sql);
}
#
#-----[ AFTER, ADD ]------------------------------------------------
#
$sql = "UPDATE " . ALBUM_CAT_TABLE . " SET cat_cont_act = 0 WHERE cat_id = $cont_album_id";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in album category', '', __LINE__, __FILE__, $sql);
}
#
#-----[ OPEN ] --------------------------------------------------------
#
templates/subSilver/album_cat_body.tpl
#
#-----[ FIND ]------------------------------------------------
#
<form action="{S_ALBUM_ACTION}" method="post" >
#
#-----[ REPLACE, WITH ]------------------------------------------------
#
<form action="{S_ALBUM_ACTION}" method="post" name="main" >
#
#-----[ FIND ]------------------------------------------------
#
{SORT_COMMENTS_OPTION}
{SORT_NEW_COMMENT_OPTION}
#
#-----[ AFTER, ADD ]------------------------------------------------
#
{SORT_CONTEST_OPTION}
#
#-----[ OPEN ] --------------------------------------------------------
#
templates/subSilver/posting_body.tpl
#
#-----[ FIND ]------------------------------------------------
#
else if (document.post.cont_album_id.value == 0 ) {
formErrors = "{L_EMPTY_CONT_CATEGORY}";
}
#
#-----[ REPLACE, WITH ]------------------------------------------------
#
else if ( document.post.cont_album_id.value <= 0 ) {
formErrors = "{L_EMPTY_CONT_CATEGORY}";
}
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Zuletzt geändert von Bootenks am Mi 17.Aug, 2005 13:36, insgesamt 3-mal geändert.
Nur ein Informatik Student. ^^
- oxpus
- Administrator
- Beiträge: 28735
- Registriert: Mo 27.Jan, 2003 22:13
- Wohnort: Bad Wildungen
- Kontaktdaten:
Ich habs zwar jetzt nicht getestet, aber hier ist es installiert.
Testet ruhig. Wenn Rechte fehlen, sagt Bescheid...
Testet ruhig. Wenn Rechte fehlen, sagt Bescheid...
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
- Bootenks
- Beiträge: 1836
- Registriert: Sa 29.Mai, 2004 23:36
- Wohnort: G?rlitz (?stlichste Stadt Deutschlands)
Hier auf deinem Board macht der Vorschau -Button so seine Probleme... Werde das morgen wahrscheinlich mal beheben müssen. ^^ :-P Aber ansonsten bitte ich trotzdem die anderen es zu testen. Die neuen Änderungen sind erstens effizienter und zweitens schmiegen sie sich besser in den Album mod so das Kompatiblitätsprobleme an dieser Stelle nie mehr auftreten können. *hoff*
Nur ein Informatik Student. ^^