Vergleich archive/index.php - 1.2.7 - 1.2.12

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

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

 * $Id: index.php 2951 2007-03-16 05:40:28Z Tikitiki $

 * $Id: index.php 3167 2007-06-28 05:34:18Z chris $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 15Zeile 15
require_once MYBB_ROOT."inc/functions_post.php";
// Load global language phrases
$lang->load("index");

require_once MYBB_ROOT."inc/functions_post.php";
// Load global language phrases
$lang->load("index");

 

$plugins->run_hooks("archive_start");


switch($action)
{


switch($action)
{

Zeile 36Zeile 38
				archive_error_no_permission();
}
}

				archive_error_no_permission();
}
}

		

		

		$announcement['subject'] = htmlspecialchars_uni($parser->parse_badwords($announcement['subject']));

$parser_options = array(

		$announcement['subject'] = htmlspecialchars_uni($parser->parse_badwords($announcement['subject']));

$parser_options = array(

Zeile 57Zeile 59

// Format announcement contents.
$announcement['startdate'] = my_date($mybb->settings['dateformat'].", ".$mybb->settings['timeformat'], $announcement['startdate']);


// Format announcement contents.
$announcement['startdate'] = my_date($mybb->settings['dateformat'].", ".$mybb->settings['timeformat'], $announcement['startdate']);






$plugins->run_hooks("archive_announcement_start");


		echo "<div class=\"post\">\n<div class=\"header\">\n<h2>{$announcement['subject']} - {$profile_link}</h2>";
echo "<div class=\"dateline\">{$announcement['startdate']}</div>\n</div>\n<div class=\"message\">{$announcement['message']}</div>\n</div>\n";

		echo "<div class=\"post\">\n<div class=\"header\">\n<h2>{$announcement['subject']} - {$profile_link}</h2>";
echo "<div class=\"dateline\">{$announcement['startdate']}</div>\n</div>\n<div class=\"message\">{$announcement['message']}</div>\n</div>\n";

 

$plugins->run_hooks("archive_announcement_end");


archive_footer();
break;


archive_footer();
break;





	// Display a thread.
case "thread":
$thread['subject'] = htmlspecialchars_uni($parser->parse_badwords($thread['subject']));

	// Display a thread.
case "thread":
$thread['subject'] = htmlspecialchars_uni($parser->parse_badwords($thread['subject']));

Zeile 73Zeile 79
		if(!$forum['fid'] || $forum['password'] != '')
{
archive_error($lang->error_invalidforum);

		if(!$forum['fid'] || $forum['password'] != '')
{
archive_error($lang->error_invalidforum);

		}

		}


// Check if we have permission to view this thread
$forumpermissions = forum_permissions($forum['fid']);
if($forumpermissions['canview'] != "yes" || $forumpermissions['canviewthreads'] != 'yes')


// Check if we have permission to view this thread
$forumpermissions = forum_permissions($forum['fid']);
if($forumpermissions['canview'] != "yes" || $forumpermissions['canviewthreads'] != 'yes')

		{

		{

			archive_error_no_permission();
}

			archive_error_no_permission();
}

 


		// Build the navigation
build_forum_breadcrumb($forum['fid'], 1);
add_breadcrumb($thread['subject']);

archive_header($thread['subject'], $thread['subject'], $mybb->settings['bburl']."/showthread.php?tid=$id");

		// Build the navigation
build_forum_breadcrumb($forum['fid'], 1);
add_breadcrumb($thread['subject']);

archive_header($thread['subject'], $thread['subject'], $mybb->settings['bburl']."/showthread.php?tid=$id");

 

$plugins->run_hooks("archive_thread_start");


// Paginate this thread
$perpage = $mybb->settings['postsperpage'];


// Paginate this thread
$perpage = $mybb->settings['postsperpage'];

Zeile 97Zeile 106
			$page = 1;
}
if($page)

			$page = 1;
}
if($page)

		{
$start = ($page-1) * $perpage;

		{
$start = ($page-1) * $perpage;

		}
else
{

		}
else
{

Zeile 168Zeile 177
			{
$post['username'] = "<a href=\"".$mybb->settings['bburl']."/member.php?action=profile&amp;uid=".$post['uid']."\">".$post['userusername']."</a>";
}

			{
$post['username'] = "<a href=\"".$mybb->settings['bburl']."/member.php?action=profile&amp;uid=".$post['uid']."\">".$post['userusername']."</a>";
}

 

$plugins->run_hooks("archive_thread_post");


// Finally show the post
echo "<div class=\"post\">\n<div class=\"header\">\n<div class=\"author\"><h2>{$post['username']}</h2></div>";
echo "<div class=\"dateline\">{$post['date']}</div>\n</div>\n<div class=\"message\">{$post['message']}</div>\n</div>\n";
}
archive_multipage($postcount, $perpage, $page, "{$base_url}thread-$id");


// Finally show the post
echo "<div class=\"post\">\n<div class=\"header\">\n<div class=\"author\"><h2>{$post['username']}</h2></div>";
echo "<div class=\"dateline\">{$post['date']}</div>\n</div>\n<div class=\"message\">{$post['message']}</div>\n</div>\n";
}
archive_multipage($postcount, $perpage, $page, "{$base_url}thread-$id");

 

$plugins->run_hooks("archive_thread_end");


archive_footer();
break;


archive_footer();
break;

Zeile 203Zeile 216

// Build the archive header.
archive_header($forum['name'], $forum['name'], $mybb->settings['bburl']."/forumdisplay.php?fid={$id}");


