Verfasst: Fr 08.Jul, 2005 17:51
Dann würde die Fehlermeldung submit_post enthalten 
phpBB-Support, PC Hilfe und vieles mehr...
https://www.oxpus.de:443/
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 ]------------------------------------------
#
# EoMCode: 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. ;)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 ]------------------------------------------
#
# EoMCode: 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 585Code: 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