Wer hat abgestimmt - WBB 2.3.x

Agi
Zitat:
Original von helmlein
Das wäre genial, wenn du das mit integrieren könntest smile

Bei größeren Foren wird sonst bei Umfragen die Liste ewig lang unglücklich


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^^
frodan
Huhu

Also bei mir funzt es auch alles.

Ich warte auch schon auf die neue version, großes Grinsen

wegen der mehrfachabstimmung Freude

einfach ein Klasse Hack cool
helmlein
@agi

Wie sieht es mit Version³ aus?
friedel58
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">&nbsp;{$lang->items['LANG_THREAD_POLL_USER_VOTET_COPYRIG
HT']}</span></td>
</tr>
</table>
<br />
</then></if>
<table width="{tableinwidth}">
<tr>
<td align="right"><normalfont>&nbsp;$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??
Indeep
Mir war das auch zulang daher hier die anleitung zum ein und ausklappen

Suche in der thread_poll_result.tpl
php:
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">&nbsp;{$lang->items['LANG_THREAD_POLL_USER_VOTET_COPYRIGHT']}</span></td>
 </tr>
</table>
<br />
</then></if>


und ersetze mit
php:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
<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 clapid )
{
displayType = ( document.getElementByIdid ).style.display == 'none') ? 'block' 'none';
document.getElementByIdid ).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>


DEMO: http://www.schreiendeseele.de/files/voteeinklappen.htm
getestet mit WBB 2.3.5
friedel58
Sorry,
habe es nun gemacht. Kann aber immer noch nichts sehen. Irgendwo ist ein Haken drin.
Agi
Thx das ist sogar noch besser als meine Spoiler Variante (die ich hier leider vergessen habe zu posten traurig ) ...

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">&nbsp;</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">&nbsp;{$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?
Indeep
Klar darfste
helmlein
@indeep
Danke erstmal.

Allerdings wird bei mir jetzt die Umfrage an sich nicht mehr dargestellt unglücklich

Ich brauch bitte mal die Original "thread_poll_result"-Template.

Danke smile
friedel58
habe kein gecacht. Muss ich nur den Thred cachen oder alle neuen. Beim letzten cachen ist alles kaputt gegangen
Indeep
Dann haste das falsch eingebaut, poste mal den Inhalt deiner thread_poll_result.tpl
helmlein
Beim ersetzen ist mir noch nie was mussglückt unglücklich

Naja gibt immer erstemal smile

Danke für die Hilfe Augenzwinkern - Hier stimmt der Support wengistens noch Augenzwinkern

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">&nbsp;{$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">&nbsp;$mod_poll_edit</span></td>
 </tr>
</table>
friedel58
hier ist sie

<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">&nbsp;{$lang->items['LANG_THREAD_POLL_USER_VOTET_COPYRIG
HT']}</span></td>
</tr>
</table>
<br />
</then></if>
<table width="{tableinwidth}">
<tr>
<td align="right"><normalfont>&nbsp;$mod_poll_edit</font></td>
</tr>
</table>



ich nehme an ich war gemeint.
wie gesagt habe nichts gecacht. weil beim letzten mal alles defekt war.
Muss ich das tpl cachen ??
Indeep
@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">&nbsp;$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>
helmlein
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 unglücklich
spider30
Wann kommt version 3.0 ???
Agi
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 .. unglücklich
Vyserion
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
Agi
Hi häng mir die zu änderenden Dateien bitte mal an. Dann guck ich nach.
Vyserion
Hab die Dateien jetzt im Anhang.