• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[GESIOR] Group name under character name at the Forum section

Status
Not open for further replies.
Saw this on a OTserver recently but can't remember exactly which one. Still interested in this!
 
A shitty method i'm using. will require some changes to work with standard gesior
PHP:
<?php
			<a href="?subtopic=characters&amp;name=<?php echo urlencode($p['name'])?>"><?php echo $p['name']?></a><br/>
<?php			if($p['group_id'] != 1) { ?>
			<font class="ff_smallinfo"><?php
				if($p['group_id'] == 2) { ?>Helper<?php }
				elseif($p['group_id'] == 3) { ?>Tutor<?php }
				elseif($p['group_id'] == 4) { ?>Gamemaster<?php }
				elseif($p['group_id'] == 5) { ?>Community Manager<?php }
				elseif($p['group_id'] == 6) { ?>God<?php }
			?><br/>
<?php		if($p['group_id'] > 3) { 
					$p['promotion'] = 0;
					$p['vocation'] = 0;
					?><img class="PostIcon" src="http://otland.net/images/forum/god_post_icon.png" border="0"/><br/><?php
				} ?>
			</font>
<?php			} ?>
			<br/>
 
What changes does it require to get it work with the standard gesior?

PHP:
            $main_content .= '<tr bgcolor="'.$bgcolor.'"><td valign="top"><?php<a href="?subtopic=characters&amp;name=<?php echo urlencode($p['name'])?>"><?php echo $p['name']?></a><br/>
			<?php            if($p['group_id'] != 1) { ?>
            <font class="ff_smallinfo"><?php
                if($p['group_id'] == 2) { ?>Helper<?php }
                elseif($p['group_id'] == 3) { ?>Tutor<?php }
                elseif($p['group_id'] == 4) { ?>Gamemaster<?php }
                elseif($p['group_id'] == 5) { ?>Community Manager<?php }
                elseif($p['group_id'] == 6) { ?>God<?php }
            ?><br/>
			<?php        if($p['group_id'] > 3) { 
                    $p['promotion'] = 0;
                    $p['vocation'] = 0;
                    ?><img class="PostIcon" src="http://otland.net/images/forum/god_post_icon.png" border="0"/><br/><?php
                } ?>
            </font>
<?php            } ?>
            <br/>
			<font size="1">Profession: '.$vocation_name[$thread['world_id']][$thread['promotion']][$thread['vocation']].'<br />
			Level: '.$thread['level'].'<br />';
            $rank = new OTS_GuildRank();
            $rank->load($thread['rank_id']);
            if($rank->isLoaded())
            {
                $guild = $rank->getGuild();
                if($guild->isLoaded())
                    $main_content .= $rank->getName().' of <a href="?subtopic=guilds&action=show&guild='.$guild->getId().'">'.$guild->getName().'</a><br />';
            }
 
Last edited:
Could anyone help with this? Im not sure if Cykotitan's code work or not, I've trying to add it to my forum.php but just getting a white page.
 
Replace "if($action == 'show_thread')" with this (I haven't tested it before so I'm not sure that it work properly):
PHP:
<?php // <-- don't copy this

