Seite 3 von 4

Verfasst: 23.03.2003 17:30
von saerdnaer
jajaja... immer mit der ruhe... ich hab halt einfach zurzeit keine zeit...

such gleich mal die forum id des entsprechenden forums raus...

ah

Verfasst: 23.03.2003 22:53
von Valerie Raghnall
*g*

Also die Nummer des Forums ist die 12... bei mir ;)

Verfasst: 11.04.2003 15:30
von Valerie Raghnall
Also... ich will dich wirklich nicht drängen oder so... ich wollt nur mal das Topic wieder raufschieben, damit du mich nicht vergisst (weißt ja wie wir Frauen sind ;)) und mir vielleicht dem/den/das Mod geben kannst... *liebschau*

Verfasst: 13.04.2003 16:38
von saerdnaer
hier hast du mal die dice.php
[size=0]<?php
/***************************************************************************
* dice.php
* -------------------
* copyright : (C) 2003 Saerdnaer
* email : saernaer@web.de
*
***************************************************************************/

// BEGIN Configuration
$self = ''; // Name of these file
$subject = '';
$message = '';
$html_on = 0;
$bbcode_on = 1;
$smilies_on = 1;
// END Configuration

define('IN_PHPBB', true);
$phpbb_root_path = './';
$self = ''; // Name of these file
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
include($phpbb_root_path . 'includes/functions_post.'.$phpEx);

if ( !empty($HTTP_POST_VARS[POST_TOPIC_URL]) || !empty($HTTP_GET_VARS[POST_TOPIC_URL]) )
{
$topic_id = ( !empty($HTTP_POST_VARS[POST_TOPIC_URL]) ) ? intval($HTTP_POST_VARS[POST_TOPIC_URL]) : intval($HTTP_GET_VARS[POST_TOPIC_URL]);
}
else
{
message_die(GENERAL_ERROR, $lang['No_topic_id']);
}

$max = intval( empty($HTTP_POST_VARS['max']) ? $HTTP_GET_VARS['max'] : $HTTP_POST_VARS['max'] ) == 20 ? 20 : 6;


//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_POSTING);
init_userprefs($userdata);
//
// End session management
//


$is_auth = array();
'auth_reply'

//
// Here we do various lookups to find topic_id, forum_id, post_id etc.
// Doing it here prevents spoofing (eg. faking forum_id, topic_id or post_id
//
$error_msg = '';
$post_data = array();

$sql = "SELECT f.*, t.topic_status
FROM " . FORUMS_TABLE . " f, " . TOPICS_TABLE . " t
WHERE t.topic_id = $topic_id
AND f.forum_id = t.forum_id";
if ( $result = $db->sql_query($sql) )
{
$post_info = $db->sql_fetchrow($result);

$forum_id = $post_info['forum_id'];
$forum_name = $post_info['forum_name'];

$is_auth = auth(AUTH_ALL, $forum_id, $userdata, $post_info);

if ( $post_info['forum_status'] == FORUM_LOCKED && !$is_auth['auth_mod'])
{
message_die(GENERAL_MESSAGE, $lang['Forum_locked']);
}
else if ( $post_info['topic_status'] == TOPIC_LOCKED && !$is_auth['auth_mod'])
{
message_die(GENERAL_MESSAGE, $lang['Topic_locked']);
}
}
else
{
message_die(GENERAL_MESSAGE, $lang['No_such_post']);
}

//
// The user is not authed, if they're not logged in then redirect
// them, else show them an error message
//
if ( !$is_auth['auth_reply'] )
{
if ( $userdata['session_logged_in'] )
{
message_die(GENERAL_MESSAGE, sprintf($lang['Sorry_auth_reply'], $is_auth['auth_reply_type']));
}

/* // For phpBB Version <= 2.0.3
$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
header($header_location . append_sid("login.$phpEx?redirect=$self.$phpEx&mode=$mode&" . POST_TOPIC_URL . "=" . $topic_id, true));
exit;
*/

// For phpBB Version >= 2.0.4
redirect(append_sid("login.$phpEx?redirect=$self.$phpEx&mode=$mode&" . POST_TOPIC_URL . "=" . $topic_id, true));
}

mt_srand( (double) microtime() * 1000000 );
$random_result = mt_rand(1, $max);
str_replace('{MAX}', $max, $message);
str_replace('{RESULT}', $random_result, $message);
str_replace('{USERNAME}', $userdata['username'], $message);

$mode = 'reply';
$attach_sig = 0;
$post_data['first_post'] = 0;
$post_data['last_post'] = false;
$post_data['has_poll'] = false;
$post_data['edit_poll'] = false;

$return_message = '';
$return_meta = '';
$username = '';
$poll_title = '';
$poll_options = '';
$poll_length = '';
$bbcode_uid = '';
$topic_type = POST_NORMAL;

prepare_post($mode, $post_data, $bbcode_on, $html_on, $smilies_on, $error_msg, $username, $bbcode_uid, $subject, $message, $poll_title, $poll_options, $poll_length);
if ( $error_msg != '' )
{
message_die(GENERAL_MESSAGE, $error_msg);;
}
submit_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $topic_type, $bbcode_on, $html_on, $smilies_on, $attach_sig, $bbcode_uid, str_replace("\'", "''", $username), str_replace("\'", "''", $subject), str_replace("\'", "''", $message), str_replace("\'", "''", $poll_title), $poll_options, $poll_length);
if ( $error_msg != '' )
{
message_die(GENERAL_MESSAGE, $error_msg);;
}
update_post_stats($mode, $post_data, $forum_id, $topic_id, $post_id, $userdata['user_id']);

$template->assign_vars( array(
'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">')
);

