Simple Colored Usergroups

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
29
66%
Very Good
8
18%
Good
3
7%
Fair
1
2%
Poor
3
7%
 
Total votes: 44

runegirlie
Registered User
Posts: 173
Joined: Sun Jul 31, 2005 6:08 pm

Re: Simple Colored Usergroups

Post by runegirlie » Tue Mar 27, 2007 6:55 am

Okay:

Earlier I had posted that I had this issue .. I did not have this issue prior to installing this color mod:

Names in topics showed as such: Stoffel85');">Stoffel85

To stop it from doing that I removed a line of code from viewtopic.php:

$poster = '<a href="javascript:pn(\''.$poster.'\');">'.$poster.'</a>';

This particular line of code is part of the Super Quick Reply Mod. Removing it fixed the above issue with the names .. but it gave me a new issue: some people (not all people) would click on a link to view a topic and see nothing in the boxes where posts should be. Once I replaced the code - they could see the posts again, BUT, the problem with the names shows up again.

kkroo
Registered User
Posts: 729
Joined: Sat Dec 03, 2005 4:49 pm
Contact:

Re: Simple Colored Usergroups

Post by kkroo » Tue Mar 27, 2007 9:50 am

This MOD has nothing to do with posts.
My MODs

Need a coder?

Enjoy my Mods? - Image

runegirlie
Registered User
Posts: 173
Joined: Sun Jul 31, 2005 6:08 pm

Re: Simple Colored Usergroups

Post by runegirlie » Tue Mar 27, 2007 1:07 pm

bprsk8r4272 wrote: you could go in phpmyadmin and go into phpbb_groups and change the group_id value however if you do that it may kick the people out of the groups and you'll have to re add them


Help? :)

runegirlie
Registered User
Posts: 173
Joined: Sun Jul 31, 2005 6:08 pm

Re: Simple Colored Usergroups

Post by runegirlie » Tue Mar 27, 2007 1:11 pm

kkroo wrote: This MOD has nothing to do with posts.


Yes - I am fully aware of that. Please re-read my second post and you will see that I am not asking you anything to do with this mod and posts. I am starting to think that your mod is not compatible with the Super Quick Reply mod .. one example of that is the way my usernames are showing up now on threads:

Stoffel85');">Stoffel85

The user's name is "Stoffel85" - it shows up twice and you can't click the hyperlink. I added the above information so you could see where I think your mod is conflicting with SQR. I had zero issues with my phpbb until I installed the color mod - something in your mod code is conflicting with this command from SQR that is on viewtopic.php:

$poster = '<a href="javascript:pn(\''.$poster.'\');">'.$poster.'</a>';

kkroo
Registered User
Posts: 729
Joined: Sat Dec 03, 2005 4:49 pm
Contact:

Re: Simple Colored Usergroups

Post by kkroo » Tue Mar 27, 2007 2:13 pm

could you give me the outputted HTML of that line and a chunk of code before and after:

$poster = '<a href="javascript:pn(\''.$poster.'\');">'.$poster.'</a>';

Thanks
My MODs

Need a coder?

Enjoy my Mods? - Image

User avatar
Raimon
Former Team Member
Posts: 12088
Joined: Tue May 30, 2006 5:31 pm
Location: Netherlands
Name: Raimon Meuldijk
Contact:

Re: Simple Colored Usergroups

Post by Raimon » Tue Mar 27, 2007 6:18 pm

* Add on exist and is already made by terrafrost , for that reason i edited this posting*
Last edited by Raimon on Tue Apr 10, 2007 8:07 am, edited 1 time in total.
Need phpBB installation, extenstions, Styles or integrate phpBB with you website?
Contact me for fair prices and good service!

terestres
Registered User
Posts: 16
Joined: Tue Mar 27, 2007 4:20 pm
Contact:

Re: Simple Colored Usergroups

Post by terestres » Wed Mar 28, 2007 7:40 pm

hi, I've the same problem with your mod.
I give you some lines from viewtopic.tpl

Code: Select all

<td valign="top" align="center" class="{postrow.ROW_CLASS}" rowspan="2"><span class="name"><a name="{postrow.U_POST_ID}" id="{postrow.U_POST_ID}"></a><strong><a href="javascript:emoticon('[b]{postrow.POSTER_NAME}[/b], ')">{postrow.POSTER_NAME}</a></strong></span><br /><br />
my username is admin, but after input this code in viewtopic.php

Code: Select all

if ( $poster_id != ANONYMOUS )
	{
		$style_color = ($user_color = color_groups_user($poster_id)) ? ' style="font-weight:bold;color: #' . $user_color . '"' : '';
		$poster = '<span' . $style_color . '>' . $poster . '</span>';
	}
I see my username admin as admin, ')">admin

kkroo
Registered User
Posts: 729
Joined: Sat Dec 03, 2005 4:49 pm
Contact:

Re: Simple Colored Usergroups

Post by kkroo » Wed Mar 28, 2007 7:56 pm

Can you give some of the outputted HTML?
My MODs

Need a coder?

Enjoy my Mods? - Image

terestres
Registered User
Posts: 16
Joined: Tue Mar 27, 2007 4:20 pm
Contact:

Re: Simple Colored Usergroups

Post by terestres » Wed Mar 28, 2007 8:07 pm

here the outputted HTML

Code: Select all

<td valign="top" align="center" class="row2" rowspan="2"><span class="name"><a name="124" id="124"></a><strong><a href="javascript:emoticon('[b]<span style="font-weight:bold;color: #a93621">admin</span>[/b], ')"><span style="font-weight:bold;color: #a93621">admin</span></a></strong></span><br /><br />
I hope, I can help you to fix the error.

kkroo
Registered User
Posts: 729
Joined: Sat Dec 03, 2005 4:49 pm
Contact:

Re: Simple Colored Usergroups

Post by kkroo » Wed Mar 28, 2007 8:36 pm

Can i see your viewtopic.php
My MODs

Need a coder?

Enjoy my Mods? - Image

terestres
Registered User
Posts: 16
Joined: Tue Mar 27, 2007 4:20 pm
Contact:

Re: Simple Colored Usergroups

Post by terestres » Wed Mar 28, 2007 8:42 pm

viewtopic.php
Line 1610 - 1614

Code: Select all

<?php
/***************************************************************************
 *                               viewtopic.php
 *                            -------------------
 *   begin                : Saturday, Feb 13, 2001
 *   copyright            : (C) 2001 The phpBB Group
 *   email                : support@phpbb.com
 *
 *   $Id: viewtopic.php,v 1.1 2005/12/28 12:54:44 CK 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/functions_post.'.$phpEx);

//
// 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;
$start = ($start < 0) ? 0 : $start;
$download = ( isset($HTTP_GET_VARS['download']) ) ? $HTTP_GET_VARS['download'] : '';

if (!$topic_id && !$post_id)
{
	message_die(GENERAL_MESSAGE, 'Topic_post_not_exist');
}
if ( $download )
{
	$sql_download = ( $download != -1 ) ? " AND p.post_id = $download " : '';

	$orig_word = array();
	$replacement_word = array();
	obtain_word_list($orig_word, $replacement_word);

	$sql = "SELECT u.*, p.*,  pt.post_text, pt.post_subject, pt.bbcode_uid
		FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TEXT_TABLE . " pt
		WHERE p.topic_id = $topic_id
			$sql_download
			AND pt.post_id = p.post_id
			AND u.user_id = p.poster_id
			ORDER BY p.post_time ASC, p.post_id ASC";
	if ( !($result = $db->sql_query($sql)) )
	{
		message_die(GENERAL_ERROR, "Could not create download stream for post.", '', __LINE__, __FILE__, $sql);
	}

	$download_file = '';
	while ( $row = $db->sql_fetchrow($result) )
	{
		$poster_id = $row['user_id'];
		$poster = ( $poster_id == ANONYMOUS ) ? $lang['Guest'] : $row['username'];

		$post_date = create_date($board_config['default_dateformat'], $row['post_time'], $board_config['board_timezone']);

		$post_subject = ( $row['post_subject'] != '' ) ? $row['post_subject'] : '';

		$bbcode_uid = $row['bbcode_uid'];
		$message = $row['post_text'];
		$message = strip_tags($message);
		$message = preg_replace("/\[.*?:$bbcode_uid:?.*?\]/si", '', $message);
		$message = preg_replace('/\[url\]|\[\/url\]/si', '', $message);
		$message = preg_replace('/\:[0-9a-z\:]+\]/si', ']', $message);

		$message = unprepare_message($message);
		$message = preg_replace('/&#40;/', '(', $message);
		$message = preg_replace('/&#41;/', ')', $message);
		$message = preg_replace('/&#58;/', ':', $message);

		if (count($orig_word))
		{
			$post_subject = preg_replace($orig_word, $replacement_word, $post_subject);

			$message = str_replace('\"', '"', substr(@preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "@preg_replace(\$orig_word, \$replacement_word, '\\0')", '>' . $message . '<'), 1, -1));
		}

		$break = "\n";
		$line = '-----------------------------------';
		$download_file .= $break.$line.$break.$poster.$break.$post_date.$break.$break.$post_subject.$break.$line.$break.$message.$break;
	}

	$disp_folder = ( $download == -1 ) ? 'Topic_'.$topic_id : 'Post_'.$download;
	$filename = $board_config['sitename']."_".$disp_folder."_".date("Ymd",time()).".txt";
	header('Content-Type: text/x-delimtext; name="'.$filename.'"');
	header('Content-Disposition: attachment;filename='.$filename);
	header('Content-Transfer-Encoding: plain/text');
	header('Content-Length: '.strlen($download_file));
	print $download_file;

	exit;
}

//
// 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 (!preg_match('/^[A-Za-z0-9]*$/', $session_id))
			         {
			            $session_id = '';
         }

			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_moved_id = 0
                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 = (!$post_id) ? '' : ", " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2 ";
$join_sql = (!$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 = (!$post_id) ? '' : ", COUNT(p2.post_id) AS prev_posts";

$order_sql = (!$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";

$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_first_post_id, t.topic_last_post_id, f.forum_name, f.forum_status, f.forum_password, 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);

if ( !($result = $db->sql_query($sql)) )
{
	message_die(GENERAL_ERROR, "Could not obtain topic information", '', __LINE__, __FILE__, $sql);
}

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

$forum_id = intval($forum_topic_data['forum_id']);

//
// Start session management
//
$userdata = session_pagestart($user_ip, $forum_id);
init_userprefs($userdata);
//
// End session management
//

/* vBulletin Navigation MOD :: START */
if ($userdata['user_id'] != '-1')
{
   $name_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&u=" . $userdata['user_id']) . '">' . $userdata['username'] . '</a>';
}
/* vBulletin Navigation MOD :: END */

//
// Start auth check
//
$is_auth = array();
$is_auth = auth(AUTH_ALL, $forum_id, $userdata, $forum_topic_data);

if( !$is_auth['auth_view'] || !$is_auth['auth_read'] )
{
	if ( !$userdata['session_logged_in'] )
	{
		$redirect = ($post_id) ? POST_POST_URL . "=$post_id" : POST_TOPIC_URL . "=$topic_id";
		$redirect .= ($start) ? "&start=$start" : '';
		redirect(append_sid("login.$phpEx?redirect=viewtopic.$phpEx&$redirect", true));
	}

	$message = ( !$is_auth['auth_view'] ) ? $lang['Topic_post_not_exist'] : sprintf($lang['Sorry_auth_read'], $is_auth['auth_read_type']);

	message_die(GENERAL_MESSAGE, $message);
}
//
// End auth check
//

$forum_name = $forum_topic_data['forum_name'];
$topic_title = $forum_topic_data['topic_title'];
$topic_id = intval($forum_topic_data['topic_id']);
$topic_time = $forum_topic_data['topic_time'];

//
// Password check
//
if( !$is_auth['auth_mod'] && $userdata['user_level'] != ADMIN )
{
	$redirect = str_replace("&", "&", preg_replace('#.*?([a-z]+?\.' . $phpEx . '.*?)$#i', '\1', htmlspecialchars($HTTP_SERVER_VARS['REQUEST_URI'])));

	if( $HTTP_POST_VARS['cancel'] )
	{
		redirect(append_sid("index.$phpEx"));
	}
	else if( $HTTP_POST_VARS['submit'] )
	{
		if( $forum_topic_data['topic_password'] != '' )
		{
			password_check('topic', $topic_id, $HTTP_POST_VARS['password'], $redirect);
		}
		else if( $forum_topic_data['forum_password'] != '' )
		{
			password_check('forum', $forum_id, $HTTP_POST_VARS['password'], $redirect);
		}
	}

	else
	{
        if( $forum_topic_data['topic_password'] != '' )
	{
		$passdata = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_tpass']) ) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_tpass'])) : '';
		if( $passdata[$topic_id] != md5($forum_topic_data['topic_password']) )
		{
			password_box('topic', $redirect);
		}
	}
	else if( $forum_topic_data['forum_password'] != '' )
	{
		$passdata = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_fpass']) ) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_fpass'])) : '';
		if( $passdata[$forum_id] != md5($forum_topic_data['forum_password']) )
		{
			password_box('forum', $redirect);
		}
	}
	}
}
//
// END: Password check
//

if ($post_id)
{
	$start = floor(($forum_topic_data['prev_posts'] - 1) / intval($board_config['posts_per_page'])) * intval($board_config['posts_per_page']);
}