if($action  == 'show_thread')
{
    $thread_id = (int) $_REQUEST['id'];
    $page = (int) $_REQUEST['page'];
    $thread_name = $SQL->query("SELECT `players`.`name`, `z_forum`.`post_topic` FROM `players`, `z_forum` WHERE `z_forum`.`first_post` = ".(int) $thread_id." AND `z_forum`.`id` = `z_forum`.`first_post` AND `players`.`id` = `z_forum`.`author_guid` LIMIT 1")->fetch();
    if(!empty($thread_name['name']))
    {
        $posts_count = $SQL->query("SELECT COUNT(`z_forum`.`id`) AS posts_count FROM `players`, `z_forum` WHERE `players`.`id` = `z_forum`.`author_guid` AND `z_forum`.`first_post` = ".(int) $thread_id)->fetch();
        for($i = 0; $i < $posts_count['posts_count'] / $threads_per_page; $i++)
        {
            if($i != $page)
                $links_to_pages .= '<a href="?subtopic=forum&action=show_thread&id='.$thread_id.'&page='.$i.'">'.($i + 1).'</a> ';
            else
                $links_to_pages .= '<b>'.($i + 1).' </b>';
        }
        $threads = $SQL->query("SELECT `players`.`name`, `players`.`group_id`, `players`.`account_id`, `players`.`world_id`, `players`.`rank_id`, `players`.`vocation`, `players`.`promotion`, `players`.`level`, `z_forum`.`id`,`z_forum`.`first_post`, `z_forum`.`section`,`z_forum`.`post_text`, `z_forum`.`post_topic`, `z_forum`.`post_date`, `z_forum`.`post_smile`, `z_forum`.`author_aid`, `z_forum`.`author_guid`, `z_forum`.`last_edit_aid`, `z_forum`.`edit_date` FROM `players`, `z_forum` WHERE `players`.`id` = `z_forum`.`author_guid` AND `z_forum`.`first_post` = ".(int) $thread_id." ORDER BY `z_forum`.`post_date` LIMIT ".$posts_per_page." OFFSET ".($page * $posts_per_page))->fetchAll();
        if(isset($threads[0]['name']))
            $SQL->query("UPDATE `z_forum` SET `views`=`views`+1 WHERE `id` = ".(int) $thread_id);
        $main_content .= '<a href="?subtopic=forum">Boards</a> >> <a href="?subtopic=forum&action=show_board&id='.$threads[0]['section'].'">'.$sections[$threads[0]['section']].'</a> >> <b>'.$thread_name['post_topic'].'</b>';

        $g = array(1 => '', 2 => 'Helper', 3 => 'Tutor', 4 => 'Gamemaster', 5 => 'Community Manager', 6 => 'God');
		
		//OPEN|CLOSE FUNCTION
        if(isThreadOpen($thread_id)) {
        $main_content .= '<br /><br /><a href="?subtopic=forum&action=new_post&thread_id='.$thread_id.'"><img src="images/post.gif" border="0" /></a><br /><br />Page: '.$links_to_pages.'<br /><table width="100%"><tr bgcolor="'.$config['site']['lightborder'].'" width="100%"><td colspan="2"><font size="4"><b>'.htmlspecialchars($thread_name['post_topic']).'</b></font><font size="1"><br />by <a href="?subtopic=characters&name='.urlencode($thread_name['name']).'">'.$thread_name['name'].'</a></font></td></tr><tr bgcolor="'.$config['site']['vdarkborder'].'"><td width="200"><font color="white" size="1"><b>Author</b></font></td><td>&nbsp;</td></tr>';}
        else
        $main_content .= '<br /><br /><strong>Thread Closed!</strong><br /><br />Page: '.$links_to_pages.'<br /><table width="100%"><tr bgcolor="'.$config['site']['lightborder'].'" width="100%"><td colspan="2"><font size="4"><b>'.htmlspecialchars($thread_name['post_topic']).'</b></font><font size="1"><br />by <a href="?subtopic=characters&name='.urlencode($thread_name['name']).'">'.$thread_name['name'].'</a></font></td></tr><tr bgcolor="'.$config['site']['vdarkborder'].'"><td width="200"><font color="white" size="1"><b>Author</b></font></td><td>&nbsp;</td></tr>';
        
        foreach($threads as $thread)
        {
            if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
            $main_content .= '<tr bgcolor="'.$bgcolor.'"><td valign="top"><a href="?subtopic=characters&name='.urlencode($thread['name']).'">'.$thread['name'].'</a><br />';
			
			if($thread['group_id'] != 1)
				$main_content .= '<font class="ff_smallinfo">'.$g[$thread['group_id']].'<br/>'.($thread['group_id'] > 3 ? '<img class="PostIcon" src="http://otland.net/images/forum/god_post_icon.png" border="0"/><br/>' : '').'</font>';
			
			$main_content .= '<br /><font size="1">Profession: '.$vocation_name[$thread['world_id']][$thread['promotion']][$thread['vocation']].'<br />Level: '.$thread['level'].'<br />';
            $rank = new OTS_GuildRank();
            $rank->load($thread['rank_id']);
            if($rank->isLoaded())
            {
                $guild = $rank->getGuild();
                if($guild->isLoaded())
                    $main_content .= $rank->getName().' of <a href="?subtopic=guilds&action=show&guild='.$guild->getId().'">'.$guild->getName().'</a><br />';
            }
            $posts = $SQL->query("SELECT COUNT(`id`) AS 'posts' FROM `z_forum` WHERE `author_aid`=".(int) $thread['account_id'])->fetch();
            $main_content .= '<br />Posts: '.(int) $posts['posts'].'<br /></font></td><td valign="top">'.showPost(htmlspecialchars($thread['?']), htmlspecialchars($thread['post_text']), $thread['post_smile']).'</td></tr>
            <tr bgcolor="'.$bgcolor.'"><td><font size="1">'.date('d.m.y H:i:s', $thread['post_date']);
            if($thread['edit_date'] > 0)
            {
                if($thread['last_edit_aid'] != $thread['author_aid'])
                    $main_content .= '<br />Edited by moderator';
                else
                    $main_content .= '<br />Edited by '.$thread['name'];
                $main_content .= '<br />on '.date('d.m.y H:i:s', $thread['edit_date']);
            }
            $main_content .= '</font></td><td>';
            if($logged && $group_id_of_acc_logged >= $group_not_blocked)
                if($thread['first_post'] != $thread['id'])
                    $main_content .= '<a href="?subtopic=forum&action=remove_post&id='.$thread['id'].'" onclick="return confirm(\'Are you sure you want remove post of '.$thread['name'].'?\')"><font color="red">REMOVE POST</font></a>';
                else
                    $main_content .= '<a href="?subtopic=forum&action=remove_post&id='.$thread['id'].'" onclick="return confirm(\'Are you sure you want remove thread > '.$thread['post_topic'].' <?\')"><font color="red">REMOVE THREAD</font></a>';
            if($logged && ($thread['account_id'] == $account_logged->getId() || $group_id_of_acc_logged >= $group_not_blocked))

            //OPEN|CLOSE FUNCTION
            if(isThreadOpen($thread_id)) {
                $main_content .= '<br/><a href="?subtopic=forum&action=edit_post&id='.$thread['id'].'">EDIT POST</a>';}
            else
                $main_content .= '';    
            if($logged)
                if(isThreadOpen($thread_id)) {
                    $main_content .= '<br/><a href="?subtopic=forum&action=new_post&thread_id='.$thread_id.'&quote='.$thread['id'].'">Quote</a>';}
            else
                $main_content .= '';
                    $main_content .= '</td></tr>';
        }
        
        //OPEN|CLOSE FUNCTION
        if(isThreadOpen($thread_id)) {
        $main_content .= '</table><br /><a href="?subtopic=forum&action=new_post&thread_id='.$thread_id.'"><img src="images/post.gif" border="0" /></a><br /><center>Pages:<br />'.$links_to_pages.'<br /></center>'; }
        else
        $main_content .= '</table><br /><strong>Thread Closed!</strong>';
            
    }
    else
        $main_content .= 'Thread with this ID does not exits.';
}
 
