Wer hat abgestimmt - WBB 2.3.x |
Agi
TEAM - PHP Freak
Dabei seit: 22.11.04
Beiträge: 2.628
Fähigkeiten: WBB3 Profi Forenversion: 3.1
Themenstarter
|
|
Zitat: |
Original von helmlein
Das wäre genial, wenn du das mit integrieren könntest
Bei größeren Foren wird sonst bei Umfragen die Liste ewig lang
|
auch dafür hab ich ne komfortable Lösung finden können.
So dass mans schön öffnen und schließen kann, ohne dass standardmäßig die Liste ewiglang runterreicht^^
__________________
|
|
12.08.06 19:27 |
Finden
Als Freund hinzufügen
|
|
frodan
Mitglied
Dabei seit: 28.03.04
Beiträge: 39
Herkunft: NRW Forenversion: 2.3
|
|
Huhu
Also bei mir funzt es auch alles.
Ich warte auch schon auf die neue version,
wegen der mehrfachabstimmung
einfach ein Klasse Hack
|
|
20.08.06 18:10 |
E-Mail
WWW
Finden
Als Freund hinzufügen
|
|
friedel58
Mitglied
Dabei seit: 25.09.06
Beiträge: 4
Forenversion: 2.3
|
|
Habe den Hack eingebaut. Kann aber nichts erkennen bzw. es passiert garnichts. habe ich was Falsch gemacht oder fehlt mir ein Button. ??
www.fribriweber.de/scrappen/
hier sind die nach Installationangaben die veränderten Dateien:
pollvote.php
<?php
// ***************************************************************************
*********//
// * WoltLab Burning Board 2
// ***************************************************************************
*********//
// * Copyright (c) 2001-2004 WoltLab GmbH
// * Web http://www.woltlab.de/
// * License http://www.woltlab.de/products/burning_board/license_en.php
// * http://www.woltlab.de/products/burning_board/license.php
// ***************************************************************************
*********//
// * WoltLab Burning Board 2 is NOT free software.
// * You may not redistribute this package or any of it's files.
// ***************************************************************************
*********//
// * $Date: 2004-10-20 13:24:57 +0200 (Wed, 20 Oct 2004) $
// * $Author: Burntime $
// * $Rev: 1453 $
// ***************************************************************************
*********//
$filename = 'pollvote.php';
require('./global.php');
$lang->load('MISC');
if (!isset($pollid)) error($lang->get("LANG_GLOBAL_ERROR_FALSELINK", array('$adminmail' => $adminmail)));
if (!checkpermissions("can_vote_poll")) access_error();
if (!count($_POST['polloptionid'])) error($lang->get("LANG_MISC_POLLVOTE_ERROR1"));
if ($poll['timeout'] && time() > $poll['starttime'] + $poll['timeout'] * 86400) error($lang->get("LANG_MISC_POLLVOTE_ERROR2"));
if (count($_POST['polloptionid']) > $poll['choicecount']) error($lang->get("LANG_MISC_POLLVOTE_ERROR3", array('$choicecount' => $poll['choicecount'])));
if ($wbbuserdata['userid']) $votecheck = $db->query_first("SELECT id AS pollid FROM bb".$n."_votes WHERE id='$pollid' AND votemode='1' AND userid='$wbbuserdata[userid]'");
else $votecheck = $db->query_first("SELECT id AS pollid FROM bb".$n."_votes WHERE id='$pollid' AND votemode='1' AND ipaddress='".addslashes($REMOTE_ADDR)."'");
if ($votecheck['pollid']) error($lang->get("LANG_MISC_POLLVOTE_ERROR4"));
$polloptionsids=implode(",",$_POST['polloptionid']);
$polloptionsids=preg_replace("/[^0-9,]/","",$polloptionsids);
$db->query("INSERT INTO bb".$n."_votes (id,votemode,userid,ipaddress,voteid) VALUES ('$pollid','1','$wbbuserdata[userid]','".addslashes($REMOTE_ADDR)."',$pollo
ptionsids)");
$polloptionsids = implode(",", $_POST['polloptionid']);
$polloptionsids = preg_replace("/[^0-9,]/", "", $polloptionsids);
$db->query("UPDATE bb".$n."_polloptions SET votes=votes+1 WHERE polloptionid IN ($polloptionsids)");
header("Location: thread.php?threadid=".$poll['threadid'].$SID_ARG_2ND_UN);
exit();
?>
thread.php
<?php
// ***************************************************************************
*********//
// * WoltLab Burning Board 2
// ***************************************************************************
*********//
// * Copyright (c) 2001-2004 WoltLab GmbH
// * Web http://www.woltlab.de/
// * License http://www.woltlab.de/products/burning_board/license_en.php
// * http://www.woltlab.de/products/burning_board/license.php
// ***************************************************************************
*********//
// * WoltLab Burning Board 2 is NOT free software.
// * You may not redistribute this package or any of it's files.
// ***************************************************************************
*********//
// * $Date: 2005-06-16 15:16:14 +0200 (Thu, 16 Jun 2005) $
// * $Author: Burntime $
// * $Rev: 1621 $
// ***************************************************************************
*********//
$filename = 'thread.php';
require('./global.php');
require('./acp/lib/class_parse.php');
$lang->load('THREAD,MEMBERS');
if ((!isset($postid) && !isset($threadid)) || $thread['closed'] == 3) error($lang->get("LANG_GLOBAL_ERROR_FALSELINK", array('$adminmail' => $adminmail)));
if (!checkpermissions("can_read_thread")) access_error();
und
threat_poll_result
<table cellpadding=4 cellspacing=1 border=0 width="{tableinwidth}" bgcolor="{tableinbordercolor}">
<tr bgcolor="{tabletitlecolor}" id="tabletitle">
<td width="100%" colspan=4><normalfont color="{fontcolorsecond}"><b>Umfrage:</b> $poll[question]</font></td>
</tr>
$thread_poll_resultbit
<tr bgcolor="{tabletitlecolor}" id="tabletitle">
<td align="right" colspan=2><normalfont color="{fontcolorsecond}">Insgesamt:</font></td>
<td nowrap><normalfont color="{fontcolorsecond}">$totalvotes Stimmen</font></td>
<td nowrap><normalfont color="{fontcolorsecond}">100%</font></td>
</tr>
</table>
<if(!$totalvotes == "0")><then>
<br />
<table cellpadding="{$style['tableincellpadding']}" cellspacing="{$style['tableincellspacing']}" border="{$style['tableinborder']}" style="width:{$style['tableinwidth']}" class="tableinborder">
<tr>
<td class="tabletitle" style="width:100%" colspan="2" align="left"><center><span class="normalfont"><b>{$lang->items['LANG_THREAD_POLL_USER_VOTET']}</b></sp
an></center></td>
</tr>
<tr>
<td class="tablea" style="width:100%" colspan="2" align="left"><div align="center"><span class="normalfont">$user_votet</span></div></td>
</tr>
<tr>
<td class="tabletitle" colspan="2" align="center"><span class="normalfont"> {$lang->items['LANG_THREAD_POLL_USER_VOTET_COPYRIG
HT']}</span></td>
</tr>
</table>
<br />
</then></if>
<table width="{tableinwidth}">
<tr>
<td align="right"><normalfont> $mod_poll_edit</font></td>
</tr>
</table>
müsste alles richtig sein. Schau mal nach.
oder habe ich was vergessen? Und wie sieht es mit dem Cache aus müssen da nicht auch die dateien geändert werden??
Dieser Beitrag wurde 2 mal editiert, zum letzten Mal von friedel58: 25.09.06 23:28.
|
|
25.09.06 22:51 |
E-Mail
Finden
Als Freund hinzufügen
|
|
friedel58
Mitglied
Dabei seit: 25.09.06
Beiträge: 4
Forenversion: 2.3
|
|
Sorry,
habe es nun gemacht. Kann aber immer noch nichts sehen. Irgendwo ist ein Haken drin.
|
|
27.09.06 18:47 |
E-Mail
Finden
Als Freund hinzufügen
|
|
Agi
TEAM - PHP Freak
Dabei seit: 22.11.04
Beiträge: 2.628
Fähigkeiten: WBB3 Profi Forenversion: 3.1
Themenstarter
|
|
Thx das ist sogar noch besser als meine Spoiler Variante (die ich hier leider vergessen habe zu posten
) ...
Für alle die die Spoiler Variante haben wollen:
Suche in der thread_poll_result.tpl nach:
code: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
|
<if(!$totalvotes == "0")><then>
<br />
<table cellpadding="{$style['tableincellpadding']}" cellspacing="{$style['tableincellspacing']}" border="{$style['tableinborder']}" style="width:{$style['tableinwidth']}" class="tableinborder">
<tr>
<td class="tabletitle" style="width:100%" colspan="2" align="left"><center><span class="normalfont"><b>{$lang->items['LANG_THREAD_POLL_USER_VOTET']}</b></span></center></td>
</tr>
<tr>
<td class="tablea" style="width:100%" colspan="2" align="left"><div align="center"><span class="normalfont">$user_votet</span></div></td>
</tr>
<tr>
<td class="tabletitle" colspan="2" align="center"><span class="normalfont"> </span></td>
</tr>
</table>
<br />
</then></if> |
|
Und ersetze ihn gegen:
code: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
|
<if(!$totalvotes == "0")><then>
<br />
<table cellpadding="{$style['tableincellpadding']}" cellspacing="{$style['tableincellspacing']}" border="{$style['tableinborder']}" style="width:{$style['tableinwidth']}" class="tableinborder">
<tr>
<td class="tabletitle" style="width:100%" colspan="2" align="left"><center><span class="normalfont"><b>{$lang->items['LANG_THREAD_POLL_USER_VOTET']}</b></span></center></td>
</tr>
<tr>
<td class="tablea" style="width:100%" colspan="2" align="left"><div align="center"><span class="normalfont">$user_votet</span></div></td>
</tr>
<tr>
<td class="tabletitle" colspan="2" align="center"><span class="normalfont"> {$lang->items['LANG_THREAD_POLL_USER_VOTET_COPYRIGHT']}</span></td>
</tr>
</table>
<br />
</then></if> |
|
Jetzt sollte ein Spoiler Button dort sein und wenn man auf diesen klickt, öffnet sich die Liste mit den Namen
Der spoiler button basiert auf der ersten Spoilerhack Verson von chez und ich habe seine Erlaubnis, diese Spoilerfunktion in diesem Hack hier zu nutzen.
Ich werd aber versuchen, das ganze in Version 3 nochmal verbessert darzustellen, aber wie gesagt: Releasetermin: unbekannt
@Indeep: Ich werd aber auch deine Variante noch testen und vlt diese in Version 3 dann nutzen, wenn ich darf (falls sie flexibler sein sollte)
@friedel58: Kannst mir vlt nen Screen machen oder meinen Acc auf deinem Board freischalten, damit ichs mir angucken kann?
Und hast du die Templates nach dem Bearbeiten auch gecached?
__________________
|
|
27.09.06 18:49 |
Finden
Als Freund hinzufügen
|
|
friedel58
Mitglied
Dabei seit: 25.09.06
Beiträge: 4
Forenversion: 2.3
|
|
habe kein gecacht. Muss ich nur den Thred cachen oder alle neuen. Beim letzten cachen ist alles kaputt gegangen
|
|
27.09.06 19:38 |
E-Mail
Finden
Als Freund hinzufügen
|
|
Indeep
Mitglied
Dabei seit: 26.08.04
Beiträge: 419
Herkunft: Berlin Forenversion: 2.3
|
|
Dann haste das falsch eingebaut, poste mal den Inhalt deiner thread_poll_result.tpl
|
|
27.09.06 19:39 |
E-Mail
Finden
Als Freund hinzufügen
|
|
helmlein
Mitglied
Dabei seit: 02.06.05
Beiträge: 234
Herkunft: Freie Gebirgsrepublik Forenversion: wbb2.3.x
|
|
Beim ersetzen ist mir noch nie was mussglückt
Naja gibt immer erstemal
Danke für die Hilfe
- Hier stimmt der Support wengistens noch
code: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
|
<if(!$totalvotes == "0")><then>
<br />
<table cellpadding="{$style['tableincellpadding']}" cellspacing="{$style['tableincellspacing']}" border="{$style['tableinborder']}" style="width:{$style['tableinwidth']}" class="tableinborder">
<tr>
<td class="tabletitle" style="width:100%" colspan="2" align="left"><center><span class="normalfont"><b>{$lang->items['LANG_THREAD_POLL_USER_VOTET']}</b></span></center></td>
</tr>
<tr>
<td class="tablea" style="width:100%" colspan="2" align="left"><div align="center"><span class="normalfont">$user_votet</span></div></td>
</tr>
<tr>
<td class="tabletitle" colspan="2" align="center"><span class="normalfont"> {$lang->items['LANG_THREAD_POLL_USER_VOTET_COPYRIGHT']}</span></td>
</tr>
</table>
<br />
</then></if>
<table style="width:{$style['tableinwidth']}">
<tr>
<td align="right"><span class="normalfont"> $mod_poll_edit</span></td>
</tr>
</table>
|
|
|
|
27.09.06 19:41 |
E-Mail
WWW
Finden
Als Freund hinzufügen
|
|
Indeep
Mitglied
Dabei seit: 26.08.04
Beiträge: 419
Herkunft: Berlin Forenversion: 2.3
|
|
@helmlein die original tpls findest du hier in der Database
das ist die geänderte mit der Klappfunktion
code: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
|
<table cellpadding="{$style['tableincellpadding']}" cellspacing="{$style['tableincellspacing']}" border="{$style['tableinborder']}" style="width:{$style['tableinwidth']}" class="tableinborder">
<tr>
<td class="tabletitle" style="width:100%" colspan="4" align="left"><span class="normalfont"><b>{$lang->items['LANG_THREAD_POLL']}</b> $poll[question]</span></td>
</tr>
$thread_poll_resultbit
<tr align="left">
<td class="tabletitle" align="right" colspan="2"><span class="normalfont">{$lang->items['LANG_THREAD_POLL_TOTAL']}</span></td>
<td class="tabletitle" nowrap="nowrap"><span class="normalfont">{$lang->items['LANG_THREAD_POLL_VOTES']}</span></td>
<td class="tabletitle" nowrap="nowrap"><span class="normalfont">100%</span></td>
</tr>
</table>
<table style="width:{$style['tableinwidth']}">
<tr>
<td align="right"><span class="normalfont"> $mod_poll_edit</span></td>
</tr>
</table>
<if(!$totalvotes == "0")><then>
<table cellpadding="{$style['tableincellpadding']}" cellspacing="{$style['tableincellspacing']}" border="{$style['tableinborder']}" style="width:{$style['tableinwidth']}" class="tableinborder">
<tr>
<td class="tabletitle" style="width:100%" colspan="2" align="left"><center><span class="normalfont"><b>{$lang->items['LANG_THREAD_POLL_USER_VOTET']}</b></span></center></td>
</tr>
<tr>
<SCRIPT language="JavaScript">
function clap( id )
{
displayType = ( document.getElementById( id ).style.display == 'none') ? 'block' : 'none';
document.getElementById( id ).style.display = displayType;
}
</SCRIPT>
<td class="tablea" style="width:100%" colspan="2" align="left"><span class="normalfont">
<div align="center"><a href="Javascript:clap('1')" onFocus="if(this.blur)this.blur()" ><b>Hier Klicken zur Ansicht</b></a></div>
<div ID="1" STYLE="display: none">
$user_votet</span></div></td>
</tr>
</table>
<br />
</then></if> |
|
|
|
28.09.06 10:26 |
E-Mail
Finden
Als Freund hinzufügen
|
|
helmlein
Mitglied
Dabei seit: 02.06.05
Beiträge: 234
Herkunft: Freie Gebirgsrepublik Forenversion: wbb2.3.x
|
|
Danke für die Hilfe.
Jetzt brauch ich nur noch das Ding, wie es ist, wenn man mehrere Auswahlmöglichkeiten hat. Es wird ja immer nur eins angezeigt
|
|
28.09.06 16:04 |
E-Mail
WWW
Finden
Als Freund hinzufügen
|
|
Agi
TEAM - PHP Freak
Dabei seit: 22.11.04
Beiträge: 2.628
Fähigkeiten: WBB3 Profi Forenversion: 3.1
Themenstarter
|
|
Zitat: |
Original von spider30
Wann kommt version 3.0 ??? |
Ich kann dazu leider kein genaues Datum vorgeben, da ich auch noch Schule habe nebenher und so kaum zum Coden komme ...
Ganz grob würd ich mal sagen: Spätestens im Dezember ...
Aber ich kann für nichts garantieren ..
__________________
|
|
02.10.06 18:17 |
Finden
Als Freund hinzufügen
|
|
Vyserion
Mitglied
Dabei seit: 06.01.06
Beiträge: 3
|
|
Hi
Also ich hab den Hack bei mir eingebaut und bekomme nun nur ein weißes fenster mit allem möglichen Text, der mir nich viel sagt ^^, wenn ich für etwas vote.
code: |
1:
|
WoltLab Burning Board 2 // ************************************************************************************// // * Copyright (c) 2001-2004 WoltLab GmbH // * Web http://www.woltlab.de/ // * License http://www.woltlab.de/products/burning_board/license_en.php // * http://www.woltlab.de/products/burning_board/license.php // ************************************************************************************// // * WoltLab Burning Board 2 is NOT free software. // * You may not redistribute this package or any of it's files. // ************************************************************************************// // * $Date: 2004-10-20 13:24:57 +0200 (Wed, 20 Oct 2004) $ // * $Author: Burntime $ // * $Rev: 1453 $ // ************************************************************************************// $filename = 'pollvote.php'; require('./global.php'); $lang->load('MISC'); if (!isset($pollid)) error($lang->get("LANG_GLOBAL_ERROR_FALSELINK", array('$adminmail' => $adminmail))); if (!checkpermissions("can_vote_poll")) access_error(); if (!count($_POST['polloptionid'])) error($lang->get("LANG_MISC_POLLVOTE_ERROR1")); if ($poll['timeout'] && time() > $poll['starttime'] + $poll['timeout'] * 86400) error($lang->get("LANG_MISC_POLLVOTE_ERROR2")); if (count($_POST['polloptionid']) > $poll['choicecount']) error($lang->get("LANG_MISC_POLLVOTE_ERROR3", array('$choicecount' => $poll['choicecount']))); if ($wbbuserdata['userid']) $votecheck = $db->query_first("SELECT id AS pollid FROM bb".$n."_votes WHERE id='$pollid' AND votemode='1' AND userid='$wbbuserdata[userid]'"); else $votecheck = $db->query_first("SELECT id AS pollid FROM bb".$n."_votes WHERE id='$pollid' AND votemode='1' AND ipaddress='".addslashes($REMOTE_ADDR)."'"); if ($votecheck['pollid']) error($lang->get("LANG_MISC_POLLVOTE_ERROR4")); $polloptionsids=implode(",",$_POST['polloptionid']); $polloptionsids=preg_replace("/[^0-9,]/","",$polloptionsids); $db->query("INSERT INTO bb".$n."_votes (id,votemode,userid,ipaddress,voteid) VALUES ('$pollid','1','$wbbuserdata[userid]','".addslashes($REMOTE_ADDR)."','$polloptionsids')"); $polloptionsids = implode(",", $_POST['polloptionid']); $polloptionsids = preg_replace("/[^0-9,]/", "", $polloptionsids); $db->query("UPDATE bb".$n."_polloptions SET votes=votes+1 WHERE polloptionid IN ($polloptionsids)"); header("Location: thread.php?threadid=".$poll['threadid'].$SID_ARG_2ND_UN); exit(); ?> |
|
Ich hoff ma ihr könnt mir helfen ^^
Der einzige andere Hack der installiert is, is das mywbb-Portal 4.0
mfg Vyserion
|
|
10.11.06 18:52 |
E-Mail
Finden
Als Freund hinzufügen
|
|
Agi
TEAM - PHP Freak
Dabei seit: 22.11.04
Beiträge: 2.628
Fähigkeiten: WBB3 Profi Forenversion: 3.1
Themenstarter
|
|
Hi häng mir die zu änderenden Dateien bitte mal an. Dann guck ich nach.
__________________
|
|
11.11.06 15:51 |
Finden
Als Freund hinzufügen
|
|
|