//
// Is user watching this thread?
//
if( $userdata['session_logged_in'] )
{
	$can_watch_topic = TRUE;

	$sql = "SELECT notify_status
		FROM " . TOPICS_WATCH_TABLE . "
		WHERE topic_id = $topic_id
			AND user_id = " . $userdata['user_id'];
	if ( !($result = $db->sql_query($sql)) )
	{
		message_die(GENERAL_ERROR, "Could not obtain topic watch information", '', __LINE__, __FILE__, $sql);
	}

	if ( $row = $db->sql_fetchrow($result) )
	{
		if ( isset($HTTP_GET_VARS['unwatch']) )
		{
			if ( $HTTP_GET_VARS['unwatch'] == 'topic' )
			{
				$is_watching_topic = 0;

				$sql_priority = (SQL_LAYER == "mysql") ? "LOW_PRIORITY" : '';
				$sql = "DELETE $sql_priority FROM " . TOPICS_WATCH_TABLE . "
					WHERE topic_id = $topic_id
						AND user_id = " . $userdata['user_id'];
				if ( !($result = $db->sql_query($sql)) )
				{
					message_die(GENERAL_ERROR, "Could not delete topic watch information", '', __LINE__, __FILE__, $sql);
				}
			}

			$template->assign_vars(array(
                        'GOTO_NEWEST_POST' => '<a href="'.append_sid("viewtopic.$phpEx?t=$topic_id&view=newest").'" class="mainmenu">'.$lang['View_newest_post'].'</a>',
				'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&start=$start") . '">')
			);

			$message = $lang['No_longer_watching'] . '<br /><br />' . sprintf($lang['Click_return_topic'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&start=$start") . '">', '</a>');
			message_die(GENERAL_MESSAGE, $message);
		}
		else
		{
			$is_watching_topic = TRUE;

			if ( $row['notify_status'] )
			{
				$sql_priority = (SQL_LAYER == "mysql") ? "LOW_PRIORITY" : '';
				$sql = "UPDATE $sql_priority " . TOPICS_WATCH_TABLE . "
					SET notify_status = 0
					WHERE topic_id = $topic_id
						AND user_id = " . $userdata['user_id'];
				if ( !($result = $db->sql_query($sql)) )
				{
					message_die(GENERAL_ERROR, "Could not update topic watch information", '', __LINE__, __FILE__, $sql);
				}
			}
		}
	}
	else
	{
		if ( isset($HTTP_GET_VARS['watch']) )
		{
			if ( $HTTP_GET_VARS['watch'] == 'topic' )
			{
				$is_watching_topic = TRUE;

				$sql_priority = (SQL_LAYER == "mysql") ? "LOW_PRIORITY" : '';
				$sql = "INSERT $sql_priority INTO " . TOPICS_WATCH_TABLE . " (user_id, topic_id, notify_status)
					VALUES (" . $userdata['user_id'] . ", $topic_id, 0)";
				if ( !($result = $db->sql_query($sql)) )
				{
					message_die(GENERAL_ERROR, "Could not insert topic watch information", '', __LINE__, __FILE__, $sql);
				}
			}

			$template->assign_vars(array(
				'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&start=$start") . '">')
			);

			$message = $lang['You_are_watching'] . '<br /><br />' . sprintf($lang['Click_return_topic'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&start=$start") . '">', '</a>');
			message_die(GENERAL_MESSAGE, $message);
		}
		else
		{
			$is_watching_topic = 0;
		}
	}
}
else
{
	if ( isset($HTTP_GET_VARS['unwatch']) )
	{
		if ( $HTTP_GET_VARS['unwatch'] == 'topic' )
		{
			redirect(append_sid("login.$phpEx?redirect=viewtopic.$phpEx&" . POST_TOPIC_URL . "=$topic_id&unwatch=topic", true));
		}
	}
	else
	{
		$can_watch_topic = 0;
		$is_watching_topic = 0;
	}
}

//
// Generate a 'Show posts in previous x days' select box. If the postdays var is POSTed
// then get it's value, find the number of topics with dates newer than it (to properly
// handle pagination) and alter the main query
//
$previous_days = array(0, 1, 7, 14, 30, 90, 180, 364);
$previous_days_text = array($lang['All_Posts'], $lang['1_Day'], $lang['7_Days'], $lang['2_Weeks'], $lang['1_Month'], $lang['3_Months'], $lang['6_Months'], $lang['1_Year']);

if( !empty($HTTP_POST_VARS['postdays']) || !empty($HTTP_GET_VARS['postdays']) )
{
	$post_days = ( !empty($HTTP_POST_VARS['postdays']) ) ? intval($HTTP_POST_VARS['postdays']) : intval($HTTP_GET_VARS['postdays']);
	$min_post_time = time() - (intval($post_days) * 86400);

	$sql = "SELECT COUNT(p.post_id) AS num_posts
		FROM " . TOPICS_TABLE . " t, " . POSTS_TABLE . " p
		WHERE t.topic_id = $topic_id
			AND p.topic_id = t.topic_id
			AND p.post_time >= $min_post_time";
	if ( !($result = $db->sql_query($sql)) )
	{
		message_die(GENERAL_ERROR, "Could not obtain limited topics count information", '', __LINE__, __FILE__, $sql);
	}

	$total_replies = ( $row = $db->sql_fetchrow($result) ) ? intval($row['num_posts']) : 0;

	$limit_posts_time = "AND p.post_time >= $min_post_time ";

	if ( !empty($HTTP_POST_VARS['postdays']))
	{
		$start = 0;
	}
}
else
{
	$total_replies = intval($forum_topic_data['topic_replies']) + 1;

	$limit_posts_time = '';
	$post_days = 0;
}

$select_post_days = '<select name="postdays">';
for($i = 0; $i < count($previous_days); $i++)
{
	$selected = ($post_days == $previous_days[$i]) ? ' selected="selected"' : '';
	$select_post_days .= '<option value="' . $previous_days[$i] . '"' . $selected . '>' . $previous_days_text[$i] . '</option>';
}
$select_post_days .= '</select>';

//
// Decide how to order the post display
//
if ( !empty($HTTP_POST_VARS['postorder']) || !empty($HTTP_GET_VARS['postorder']) )
{
	$post_order = (!empty($HTTP_POST_VARS['postorder'])) ? htmlspecialchars($HTTP_POST_VARS['postorder']) : htmlspecialchars($HTTP_GET_VARS['postorder']);
	$post_time_order = ($post_order == "asc") ? "ASC" : "DESC";
}
else
{
	$post_order = 'asc';
	$post_time_order = 'ASC';
}

$select_post_order = '<select name="postorder">';
if ( $post_time_order == 'ASC' )
{
	$select_post_order .= '<option value="asc" selected="selected">' . $lang['Oldest_First'] . '</option><option value="desc">' . $lang['Newest_First'] . '</option>';
}
else
{
	$select_post_order .= '<option value="asc">' . $lang['Oldest_First'] . '</option><option value="desc" selected="selected">' . $lang['Newest_First'] . '</option>';
}
$select_post_order .= '</select>';

//
// Go ahead and pull all data for this topic
//
$sql = "SELECT u.username, u.user_absence, u.user_absence_mode, u.user_id, u.user_posts, u.user_from, u.user_from_flag, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_skype, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_avatar, u.user_avatar_type, u.user_allowavatar, u.user_allowsmile, u.user_warnings, u.user_level, u.ct_miserable_user, u.user_birthday, u.user_next_birthday_greeting, u.user_allow_viewonline, u.user_session_time, p.*, u.user_gender,  pt.post_text, pt.post_subject, pt.bbcode_uid, k.kategorie
	FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TEXT_TABLE . " pt, " . TOPICS_TABLE. " t LEFT Join " .TOPIC_KAT. " as k  ON t.k_id=k.k_id
	WHERE p.topic_id = $topic_id
		$limit_posts_time
		AND pt.post_id = p.post_id
		AND u.user_id = p.poster_id
		AND t.topic_id = $topic_id
	ORDER BY p.post_time $post_time_order
	LIMIT $start, ".$board_config['posts_per_page'];
if ( !($result = $db->sql_query($sql)) )
{
	message_die(GENERAL_ERROR, "Could not obtain post/user information.", '', __LINE__, __FILE__, $sql);
}

$postrow = array();
if ($row = $db->sql_fetchrow($result))
{
	do
	{
		$postrow[] = $row;
	}
	while ($row = $db->sql_fetchrow($result));
	$db->sql_freeresult($result);

	$total_posts = count($postrow);
}
else
{
   include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
   sync('topic', $topic_id);

   message_die(GENERAL_MESSAGE, $lang['No_posts_topic']);
}

$resync = FALSE;
if ($forum_topic_data['topic_replies'] + 1 < $start + count($postrow))
{
   $resync = TRUE;
}
elseif ($start + $board_config['posts_per_page'] > $forum_topic_data['topic_replies'])
{
   $row_id = intval($forum_topic_data['topic_replies']) % intval($board_config['posts_per_page']);
   if ($postrow[$row_id]['post_id'] != $forum_topic_data['topic_last_post_id'] || $start + count($postrow) < $forum_topic_data['topic_replies'])
   {
      $resync = TRUE;
   }
}
elseif (count($postrow) < $board_config['posts_per_page'])
{
   $resync = TRUE;
}

if ($resync)
{
   include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
   sync('topic', $topic_id);

   $result = $db->sql_query('SELECT COUNT(post_id) AS total FROM ' . POSTS_TABLE . ' WHERE topic_id = ' . $topic_id);
   $row = $db->sql_fetchrow($result);
   $total_replies = $row['total'];
}

$sql = "SELECT *
	FROM " . RANKS_TABLE . "
	ORDER BY rank_special, rank_min";
if ( !($result = $db->sql_query($sql)) )
{
	message_die(GENERAL_ERROR, "Could not obtain ranks information.", '', __LINE__, __FILE__, $sql);
}

$ranksrow = array();
while ( $row = $db->sql_fetchrow($result) )
{
	$ranksrow[] = $row;
}
$db->sql_freeresult($result);

//
// Define censored word matches
//
$orig_word = array();
$replacement_word = array();
obtain_word_list($orig_word, $replacement_word);

//
// Censor topic title
//
if ( count($orig_word) )
{
	$topic_title = preg_replace($orig_word, $replacement_word, $topic_title);
}

//
// Word hightlighter with CrackerTracker Protection Engine
// Security System powered by http://www.cback.de
//
$highlight_match = $highlight = '';
if (isset($HTTP_GET_VARS['highlight']))
{
    $highlight = $HTTP_GET_VARS['highlight'];
    $highlight = addslashes($highlight);

    // Split words and phrases
    $words = explode(' ', trim(htmlspecialchars($highlight)));

   for($i = 0; $i < sizeof($words); $i++)
   {
		if (trim($words[$i]) != '')
		{
			$highlight_match .= (($highlight_match != '') ? '|' : '') . str_replace('*', '\w*', preg_quote($words[$i], '#'));
		}
	}
	unset($words);

	$highlight = urlencode($highlight);
	$highlight_match = phpbb_rtrim($highlight_match, "\\");
}

//
// Post, reply and other URL generation for
// templating vars
//
$new_topic_url = append_sid("posting.$phpEx?mode=newtopic&" . POST_FORUM_URL . "=$forum_id");
$reply_topic_url = append_sid("posting.$phpEx?mode=reply&" . POST_TOPIC_URL . "=$topic_id");
$view_forum_url = append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id");
$view_prev_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=previous");
$view_next_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=next");

//
// Mozilla navigation bar
//
$nav_links['prev'] = array(
	'url' => $view_prev_topic_url,
	'title' => $lang['View_previous_topic']
);
$nav_links['next'] = array(
	'url' => $view_next_topic_url,
	'title' => $lang['View_next_topic']
);
$nav_links['up'] = array(
	'url' => $view_forum_url,
	'title' => $forum_name
);

$reply_img = ( $forum_topic_data['forum_status'] == FORUM_LOCKED || $forum_topic_data['topic_status'] == TOPIC_LOCKED ) ? $images['reply_locked'] : $images['reply_new'];
$reply_alt = ( $forum_topic_data['forum_status'] == FORUM_LOCKED || $forum_topic_data['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['Reply_to_topic'];
$post_img = ( $forum_topic_data['forum_status'] == FORUM_LOCKED ) ? $images['post_locked'] : $images['post_new'];
$post_alt = ( $forum_topic_data['forum_status'] == FORUM_LOCKED ) ? $lang['Forum_locked'] : $lang['Post_new_topic'];

//
// Set a cookie for this topic
//
if ( $userdata['session_logged_in'] )
{
	$tracking_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) : array();
	$tracking_forums = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) : array();

	if ( !empty($tracking_topics[$topic_id]) && !empty($tracking_forums[$forum_id]) )
	{
		$topic_last_read = ( $tracking_topics[$topic_id] > $tracking_forums[$forum_id] ) ? $tracking_topics[$topic_id] : $tracking_forums[$forum_id];
	}
	else if ( !empty($tracking_topics[$topic_id]) || !empty($tracking_forums[$forum_id]) )
	{
		$topic_last_read = ( !empty($tracking_topics[$topic_id]) ) ? $tracking_topics[$topic_id] : $tracking_forums[$forum_id];
	}
	else
	{
		$topic_last_read = $userdata['user_lastvisit'];
	}

	if ( count($tracking_topics) >= 150 && empty($tracking_topics[$topic_id]) )
	{
		asort($tracking_topics);
		unset($tracking_topics[key($tracking_topics)]);
	}

	$tracking_topics[$topic_id] = time();

	setcookie($board_config['cookie_name'] . '_t', serialize($tracking_topics), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
}

//
// Load templates
//
$template->set_filenames(array(
	'body' => 'viewtopic_body.tpl')
);
// Begin Simple Subforums MOD
$all_forums = array();
make_jumpbox_ref('viewforum.'.$phpEx, $forum_id, $all_forums);

$parent_id = 0;
for( $i = 0; $i < count($all_forums); $i++ )
{
	if( $all_forums[$i]['forum_id'] == $forum_id )
	{
		$parent_id = $all_forums[$i]['forum_parent'];
	}
}

if( $parent_id )
{
	for( $i = 0; $i < count($all_forums); $i++ )
	{
		if( $all_forums[$i]['forum_id'] == $parent_id )
		{
			$template->assign_vars(array(
				'PARENT_FORUM'			=> 1,
				'U_VIEW_PARENT_FORUM'	=> append_sid("viewforum.$phpEx?" . POST_FORUM_URL .'=' . $all_forums[$i]['forum_id']),
				'PARENT_FORUM_NAME'		=> $all_forums[$i]['forum_name'],
				));
		}
	}
}
// End Simple Subforums MOD

/* vBulletin Navigation MOD :: START */
$sql = "SELECT f.cat_id, f.forum_id, c.cat_id, c.cat_title
FROM " . FORUMS_TABLE . " f, " . CATEGORIES_TABLE ." c
WHERE f.forum_id = $forum_id
AND f.cat_id = c.cat_id";
if( !($result = $db->sql_query($sql)) )
{
  message_die(GENERAL_ERROR, 'Could not query categories list', '', __LINE__, __FILE__, $sql);
}

$row = $db->sql_fetchrow($result);
$cat_id = $row['cat_id'];
$show_cat = $row['cat_title'];
/* vBulletin Navigation MOD :: END */

//
// Output page header
//
$page_title = $lang['View_topic'] .' - ' . $topic_title;
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
//Parse smilies to display topic title
$topic_title = smilies_pass($topic_title);

//
// User authorisation levels output
//
$s_auth_can = ( ( $is_auth['auth_post'] ) ? $lang['Rules_post_can'] : $lang['Rules_post_cannot'] ) . '<br />';
$s_auth_can .= ( ( $is_auth['auth_reply'] ) ? $lang['Rules_reply_can'] : $lang['Rules_reply_cannot'] ) . '<br />';
$s_auth_can .= ( ( $is_auth['auth_edit'] ) ? $lang['Rules_edit_can'] : $lang['Rules_edit_cannot'] ) . '<br />';
$s_auth_can .= ( ( $is_auth['auth_delete'] ) ? $lang['Rules_delete_can'] : $lang['Rules_delete_cannot'] ) . '<br />';
$s_auth_can .= ( ( $is_auth['auth_vote'] ) ? $lang['Rules_vote_can'] : $lang['Rules_vote_cannot'] ) . '<br />';
$s_auth_can .= ( $is_auth['auth_ban'] ) ? $lang['Rules_ban_can'] . "<br />" : ""; 
$s_auth_can .= ( $is_auth['auth_greencard'] ) ? $lang['Rules_greencard_can'] . "<br />" : ""; 
$s_auth_can .= ( $is_auth['auth_bluecard'] ) ? $lang['Rules_bluecard_can'] . "<br />" : "";
attach_build_auth_levels($is_auth, $s_auth_can);


$topic_mod = '';

if ( $is_auth['auth_mod'] )
{
	$s_auth_can .= sprintf($lang['Rules_moderate'], "<a href=modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&sid=" . $userdata['session_id'] . '>', '</a>');

	$topic_mod .= "<a href=\"modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=delete&sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_delete'] . '" alt="' . $lang['Delete_topic'] . '" title="' . $lang['Delete_topic'] . '" border="0" /></a>&nbsp;';

	$topic_mod .= ( $forum_topic_data['topic_type'] != 1 ) ? "<a href=\"modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=sticky&sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_sticky'] . '" alt="' . $lang['Sticky_topic'] . '" title="' . $lang['Sticky_topic'] . '" border="0" /></a>&nbsp;' : "<a href=\"modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=unsticky&sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_unsticky'] . '" alt="' . $lang['Unsticky_topic'] . '" title="' . $lang['Unsticky_topic'] . '" border="0" /></a>&nbsp;';

	$topic_mod .= ( $forum_topic_data['topic_type'] != 2 ) ? "<a href=\"modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=announce&sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_announce'] . '" alt="' . $lang['Announce_topic'] . '" title="' . $lang['Announce_topic'] . '" border="0" /></a>&nbsp;' : "<a href=\"modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=unannounce&sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_unannounce'] . '" alt="' . $lang['Unannounce_topic'] . '" title="' . $lang['Unannounce_topic'] . '" border="0" /></a>&nbsp;';

	$topic_mod .= "<a href=\"modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=move&sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_move'] . '" alt="' . $lang['Move_topic'] . '" title="' . $lang['Move_topic'] . '" border="0" /></a>&nbsp;';

	$topic_mod .= ( $forum_topic_data['topic_status'] == TOPIC_UNLOCKED ) ? "<a id=\"topic_locklink\" onclick=\"return AJAXLockTopic($topic_id, 1);\" href=\"modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=lock&sid=" . $userdata['session_id'] . '"><img id="topic_lockimg" src="' . $images['topic_mod_lock'] . '" alt="' . $lang['Lock_topic'] . '" title="' . $lang['Lock_topic'] . '" border="0" /></a>&nbsp;' : "<a id=\"topic_locklink\" onclick=\"return AJAXLockTopic($topic_id, 0);\" href=\"modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=unlock&sid=" . $userdata['session_id'] . '"><img id="topic_lockimg" src="' . $images['topic_mod_unlock'] . '" alt="' . $lang['Unlock_topic'] . '" title="' . $lang['Unlock_topic'] . '" border="0" /></a>&nbsp;';

	$topic_mod .= "<a href=\"modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=split&sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_split'] . '" alt="' . $lang['Split_topic'] . '" title="' . $lang['Split_topic'] . '" border="0" /></a>&nbsp;';

	include_once($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
	$make_move_select = make_forum_select($topic_id.'_new_forum', $forum_id);
	if (strpos($make_move_select, '<select') !== false)
	{
		$topic_mod .= "<div id=\"move_topic\" style=\"display:none\" class=\"gen\"><hr /><b>".$lang['Move'].":</b> ".$make_move_select;
		$topic_mod .= "<br /><input type=\"checkbox\" id=\"shadow\" />&nbsp;" . $lang['Leave_shadow_topic'];
		$topic_mod .= "<hr /><input type=\"button\" value=\"".$lang['Move']."\" onclick=\"return AJAXTopicMove($topic_id, $forum_id);\" />";
		$topic_mod .= "&nbsp;<input type=\"button\" value=\"".$lang['Reset']."\" onclick=\"return AJAXTopicMoveCancel();\" /></div>";
	}


}

//
// Topic watch information
//
$s_watching_topic = '';
if ( $can_watch_topic )
{
	if ( $is_watching_topic )
	{
		$s_watching_topic = "<a id=\"watchlink\" onclick=\"return AJAXWatchTopic($topic_id, $start, 0);\" href=\"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&unwatch=topic&start=$start&sid=" . $userdata['session_id'] . '">' . $lang['Stop_watching_topic'] . '</a>';
		$s_watching_topic_img = ( isset($images['topic_un_watch']) ) ? "<a id=\"watchlink_img\" onclick=\"return AJAXWatchTopic($topic_id, $start, 0);\" href=\"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&unwatch=topic&start=$start&sid=" . $userdata['session_id'] . '"><img id="watchimage" src="' . $images['topic_un_watch'] . '" alt="' . $lang['Stop_watching_topic'] . '" title="' . $lang['Stop_watching_topic'] . '" border="0"></a>' : '';
	}
	else
	{
		$s_watching_topic = "<a id=\"watchlink\" onclick=\"return AJAXWatchTopic($topic_id, $start, 1);\" href=\"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&watch=topic&start=$start&sid=" . $userdata['session_id'] . '">' . $lang['Start_watching_topic'] . '</a>';
		$s_watching_topic_img = ( isset($images['Topic_watch']) ) ? "<a id=\"watchlink_img\" onclick=\"return AJAXWatchTopic($topic_id, $start, 1);\" href=\"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&watch=topic&start=$start&sid=" . $userdata['session_id'] . '"><img id="watchimage" src="' . $images['Topic_watch'] . '" alt="' . $lang['Start_watching_topic'] . '" title="' . $lang['Start_watching_topic'] . '" border="0"></a>' : '';
	}
}

//
// If we've got a hightlight set pass it on to pagination,
// I get annoyed when I lose my highlight after the first page.
//
$pagination = ( $highlight != '' ) ? generate_pagination("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&postdays=$post_days&postorder=$post_order&highlight=$highlight", $total_replies, $board_config['posts_per_page'], $start) : generate_pagination("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&postdays=$post_days&postorder=$post_order", $total_replies, $board_config['posts_per_page'], $start);

//
// Send vars to template
//
$template->assign_vars(array(
	'L_DOWNLOAD_POST' => $lang['Download_post'],
	'L_DOWNLOAD_TOPIC' => $lang['Download_topic'],
	'DOWNLOAD_TOPIC' => append_sid("viewtopic.$phpEx?download=-1&".POST_TOPIC_URL."=".$topic_id),
	'FORUM_ID' => $forum_id,
    'FORUM_NAME' => $forum_name,
    'TOPIC_ID' => $topic_id,
    'TOPIC_TITLE' => $topic_title,
	'PAGINATION' => $pagination,
	'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / intval($board_config['posts_per_page']) ) + 1 ), ceil( $total_replies / intval($board_config['posts_per_page']) )),
	'HIGHLIGHT' => $highlight,
	'POST_IMG' => $post_img,
	'REPLY_IMG' => $reply_img,

    'L_PRINT' => ($lang['Print_View']) ? $lang['Print_View'] : 'Printable version',
    'U_PRINT' => append_sid("printview.$phpEx?" . POST_TOPIC_URL . "=$topic_id&start=$start"),

	'L_AUTHOR' => $lang['Author'],
	'L_MESSAGE' => $lang['Message'],
	'L_POSTED' => $lang['Posted'],
	'L_POST_SUBJECT' => $lang['Post_subject'],
	'L_VIEW_NEXT_TOPIC' => $lang['View_next_topic'],
	'L_VIEW_PREVIOUS_TOPIC' => $lang['View_previous_topic'],
	'L_POST_NEW_TOPIC' => $post_alt,
	'L_POST_REPLY_TOPIC' => $reply_alt,
	'L_BACK_TO_TOP' => $lang['Back_to_top'],
	'L_DISPLAY_POSTS' => $lang['Display_posts'],
	'L_LOCK_TOPIC' => $lang['Lock_topic'],
	'L_UNLOCK_TOPIC' => $lang['Unlock_topic'],
	'L_MOVE_TOPIC' => $lang['Move_topic'],
	'L_SPLIT_TOPIC' => $lang['Split_topic'],
	'L_DELETE_TOPIC' => $lang['Delete_topic'],
	'L_GOTO_PAGE' => $lang['Goto_page'],
	'L_FULL_EDIT' => $lang['Full_edit'],
	'L_PREVIEW' => $lang['Preview'],
	'L_SAVE_CHANGES' => $lang['Save_changes'],
	'L_CANCEL' => $lang['Cancel'],
    'L_ORION_AUTH' => $lang['orion_autho'],

	'S_TOPIC_LINK' => POST_TOPIC_URL,
	'S_SELECT_POST_DAYS' => $select_post_days,
	'S_SELECT_POST_ORDER' => $select_post_order,
	'S_POST_DAYS_ACTION' => append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . '=' . $topic_id . "&start=$start"),
	'S_AUTH_LIST' => $s_auth_can,
	'S_TOPIC_ADMIN' => $topic_mod,
	'S_WATCH_TOPIC' => $s_watching_topic,
	'S_WATCH_TOPIC_IMG' => $s_watching_topic_img,
	/* vBulletin Navigation MOD :: START */
    'L_DARE_WELCOME' => $lang['DARE_WELCOME'],
    'L_DARE_NAVIGATION' => $lang['DARE_NAVIGATION'],
    'L_DARE_LOGIN' => $lang['DARE_LOGIN'],
    'L_DARE_USERNAME' => $lang['DARE_USERNAME'],
    'L_DARE_PASSWORD' => $lang['DARE_PASSWORD'],
    'L_DARE_LOGIN_EXPLAIN' => $lang['DARE_LOGIN_EXPLAIN'],
    'L_SHOW_CAT' => $show_cat,
    'U_SHOW_CAT' => append_sid("index.$phpEx?c=$cat_id"),
    'U_NAME_LINK' => $name_link,
    /* vBulletin Navigation MOD :: END */
	'S_DISPLAY_PREVIEW' => 'style="display:none;"',

    'U_VIEW_TOPIC' => append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&start=$start&postdays=$post_days&postorder=$post_order&highlight=$highlight"),
	'U_VIEW_FORUM' => $view_forum_url,
	'U_VIEW_OLDER_TOPIC' => $view_prev_topic_url,
	'U_VIEW_NEWER_TOPIC' => $view_next_topic_url,
	'U_POST_NEW_TOPIC' => $new_topic_url,
	'U_POST_REPLY_TOPIC' => $reply_topic_url)
);

//
// Does this topic contain a poll?
//
if (empty($forum_topic_data['topic_vote']))
{
	$template->assign_vars(array(
		'MAX_POLL_OPTION' => 0,
		'MAX_VOTE' => 0)
	);
}
else
if ( !empty($forum_topic_data['topic_vote']) )
{
	$s_hidden_fields = '';

	$sql = "SELECT vd.vote_id, vd.vote_text, vd.vote_start, vd.vote_length, vr.vote_option_id, vr.vote_option_text, vr.vote_result
		FROM " . VOTE_DESC_TABLE . " vd, " . VOTE_RESULTS_TABLE . " vr
		WHERE vd.topic_id = $topic_id
			AND vr.vote_id = vd.vote_id
		ORDER BY vr.vote_option_id ASC";
	if ( !($result = $db->sql_query($sql)) )
	{
		message_die(GENERAL_ERROR, "Could not obtain vote data for this topic", '', __LINE__, __FILE__, $sql);
	}

	if ( $vote_info = $db->sql_fetchrowset($result) )
	{
		$db->sql_freeresult($result);
		$vote_options = count($vote_info);

		$vote_id = $vote_info[0]['vote_id'];
		$vote_title = $vote_info[0]['vote_text'];

		$sql = "SELECT vote_id
			FROM " . VOTE_USERS_TABLE . "
			WHERE vote_id = $vote_id
				AND vote_user_id = " . intval($userdata['user_id']);
		if ( !($result = $db->sql_query($sql)) )
		{
			message_die(GENERAL_ERROR, "Could not obtain user vote data for this topic", '', __LINE__, __FILE__, $sql);
		}

		$user_voted = ( $row = $db->sql_fetchrow($result) ) ? TRUE : 0;
		$db->sql_freeresult($result);

		if ( isset($HTTP_GET_VARS['vote']) || isset($HTTP_POST_VARS['vote']) )
		{
			$view_result = ( ( ( isset($HTTP_GET_VARS['vote']) ) ? $HTTP_GET_VARS['vote'] : $HTTP_POST_VARS['vote'] ) == 'viewresult' ) ? TRUE : 0;
		}
		else
		{
			$view_result = 0;
		}

		$poll_expired = ( $vote_info[0]['vote_length'] ) ? ( ( $vote_info[0]['vote_start'] + $vote_info[0]['vote_length'] < time() ) ? TRUE : 0 ) : 0;
		$sql = "SELECT pt.bbcode_uid FROM " . TOPICS_TABLE . " t, " . POSTS_TEXT_TABLE . " pt
			WHERE t.topic_id = $topic_id
				AND t.topic_first_post_id = pt.post_id
			LIMIT 1";
		if (!$result = $db->sql_query($sql))
		{
			message_die(GENERAL_ERROR, 'Could not read bbcode for poll_options', '', __LINE__, __FILE__, $sql);
		}
		$row = $db->sql_fetchrow($result);
		$bbcode_uid = $row['bbcode_uid'];
		$db->sql_freeresult($result);


		if ( $user_voted || $view_result || $poll_expired || !$is_auth['auth_vote'] || $forum_topic_data['topic_status'] == TOPIC_LOCKED )
		{
			$template->set_filenames(array(
				'pollbox' => 'viewtopic_poll_result.tpl')
			);

			$vote_results_sum = 0;

			for($i = 0; $i < $vote_options; $i++)
			{
				$vote_results_sum += $vote_info[$i]['vote_result'];
			}

			$vote_graphic = 0;
			$vote_graphic_max = count($images['voting_graphic']);

			for($i = 0; $i < $vote_options; $i++)
			{
				$vote_percent = ( $vote_results_sum > 0 ) ? $vote_info[$i]['vote_result'] / $vote_results_sum : 0;
				$vote_graphic_length = round($vote_percent * $board_config['vote_graphic_length']);

				$vote_graphic_img = $images['voting_graphic'][$vote_graphic];
				$vote_graphic = ($vote_graphic < $vote_graphic_max - 1) ? $vote_graphic + 1 : 0;

				if ( count($orig_word) )
				{
					$vote_info[$i]['vote_option_text'] = preg_replace($orig_word, $replacement_word, $vote_info[$i]['vote_option_text']);
				}

					$vote_caption_text = $vote_info[$i]['vote_option_text'];
					$vote_caption_text = (!$board_config['allow_html']) ? preg_replace('#(<)([\/]?.*?)(>)#is', "<\\2>", $vote_caption_text) : $vote_caption_text;
					$vote_caption_text = ($board_config['allow_bbcode'] && $bbcode_uid != '') ? bbencode_second_pass($vote_caption_text, $bbcode_uid) : preg_replace('/\:[0-9a-z\:]+\]/si', ']', $vote_caption_text);
					$vote_caption_text = make_clickable($vote_caption_text);
					$vote_caption_text = ($board_config['allow_smilies']) ? smilies_pass($vote_caption_text) : $vote_caption_text;

					$template->assign_block_vars("poll_option", array(
					'POLL_OPTION_CAPTION' => $vote_caption_text,
					'POLL_OPTION_RESULT' => $vote_info[$i]['vote_result'],
					'POLL_OPTION_PERCENT' => sprintf("%.1d%%", ($vote_percent * 100)),

					'POLL_OPTION_IMG' => $vote_graphic_img,
					'POLL_OPTION_IMG_WIDTH' => $vote_graphic_length)
				);
			}

			$template->assign_vars(array(
				'L_TOTAL_VOTES' => $lang['Total_votes'],
				'TOTAL_VOTES' => $vote_results_sum,
				'MAX_POLL_OPTION' => 0,
				'MAX_VOTE' => 0,				
				
				'L_VIEW_BALLOT' => $lang['View_ballot'],
				'U_VIEW_BALLOT' => append_sid("viewtopic.$phpEx?". POST_TOPIC_URL ."=$topic_id&postdays=$post_days&postorder=$post_order"))
			);
			
			if (!$user_voted && !$poll_expired && $is_auth['auth_vote'] && ($forum_topic_data['topic_status'] != TOPIC_LOCKED))
			{
				$template->assign_block_vars('switch_view_ballot', array());
			}

		}
		else
		{
			$template->set_filenames(array(
				'pollbox' => 'viewtopic_poll_ballot.tpl')
			);

			for($i = 0; $i < $vote_options; $i++)
			{
				if ( count($orig_word) )
				{
					$vote_info[$i]['vote_option_text'] = preg_replace($orig_word, $replacement_word, $vote_info[$i]['vote_option_text']);
				}

				$vote_caption_text = $vote_info[$i]['vote_option_text'];
				$vote_caption_text = (!$board_config['allow_html']) ? preg_replace('#(<)([\/]?.*?)(>)#is', "<\\2>", $vote_caption_text) : $vote_caption_text;
				$vote_caption_text = ($board_config['allow_bbcode'] && $bbcode_uid != '') ? bbencode_second_pass($vote_caption_text, $bbcode_uid) : preg_replace('/\:[0-9a-z\:]+\]/si', ']', $vote_caption_text);
				$vote_caption_text = make_clickable($vote_caption_text);
				$vote_caption_text = ($board_config['allow_smilies']) ? smilies_pass($vote_caption_text) : $vote_caption_text;

				$template->assign_block_vars("poll_option", array(
					"POLL_OPTION_ID" => $vote_info[$i]['vote_option_id'],
					"POLL_OPTION_CAPTION" => $vote_caption_text)
				);
			}

			$template->assign_vars(array(
				'L_SUBMIT_VOTE' => $lang['Submit_vote'],
				'L_VIEW_RESULTS' => $lang['View_results'],
				'L_MAX_POLL_OPTION' => $lang['Max_voting_1_explain'] . (($max_vote) ? $max_vote : 1) . $lang['Max_voting_2_explain'],

				'MAX_VOTE' => ($max_vote) ? $max_vote : 1,
				'MAX_POLL_OPTION' => $vote_options,

				'U_VIEW_RESULTS' => append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&postdays=$post_days&postorder=$post_order&vote=viewresult"))
			);

			$s_hidden_fields = '<input type="hidden" name="topic_id" value="' . $topic_id . '" /><input type="hidden" name="mode" value="vote" />';
		}

		if ( count($orig_word) )
		{
			$vote_title = preg_replace($orig_word, $replacement_word, $vote_title);
		}

		$s_hidden_fields .= '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />';

		$template->assign_vars(array(
			'POLL_QUESTION' => $vote_title,

			'S_HIDDEN_FIELDS' => $s_hidden_fields,
			'S_POLL_ACTION' => append_sid("posting.$phpEx?mode=vote&" . POST_TOPIC_URL . "=$topic_id"))
		);

		$template->assign_var_from_handle('POLL_DISPLAY', 'pollbox');
	}
}

init_display_post_attachments($forum_topic_data['topic_attachment']);

//
// Update the topic view counter
//
$sql = "UPDATE " . TOPICS_TABLE . "
	SET topic_views = topic_views + 1
	WHERE topic_id = $topic_id";
if ( !$db->sql_query($sql) )
{
	message_die(GENERAL_ERROR, "Could not update topic views.", '', __LINE__, __FILE__, $sql);
}

//
// Okay, let's do the loop, yeah come on baby let's do the loop
// and it goes like this ...
//
// Start add - Birthday MOD
$this_year = create_date('Y', time(), $board_config['board_timezone']);
$this_date = create_date('md', time(), $board_config['board_timezone']);
// End add - Birthday MOD
for($i = 0; $i < $total_posts; $i++)
{
	$poster_id = $postrow[$i]['user_id'];
	$poster = ( $poster_id == ANONYMOUS ) ? $lang['Guest'] : $postrow[$i]['username'];

// Start add - Birthday MOD
	if ( $postrow[$i]['user_birthday'] != 999999 )
	{
		$poster_birthdate=realdate('md', $postrow[$i]['user_birthday']);
		$poster_age = $this_year - realdate ('Y',$postrow[$i]['user_birthday']);
		if ($this_date < $poster_birthdate) $poster_age--;
		$poster_age = $lang['Age'] . ': ' . $poster_age;
	} else
	{
		$poster_age = '';
        $poster_birthdate = '';
	}
// End add - Birthday MOD

        if ($this_date == $poster_birthdate)
        {
        $gebbild = '<img src="templates/' . $theme['template_name'] . '/images/birthdaycake.gif" border="0" alt="Happy Birthday" title="Happy Birthday">';
        }
        else
        {
        $gebbild = ' ';
        }

	$post_date = create_date($board_config['default_dateformat'], $postrow[$i]['post_time'], $board_config['board_timezone']);

	$poster_posts = ( $postrow[$i]['user_id'] != ANONYMOUS ) ? $lang['Posts'] . ': ' . $postrow[$i]['user_posts'] : '';

	$poster_from = ( $postrow[$i]['user_from'] && $postrow[$i]['user_id'] != ANONYMOUS ) ? $lang['Location'] . ': ' . $postrow[$i]['user_from'] : '';
// FLAGHACK-start
	$poster_from_flag = ( $postrow[$i]['user_from_flag'] && $postrow[$i]['user_id'] != ANONYMOUS ) ? "<img src=\"images/flags/" . $postrow[$i]['user_from_flag'] . "\" alt=\"" . $postrow[$i]['user_from_flag'] . "\" border=\"0\" width=\"32\" height=\"20\" /><br />" : "";
// FLAGHACK-end
	$poster_joined = ( $postrow[$i]['user_id'] != ANONYMOUS ) ? $lang['Joined'] . ': ' . create_date($lang['DATE_FORMAT'], $postrow[$i]['user_regdate'], $board_config['board_timezone']) : '';

	$poster_avatar = '';
	if ( $postrow[$i]['user_avatar_type'] && $poster_id != ANONYMOUS && $postrow[$i]['user_allowavatar'] )
	{
		switch( $postrow[$i]['user_avatar_type'] )
		{
			case USER_AVATAR_UPLOAD:
				$poster_avatar = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $postrow[$i]['user_avatar'] . '" alt="" border="0" />' : '';
				break;
			case USER_AVATAR_REMOTE:
				$poster_avatar = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $postrow[$i]['user_avatar'] . '" alt="" border="0" />' : '';
				break;
			case USER_AVATAR_GALLERY:
				$poster_avatar = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $postrow[$i]['user_avatar'] . '" alt="" border="0" />' : '';
				break;
		}
	}

	//
	// Define the little post icon
	//
	if ( $userdata['session_logged_in'] && $postrow[$i]['post_time'] > $userdata['user_lastvisit'] && $postrow[$i]['post_time'] > $topic_last_read )
	{
		$mini_post_img = $images['icon_minipost_new'];
		$mini_post_alt = $lang['New_post'];
	}
	else
	{
		$mini_post_img = $images['icon_minipost'];
		$mini_post_alt = $lang['Post'];
	}

	$mini_post_url = append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $postrow[$i]['post_id']) . '#' . $postrow[$i]['post_id'];

	//
	// Generate ranks, set them to empty string initially.
	//
	$poster_rank = '';
	$rank_image = '';
// Start add - Gender MOD
$gender_image = '';
// End add - Gender MOD
	if ( $postrow[$i]['user_id'] == ANONYMOUS )
	{
	}
	else if ( $postrow[$i]['user_rank'] )
	{
		for($j = 0; $j < count($ranksrow); $j++)
		{
			if ( $postrow[$i]['user_rank'] == $ranksrow[$j]['rank_id'] && $ranksrow[$j]['rank_special'] )
			{
				$poster_rank = $ranksrow[$j]['rank_title'];
				$rank_image = ( $ranksrow[$j]['rank_image'] ) ? '<img src="' . $ranksrow[$j]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
			}
		}
	}
	else
	{
		for($j = 0; $j < count($ranksrow); $j++)
		{
			if ( $postrow[$i]['user_posts'] >= $ranksrow[$j]['rank_min'] && !$ranksrow[$j]['rank_special'] )
			{
				$poster_rank = $ranksrow[$j]['rank_title'];
				$rank_image = ( $ranksrow[$j]['rank_image'] ) ? '<img src="' . $ranksrow[$j]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
			}
		}
	}

	//
	// Handle anon users posting with usernames
	//
	if ( $poster_id == ANONYMOUS && $postrow[$i]['post_username'] != '' )
	{
		$poster = $postrow[$i]['post_username'];
		$poster_rank = $lang['Guest'];
// Start add - Birthday MOD
		$poster_age = '';
// End add - Birthday MOD
	}

	$temp_url = '';

	if ( $poster_id != ANONYMOUS )
	{
		$temp_url = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$poster_id");
		$profile_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_profile'] . '" alt="' . $lang['Read_profile'] . '" title="' . $lang['Read_profile'] . '" border="0" /></a>';
		$profile = '<a href="' . $temp_url . '">' . $lang['Read_profile'] . '</a>';

		$temp_url = append_sid("privmsg.$phpEx?mode=post&" . POST_USERS_URL . "=$poster_id&gesendet=fenster");
		$temp_popup = "window.open('$temp_url', 'Send_PM_Popup', 'width=600,height=500,scrollbars=yes,resizable=yes');";
		$pm_img = '<a href="javascript:void(0);" onClick="' . $temp_popup . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" title="' . $lang['Send_private_message'] . '" border="0" /></a>';
// Start add - Gender MOD
switch ($postrow[$i]['user_gender'])
{
   case 1 : $gender_image = $lang['Gender'].": <img src=" . $images['icon_minigender_male'] . ">"; break;
   case 2 : $gender_image = $lang['Gender'].": <img src=" . $images['icon_minigender_female'] . ">"; break;
   default : $gender_image="";
}
// End add - Gender MOD
		$pm = '<a href="' . $temp_url . '">' . $lang['Send_private_message'] . '</a>';
		$temp_url_profile = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$poster_id");
$vb_menu_profile = '<a class="vbm" href="' . $temp_url_profile . '">&nbsp;<img src="' . $images['vb_menu_profile'] . '" border="0" />&nbsp;' . $lang['vb_menu_l_profile'] . '</a>';
$temp_url_menu = append_sid("privmsg.$phpEx?mode=post&" . POST_USERS_URL . "=$poster_id");
$vb_menu_pm = '<a class="vbm" href="' . $temp_url_menu . '">&nbsp;<img src="' . $images['vb_menu_pm'] . '" border="0" />&nbsp;' . $lang['vb_menu_l_pm1'] . '&nbsp;' . $postrow[$i]['username'] . '&nbsp;' . $lang['vb_menu_l_pm2'] . '&nbsp;</a>';
$vb_menu_search = '<a class="vbm" href="search.php?show_results=posts&search_author=' . $poster . '">&nbsp;<img src="' . $images['vb_menu_search'] . '" border="0" />&nbsp;' . $lang['vb_menu_l_search1'] . '&nbsp;' . $postrow[$i]['username'] . '&nbsp;' . $lang['vb_menu_l_search2'] . '</a>';
$vb_menu_www = ( $postrow[$i]['user_website'] ) ? '<a class="vbm" href="' . $postrow[$i]['user_website'] . '" target="_userwww">&nbsp;<img src="' . $images['vb_menu_www'] . '" border="0" />&nbsp;' . $lang['vb_menu_l_www'] . '&nbsp;' . $postrow[$i]['username'] . '!</a>' : '';
//$vb_menu_album = '<a class="vbm" href="album.php?user_id=' . $poster_id . '&mode=list">&nbsp;<img src="' . $images['vb_menu_album'] . '" border="0" />&nbsp;' . $lang['vb_menu_l_album1'] . '&nbsp;' . $postrow[$i]['username'] . '&nbsp;' . $lang['vb_menu_l_album2'] . '</a>';
$vb_menu_id = $poster_id;

		if ( !empty($postrow[$i]['user_viewemail']) || $is_auth['auth_mod'] )
		{
			$email_uri = ( $board_config['board_email_form'] ) ? append_sid("profile.$phpEx?mode=email&" . POST_USERS_URL .'=' . $poster_id) : 'mailto:' . $postrow[$i]['user_email'];

			$email_img = '<a href="' . $email_uri . '"><img src="' . $images['icon_email'] . '" alt="' . $lang['Send_email'] . '" title="' . $lang['Send_email'] . '" border="0" /></a>';
			$email = '<a href="' . $email_uri . '">' . $lang['Send_email'] . '</a>';
			$vb_menu_email = '<a class="vbm" href="' . $email_uri . '">&nbsp;<img src="' . $images['vb_menu_email'] . '" border="0" />&nbsp;' . $lang['vb_menu_l_email1'] . '&nbsp;' . $postrow[$i]['username'] . '&nbsp;' . $lang['vb_menu_l_email2'] . '</a>';
		}
		else
		{
			$email_img = '';
			$email = '';
			$vb_menu_email = '';
		}

		if ( $postrow[$i]['user_posts'] <= NOFOLLOW_POSTS )
		{
			$nofollow_status = true;
			$www_img = ( $postrow[$i]['user_website'] ) ? '<a href="' . $postrow[$i]['user_website'] . '" target="_userwww" rel="nofollow"><img src="' . $images['icon_www'] . '" alt="' . $lang['Visit_website'] . '" title="' . $lang['Visit_website'] . '" border="0" /></a>' : '';
			$www = ( $postrow[$i]['user_website'] ) ? '<a href="' . $postrow[$i]['user_website'] . '" target="_userwww" rel="nofollow">' . $lang['Visit_website'] . '</a>' : '';
		}
		else
		{
			$nofollow_status = false;
			$www_img = ( $postrow[$i]['user_website'] ) ? '<a href="' . $postrow[$i]['user_website'] . '" target="_userwww"><img src="' . $images['icon_www'] . '" alt="' . $lang['Visit_website'] . '" title="' . $lang['Visit_website'] . '" border="0" /></a>' : '';
			$www = ( $postrow[$i]['user_website'] ) ? '<a href="' . $postrow[$i]['user_website'] . '" target="_userwww">' . $lang['Visit_website'] . '</a>' : '';
		}

		if ( !empty($postrow[$i]['user_icq']) )
		{
			$icq_status_img = '<a href="http://wwp.icq.com/' . $postrow[$i]['user_icq'] . '#pager"><img src="http://web.icq.com/whitepages/online?icq=' . $postrow[$i]['user_icq'] . '&img=5" width="18" height="18" border="0" /></a>';
			$temp_icq_url = append_sid('icqinfo.php?info=' . $postrow[$i]['user_icq']);
			$temp_icq_popup = "Javascript:window.open('$temp_icq_url', '_icqinfo_popup', 'width=400,height=320,scrollbars=yes');";
			$icq_img = '<a href="javascript:void(0);" onClick="' . $temp_icq_popup . '"><img src="' . $images['icon_icq'] . '" alt="' . $lang['ICQ'] . '" title="' . $lang['ICQ'] . '" border="0" /></a>';
			$icq =  '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $postrow[$i]['user_icq'] . '">' . $lang['ICQ'] . '</a>';
		}
		else
		{
			$icq_status_img = '';
			$icq_img = '';
			$icq = '';
		}

		$aim_img = ( $postrow[$i]['user_aim'] ) ? '<a href="aim:goim?screenname=' . $postrow[$i]['user_aim'] . '&message=Hello+Are+you+there?"><img src="' . $images['icon_aim'] . '" alt="' . $lang['AIM'] . '" title="' . $lang['AIM'] . '" border="0" /></a>' : '';
		$aim = ( $postrow[$i]['user_aim'] ) ? '<a href="aim:goim?screenname=' . $postrow[$i]['user_aim'] . '&message=Hello+Are+you+there?">' . $lang['AIM'] . '</a>' : '';

		$temp_url = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$poster_id");
		$msn_img = ( $postrow[$i]['user_msnm'] ) ? '<a href="' . $temp_url . '"><img src="' . $images['icon_msnm'] . '" alt="' . $lang['MSNM'] . '" title="' . $lang['MSNM'] . '" border="0" /></a>' : '';
		$msn = ( $postrow[$i]['user_msnm'] ) ? '<a href="' . $temp_url . '">' . $lang['MSNM'] . '</a>' : '';

		$yim_img = ( $postrow[$i]['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $postrow[$i]['user_yim'] . '&.src=pg"><img src="' . $images['icon_yim'] . '" alt="' . $lang['YIM'] . '" title="' . $lang['YIM'] . '" border="0" /></a>' : '';
		$yim = ( $postrow[$i]['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $postrow[$i]['user_yim'] . '&.src=pg">' . $lang['YIM'] . '</a>' : '';

		$skype_img = ( $postrow[$i]['user_skype'] ) ? '<a href="callto://' . $postrow[$i]['user_skype'] . '/"><img src="' . $images['icon_skype'] . '" alt="' . $lang['SKYPE'] . '" title="' . $lang['SKYPE'] . '" border="0" /></a>' : '';
		$skype = ( $postrow[$i]['user_skype'] ) ? '<a href="callto://' . $postrow[$i]['user_skype'] . '/">' . $lang['SKYPE'] . '</a>' : '';
	}
	else
	{
		$profile_img = '';
		$profile = '';
		$pm_img = '';
		$pm = '';
		$email_img = '';
		$email = '';
		$www_img = '';
		$www = '';
		$icq_status_img = '';
		$icq_img = '';
		$icq = '';
		$aim_img = '';
		$aim = '';
		$msn_img = '';
		$msn = '';
		$yim_img = '';
		$yim = '';
		$vb_menu_profile = '';
		$vb_menu_pm = '';
		$vb_menu_search = '';
		$vb_menu_email = '';
		$vb_menu_www = '';
		//$vb_menu_album = '';
		$skype_img = '';
		$skype = '';
	}

	$temp_url = append_sid("posting.$phpEx?mode=quote&" . POST_POST_URL . "=" . $postrow[$i]['post_id']);
	$quote_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_quote'] . '" alt="' . $lang['Reply_with_quote'] . '" title="' . $lang['Reply_with_quote'] . '" border="0" /></a>';
	$quote = '<a href="' . $temp_url . '">' . $lang['Reply_with_quote'] . '</a>';

	$temp_url = append_sid("search.$phpEx?search_author=" . urlencode($postrow[$i]['username']) . "&showresults=posts");
	$search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . sprintf($lang['Search_user_posts'], $postrow[$i]['username']) . '" title="' . sprintf($lang['Search_user_posts'], $postrow[$i]['username']) . '" border="0" /></a>';
	$search = '<a href="' . $temp_url . '">' . sprintf($lang['Search_user_posts'], $postrow[$i]['username']) . '</a>';

	if ( ( $userdata['user_id'] == $poster_id && $is_auth['auth_edit'] && ($forum_topic_data['topic_status'] != TOPIC_LOCKED)) || $is_auth['auth_mod'] )
	{
		$edit_url = append_sid("posting.$phpEx?mode=editpost&" . POST_POST_URL . "=" . $postrow[$i]['post_id']);
		$edit_img = '<a href="'. $edit_url .'"><img src="' . $images['icon_edit'] . '" alt="' . $lang['Edit_delete_post'] . '" title="' . $lang['Edit_delete_post'] . '" border="0" /></a>';
		$edit =  '<a id="editlink_'. $postrow[$i]['post_id'] .'" onclick="return AJAXPostEdit('. $postrow[$i]['post_id'] .');" href="' . $edit_url . '" style="text-decoration: none;">[ ' . $lang['Edit_quick_post'] . ' ]</a>';
	}
	else
	{
		$edit_img = '';
		$edit_direct = '';
		$edit = '';
		$edit_url = '';
	}

	if ( $is_auth['auth_mod'] )
	{
		$temp_url = "modcp.$phpEx?mode=ip&" . POST_POST_URL . "=" . $postrow[$i]['post_id'] . "&" . POST_TOPIC_URL . "=" . $topic_id . "&sid=" . $userdata['session_id'];
		$ip_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_ip'] . '" alt="' . $lang['View_IP'] . '" title="' . $lang['View_IP'] . '" border="0" /></a>';
		$ip = '<a href="' . $temp_url . '">' . $lang['View_IP'] . '</a>';

		$temp_url = "posting.$phpEx?mode=delete&" . POST_POST_URL . "=" . $postrow[$i]['post_id'] . "&sid=" . $userdata['session_id'];
		$delpost_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_delpost'] . '" alt="' . $lang['Delete_post'] . '" title="' . $lang['Delete_post'] . '" border="0" /></a>';
		$delpost = '<a href="' . $temp_url . '">' . $lang['Delete_post'] . '</a>';
	}
	else
	{
		$ip_img = '';
		$ip = '';

		if ( $userdata['user_id'] == $poster_id && $is_auth['auth_delete'] && $forum_topic_data['topic_last_post_id'] == $postrow[$i]['post_id'] )
		{
			$temp_url = "posting.$phpEx?mode=delete&" . POST_POST_URL . "=" . $postrow[$i]['post_id'] . "&sid=" . $userdata['session_id'];
			$delpost_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_delpost'] . '" alt="' . $lang['Delete_post'] . '" title="' . $lang['Delete_post'] . '" border="0" /></a>';
			$delpost = '<a href="' . $temp_url . '">' . $lang['Delete_post'] . '</a>';
		}
		else
		{
			$delpost_img = '';
			$delpost = '';
		}
	}

if($poster_id != ANONYMOUS && $postrow[$i]['user_level'] != ADMIN) 
{ 
	$current_user = str_replace("'","\'",$postrow[$i]['username']);
	if ($is_auth['auth_greencard'] && $userdata['user_level'] ==ADMIN || $userdata['user_level'] ==LESS_ADMIN) 
	{ 
	      $g_card_img = ' <input type="image" name="unban" value="unban" onClick="return confirm(\''.sprintf($lang['Green_card_warning'],$current_user).'\')" src="'. $images['icon_g_card'] . '" alt="' . $lang['Give_G_card'] . '" >'; 
	} 
	else 
	{
		$g_card_img = ''; 
	}
	$user_warnings = $postrow[$i]['user_warnings'];
	$card_img = ($user_warnings) ? (( $user_warnings < $board_config['max_user_bancard']) ? sprintf($lang['Warnings'], $user_warnings) : $lang['Banned'] ) : '';
// these lines will make a icon apear beside users post, if user have warnings or ar banned
// used instead of the previous line of code, witch shows the status as a text
//  ------ From here --- do not include this line
// $card_img = ($user_warnings) ? '<img src="'.(( $user_warnings < $board_config['max_user_bancard']) ? 
//		$images['icon_y_card'] . '" alt="'. sprintf($lang['Warnings'], $user_warnings) .'">' : 
//		$images['icon_r_card'] . '" alt="'. $lang['Banned'] .'">') : '';
//  ----- To this line --- Do not included this line
// 
// You may also included several images, instead of only one yellow, these lines below will produce several yellow images, depending on mumber of yellow cards
//  ------ From here --- do not include this line
//$card_img = ($user_warnings >= $board_config['max_user_bancard'])  ? '<img src="'.$images['icon_r_card'] . '" alt="'. $lang['Banned'] .'">' : '';
//for ($n=0 ; $n<$user_warnings && $user_warnings < $board_config['max_user_bancard'];$n++)
//{
//$card_img .= ($user_warnings) ? '<img src="'.(( $user_warnings < $board_config['max_user_bancard']) ? 
//$images['icon_y_card'] . '" alt="'. sprintf($lang['Warnings'], $user_warnings) .'">' : 
//$images['icon_r_card'] . '" alt="'. $lang['Banned'] .'">') : '';
//}
//  ----- To this line --- Do not included this line

	if ($user_warnings<$board_config['max_user_bancard'] && $userdata['user_level'] ==ADMIN || $userdata['user_level'] ==LESS_ADMIN )
	{ 
		$y_card_img = ' <input type="image" name="warn" value="warn" onClick="return confirm(\''.sprintf($lang['Yellow_card_warning'],$current_user).'\')" src="'. $images['icon_y_card'] . '" alt="' . sprintf($lang['Give_Y_card'],$user_warnings+1) . '" >'; 
     		$r_card_img = ' <input type="image" name="ban" value="ban"  onClick="return confirm(\''.sprintf($lang['Red_card_warning'],$current_user).'\')" src="'. $images['icon_r_card'] . '" alt="' . $lang['Give_R_card'] . '" >'; 
	}
	else if ($user_warnings<$board_config['max_user_bancard'] && $userdata['user_level'] ==MOD  )
	{ 
		$y_card_img = ' <input type="image" name="warn" value="warn" onClick="return confirm(\''.sprintf($lang['Yellow_card_warning'],$current_user).'\')" src="'. $images['icon_y_card'] . '" alt="' . sprintf($lang['Give_Y_card'],$user_warnings+1) . '" >'; 
	}
	else
	{
		$y_card_img = '';
		$r_card_img = ''; 
	} 
} else
{
	$card_img = '';
	$g_card_img = '';
	$y_card_img = '';
	$r_card_img = '';
}

	if ($is_auth['auth_bluecard']) 
	{ 
		if ($is_auth['auth_mod']) 
		{ 
			$b_card_img = (($postrow[$i]['post_bluecard'])) ? ' <input type="image" name="report_reset" value="report_reset" onClick="return confirm(\''.$lang['Clear_blue_card_warning'].'\')" src="'. $images['icon_bhot_card'] . '" alt="'. sprintf($lang['Clear_b_card'],$postrow[$i]['post_bluecard']) . '">':' <input type="image" name="report" value="report" onClick="return confirm(\''.$lang['Blue_card_warning'].'\')" src="'. $images['icon_b_card'] . '" alt="'. $lang['Give_b_card'] . '" >'; 
		} 
   		else 
		{ 
			$b_card_img = ' <input type="image" name="report" value="report" onClick="return confirm(\''.$lang['Blue_card_warning'].'\')" src="'. $images['icon_b_card'] . '" alt="'. $lang['Give_b_card'] . '" >';
			
   		}
	} else $b_card_img = '';

// parse hidden filds if cards visible
$card_hidden = ($g_card_img || $r_card_img || $y_card_img || $b_card_img) ? '<input type="hidden" name="post_id" value="'.
$postrow[$i]['post_id'].'">' :'';


		//kategorien
	if($postrow[$i]['kategorie'] !=""){
$postka= "[" .$postrow[$i]['kategorie']. "] ";
	}else{
	$postka= "";
}
	if ($postrow[$i]['post_id'] ==$forum_topic_data['topic_first_post_id']){

	$post_subject = ( $postrow[$i]['post_subject'] != '' ) ? $postka.$postrow[$i]['post_subject'] : '';
}else{	
		

	$post_subject = ( $postrow[$i]['post_subject'] != '' ) ? $postrow[$i]['post_subject'] : '';
}
$template->assign_vars(array(
	'TOPIC_CAT' => $postka
	));	

//kategorien

	// CrackerTracker v5.x
	if ( $postrow[$i]['ct_miserable_user'] == 1 && $postrow[$i]['user_id'] != $userdata['user_id'] && $userdata['user_level'] == 0)
	{
		$message = $lang['ctracker_message_dialog_title'] . '<br /><br />' . $lang['ctracker_ipb_deleted'];
	}
	else
	{
		$message = $postrow[$i]['post_text'];
		if ( $postrow[$i]['ct_miserable_user'] == 1 && $userdata['user_level'] == ADMIN )
		{
			$message .= '<br /><br />' . $lang['ctracker_mu_success'];
		}
	}
	$bbcode_uid = $postrow[$i]['bbcode_uid'];

	$user_sig = ( $postrow[$i]['enable_sig'] && $postrow[$i]['user_sig'] != '' && $board_config['allow_sig'] ) ? $postrow[$i]['user_sig'] : '';
	$user_sig_bbcode_uid = $postrow[$i]['user_sig_bbcode_uid'];

	//
	// Note! The order used for parsing the message _is_ important, moving things around could break any
	// output
	//

	//
	// If the board has HTML off but the post has HTML
	// on then we process it, else leave it alone
	//
    if ( !$board_config['allow_html'] || !$userdata['user_allowhtml'])
	{
		if ( $user_sig != '' )
		{
			$user_sig = preg_replace('#(<)([\/]?.*?)(>)#is', "<\\2>", $user_sig);
		}

		if ( $postrow[$i]['enable_html'] )
		{
			$message = preg_replace('#(<)([\/]?.*?)(>)#is', "<\\2>", $message);
		}
	}

	//
	// Parse message and/or sig for BBCode if reqd
	//
	if ($user_sig != '' && $user_sig_bbcode_uid != '')
	{
		$user_sig = ($board_config['allow_bbcode']) ? bbencode_second_pass($user_sig, $user_sig_bbcode_uid) : preg_replace("/\:$user_sig_bbcode_uid/si", '', $user_sig);
	}

	if ($bbcode_uid != '')
	{
		$message = ($board_config['allow_bbcode']) ? bbencode_second_pass($message, $bbcode_uid) : preg_replace("/\:$bbcode_uid/si", '', $message);
	}

	if ( $user_sig != '' )
	{
		$user_sig = make_clickable($user_sig);
	}
	$message = make_clickable($message);

	// BEGIN CMX News Mod
	// Strip out the <!--break--> delimiter.
	$delim = htmlspecialchars( '<!--break-->' );
	$pos = strpos( $message, $delim );
	if( ($pos !== false) && ($pos < strlen( $message )) ) {
		$message = substr_replace( $message, html_entity_decode($delim), $pos, strlen($delim) );
	}
	// END CMX News Mod


	//
	// Parse smilies
	//
	if ( $board_config['allow_smilies'] )
	{
		if ( $postrow[$i]['user_allowsmile'] && $user_sig != '' )
		{
			$user_sig = smilies_pass($user_sig);
		}

		if ( $postrow[$i]['enable_smilies'] )
		{
			$message = smilies_pass($message);
		}
	}

	//
	// Highlight active words (primarily for search)
	//
	if ($highlight_match)
	{
		// This has been back-ported from 3.0 CVS
		$message = preg_replace('#(?!<.*)(?<!\w)(' . $highlight_match . ')(?!\w|[^<>]*>)#i', '<b style="color:#'.$theme['fontcolor3'].'">\1</b>', $message);
	}

	//
	// Replace naughty words
	//
	if (count($orig_word))
	{
		$post_subject = preg_replace($orig_word, $replacement_word, $post_subject);

		if ($user_sig != '')
		{
			$user_sig = str_replace('\"', '"', substr(@preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "@preg_replace(\$orig_word, \$replacement_word, '\\0')", '>' . $user_sig . '<'), 1, -1));
		}

		$message = str_replace('\"', '"', substr(preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "preg_replace(\$orig_word, \$replacement_word, '\\0')", '>' . $message . '<'), 1, -1));
	}

	//
	// Replace newlines (we use this rather than nl2br because
	// till recently it wasn't XHTML compliant)
	//
	if ( $user_sig != '' )
	{
		$user_sig = '<br />_________________<br />' . str_replace("\n", "\n<br />\n", $user_sig);
	}

	$message = acronym_pass( $message );
	$message = str_replace("\n", "\n<br />\n", $message);

	//
	// Editing information
	//
	if ( $postrow[$i]['post_edit_count'] )
	{
		$l_edit_time_total = ( $postrow[$i]['post_edit_count'] == 1 ) ? $lang['Edited_time_total'] : $lang['Edited_times_total'];

		$l_edited_by = '<br /><br />' . sprintf($l_edit_time_total, $poster, create_date($board_config['default_dateformat'], $postrow[$i]['post_edit_time'], $board_config['board_timezone']), $postrow[$i]['post_edit_count']);
	}
	else
	{
		$l_edited_by = '';
	}
	if ( $postrow[$i]['user_absence'] == TRUE )
	{
		$absence_mode = create_absence_mode($postrow[$i]['user_absence_mode'], $pm_img, $pm, $email_img, $email, $poster);
	}
	
	if ( $poster_id != ANONYMOUS )
	{
		$style_color = ($user_color = color_groups_user($poster_id)) ? ' style="font-weight:bold;color: #' . $user_color . '"' : '';
		$poster = '<span' . $style_color . '>' . $poster . '</span>';
	}
	//
	// Again this will be handled by the templating
	// code at some point
	//
	$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
	$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
	
	$is_firstpost = ($postrow[$i]['post_id'] == $forum_topic_data['topic_first_post_id']) ? 1 : 0;
	if ($can_edit = ($is_auth['auth_mod'] || (($postrow[$i]['user_id'] == $userdata['user_id'] && ($forum_topic_data['topic_status'] != TOPIC_LOCKED)) && $is_auth['auth_edit'])))
	{
		$raw_message = $postrow[$i]['post_text'];
		if (!empty($bbcode_uid))
		{
			$raw_message = preg_replace('#\:(([a-z0-9]:)?)'. $bbcode_uid .'#s', '', $raw_message);
		}
	
		$raw_message = str_replace('<', '<', $raw_message);
		$raw_message = str_replace('>', '>', $raw_message);
		$raw_message = str_replace('<br />', "\n", $raw_message);
	}

	//Online/Offline
	if (($postrow[$i]['user_session_time'] >= ( time() - 300 )) && ($postrow[$i]['user_allow_viewonline']))
	{
		$on_off_hidden = '<img src="' . $images['icon_online'] . '" alt="' . $lang['Online'] . '" title="' . $lang['Online'] . '" border="0" />';
	}
	else if (($postrow[$i]['user_allow_viewonline']) == 0)
	{
		$on_off_hidden = '<img src="' . $images['icon_hidden'] . '" alt="' . $lang['Hidden'] . '" title="' . $lang['Hidden'] . '" border="0" />';
	}
	else if ($postrow[$i]['user_id'] == ANONYMOUS)

   {

      $on_off_hidden = '';

   }
	else
	{
		$on_off_hidden = '<img src="' . $images['icon_offline'] . '" alt="' . $lang['Offline'] . '" title="' . $lang['Offline'] . '" border="0" />';
	}

	$template->assign_block_vars('postrow', array(
		'DOWNLOAD_POST' => append_sid("viewtopic.$phpEx?download=".$postrow[$i]['post_id']."&".POST_TOPIC_URL."=".$topic_id),
		'ROW_COLOR' => '#' . $row_color,
		'ROW_CLASS' => $row_class,
		'POSTER_NAME' => $poster,
// Start add - Birthday MOD
		'POSTER_AGE' => $poster_age,
		'GEB_BILD' => $gebbild,
// End add - Birthday MOD
		'POSTER_RANK' => $poster_rank,
		'L_GENDER' => $lang['Gender'],
		'POSTER_GENDER' => $gender_image,
		'EDIT_HERE' => $edit,
		'RANK_IMAGE' => $rank_image,
		'POSTER_JOINED' => $poster_joined,
		'POSTER_POSTS' => $poster_posts,
		'POSTER_FROM' => $poster_from,
// FLAGHACK-start
		'POSTER_FROM_FLAG' => $poster_from_flag,
// FLAGHACK-end
		'POSTER_AVATAR' => $poster_avatar,
		'POSTER_ONLINE' => $on_off_hidden,
		'POST_DATE' => $post_date,
		'POST_SUBJECT' => (empty($post_subject)) ? $lang['No_subject'] : $post_subject,
		'POST_RAW_SUBJECT' => $post_subject,
		'MESSAGE' => $message,
		'SIGNATURE' => $user_sig,
		'EDITED_MESSAGE' => $l_edited_by,
		'VB_MENU_PROFILE' => $vb_menu_profile,
        'VB_MENU_EMAIL' => $vb_menu_email,
        'VB_MENU_PM' => $vb_menu_pm,
        'VB_MENU_WWW' => $vb_menu_www,
        'VB_MENU_SEARCH' => $vb_menu_search,
        //'VB_MENU_ALBUM' => $vb_menu_album,
        'VB_MENU_ID' => $vb_menu_id,
        'VB_MENU_L_PROFILE' => $vb_menu_l_profile,
        'VB_MENU_L_EMAIL1' => $vb_menu_l_email1,
        'VB_MENU_L_EMAIL2' => $vb_menu_l_email2,
        'VB_MENU_L_PM1' => $vb_menu_l_pm1,
        'VB_MENU_L_PM2' => $vb_menu_l_pm2,
        'VB_MENU_L_WWW' => $vb_menu_l_www,
        'VB_MENU_L_SEARCH1' => $vb_menu_l_search1,
        'VB_MENU_L_SEARCH2' => $vb_menu_l_search2,
        //'VB_MENU_L_ALBUM1' => $vb_menu_l_album1,
        //'VB_MENU_L_ALBUM2' => $vb_menu_l_album2,

		'MINI_POST_IMG' => $mini_post_img,
		'PROFILE_IMG' => $profile_img,
		'PROFILE' => $profile,
		'SEARCH_IMG' => $search_img,
		'SEARCH' => $search,
		'PM_IMG' => $pm_img,
		'PM' => $pm,
		'EMAIL_IMG' => $email_img,
		'EMAIL' => $email,
		'WWW_IMG' => $www_img,
		'WWW' => $www,
		'ICQ_STATUS_IMG' => $icq_status_img,
		'ICQ_IMG' => $icq_img,
		'ICQ' => $icq,
		'AIM_IMG' => $aim_img,
		'AIM' => $aim,
		'MSN_IMG' => $msn_img,
		'MSN' => $msn,
		'YIM_IMG' => $yim_img,
		'YIM' => $yim,
		'SKYPE_IMG' => $skype_img,
		'SKYPE' => $skype,
		'EDIT_IMG' => $edit_img,
		'EDIT' => $edit,
		'QUOTE_IMG' => $quote_img,
		'QUOTE' => $quote,
		'IP_IMG' => $ip_img,
		'IP' => $ip,
		'RAW_MESSAGE' => ($can_edit) ? $raw_message : '',
		'DELETE_IMG' => $delpost_img,
		'DELETE' => $delpost,
		'USER_WARNINGS' => $user_warnings,
'CARD_IMG' => $card_img,
'CARD_HIDDEN_FIELDS' => $card_hidden,
'CARD_EXTRA_SPACE' => ($r_card_img || $y_card_img || $g_card_img || $b_card_img) ? ' ' : '',
// Start add - Gender MOD
'L_GENDER' => $lang['Gender'],
// End add - Gender MOD

		'L_MINI_POST_ALT' => $mini_post_alt,
		'S_FIRST_POST' => $is_firstpost,
		'S_AJAX_EDIT_TITLE' => ($can_edit) ? 'ondblclick="AJAXTitleEdit('. $postrow[$i]['post_id'] .', '. $is_firstpost .');"' : '',
		
		'U_EDIT_POST' => $edit_url,
		'U_MINI_POST' => $mini_post_url,
		'U_G_CARD' => $g_card_img, 
'U_Y_CARD' => $y_card_img, 
'U_R_CARD' => $r_card_img, 
'U_B_CARD' => $b_card_img,
'S_CARD' => append_sid("card.".$phpEx),
		'U_POST_ID' => $postrow[$i]['post_id'])
	);
	display_post_attachments($postrow[$i]['post_id'], $postrow[$i]['post_attachment']);
	if ($can_edit)
	{
		$template->assign_block_vars('postrow.can_edit', array());
	}
if ( $userdata['user_level'] == ADMIN || $userdata['user_level'] == MOD || $userdata['user_level'] == LESS_ADMIN )
{
  $template->assign_block_vars('postrow.switch_mod',   array());
}

}

include($phpbb_root_path . 'quick_reply.'.$phpEx);
$template->pparse('body');

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

?>
viewtopic_body.tpl
Line 261

Code: Select all

<script type="text/javascript" src="ajax/ajax_topicfunctions.js"></script>
<script type="text/javascript">
<!--
is_viewtopic = 1;
highlight = '{HIGHLIGHT}';
vote_max = {MAX_VOTE};
l_max_poll_option = '{L_MAX_POLL_OPTION}';
max_poll_option = {MAX_POLL_OPTION};
//-->
</script>

<script type="text/javascript">

/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//Contents for menu 2, and so on
<!-- BEGIN postrow -->
var menu{postrow.VB_MENU_ID}=new Array()
menu{postrow.VB_MENU_ID}[0]='<a class="vbmh">&nbsp;{postrow.POSTER_NAME}</a>'
menu{postrow.VB_MENU_ID}[1]='{postrow.POSTER_ONLINE}'
menu{postrow.VB_MENU_ID}[2]='{postrow.VB_MENU_PROFILE}'
menu{postrow.VB_MENU_ID}[3]='{postrow.VB_MENU_PM}'
menu{postrow.VB_MENU_ID}[4]='{postrow.VB_MENU_EMAIL}'
menu{postrow.VB_MENU_ID}[5]='{postrow.VB_MENU_WWW}'
//menu{postrow.VB_MENU_ID}[6]='{postrow.VB_MENU_ALBUM}'
<!-- END postrow -->
var menuwidth='selfc' //default menu width
var menubgcolor='#EFF2FA'  //menu bgcolor
var disappeardelay='350'  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick='yes' //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all
var defaultwidth=menuwidth
if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')
function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}
function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
dropmenuobj.widthobj=dropmenuobj.style
if (typeof menuwidth=='undefined'||menuwidth=='selfc'){
tmpspan.style.display='inline'
dropmenuobj.widthobj.width=tmpspan.offsetWidth+'px'
tmpspan.style.display='none'
}
else if (menuwidth!='')
dropmenuobj.widthobj.width=menuwidth
else
dropmenuobj.widthobj.width=defaultwidth
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}
function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}
function populatemenu(what){
if (ie4||ns6){
var appendit=0
if (typeof tmpspan=='undefined'){
tmpspan=document.createElement('span')
appendit=1
}
if(appendit){
tmpspan.style.position="absolute"
tmpspan.style.left="-1000px"
tmpspan.id='tspan'
document.body.appendChild(tmpspan)
tmpspan.style.display='none'
}
tmpspan.innerHTML=dropmenuobj.innerHTML=what.join("")
}
}
function dropdownmenu(obj, e, menucontents, menuwidth){
obj.onmouseout=delayhidemenu;
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)
if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}
return clickreturnvalue()
}
function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}
function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}
function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}
function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}
function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}
function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}
if (hidemenu_onclick=="yes")
document.onclick=hidemenu
</script>