message_die(GENERAL_MESSAGE, $lang[''] . '<br /><br />' . sprintf($lang['Click_view_message'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">', '</a>');

?>[/size]
mit dice.php?max=6 kannst du das ding aufrufen... achja leider ist es möglich das ergebnis zu manipulieren wenn man einfach den post editert...

ah

Verfasst: 18.04.2003 11:42
von Valerie Raghnall
och... dann wird einfach das editieren verweigert *g* danke... ich werd mir mal angucken wie man das einbaut... bin ja da ned sonderlich versiert, aber ich freu mich total, dass mir hier so geholfen wird. Großes Dickes Fettes

DANKE!

Verfasst: 18.09.2003 16:45
von Sabiene
Ich würde auch gerne das Würfel spiel haben.
Hab die dice.php hochgeladen, aber wenn ich sie aufrufe erscheint
folgende Fehlermeldung:

parse error, unexpected T_VARIABLE on line 56

Was kann ich machen? :roll:
Hats denn bei dir geklappt, Valerie Raghnall?

Verfasst: 18.09.2003 19:14
von Lucas1510
Hi,

vielleicht ist das ja für Euch interessant: bbcode DICE (BETA)

Code: Alles auswählen

################################################################# 
## MOD Title: Dice BBCode 
## MOD Author: Hades < phpbb@hades.me.uk > - Lee Conlin - http://www.celestialvault.com/blast 
## MOD Description: Adds a dice roller BBCode to your forum. 
## MOD Version: 1.2.2 
## 
## Installation Level: Intermediate 
## Installation Time: 10 Minutes 
## Files To Edit: bbcode.php, posting.php, bbcode.tpl, posting_body.tpl, lang_main.php, lang_bbcode.php 
## Included Files: n/a 
############################################################## 
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the 
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code 
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered 
## in our MOD-Database, located at: http://www.phpbb.com/mods/ 
############################################################## 
## 
## Author Notes: 
## 
##  BASED ON THE DICE MOD BY Jeff Leigh 
## 
##  IMPORTANT: if you are installing manually (without EasyMod) you MUST first 
##        install the Multi BBCode MOD available at http://www.phpbb.com/mods/downloads 
## 
##  For serious use of this MOD, you MUST disable non-moderator editing of posts.. otherwise, users 
##  can simply edit their posts a few times until they get a good roll.  Also, if a post is edited (by a 
##  moderator or user) the word 'Fixed' will appear in the dice roll.  This prevents users from 'fixing' 
##  their results by passing in a result seed they know brings good results... but is nessassary to 
##  allow a post to be edited without changing the results.  I am not quite happy with this, but 
##  it does the job. 
## 
##  The obvious way to avoid the above issues is to use the Post_ID to seed the results.  This, 
##  however, appeared to require changes to phpbb function declarations - a thing I try very 
##  hard to avoid (as it can cause problems for other MODs not expecting these changes). 
## 
##############################################################
Was da wichtig ist:
IMPORTANT: if you are installing manually (without EasyMod) you MUST first install the Multi BBCode MOD available at http://www.phpbb.com/mods/downloads
Habe weder den Dice-Mod noch den Multi BBcode Mod eingebaut, aber der Dice-Mod liesst sich ganz gut :)

Viele Grüße,

Lucas

Verfasst: 20.09.2003 22:59
von Sabine
Ist das dieser Multi-Mod?:
http://www.phpbb.com/mods/downloads/upl ... bbc100.txt

Ich hab den installiert, aber wenn ich nun posten will kommt ne Fehlermeldung: parse error, unexpected ';'

Der Fehler liegt an folgender Änderung:

Code: Alles auswählen

# 
#-----[ OPEN ]---------------------------------
# 
posting.php

# 
#-----[ FIND ]---------------------------------
#
#  NOTE: the full line to look for is:
# make_jumpbox('viewforum.'.$phpEx);
#
make_jumpbox(


# 
#-----[ AFTER, ADD ]---------------------------------
#

// EASYMOD-begin
//NOTE: the first element of each array must be ''   Add new elements AFTER the ''
$EMBB_keys = array('') ;
$EMBB_widths = array('') ;
$EMBB_values = array('') ;

for ($i=1; $i<count($EMBB_values); $i++)
{
	// EasyMod BBcode mods
	$val = ($i*2)+16 ;
	$template->assign_block_vars('EasyModBB', array(
		'KEY' => $EMBB_keys[$i],
		'NAME' => "addbbcode$val",
		'WIDTH' => $EMBB_widths[$i],
		'VALUE' => $EMBB_values[$i],
		'STYLE' => "bbstyle($val)")
	);
}
// EASYMOD-end[/size]
Denn wenn ich diese rückgängig mache, ist er weg.
Muss ich den einzusetzenden Text direkt hinter die öffnende Klammer schreiben?
Ich denke mal nicht das ich das Problem daran liegt, dass ich 2.0.4 hab.

Verfasst: 06.06.2004 20:33
von magikyr
eine möglichkeit mit mehreren würfeln zu würfeln wäre net ;)
d20 oder d4 usw

Verfasst: 06.12.2005 19:17
von HyperPunk
Das schaut ja alles recht geil aus aber irgendwie blick ich da jetzt grad net so ganz durch...

Würde nämlich auch gerne nen Würfelmod haben...
Am geilsten wäre das dann für mich wenn man das beim Post mit nem befehl wie z.B. /dice1w6 oder sowas in der art aufrufen könnte.
und man müsste auf jeden fall 6seitige und 20seitige Würfel wählen können.

Kann mir da jemand sagen ob das da schon das ist was ich suche oder was ich da noch anders machen muss bzw das vll für mich schon ändern so dass es passt??
hab da voll keine ahnung von.