// Build the archive header.
archive_header($forum['name'], $forum['name'], $mybb->settings['bburl']."/forumdisplay.php?fid={$id}");

 

$plugins->run_hooks("archive_forum_start");


$perpage = $mybb->settings['threadsperpage'];
$pages = ceil($threadcount/$perpage);
if($page > $pages)


$perpage = $mybb->settings['threadsperpage'];
$pages = ceil($threadcount/$perpage);
if($page > $pages)

		{
$page = 1;
}
if($page > 0)

		{
$page = 1;
}
if($page > 0)

		{
$start = ($page-1) * $perpage;
}

		{
$start = ($page-1) * $perpage;
}

Zeile 221Zeile 236
		}

// Decide what type of listing to show.

		}

// Decide what type of listing to show.

		if($forum['type'] == 'f')
{
echo "<div class=\"listing\">\n<div class=\"header\"><h2>{$forum['name']}</h2></div>\n";

		if($forum['type'] == 'f')
{
echo "<div class=\"listing\">\n<div class=\"header\"><h2>{$forum['name']}</h2></div>\n";

		}
elseif($forum['type'] == 'c')
{
echo "<div class=\"listing\">\n<div class=\"header\"><h2>{$forum['name']}</h2></div>\n";

		}
elseif($forum['type'] == 'c')
{
echo "<div class=\"listing\">\n<div class=\"header\"><h2>{$forum['name']}</h2></div>\n";

		}

		}


// Show subforums.
$query = $db->simple_select(TABLE_PREFIX."forums", "COUNT(fid) AS subforums", "pid='{$id}' AND status='1'");


// Show subforums.
$query = $db->simple_select(TABLE_PREFIX."forums", "COUNT(fid) AS subforums", "pid='{$id}' AND status='1'");

Zeile 264Zeile 279
		}

// Get the stickies if the forum is not a category.

		}

// Get the stickies if the forum is not a category.

		if($forum['type'] == 'f')

		if($forum['type'] == 'f')

		{
$options = array(
'order_by' => 'sticky, lastpost',

		{
$options = array(
'order_by' => 'sticky, lastpost',

Zeile 281Zeile 296
				while($sticky = $db->fetch_array($query))
{
if($sticky['replies'] != 1)

				while($sticky = $db->fetch_array($query))
{
if($sticky['replies'] != 1)

					{

					{

						$lang_reply_text = $lang->archive_replies;
}
else
{
$lang_reply_text = $lang->archive_reply;

						$lang_reply_text = $lang->archive_replies;
}
else
{
$lang_reply_text = $lang->archive_reply;

					}					




					}

$plugins->run_hooks("archive_forum_thread");


					echo "<li><a href=\"{$base_url}thread-{$sticky['tid']}.html\">{$sticky['subject']}</a>";
echo "<span class=\"replycount\"> ({$sticky['replies']} {$lang_reply_text})</span></li>";
}

					echo "<li><a href=\"{$base_url}thread-{$sticky['tid']}.html\">{$sticky['subject']}</a>";
echo "<span class=\"replycount\"> ({$sticky['replies']} {$lang_reply_text})</span></li>";
}

Zeile 321Zeile 339
					{
$lang_reply_text = $lang->archive_reply;
}

					{
$lang_reply_text = $lang->archive_reply;
}

 

$plugins->run_hooks("archive_forum_thread");


					echo "<li><a href=\"{$base_url}thread-{$thread['tid']}.html\">{$thread['subject']}</a>";
echo "<span class=\"replycount\"> ({$thread['replies']} {$lang_reply_text})</span></li>";
}
echo "</ol>\n</div>\n";
}
}

					echo "<li><a href=\"{$base_url}thread-{$thread['tid']}.html\">{$thread['subject']}</a>";
echo "<span class=\"replycount\"> ({$thread['replies']} {$lang_reply_text})</span></li>";
}
echo "</ol>\n</div>\n";
}
}





		echo "</div>\n";

archive_multipage($threadcount, $perpage, $page, "{$base_url}forum-$id");

		echo "</div>\n";

archive_multipage($threadcount, $perpage, $page, "{$base_url}forum-$id");

		archive_footer();





$plugins->run_hooks("archive_forum_end");

archive_footer();

		break;

// Display the board home.

		break;

// Display the board home.

Zeile 339Zeile 363
		// Build our forum listing
$forums = build_archive_forumbits(0);
archive_header("", $mybb->settings['bbname'], $mybb->settings['bburl']."/index.php");

		// Build our forum listing
$forums = build_archive_forumbits(0);
archive_header("", $mybb->settings['bbname'], $mybb->settings['bburl']."/index.php");

 

$plugins->run_hooks("archive_index_start");


		echo "<div class=\"listing forumlist\">\n<div class=\"header\">{$mybb->settings['bbname']}</div>\n<div class=\"forums\">\n<ul>\n";
echo $forums;
echo "\n</ul>\n</div>\n</div>";

		echo "<div class=\"listing forumlist\">\n<div class=\"header\">{$mybb->settings['bbname']}</div>\n<div class=\"forums\">\n<ul>\n";
echo $forums;
echo "\n</ul>\n</div>\n</div>";

 

$plugins->run_hooks("archive_index_end");


		archive_footer();
break;
default:
header("HTTP/1.0 404 Not Found");
echo $lang->archive_not_found;

		archive_footer();
break;
default:
header("HTTP/1.0 404 Not Found");
echo $lang->archive_not_found;

		exit;

 
}

}

 

$plugins->run_hooks("archive_end");


/**
* Gets a list of forums and possibly subforums.


/**
* Gets a list of forums and possibly subforums.