<table width="100%" cellpadding="2" cellspacing="1" border="0" align="center" class="forumline">
  <tr>
	<td class="cat" align="left" valign="middle" width="100%" colspan=2"><center>{L_DARE_NAVIGATION}</center></td>
  </tr><tr><td class="row1"><img border="0" src="images/dare_navi_one.gif">
  <span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a>
	  &raquo; <a href="{U_SHOW_CAT}" class="nav">{L_SHOW_CAT}</a>
	  <!-- IF PARENT_FORUM --> &raquo; <a class="nav" href="{U_VIEW_PARENT_FORUM}">{PARENT_FORUM_NAME}</a><!-- ENDIF --> 
	  &raquo; <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a><br /><img border="0" src="images/dare_navi_two.gif">&nbsp;<a class="nav" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a></span></td>
	  <td width="36%" class="row2">
	  <!-- BEGIN switch_user_logged_in -->
	  <span class="nav">{L_DARE_WELCOME}, {U_NAME_LINK}</span><br /><span class="gensmall">
   {LAST_VISIT_DATE}<br />
   <a href="{U_PRIVATEMSGS}">{PRIVATE_MESSAGE_INFO}</a><br /><br />
   <!-- END switch_user_logged_in -->
   </span>
   <!-- BEGIN switch_user_logged_out -->
   <form method="post" action="{S_LOGIN_ACTION}">
   	<span class="gen">{L_DARE_USERNAME}:</span>
		<input class="post" type="text" name="username" size="10" />&nbsp;<input type="checkbox" name="autologin" value="ON" />
		<acronym style="border-bottom: 1px dotted #000000; cursor: help;" title="{L_DARE_LOGIN_EXPLAIN}" alt="{L_DARE_LOGIN_EXPLAIN}"><span class="gen">{L_DARE_LOGIN}</span></acronym>
		<br /><span class="gen">{L_DARE_PASSWORD}:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
		<input class="post" type="password" name="password" size="10" />&nbsp;<input type="submit" class="mainoption" name="login" value="{L_LOGIN}" />
		<input type="hidden" name="redirect" value="{U_VIEW_TOPIC}" />
		</form>