Worked thanks VirrageS. :) Though could you fix so the group id names is smaller and got colors? :p

Thanks in advance!
 
Last edited:
Code:
$g = array(1 => '', 2 => '[COLOR="#FF0000"]<font [B]size="1"[/B] color="red">Helper</font>[/COLOR]', 3 => 'Tutor', 4 => 'Gamemaster', 5 => 'Community Manager', 6 => '[COLOR="#0000FF"]<font [B]size="1"[/B] color="blue">God</font>[/COLOR]');

or:

PHP:
<?php // <-- don't copy this

if($action  == 'show_thread')
{
    $thread_id = (int) $_REQUEST['id'];
    $page = (int) $_REQUEST['page'];
    $thread_name = $SQL->query("SELECT `players`.`name`, `z_forum`.`post_topic` FROM `players`, `z_forum` WHERE `z_forum`.`first_post` = ".(int) $thread_id." AND `z_forum`.`id` = `z_forum`.`first_post` AND `players`.`id` = `z_forum`.`author_guid` LIMIT 1")->fetch();
    if(!empty($thread_name['name']))
    {
        $posts_count = $SQL->query("SELECT COUNT(`z_forum`.`id`) AS posts_count FROM `players`, `z_forum` WHERE `players`.`id` = `z_forum`.`author_guid` AND `z_forum`.`first_post` = ".(int) $thread_id)->fetch();
        for($i = 0; $i < $posts_count['posts_count'] / $threads_per_page; $i++)
        {
            if($i != $page)
                $links_to_pages .= '<a href="?subtopic=forum&action=show_thread&id='.$thread_id.'&page='.$i.'">'.($i + 1).'</a> ';
            else
                $links_to_pages .= '<b>'.($i + 1).' </b>';
        }
        $threads = $SQL->query("SELECT `players`.`name`, `players`.`group_id`, `players`.`account_id`, `players`.`world_id`, `players`.`rank_id`, `players`.`vocation`, `players`.`promotion`, `players`.`level`, `z_forum`.`id`,`z_forum`.`first_post`, `z_forum`.`section`,`z_forum`.`post_text`, `z_forum`.`post_topic`, `z_forum`.`post_date`, `z_forum`.`post_smile`, `z_forum`.`author_aid`, `z_forum`.`author_guid`, `z_forum`.`last_edit_aid`, `z_forum`.`edit_date` FROM `players`, `z_forum` WHERE `players`.`id` = `z_forum`.`author_guid` AND `z_forum`.`first_post` = ".(int) $thread_id." ORDER BY `z_forum`.`post_date` LIMIT ".$posts_per_page." OFFSET ".($page * $posts_per_page))->fetchAll();
        if(isset($threads[0]['name']))
            $SQL->query("UPDATE `z_forum` SET `views`=`views`+1 WHERE `id` = ".(int) $thread_id);
        $main_content .= '<a href="?subtopic=forum">Boards</a> >> <a href="?subtopic=forum&action=show_board&id='.$threads[0]['section'].'">'.$sections[$threads[0]['section']].'</a> >> <b>'.$thread_name['post_topic'].'</b>';

        $g = array(1 => '', 2 => array('Helper', 'red'), 3 => array('Tutor', 'blue'), 4 => array('Gamemaster', 'yellow'), 5 => array('Community Manager', 'orange'), 6 => array('God', 'red'));
        
        //OPEN|CLOSE FUNCTION
        if(isThreadOpen($thread_id)) {
        $main_content .= '<br /><br /><a href="?subtopic=forum&action=new_post&thread_id='.$thread_id.'"><img src="images/post.gif" border="0" /></a><br /><br />Page: '.$links_to_pages.'<br /><table width="100%"><tr bgcolor="'.$config['site']['lightborder'].'" width="100%"><td colspan="2"><font size="4"><b>'.htmlspecialchars($thread_name['post_topic']).'</b></font><font size="1"><br />by <a href="?subtopic=characters&name='.urlencode($thread_name['name']).'">'.$thread_name['name'].'</a></font></td></tr><tr bgcolor="'.$config['site']['vdarkborder'].'"><td width="200"><font color="white" size="1"><b>Author</b></font></td><td>&nbsp;</td></tr>';}
        else
        $main_content .= '<br /><br /><strong>Thread Closed!</strong><br /><br />Page: '.$links_to_pages.'<br /><table width="100%"><tr bgcolor="'.$config['site']['lightborder'].'" width="100%"><td colspan="2"><font size="4"><b>'.htmlspecialchars($thread_name['post_topic']).'</b></font><font size="1"><br />by <a href="?subtopic=characters&name='.urlencode($thread_name['name']).'">'.$thread_name['name'].'</a></font></td></tr><tr bgcolor="'.$config['site']['vdarkborder'].'"><td width="200"><font color="white" size="1"><b>Author</b></font></td><td>&nbsp;</td></tr>';
        
        foreach($threads as $thread)
        {
            if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
            $main_content .= '<tr bgcolor="'.$bgcolor.'"><td valign="top"><a href="?subtopic=characters&name='.urlencode($thread['name']).'">'.$thread['name'].'</a><br />';
            
            if($thread['group_id'] != 1)
                $main_content .= '<font class="ff_smallinfo" size="1" color="'.$g[$thread['group_id']][1].'">'.$g[$thread['group_id']][0].'<br/>'.($thread['group_id'] > 3 ? '<img class="PostIcon" src="http://otland.net/images/forum/god_post_icon.png" border="0"/><br/>' : '').'</font>';
            
            $main_content .= '<br /><font size="1">Profession: '.$vocation_name[$thread['world_id']][$thread['promotion']][$thread['vocation']].'<br />Level: '.$thread['level'].'<br />';
            $rank = new OTS_GuildRank();
            $rank->load($thread['rank_id']);
            if($rank->isLoaded())
            {
                $guild = $rank->getGuild();
                if($guild->isLoaded())
                    $main_content .= $rank->getName().' of <a href="?subtopic=guilds&action=show&guild='.$guild->getId().'">'.$guild->getName().'</a><br />';
            }
            $posts = $SQL->query("SELECT COUNT(`id`) AS 'posts' FROM `z_forum` WHERE `author_aid`=".(int) $thread['account_id'])->fetch();
            $main_content .= '<br />Posts: '.(int) $posts['posts'].'<br /></font></td><td valign="top">'.showPost(htmlspecialchars($thread['?']), htmlspecialchars($thread['post_text']), $thread['post_smile']).'</td></tr>
            <tr bgcolor="'.$bgcolor.'"><td><font size="1">'.date('d.m.y H:i:s', $thread['post_date']);
            if($thread['edit_date'] > 0)
            {
                if($thread['last_edit_aid'] != $thread['author_aid'])
                    $main_content .= '<br />Edited by moderator';
                else
                    $main_content .= '<br />Edited by '.$thread['name'];
                $main_content .= '<br />on '.date('d.m.y H:i:s', $thread['edit_date']);
            }
            $main_content .= '</font></td><td>';
            if($logged && $group_id_of_acc_logged >= $group_not_blocked)
                if($thread['first_post'] != $thread['id'])
                    $main_content .= '<a href="?subtopic=forum&action=remove_post&id='.$thread['id'].'" onclick="return confirm(\'Are you sure you want remove post of '.$thread['name'].'?\')"><font color="red">REMOVE POST</font></a>';
                else
                    $main_content .= '<a href="?subtopic=forum&action=remove_post&id='.$thread['id'].'" onclick="return confirm(\'Are you sure you want remove thread > '.$thread['post_topic'].' <?\')"><font color="red">REMOVE THREAD</font></a>';
            if($logged && ($thread['account_id'] == $account_logged->getId() || $group_id_of_acc_logged >= $group_not_blocked))

            //OPEN|CLOSE FUNCTION
            if(isThreadOpen($thread_id)) {
                $main_content .= '<br/><a href="?subtopic=forum&action=edit_post&id='.$thread['id'].'">EDIT POST</a>';}
            else
                $main_content .= '';    
            if($logged)
                if(isThreadOpen($thread_id)) {
                    $main_content .= '<br/><a href="?subtopic=forum&action=new_post&thread_id='.$thread_id.'&quote='.$thread['id'].'">Quote</a>';}
            else
                $main_content .= '';
                    $main_content .= '</td></tr>';
        }
        
        //OPEN|CLOSE FUNCTION
        if(isThreadOpen($thread_id)) {
        $main_content .= '</table><br /><a href="?subtopic=forum&action=new_post&thread_id='.$thread_id.'"><img src="images/post.gif" border="0" /></a><br /><center>Pages:<br />'.$links_to_pages.'<br /></center>'; }
        else
        $main_content .= '</table><br /><strong>Thread Closed!</strong>';
            
    }
    else
        $main_content .= 'Thread with this ID does not exits.';
}

