Seite 3 von 9

posting.php

Verfasst: 12.07.2004 13:33
von jojooriginal

Verfasst: 12.07.2004 16:03
von saerdnaer
den teil der install anleitung des cash mods in der die änderungen an der posting.php gemacht werden bräuchte ich auch noch.

ah

habe mal die ganze installanleitung vom cash mod gepostet

Verfasst: 15.07.2004 10:14
von jojooriginal

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;
edited by saerdnaer: ich sage doch das ich nur den teil der anleitung sehen will in der die änderungen an der posting.php gemacht werden!

Verfasst: 15.07.2004 11:41
von saerdnaer
in der includes/quiz.php:
suche:

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);
danach einfügen:

Code: Alles auswählen

define('IN_CASHMOD', true);
define('CM_POSTING', true); 

global $table_prefix;
include($phpbb_root_path . 'includes/functions_cash.'.$phpEx);
anschließend hoffen das es funktioniert ;-)

achja die alten änderungen sollten vorher wieder gelöscht werden

Verfasst: 16.07.2004 11:59
von jojooriginal
jetzt scheint bei mir noch ein fehler in der datenbank zu sein :

DEBUG MODE

SQL Error : 1146 Table 'usr_web207_7.cash' doesn't exist

SELECT * FROM cash ORDER BY cash_order ASC

Line : 657
File : /home/www/web207/html/phpBB2/includes/functions_cash.php


usr_web207_7 ist meine datenbank und
meine cash datenbank heisst minerva_cash ... wie ändere ich das in der functions_cash.php ?

hier die functions_cash.php

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 ]=========================
//
edit: keine kompletten dateien posten!
KB:datei
mfg saerdnaer

Verfasst: 16.07.2004 18:24
von saerdnaer
ich hab den obrigen beitrag editiert und das global $table_prefix; noch mit eingebaut

Verfasst: 18.07.2004 13:19
von jojooriginal
sorry werde keine kompletten dateien mehr posten...

scheint nicht zu funktionieren , wenn ich in den adminbereich will kommt:

Fatal error: Cannot instantiate non-existent class: cash_menucat in /home/www/web207/html/phpBB2/admin/admin_cash.php on line 31

Verfasst: 18.07.2004 14:12
von saerdnaer
dann zeig mal die admin_cash.php

Verfasst: 20.07.2004 13:30
von jojooriginal

Verfasst: 20.07.2004 15:16
von theMomo
Habe jetzt erst Deine Antwort gesehen, solltest Du mich meinen hier der Link zur posting.php

http://www.ketario.de/posting.txt

Quiz und Cashmod funktionieren übrigens, nur manuell kann ich keine Fragen freischalten und auch nicht Antworten als richtig kennzeichnen, dann bekomme ich den genannten Fehler.

Hier noch die functions_post

http://www.ketario.de/functions_post.txt

Danke