<!-- END switch_user_logged_out -->
</td></tr></table>
<br />
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td class="gensmall" align="right" valign="bottom">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="row1"><img src="templates/{T_NAME}/images/spacer.gif" border="0" width="4"></td>
    <td class="row1"><a href="{U_VIEW_OLDER_TOPIC}" title="{L_VIEW_PREVIOUS_TOPIC}"><img src="templates/{T_NAME}/images/orion/icons/previous.png" border="0"></a></td>
    <td class="row1"><img src="templates/{T_NAME}/images/spacer.gif" border="0"></td>
    <td class="row1"><a href="portal.php" title="Portal"><img src="templates/{T_NAME}/images/orion/icons/homebut.gif" border="0"></a></td>
    <td class="row1"><img src="templates/{T_NAME}/images/spacer.gif" border="0"></td>
<!-- BEGIN switch_user_logged_in -->
    <td class="row1"><a href="{DOWNLOAD_TOPIC}" title="{L_DOWNLOAD_TOPIC}"><img src="templates/{T_NAME}/images/orion/icons/disk.png" border="0"></a></td>
    <td class="row1"><img src="templates/{T_NAME}/images/spacer.gif" border="0" width="4"></td>
    <td class="row1"><a href="{U_PRINT}" title="{L_PRINT}" target="_blank"><img src="templates/{T_NAME}/images/orion/icons/printer.png" border="0"></a></td>
    <td class="row1"><img src="templates/{T_NAME}/images/spacer.gif" border="0" width="4"></td>
    <td class="row1"><a href="{U_SEARCH_NEW}" title="{L_SEARCH_NEW}"><img src="templates/{T_NAME}/images/orion/icons/book_add.png" border="0"></a></td>
    <td class="row1"><img src="templates/{T_NAME}/images/spacer.gif" border="0" width="4"></td>
    <td class="row1"><a href="javascript:void(0);" onclick="return overlib('<ul><li class=orionmenu><a href={U_SEARCH_UNANSWERED}>{L_SEARCH_UNANSWERED}</a></li><br /><li class=orionmenu><a href={U_POST_REPLY_TOPIC}><strong>{L_POST_REPLY_TOPIC}</strong></a></li><br><li class=orionmenu><a href={U_POST_NEW_TOPIC}>{L_POST_NEW_TOPIC}</a></li><br><li class=orionmenu><a href={U_PROFILE}>{L_PROFILE}</a></li></ul>', STICKY, CAPTION, '{L_OR_DROPDWN}', LEFT, CLOSECLICK);" onmouseout="nd();"><img src="templates/{T_NAME}/images/orion/icons/information.png" border="0"></a></td>
    <td class="row1"><img src="templates/{T_NAME}/images/spacer.gif" border="0" width="4"></td>
