Quiz Hack Version 0.2.0

In diesem Forum können Mod-Autoren ihre Mods vorstellen, die sich noch im Entwicklungsstatus befinden. Der Einbau in Foren im produktiven Betrieb wird nicht empfohlen.
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Mofi
Mitglied
Beiträge: 42
Registriert: 07.09.2003 19:06
Wohnort: Bochum
Kontaktdaten:

Beitrag von Mofi »

Sorry, schon gefunden! Da war etwas in der functions_search doppelt!

Ich hab aber noch ein Problem! Alle Fragen stehen auf bereit aber der starten die Fragen nicht automatisch!

EDIT: Fehler behoben! Brauche nur noch mehr Fragen!
Gast

Beitrag von Gast »

hab ein problem:
#-----[ FIND ]------------------------------------------
#
$order_sql = ( !isset($post_id) ) ? '' : "GROUP BY p.post_id, t.topic_id, [...]
#
#-----[ AFTER, ADD ]------------------------------------------
#
$count_sql .= ', t.topic_first_post_id, t.topic_quiz'; // ADDED BY Quiz Hack
aber so sieht die viewtopic.php aus
<?php
//-- mod : calendar --------------------------------------------------------------------------------
//-- mod : categories hierarchy --------------------------------------------------------------------
/***************************************************************************
* viewtopic.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: viewtopic.php,v 1.186.2.32 2003/06/20 16:34:58 psotfx 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.
*
***************************************************************************/

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
include($phpbb_root_path . 'includes/def_icons.'. $phpEx);
//-- mod : profile cp ------------------------------------------------------------------------------
//-- add
include($phpbb_root_path . 'profilcp/functions_profile.'.$phpEx);
//-- fin mod : profile cp --------------------------------------------------------------------------
//-- mod : calendar --------------------------------------------------------------------------------
//-- add
include($phpbb_root_path . 'includes/functions_calendar.'.$phpEx);
//-- fin mod : calendar ----------------------------------------------------------------------------

//
// Start initial var setup
//
$topic_id = $post_id = 0;
if ( isset($HTTP_GET_VARS[POST_TOPIC_URL]) )
{
$topic_id = intval($HTTP_GET_VARS[POST_TOPIC_URL]);
}
else if ( isset($HTTP_GET_VARS['topic']) )
{
$topic_id = intval($HTTP_GET_VARS['topic']);
}

if ( isset($HTTP_GET_VARS[POST_POST_URL]))
{
$post_id = intval($HTTP_GET_VARS[POST_POST_URL]);
}


$start = ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0;

if ( !isset($topic_id) && !isset($post_id) )
{
message_die(GENERAL_MESSAGE, 'Topic_post_not_exist');
}

//
// Find topic id if user requested a newer
// or older topic
//
if ( isset($HTTP_GET_VARS['view']) && empty($HTTP_GET_VARS[POST_POST_URL]) )
{
if ( $HTTP_GET_VARS['view'] == 'newest' )
{
if ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_sid']) || isset($HTTP_GET_VARS['sid']) )
{
$session_id = isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_sid']) ? $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_sid'] : $HTTP_GET_VARS['sid'];

if ( $session_id )
{
$sql = "SELECT p.post_id
FROM " . POSTS_TABLE . " p, " . SESSIONS_TABLE . " s, " . USERS_TABLE . " u
WHERE s.session_id = '$session_id'
AND u.user_id = s.session_user_id
AND p.topic_id = $topic_id
AND p.post_time >= u.user_lastvisit
ORDER BY p.post_time ASC
LIMIT 1";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain newer/older topic information', '', __LINE__, __FILE__, $sql);
}

if ( !($row = $db->sql_fetchrow($result)) )
{
message_die(GENERAL_MESSAGE, 'No_new_posts_last_visit');
}

$post_id = $row['post_id'];

if (isset($HTTP_GET_VARS['sid']))
{
redirect("viewtopic.$phpEx?sid=$session_id&" . POST_POST_URL . "=$post_id#$post_id");
}
else
{
redirect("viewtopic.$phpEx?" . POST_POST_URL . "=$post_id#$post_id");
}
}
}

redirect(append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id", true));
}
else if ( $HTTP_GET_VARS['view'] == 'next' || $HTTP_GET_VARS['view'] == 'previous' )
{
$sql_condition = ( $HTTP_GET_VARS['view'] == 'next' ) ? '>' : '<';
$sql_ordering = ( $HTTP_GET_VARS['view'] == 'next' ) ? 'ASC' : 'DESC';

$sql = "SELECT t.topic_id
FROM " . TOPICS_TABLE . " t, " . TOPICS_TABLE . " t2
WHERE
t2.topic_id = $topic_id
AND t.forum_id = t2.forum_id
AND t.topic_last_post_id $sql_condition t2.topic_last_post_id
ORDER BY t.topic_last_post_id $sql_ordering
LIMIT 1";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Could not obtain newer/older topic information", '', __LINE__, __FILE__, $sql);
}

