Vergleich showthread.php - 1.00 - 1.15

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.com
* License: http://www.mybboard.com/eula.html
*

 * Website: http://www.mybboard.com
* License: http://www.mybboard.com/eula.html
*

 * $Id$

 * $Id: showthread.php 903 2005-11-18 13:07:07Z chris $

 */
define("KILL_GLOBALS", 1);


 */
define("KILL_GLOBALS", 1);


Zeile 132Zeile 132
		$poll['timeout'] = $poll['timeout']*60*60*24;
$expiretime = $poll['dateline'] + $poll['timeout'];
$now = time();

		$poll['timeout'] = $poll['timeout']*60*60*24;
$expiretime = $poll['dateline'] + $poll['timeout'];
$now = time();

		if($poll['closed'] == "yes" || $thread['closed'] == "yes" || ($expiretime < $now && $poll['timeout'] > 0)) {


		if($poll['closed'] == "yes" || $thread['closed'] == "yes" || ($expiretime < $now && $poll['timeout'] > 0))
{

			$showresults = 1;
}

			$showresults = 1;
}

		$query = $db->query("SELECT * FROM ".TABLE_PREFIX."pollvotes WHERE uid='".$mybb->user[uid]."' AND pid='".$poll[pid]."'");
while($votecheck = $db->fetch_array($query)) {
$alreadyvoted = 1;
if($mybb->user['uid']) {



		if($mybb->user['uid'] != 0)
{
$query = $db->query("SELECT * FROM ".TABLE_PREFIX."pollvotes WHERE uid='".$mybb->user[uid]."' AND pid='".$poll[pid]."'");
while($votecheck = $db->fetch_array($query))
{
$alreadyvoted = 1;

				$votedfor[$votecheck['voteoption']] = 1;

				$votedfor[$votecheck['voteoption']] = 1;

			}
}
if($pollvotes[$poll['pid']]) {
$alreadyvoted = 1;





			}
}
else
{
if($_COOKIE['pollvotes'][$poll['pid']])
{
$alreadyvoted = 1;
}

		}
$optionsarray = explode("||~|~||", $poll['options']);
$votesarray = explode("||~|~||", $poll['votes']);

		}
$optionsarray = explode("||~|~||", $poll['options']);
$votesarray = explode("||~|~||", $poll['votes']);

Zeile 175Zeile 182
					eval("\$polloptions .= \"".$templates->get("showthread_poll_option_multiple")."\";");
} else {
eval("\$polloptions .= \"".$templates->get("showthread_poll_option")."\";");

					eval("\$polloptions .= \"".$templates->get("showthread_poll_option_multiple")."\";");
} else {
eval("\$polloptions .= \"".$templates->get("showthread_poll_option")."\";");

				}

				}

			}
}
if($poll['totvotes'])

			}
}
if($poll['totvotes'])

Zeile 193Zeile 200
			} else {
$pollstatus = $lang->poll_closed;
eval("\$pollstatus = \"".$templates->get("showthread_poll_results_closed")."\";");

			} else {
$pollstatus = $lang->poll_closed;
eval("\$pollstatus = \"".$templates->get("showthread_poll_results_closed")."\";");

			}

			}

			$lang->total_votes = sprintf($lang->total_votes, $poll['numvotes']);
eval("\$pollbox = \"".$templates->get("showthread_poll_results")."\";");
$plugins->run_hooks("showthread_poll_results");

			$lang->total_votes = sprintf($lang->total_votes, $poll['numvotes']);
eval("\$pollbox = \"".$templates->get("showthread_poll_results")."\";");
$plugins->run_hooks("showthread_poll_results");

Zeile 211Zeile 218
	
// Make forum jump...
$forumjump = makeforumjump("", $fid, 1);

	
// Make forum jump...
$forumjump = makeforumjump("", $fid, 1);





	// Update Thread Last Read
if($mybb->settings['threadreadcut'] && $mybb->user['uid'])
{

	// Update Thread Last Read
if($mybb->settings['threadreadcut'] && $mybb->user['uid'])
{

Zeile 429Zeile 436
		$plugins->run_hooks("showthread_linear");
}
if($mybb->settings['showsimilarthreads'] != "no") {

		$plugins->run_hooks("showthread_linear");
}
if($mybb->settings['showsimilarthreads'] != "no") {

		$query = $db->query("SELECT subject, tid, lastpost, username, replies FROM ".TABLE_PREFIX."threads WHERE fid=".$thread['fid']." AND tid!=".$thread['tid']." AND visible='1' AND  MATCH (subject) AGAINST ('".addslashes($thread['subject'])."') >= ".$mybb->settings['similarityrating']." ORDER BY dateline DESC LIMIT 0, ".$mybb->settings['similarlimit']);

		$query = $db->query("SELECT subject, tid, lastpost, username, replies, MATCH (subject) AGAINST ('".addslashes($thread['subject'])."') AS relevance FROM ".TABLE_PREFIX."threads WHERE fid='".$thread['fid']."' AND tid <> '".$thread['tid']."' AND visible='1' ORDER BY dateline DESC LIMIT 0, ".$mybb->settings['similarlimit']);

		$count = 0;
while($similarthread = $db->fetch_array($query)) {

		$count = 0;
while($similarthread = $db->fetch_array($query)) {

			$count++;
$similarthreaddate = mydate($mybb->settings['dateformat'], $similarthread['lastpost']);
$similarthreadtime = mydate($mybb->settings['timeformat'], $similarthread['lastpost']);
$similarthread['subject'] = htmlspecialchars_uni(stripslashes($similarthread['subject']));
eval("\$similarthreadbits .= \"".$templates->get("showthread_similarthreads_bit")."\";");




			if($similarthread['relevance'] >= $mybb->settings['similarityrating'])
{
$count++;
$similarthreaddate = mydate($mybb->settings['dateformat'], $similarthread['lastpost']);
$similarthreadtime = mydate($mybb->settings['timeformat'], $similarthread['lastpost']);
$similarthread['subject'] = htmlspecialchars_uni(stripslashes($similarthread['subject']));
eval("\$similarthreadbits .= \"".$templates->get("showthread_similarthreads_bit")."\";");
}

		}
if($count) {
eval("\$similarthreads = \"".$templates->get("showthread_similarthreads")."\";");

		}
if($count) {
eval("\$similarthreads = \"".$templates->get("showthread_similarthreads")."\";");