<!-- END switch_user_logged_in -->
    <td class="row1"><a href="{U_VIEW_NEWER_TOPIC}" title="{L_VIEW_NEXT_TOPIC}"><img src="templates/{T_NAME}/images/orion/icons/go.png" border="0"></a></td>
    <td class="row1"><img src="templates/{T_NAME}/images/spacer.gif" border="0" width="4"></td>
  </tr>
</table>
<br />
</td>
</tr>
</table>

<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
  <tr> 
	<td align="left" valign="middle" nowrap="nowrap"><span class="nav"><a href="{U_POST_NEW_TOPIC}"><img src="{POST_IMG}" border="0" alt="{L_POST_NEW_TOPIC}" align="middle" /></a>&nbsp;&nbsp;&nbsp;<a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" border="0" alt="{L_POST_REPLY_TOPIC}" align="middle" /></a></span></td>
<td align="right" valign="bottom" nowrap="nowrap"><span class="gensmall"><b>{PAGINATION}</b></span><br /><span class="gensmall">{PAGE_NUMBER}</span></td>
  </tr>
</table>

{POLL_DISPLAY}
<!-- BEGIN postrow -->
<table class="forumline" width="100%" cellspacing="1" cellpadding="3" border="0">
    <tr>
		<td class="row1" width="100%" height="28" valign="bottom" nowrap="nowrap" colspan="2">
			<table width="100%" cellpadding="0" cellspacing="0" border="0">
				<tr>
					<td align="left" nowrap="nowrap" valign="top"><a href="{postrow.U_MINI_POST}"><img src="{postrow.MINI_POST_IMG}" width="12" height="9" alt="{postrow.L_MINI_POST_ALT}" title="{postrow.L_MINI_POST_ALT}" border="0" /></a><span class="genmini">&nbsp;</span><span class="postdetails">{L_POSTED}: {postrow.POST_DATE}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    </td>
					<!-- Start add - Yellow card admin MOD -->