if ( $row = $db->sql_fetchrow($result) )
{
$topic_id = intval($row['topic_id']);
}
else
{
$message = ( $HTTP_GET_VARS['view'] == 'next' ) ? 'No_newer_topics' : 'No_older_topics';
message_die(GENERAL_MESSAGE, $message);
}
}
}

//
// This rather complex gaggle of code handles querying for topics but
// also allows for direct linking to a post (and the calculation of which
// page the post is on and the correct display of viewtopic)
//
$join_sql_table = ( empty($post_id) ) ? '' : ", " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2 ";
$join_sql = ( empty($post_id) ) ? "t.topic_id = $topic_id" : "p.post_id = $post_id AND t.topic_id = p.topic_id AND p2.topic_id = p.topic_id AND p2.post_id <= $post_id";
$count_sql = ( empty($post_id) ) ? '' : ", COUNT(p2.post_id) AS prev_posts";

$order_sql = ( empty($post_id) ) ? '' : "GROUP BY p.post_id, t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, t.topic_type, t.topic_vote, t.topic_last_post_id, f.forum_name, f.forum_status, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce, f.auth_pollcreate, f.auth_vote, f.auth_attachments, f.auth_ban, f.auth_greencard, f.auth_bluecard ORDER BY p.post_id ASC";
//-- mod : calendar --------------------------------------------------------------------------------
// here we added
// , t.topic_first_post_id, t.topic_calendar_time, t.topic_calendar_duration
//-- modify

$sql = "SELECT t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, t.topic_type, t.topic_vote, t.topic_last_post_id, t.topic_first_post_id, t.topic_calendar_time, t.topic_calendar_duration, f.forum_name, f.forum_status, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce, f.auth_pollcreate, f.auth_vote, f.auth_attachments, f.auth_ban, f.auth_greencard, f.auth_bluecard" . $count_sql . "
FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f" . $join_sql_table . "
WHERE $join_sql
AND f.forum_id = t.forum_id
$order_sql";
attach_setup_viewtopic_auth($order_sql, $sql);
2Pac
Mitglied
Beiträge: 570
Registriert: 22.04.2003 15:00
Wohnort: Fuchsstadt
Kontaktdaten:

Beitrag von 2Pac »

sry kam von mir!
hab ein weiteres problem!

Code: Alles auswählen

#-----[ FIND ]------------------------------------------
#
	if ($mode == 'newtopic' || $mode == 'reply') 
#
#-----[ REPLACE WITH ]------------------------------------------
#
	if ( !isset($post_data['flood_control_off']) && ( $mode == 'newtopic' || $mode == 'reply' ) ) // ADDED ' !isset($post_data['flood_control_off']) && ( ' AND ')' BY Quiz Hack



#-----[ FIND ]------------------------------------------
#
		$sql  = ($mode != "editpost") ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, 
#
#-----[ IN-LINE, FIND ]------------------------------------------
#
topic_type, topic_vote


#-----[ IN-LINE, AFTER, ADD ]------------------------------------------
#
, topic_quiz
#
#-----[ IN-LINE, FIND ]------------------------------------------
#
$topic_type, $topic_vote
#
#-----[ IN-LINE, AFTER, ADD ]------------------------------------------
#
, " . ( empty($post_data['topic_quiz']) ? '0' : '1' ) . "



dazu: http://v082998.dd1232.kasserver.com/php ... s_post.txt




und dann noch
#
#-----[ OPEN ]------------------------------------------
#
/templates/xxx/overall_header.tpl
#
#-----[ FIND ]------------------------------------------
#
<td height="25" align="center" valign="top" nowrap="nowrap"><span class="mainmenu">&nbsp;<a href="{U_PROFILE}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_profile.gif" width="12" height="13" border="0" alt="{L_PROFILE}" hspace="3" />{L_PROFILE}</a> [...]
#
#-----[ IN-LINE, FIND ]------------------------------------------
#
<span class="mainmenu">&nbsp;
#
#-----[ IN-LINE, AFTER, ADD ]------------------------------------------
#
<a href="{U_QUIZ_FAQ}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_quiz1.gif" width="12" height="13" border="0" alt="{L_QUIZ_FAQ}" hspace="3" />{L_QUIZ_FAQ}</a>&nbsp; &nbsp;<a href="{U_QUIZ_SUGGEST}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_quiz2.gif" width="12" height="13" border="0" alt="{L_QUIZ_SUGGEST}" hspace="3" />{L_QUIZ_SUGGEST}</a>&nbsp; &nbsp;
#