And in line:
Code:
$g = array(1 => '', 2 => array('Helper', '[B]red[/B]'), 3 => array('Tutor', '[B]blue[/B]').....;
You can set color (if you want without color set everywhere: '')
 
Last edited:
look :/ im using gesior 0.3.8
photo:
Sin t?tulo.jpg

Script:
PHP:
if($action  == 'show_thread') 
{ 
    $thread_id = (int) $_REQUEST['id']; 
    $page = (int) $_REQUEST['page']; 
    $thread_name = $SQL->query("SELECT `players`.`name`, `z_forum`.`post_topic` FROM `players`, `z_forum` WHERE `z_forum`.`first_post` = ".(int) $thread_id." AND `z_forum`.`id` = `z_forum`.`first_post` AND `players`.`id` = `z_forum`.`author_guid` LIMIT 1")->fetch(); 
    if(!empty($thread_name['name'])) 
    { 
        $posts_count = $SQL->query("SELECT COUNT(`z_forum`.`id`) AS posts_count FROM `players`, `z_forum` WHERE `players`.`id` = `z_forum`.`author_guid` AND `z_forum`.`first_post` = ".(int) $thread_id)->fetch(); 
        for($i = 0; $i < $posts_count['posts_count'] / $threads_per_page; $i++) 
        { 
            if($i != $page) 
                $links_to_pages .= '<a href="?subtopic=forum&action=show_thread&id='.$thread_id.'&page='.$i.'">'.($i + 1).'</a> '; 
            else 
                $links_to_pages .= '<b>'.($i + 1).' </b>'; 
        } 
        $threads = $SQL->query("SELECT `players`.`name`, `players`.`group_id`, `players`.`account_id`, `players`.`world_id`, `players`.`rank_id`, `players`.`vocation`, `players`.`promotion`, `players`.`level`, `z_forum`.`id`,`z_forum`.`first_post`, `z_forum`.`section`,`z_forum`.`post_text`, `z_forum`.`post_topic`, `z_forum`.`post_date`, `z_forum`.`post_smile`, `z_forum`.`author_aid`, `z_forum`.`author_guid`, `z_forum`.`last_edit_aid`, `z_forum`.`edit_date` FROM `players`, `z_forum` WHERE `players`.`id` = `z_forum`.`author_guid` AND `z_forum`.`first_post` = ".(int) $thread_id." ORDER BY `z_forum`.`post_date` LIMIT ".$posts_per_page." OFFSET ".($page * $posts_per_page))->fetchAll(); 
        if(isset($threads[0]['name'])) 
            $SQL->query("UPDATE `z_forum` SET `views`=`views`+1 WHERE `id` = ".(int) $thread_id); 
        $main_content .= '<a href="?subtopic=forum">Boards</a> >> <a href="?subtopic=forum&action=show_board&id='.$threads[0]['section'].'">'.$sections[$threads[0]['section']].'</a> >> <b>'.$thread_name['post_topic'].'</b>'; 

         $g = array(1 => '', 2 => 'Helper', 3 => 'Tutor', 4 => 'Gamemaster', 5 => 'Community Manager', 6 => 'God'); 

        //OPEN|CLOSE FUNCTION 
        if(isThreadOpen($thread_id)) { 
        $main_content .= '<br /><br /><a href="?subtopic=forum&action=new_post&thread_id='.$thread_id.'"><img src="images/post.gif" border="0" /></a><br /><br />Page: '.$links_to_pages.'<br /><table width="100%"><tr bgcolor="'.$config['site']['lightborder'].'" width="100%"><td colspan="2"><font size="4"><b>'.htmlspecialchars($thread_name['post_topic']).'</b></font><font size="1"><br />by <a href="?subtopic=characters&name='.urlencode($thread_name['name']).'">'.$thread_name['name'].'</a></font></td></tr><tr bgcolor="'.$config['site']['vdarkborder'].'"><td width="200"><font color="white" size="1"><b>Author</b></font></td><td>&nbsp;</td></tr>';} 
        else 
        $main_content .= '<br /><br /><strong>Thread Closed!</strong><br /><br />Page: '.$links_to_pages.'<br /><table width="100%"><tr bgcolor="'.$config['site']['lightborder'].'" width="100%"><td colspan="2"><font size="4"><b>'.htmlspecialchars($thread_name['post_topic']).'</b></font><font size="1"><br />by <a href="?subtopic=characters&name='.urlencode($thread_name['name']).'">'.$thread_name['name'].'</a></font></td></tr><tr bgcolor="'.$config['site']['vdarkborder'].'"><td width="200"><font color="white" size="1"><b>Author</b></font></td><td>&nbsp;</td></tr>'; 
         
        foreach($threads as $thread) 
        { 
            if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; 
            $main_content .= '<tr bgcolor="'.$bgcolor.'"><td valign="top"><a href="?subtopic=characters&name='.urlencode($thread['name']).'">'.$thread['name'].'</a><br />'; 
             
            if($thread['group_id'] != 1) 
                $main_content .= '<font class="ff_smallinfo">'.$g[$thread['group_id']].'<br/>'.($thread['group_id'] > 3 ? '<img class="PostIcon" src="http://static.tibia.com/images/forum/cip_post_icon.gif" border="0"/><br/>' : '').'</font>'; 
             
            $main_content .= '<br /><font size="1">Profession: '.$vocation_name[$thread['world_id']][$thread['promotion']][$thread['vocation']].'<br />Level: '.$thread['level'].'<br />'; 
            $rank = new OTS_GuildRank(); 
            $rank->load($thread['rank_id']); 
            if($rank->isLoaded()) 
            { 
                $guild = $rank->getGuild(); 
                if($guild->isLoaded()) 
                    $main_content .= $rank->getName().' of <a href="?subtopic=guilds&action=show&guild='.$guild->getId().'">'.$guild->getName().'</a><br />'; 
            } 
            $posts = $SQL->query("SELECT COUNT(`id`) AS 'posts' FROM `z_forum` WHERE `author_aid`=".(int) $thread['account_id'])->fetch(); 
            $main_content .= '<br />Posts: '.(int) $posts['posts'].'<br /></font></td><td valign="top">'.showPost(htmlspecialchars($thread['?']), htmlspecialchars($thread['post_text']), $thread['post_smile']).'</td></tr> 
            <tr bgcolor="'.$bgcolor.'"><td><font size="1">'.date('d.m.y H:i:s', $thread['post_date']); 
            if($thread['edit_date'] > 0) 
            { 
                if($thread['last_edit_aid'] != $thread['author_aid']) 
                    $main_content .= '<br />Edited by moderator'; 
                else 
                    $main_content .= '<br />Edited by '.$thread['name']; 
                $main_content .= '<br />on '.date('d.m.y H:i:s', $thread['edit_date']); 
            } 
            $main_content .= '</font></td><td>'; 
            if($logged && $group_id_of_acc_logged >= $group_not_blocked) 
                if($thread['first_post'] != $thread['id']) 
                    $main_content .= '<a href="?subtopic=forum&action=remove_post&id='.$thread['id'].'" onclick="return confirm(\'Are you sure you want remove post of '.$thread['name'].'?\')"><font color="red">REMOVE POST</font></a>'; 
                else 
                    $main_content .= '<a href="?subtopic=forum&action=remove_post&id='.$thread['id'].'" onclick="return confirm(\'Are you sure you want remove thread > '.$thread['post_topic'].' <?\')"><font color="red">REMOVE THREAD</font></a>'; 
            if($logged && ($thread['account_id'] == $account_logged->getId() || $group_id_of_acc_logged >= $group_not_blocked)) 

            //OPEN|CLOSE FUNCTION 
            if(isThreadOpen($thread_id)) { 
                $main_content .= '<br/><a href="?subtopic=forum&action=edit_post&id='.$thread['id'].'">EDIT POST</a>';} 
            else 
                $main_content .= '';     
            if($logged) 
                if(isThreadOpen($thread_id)) { 
                    $main_content .= '<br/><a href="?subtopic=forum&action=new_post&thread_id='.$thread_id.'&quote='.$thread['id'].'">Quote</a>';} 
            else 
                $main_content .= ''; 
                    $main_content .= '</td></tr>'; 
        } 
         
        //OPEN|CLOSE FUNCTION 
        if(isThreadOpen($thread_id)) { 
        $main_content .= '</table><br /><a href="?subtopic=forum&action=new_post&thread_id='.$thread_id.'"><img src="images/post.gif" border="0" /></a><br /><center>Pages:<br />'.$links_to_pages.'<br /></center>'; } 
        else 
        $main_content .= '</table><br /><strong>Thread Closed!</strong>'; 
             
    } 
    else 
        $main_content .= 'Thread with this ID does not exits.'; 
}
 
Last edited:
Status
Not open for further replies.
Back
Top Bottom