<form method="post" action="{postrow.S_CARD}">
<!-- End add - Yellow card admin MOD -->
			        <td width="100%" height="18" align="right" nowrap="nowrap" valign="top">
					{postrow.U_R_CARD}{postrow.U_Y_CARD}
					{postrow.U_G_CARD}{postrow.U_B_CARD}{postrow.CARD_EXTRA_SPACE}{postrow.CARD_HIDDEN_FIELDS}
					  <a class="nav" href="javascript:void(0)" onClick="return dropdownmenu(this, event, menu{postrow.VB_MENU_ID}, 'selfc')" onMouseout="delayhidemenu()">Userinfo</a> &nbsp;&nbsp;
					  &nbsp;{postrow.QUOTE_IMG} {postrow.EDIT_IMG} {postrow.DELETE_IMG} {postrow.IP_IMG}  
			          <a href="#" onclick="self.scrollTo(0,0); return false;"><img src="templates/{T_NAME}/images/icon_up.gif" alt="{L_BACK_TO_TOP}" width="" height="" title="{L_BACK_TO_TOP}" class="imgtopic" /></a> 
			          <a href="#" onclick="self.scrollTo(0,50000); return false;"><img src="templates/cback/images/icon_go_to_bottom.gif" width="" height="" alt="{L_BACK_TO_BOTTOM}" title="Nach unten" border="0" /></a>&nbsp;
			       </td>
				   <!-- Start add - Yellow card admin MOD -->