Code: Alles auswählen

<?xml version="1.0" encoding="{S_CONTENT_ENCODING}"?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}" /> 
<meta http-equiv="Content-Style-Type" content="text/css" /> 
{META} 
{NAV_LINKS} 
<title>{SITENAME} :: {PAGE_TITLE}</title> 
<link rel="stylesheet" href="templates/fisubice/{T_HEAD_STYLESHEET}" type="text/css" /> 
<script type="text/javascript" src="templates/rollout.js"></script> 
<script language="JavaScript" type="text/javascript" src="includes/toggle_display.js"></script> 
<!-- BEGIN switch_enable_pm_popup --> 
<script type="text/javascript"> 
<!-- 
   if ( {PRIVATE_MESSAGE_NEW_FLAG} ) 
   { 
      window.open('{U_PRIVATEMSGS_POPUP}', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');; 
   } 
//--> 
</script> 
<!-- END switch_enable_pm_popup --> 
<!-- mod : profile cp --> 
<!-- BEGIN birthday_popup --> 
<script language="Javascript" type="text/javascript"> 
<!-- 
   window.open('{birthday_popup.U_BIRTHDAY_POPUP}', '_phpbbbirthday', 'HEIGHT=225,resizable=yes,WIDTH=400'); 
//--> 
</script> 
<!-- END birthday_popup --> 
<!-- fin mod : profile cp --> 
</head> 
<body> 
<!-- Banners --> 
<table width="100%" border="0" cellspacing="0" cellpadding="0"> 
<tr> 
<td width="20%"> 
<table width="100%" border="0" cellspacing="0" cellpadding="2"> 
<tr><td><div align="center">{BANNER_1_IMG}</div></td></tr> 
<tr><td><div align="center">{BANNER_2_IMG}</div></td></tr> 
</table> 
</td> 
<td width="60%"> 
<table width="100%" border="0" cellspacing="0" cellpadding="2"> 
<tr><td><div align="center">{BANNER_3_IMG}</div></td></tr> 
<tr><td><div align="center">{BANNER_4_IMG}</div></td></tr> 
</table> 
</td> 
<td width="20%"> 
<table width="100%" border="0" cellspacing="0" cellpadding="2"> 
<tr><td><div align="center">{BANNER_5_IMG}</div></td></tr> 
<tr><td><div align="center">{BANNER_6_IMG}</div></td></tr> 
</table> 
</td> 
</tr> 
</table> 
<!-- End Banners --> 
<a name="top" id="top"></a> 
<table class="bodyline" width="100%" cellspacing="0" cellpadding="0" border="0"> 
<tr> 
<td valign="top"> 
<table class="row2" width="100%" cellspacing="0" cellpadding="0" border="0"> 
<tr> 
<td width="100%" align="center"><a href="{U_INDEX}"><img src="templates/fisubice/images/phpbb2_logo.jpg" border="0" alt="{L_INDEX}" title="{L_INDEX}" width="800" height="120" /></a></td> 
</tr> 
</table> 
<table width="100%" border="0" cellspacing="0" cellpadding="2"> 
<tr> 
<td align="center" class="topnav"> 
&nbsp;<a href="{U_PORTAL}">{L_HOME}</a>&nbsp; • 
&nbsp; <a href="{U_SEARCH}">{L_SEARCH}</a> 
&nbsp;• &nbsp;<a href="{U_MEMBERLIST}">{L_MEMBERLIST}</a>&nbsp; • 
&nbsp;<a href="{U_STATISTICS}">{L_STATISTICS}</a>&nbsp; • 
&nbsp;<a href="{U_ALBUM}">{L_ALBUM}</a>&nbsp; • 
&nbsp;<a href="{U_LINKS}">{L_LINKS}</a>&nbsp; • 
&nbsp;<a href="charts.php?action=all_list">Charts</a>&nbsp; • 

&nbsp;<a href="{U_CALENDAR}">{L_CALENDAR}</a>&nbsp; • 
&nbsp;<a href="{U_RECENT}">{L_RECENT}</a> 
<!-- BEGIN Shownickpagebutton --> 
&nbsp; • 
&nbsp;<a href="{Shownickpagebutton.U_NICKPAGE}">Nickpage</a> 
<!-- END Shownickpagebutton --> 
<br /> 
&nbsp;<a href="{U_STAFF}">{L_STAFF}</a>&nbsp; • 
&nbsp;<a href="{U_RANKS}">{L_RANKS}</a>&nbsp; • 
&nbsp;<a href="{U_GROUP_CP}">{L_USERGROUPS}</a>&nbsp; • 
<!-- BEGIN switch_user_logged_out --> 
&nbsp;<a href="{U_REGISTER}">{L_REGISTER}</a>&nbsp; • 
<!-- END switch_user_logged_out --> 
&nbsp;<a href="{U_FAQ}">{L_FAQ}</a>&nbsp; • &nbsp;<a href="{U_PROFILE}">{L_PROFILE}</a>&nbsp; • &nbsp;<a href="{U_PRIVATEMSGS}">{PRIVATE_MESSAGE_INFO}</a>&nbsp; 
• &nbsp;<a href="{U_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT}</a> 
</td> 
</tr> 
</table> 
<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table> 
{CALENDAR_BOX} 
<table width="100%" border="0" cellspacing="0" cellpadding="10"> 
<tr> 
<td>

das auch net:
#-----[ FIND ]------------------------------------------
#
<tr>
<td class="row1" valign="top"><span class="gen"><b>{L_OPTIONS}</b></span><br /><span class="gensmall">{HTML_STATUS}<br />{BBCODE_STATUS}<br />{SMILIES_STATUS}</span></td>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
<!-- BEGIN switch_quiz_answer -->
<tr>
<td class="row1" valign="top"><span class="gen"><b>{switch_quiz_answer.L_ANSWER}</b></span></td>
<td class="row2"><span class="genmed">{switch_quiz_answer.ANSWER}</span></td>
</tr>
<!-- END switch_quiz_answer -->
http://v082998.dd1232.kasserver.com/php ... g_body.txt



und nochwas:
#-----[ OPEN ]------------------------------------------
#
/templates/xxx/profile_view_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<td> <b><span class="gen">{INTERESTS}</span></b></td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<tr>
<td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_QUIZ_POINTS}:</span></td>
<td> <b><span class="gen">{QUIZ_POINTS}</span></b></td>
</tr>
da find ich nur:

<td align="right" valign="top" nowrap="nowrap" class="explaintitle">{L_INTERESTS}:</td>
<td>{INTERESTS}</td>
</tr>
Meine Signatur war zu groß und wurde deshalb gelöscht - Siehe phpBB.de-Knigge
Mofi
Mitglied
Beiträge: 42
Registriert: 07.09.2003 19:06
Wohnort: Bochum
Kontaktdaten:

Beitrag von Mofi »

und ich suche immernoch Fragen! :cry:
testit
Mitglied
Beiträge: 234
Registriert: 04.06.2001 02:00

Beitrag von testit »

Ich suche ebenfalls Fragen ...

aber im Zusammenhang mit dem Quizhack scheint eine Vielzahl von Zeitgenossen auf einmal zu ziemlich egoistischen Leutchen zu mutieren, die offensichtlich ganz vergessen haben, dass sie ebenfalls sowohl den MOD wie auch phpBB etc. kostenlos bereitgestellt bekamen.

Prima Einstellung!

Volker
Benutzeravatar
Innos_Zorn
Mitglied
Beiträge: 127
Registriert: 28.06.2003 12:32
Wohnort: Sternenfels
Kontaktdaten:

Beitrag von Innos_Zorn »

Ihr könnt gern meine Fragen haben, nur werdet ihr nicht viel damit anfangen können, weil sich ca. 60-80% um alternative Rockmusik drehen.
Aber wenn ihr wollt, hier sind sie

ca. 200 Quizfragen
...wir waten durch ein Meer von Blut, Gib uns dafür Kraft und Mut...
JarOfFlies - Alternative-Rock Community
testit
Mitglied
Beiträge: 234
Registriert: 04.06.2001 02:00

Beitrag von testit »

Hi,

vielen Dank, das ist sehr nett von Dir!

MfG

Volker
Mofi
Mitglied
Beiträge: 42
Registriert: 07.09.2003 19:06
Wohnort: Bochum
Kontaktdaten:

Beitrag von Mofi »

ich bedanke mich auch. Hab auch die 6000 Fragen bekommen. Wenn die einer haben möchte sollte er sich melden1
testit
Mitglied
Beiträge: 234
Registriert: 04.06.2001 02:00

Beitrag von testit »

Gemeldet!

Und jetzt? :grin:

Gruss
Volker
Mofi
Mitglied
Beiträge: 42
Registriert: 07.09.2003 19:06
Wohnort: Bochum
Kontaktdaten:

Beitrag von Mofi »

jetzt hast du die.

Und noch ne Frage an die Macher von dem Quiz:

Kann man das evtl irgendwie so regeln das eine Frage z.B. 5 Stunden dort steht und alle Leute einen Tipp abgegeben können. Nach 5 Stunden macht der Quizbot dir Frage zu und alle die die richtige Antwort gegeben haben bekommen die Punkte!?
Gesperrt

Zurück zu „phpBB 2.0: Mods in Entwicklung“