posting.php
Verfasst: 12.07.2004 13:33
phpBB.de - Die deutsche phpBB-Community
https://www.phpbb.de/community/
Code: Alles auswählen
#
#-----[ OPEN ]------------------------------------------
#
posting.php
#
#-----[ FIND ]------------------------------------------
#
define('IN_PHPBB', true);
#
#-----[ AFTER, ADD ]------------------------------------------
#
define('IN_CASHMOD', true);
define('CM_POSTING', true);
#
#-----[ FIND ]------------------------------------------
#
$sql = "SELECT f.*, t.topic_status, t.topic_title
#
#-----[ IN-LINE FIND ]------------------------------------------
#
t.topic_title
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, t.topic_poster
#
#-----[ FIND ]------------------------------------------
#
$select_sql = ( !$submit ) ? ", t.topic_title, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, pt.post_text, pt.bbcode_uid, u.username, u.user_id, u.user_sig" : '';
#
#-----[ BEFORE, ADD ]------------------------------------------
#
$temp = $submit;
$submit = !(!$submit || ( isset($board_config['cash_disable']) && !$board_config['cash_disable'] && (($mode == 'editpost') || ($mode == 'delete'))));
#
#-----[ FIND ]------------------------------------------
#
$where_sql = ( !$submit ) ? "AND pt.post_id = p.post_id AND u.user_id = p.poster_id" : '';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$submit = $temp;
unset($temp);
#
#-----[ FIND ]------------------------------------------
#
$post_data['poster_post'] = ( $post_info['poster_id'] == $userdata['user_id'] ) ? true : false;
#
#-----[ BEFORE, ADD ]------------------------------------------
#
$post_data['post_text'] = ( ($mode == 'editpost') || ($mode == 'delete') ) ? $post_info['post_text'] : '';
$post_data['bbcode_uid'] = ( ($mode == 'editpost') || ($mode == 'delete') ) ? $post_info['bbcode_uid'] : '';
#
#-----[ FIND ]------------------------------------------
#
$post_data['first_post'] = ( $mode == 'newtopic' ) ? true : 0;
#
#-----[ BEFORE, ADD ]------------------------------------------
#
$post_data['topic_poster'] = ( $mode == 'reply' ) ? $post_info['topic_poster'] : 0;
Code: Alles auswählen
function make_post($subject, $message, $mode, $topic_id = 0, $post_id = 0)
{
global $db, $phpbb_root_path, $phpEx, $userdata;
global $html_entities_match, $html_entities_replace, $code_entities_match, $code_entities_replace;
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
include($phpbb_root_path . 'includes/functions_post.'.$phpEx);
Code: Alles auswählen
define('IN_CASHMOD', true);
define('CM_POSTING', true);
global $table_prefix;
include($phpbb_root_path . 'includes/functions_cash.'.$phpEx);
Code: Alles auswählen
<?php
/***************************************************************************
* functions_cash.php
* -------------------
* begin : Friday, Apr 18, 2003
* copyright : (C) 2003 Xore
* email : mods@xore.ca
*
* $Id: functions_cash.php,v 1.1 2003/11/17 14:20:05 wimpy Exp $
*
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}
if ( defined('CM_EVENT') || defined('CM_MEMBERLIST') || defined('CM_VIEWTOPIC') || defined('CM_VIEWPROFILE') || defined('CM_VIEWPROFILE') || defined('CM_POSTING') )
{
include($phpbb_root_path . 'includes/classes_cash.'.$phpEx);
}
if ( defined('CASH_INCLUDE') )
{
return;
}
define('CASH_INCLUDE',TRUE);
//
//=============[ BEGIN Defines ]=========================
//
// Cash Mod Constants
define('PERCHAR_DEC_BONUS',3);
define('CASH_LOG_ACTION_DELIMETER','@-@');
define('CASH_EVENT_DELIM1','#');
define('CASH_EVENT_DELIM2','@');
// Log Settings - the order here matters. don't change it. only add to the end of the list.
$i = 0;
define('CASH_LOG_DONATE', $i++);
define('CASH_LOG_ADMIN_MODEDIT', $i++);
define('CASH_LOG_ADMIN_CREATE_CURRENCY', $i++);
define('CASH_LOG_ADMIN_DELETE_CURRENCY', $i++);
define('CASH_LOG_ADMIN_RENAME_CURRENCY', $i++);
define('CASH_LOG_ADMIN_COPY_CURRENCY',$i++);
// insert new log types before this line
// Allowance Time
define('CASH_ALLOW_DAY', 1);
define('CASH_ALLOW_WEEK', 2);
define('CASH_ALLOW_MONTH', 3);
define('CASH_ALLOW_YEAR', 4);
// Cash groups
define('CASH_GROUPS_LEVEL', 1);
define('CASH_GROUPS_RANK', 2);
define('CASH_GROUPS_USERGROUP', 3);
// Cash groups status
define('CASH_GROUPS_DEFAULT', 1);
define('CASH_GROUPS_CUSTOM', 2);
define('CASH_GROUPS_OFF', 3);
// Bitmask filters - the order here matters. don't change it. only add to the end of the list.
$i = 0;
define('CURRENCY_ENABLED', 1 << $i++);
define('CURRENCY_IMAGE', 1 << $i++);
define('CURRENCY_PREFIX', 1 << $i++);
define('CURRENCY_INCLUDEQUOTES', 1 << $i++);
define('CURRENCY_VIEWPROFILE', 1 << $i++);
define('CURRENCY_VIEWTOPIC', 1 << $i++);
define('CURRENCY_VIEWMEMBERLIST', 1 << $i++);
define('CURRENCY_DONATE', 1 << $i++);
define('CURRENCY_MODEDIT', 1 << $i++);
define('CURRENCY_ALLOWNEG', 1 << $i++);
define('CURRENCY_FORUMLISTTYPE', 1 << $i++);
define('CURRENCY_EXCHANGEABLE', 1 << $i++);
// insert new bitmasks before this line
// Cash tables
define('CASH_TABLE', $table_prefix.'cash');
define('CASH_EVENTS_TABLE', $table_prefix.'cash_events');
define('CASH_EXCHANGE_TABLE', $table_prefix.'cash_exchange');
define('CASH_GROUPS_TABLE', $table_prefix.'cash_groups');
define('CASH_LOGS_TABLE', $table_prefix.'cash_log');
//
//=============[ END Defines ]=========================
//