</form>
<!-- End add - Yellow card admin MOD -->
			  </tr>
		  </table>
		</td>
    </tr>
	<tr>
		<td class="row2" width="100%" height="25" valign="top" colspan="2">
			<span class="postdetails"><b>{postrow.POST_SUBJECT}</b></span>
		</td>
	</tr>
	<!-- END title -->
	<tr>
		<td width="150" height="28" class="cat">{L_AUTHOR}</td>
		<td width="100%" class="cat">{L_MESSAGE}</td>
	</tr>
	<tr>
        <td valign="top" align="center" class="{postrow.ROW_CLASS}" rowspan="2"><span class="name"><a name="{postrow.U_POST_ID}" id="{postrow.U_POST_ID}"></a><strong><a href="javascript:emoticon('[b]{postrow.POSTER_NAME}[/b], ')">{postrow.POSTER_NAME}</a></strong></span><br /><br />
            <span class="postdetails">
            {postrow.RANK_IMAGE}<br>{postrow.POSTER_AVATAR}<br />
            {postrow.POSTER_JOINED}<br />
            {postrow.POSTER_POSTS}<br />
			<!-- BEGIN switch_mod -->
            <br />{postrow.CARD_IMG}
            <!-- END switch_mod --></span><br />
<br />
             <img src="images/spacer.gif" alt="" width="150" height="1" />
        </td>
        <td class="{postrow.ROW_CLASS}" valign="top">
<br>
<table width="100%" height="170" border="0" cellpadding="0" cellspacing="0">
<tr>
				<td height="48" colspan="2">
					<span id="postmessage_{postrow.U_POST_ID}"><span class="postbody">{postrow.MESSAGE}</span></span>
				</td>
</tr>
<tr valign="bottom">
				<td colspan="2">
					<!-- BEGIN can_edit -->
					<div id="preview_box_{postrow.U_POST_ID}" {s_display_preview}>{POST_PREVIEW_BOX}</div>
					<div class="gen" id="post_{postrow.U_POST_ID}" style="display:none; text-align:right;">
						<textarea id="posttext_{postrow.U_POST_ID}" rows="15" cols="35" wrap="virtual" class="post" style="width:100%;" onkeyup="AJAXPostEditkeyUp(event, {postrow.U_POST_ID})">{postrow.RAW_MESSAGE}</textarea><textarea id="orig_posttext_{postrow.U_POST_ID}" rows="1" cols="1" style="display:none;">{postrow.RAW_MESSAGE}</textarea><br />
						<input type="button" value=" + " onclick="AJAXEnlargePostArea({postrow.U_POST_ID});return false;" class="liteoption" />&nbsp;<input type="button" value=" - " onclick="AJAXShortenPostArea({postrow.U_POST_ID});return false;" class="liteoption" />&nbsp;&nbsp;&nbsp;<input type="button" onclick="AJAXEndPostEdit({postrow.U_POST_ID}, -1);return false;" value="{L_SAVE_CHANGES}" class="liteoption" />&nbsp;<input type="button" onclick="AJAXCancelPostEdit({postrow.U_POST_ID});return false;" value="{L_CANCEL}" class="liteoption" />&nbsp;<a href="{postrow.U_EDIT_POST}" class="gen">{L_FULL_EDIT}</a>
					</div>
					<!-- END can_edit -->
					<span class="postbody">{postrow.ATTACHMENTS}{postrow.SIGNATURE}</span>
					<span id="editmessage_{postrow.U_POST_ID}" class="gensmall">{postrow.EDITED_MESSAGE}</span>
					<br />
					<div align="right"><span class="gensmall"><b>{postrow.EDIT_HERE}</b></div>
		  </td>
</tr>
</table>
</td>
</tr>
</table>
<table class="shadow" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="shleft"><img src="templates/cback/images/spacer.gif" alt="" width="8" height="4" /></td>
<td class="shbottom"><img src="templates/cback/images/spacer.gif" alt="" width="8" height="4" /></td>
<td class="shright"><img src="templates/cback/images/spacer.gif" alt="" width="8" height="4" /></td>
</tr>
</table>
   <!-- END postrow --> 
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="forumline">
<tr>
<td class="spacerow" colspan="2" height="0"></td>
</tr>
{QUICKREPLY_OUTPUT}
<tr>
<td colspan="2" align="center" class="cat">
<form method="post" action="{S_POST_DAYS_ACTION}">
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td class="gensmall">{L_DISPLAY_POSTS}:&nbsp;&nbsp;</td>
<td>{S_SELECT_POST_DAYS}&nbsp;</td>
<td>{S_SELECT_POST_ORDER}&nbsp;</td>
<td><input type="submit" value="{L_GO}" class="catbutton" name="submit" /></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
  <tr> 
	<td align="left" valign="middle" nowrap="nowrap"><span class="nav"><a href="{U_POST_NEW_TOPIC}"><img src="{POST_IMG}" border="0" alt="{L_POST_NEW_TOPIC}" align="middle" /></a>&nbsp;&nbsp;&nbsp;<a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" border="0" alt="{L_POST_REPLY_TOPIC}" align="middle" /></a></span></td>
<td align="right" valign="top" nowrap="nowrap"><span class="gensmall">{PAGE_NUMBER}</span><br /><span class="gensmall"><b>{PAGINATION}</b></span></td>
  </tr>
</table>
<br />
<table width="100%" cellpadding="2" cellspacing="1" border="0" align="center" class="forumline">
  <tr>
  </tr><tr><td class="row2"><img border="0" src="images/dare_navi_one.gif">
  <span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a>
	  &raquo; <a href="{U_SHOW_CAT}" class="nav">{L_SHOW_CAT}</a>
	  <!-- IF PARENT_FORUM --> &raquo; <a class="nav" href="{U_VIEW_PARENT_FORUM}">{PARENT_FORUM_NAME}</a><!-- ENDIF --> 
	  &raquo; <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a><br /><img border="0" src="images/dare_navi_two.gif">&nbsp;<a class="nav" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a></span></td>
	  <td width="36%" class="row2">
	  <!-- BEGIN switch_user_logged_in -->
	  <span class="nav">{L_DARE_WELCOME}, {U_NAME_LINK}</span><br /><span class="gensmall">
   {LAST_VISIT_DATE}<br />
   <a href="{U_PRIVATEMSGS}">{PRIVATE_MESSAGE_INFO}</a>
   <!-- END switch_user_logged_in -->
   </span>
   <!-- BEGIN switch_user_logged_out -->
   <form method="post" action="{S_LOGIN_ACTION}">
   	<span class="gen">{L_DARE_USERNAME}:</span>
		<input class="post" type="text" name="username" size="10" />&nbsp;<input type="checkbox" name="autologin" value="ON" />
		<acronym style="border-bottom: 1px dotted #000000; cursor: help;" title="{L_DARE_LOGIN_EXPLAIN}" alt="{L_DARE_LOGIN_EXPLAIN}"><span class="gen">{L_DARE_LOGIN}</span></acronym>
		<br /><span class="gen">{L_DARE_PASSWORD}:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
		<input class="post" type="password" name="password" size="10" />&nbsp;<input type="submit" class="mainoption" name="login" value="{L_LOGIN}" />
		<input type="hidden" name="redirect" value="{U_VIEW_TOPIC}" />
		</form>
<!-- END switch_user_logged_out -->
</td></tr>
<tr>
<td class="row1"><br />
<br />
{JUMPBOX}<br />
<br />
{S_TOPIC_ADMIN}</td>
<td class="row1" align="right" valign="top"><span class="gensmall"><strong>
{S_WATCH_TOPIC}</strong></span><br><br>
<span class="gensmall"><strong><a href="javascript:void(0);" onclick="return overlib('{S_AUTH_LIST}', STICKY, CAPTION, '{L_ORION_AUTH}', LEFT, WIDTH, 400);" onmouseout="nd();">{L_ORION_AUTH}</a></strong></span>
</td>
</tr>
</table>
<script type="text/javascript">
// <![CDATA[
if (navigator.appName.indexOf("Explorer") == -1)
{document.body.style.overflow = 'hidden'; document.body.style.overflow = '';}
// ]]>
</script>

kkroo
Registered User
Posts: 729
Joined: Sat Dec 03, 2005 4:49 pm
Contact:

Re: Simple Colored Usergroups

Post by kkroo » Wed Mar 28, 2007 9:11 pm

ok

Find:

Code: Select all

       if ( $poster_id != ANONYMOUS )
       {
          $style_color = ($user_color = color_groups_user($poster_id)) ? ' style="font-weight:bold;color: #' . $user_color . '"' : '';
          $poster = '<span' . $style_color . '>' . $poster . '</span>';
       }
Replace with:

Code: Select all

	   $poster_name = $poster;
       if ( $poster_id != ANONYMOUS )
       {
          $style_color = ($user_color = color_groups_user($poster_id)) ? ' style="font-weight:bold;color: #' . $user_color . '"' : '';
          $poster = '<span' . $style_color . '>' . $poster_name . '</span>';
       }
Find:

Code: Select all

          'POSTER_NAME' => $poster,
After Add:

Code: Select all

          'POSTER_NAME_RAW' => $poster_name,

In viewtopic_body.tpl

Find:

Code: Select all

<td valign="top" align="center" class="{postrow.ROW_CLASS}" rowspan="2"><span class="name"><a name="{postrow.U_POST_ID}" id="{postrow.U_POST_ID}"></a><strong><a href="javascript:emoticon('[b]{postrow.POSTER_NAME}[/b], ')">{postrow.POSTER_NAME}</a></strong></span><br /><br />
Replace with:

Code: Select all

<td valign="top" align="center" class="{postrow.ROW_CLASS}" rowspan="2"><span class="name"><a name="{postrow.U_POST_ID}" id="{postrow.U_POST_ID}"></a><strong><a href="javascript:emoticon('[b]{postrow.POSTER_NAME_RAW}[/b], ')">{postrow.POSTER_NAME}</a></strong></span><br /><br />
My MODs

Need a coder?

Enjoy my Mods? - Image

terestres
Registered User
Posts: 16
Joined: Tue Mar 27, 2007 4:20 pm
Contact:

Re: Simple Colored Usergroups

Post by terestres » Thu Mar 29, 2007 2:07 pm

Thank you for your feedback, kkroo. It works perfekt ! :)

runegirlie
Registered User
Posts: 173
Joined: Sun Jul 31, 2005 6:08 pm

Re: Simple Colored Usergroups

Post by runegirlie » Fri Mar 30, 2007 12:52 pm

kkroo .. btw - your assistance has been amazing.

I made those changes to my viewtopic.php, but can't to the viewtopic_body.tpl because this is how it looks for me due to the Custom Profile Mod:
<!-- Custom Profile Fields MOD start -->
<td width="150" align="center" valign="top" class="row1"><span class="gen">
<span class="postername"><a name="{postrow.U_POST_ID}"></a>{postrow.POSTER_NAME}</span><br />
<span class="posterrank">{postrow.POSTER_RANK}<br /></span>
{postrow.RANK_IMAGE}{postrow.POSTER_AVATAR}<br /><br />
<table border="0" cellspacing="0" cellpadding="2" width="95%">
<tr>
<td align="left" class="posterprofile">{postrow.POSTER_JOINED}<br />{postrow.POSTER_POSTS}<br />{postrow.POSTER_FROM}
<!-- BEGIN author_profile -->
<br />{postrow.author_profile.AUTHOR_VAL}
<!-- END author_profile -->
<!-- Custom Profile Fields MOD finish -->


Any ideas?

kkroo
Registered User
Posts: 729
Joined: Sat Dec 03, 2005 4:49 pm
Contact:

Re: Simple Colored Usergroups

Post by kkroo » Fri Mar 30, 2007 4:47 pm

runegirlie, just as terestres gave me the outputted HTML, could you do that too so that I can help you out?
My MODs

Need a coder?

Enjoy my Mods? - Image

Post Reply

Return to “[2.0.x] MOD Database Releases”