jerryb1988
Member
- Joined
- Mar 10, 2008
- Messages
- 79
- Reaction score
- 5
This tells you how to make your characters page only show marriage info if the character is married. No more "Single"! You also must have marriage info enabled in config.php.
Open characters.php and find: (Roughly lines 43 -> 53)
Highlight all of these lines ^^^
Paste this over them:
Open characters.php and find: (Roughly lines 43 -> 53)
PHP:
if($config['site']['show_marriage_info'])
{
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>Marital status:</TD><TD>';
$marriage = new OTS_Player();
$marriage->load($player->getMarriage());
if($marriage->isLoaded())
$main_content .= 'married to <a href="?subtopic=characters&name='.urlencode($marriage->getName()).'"><b>'.$marriage->getName().'</b></a></TD></TR>';
else
$main_content .= 'single</TD></TR>';
}
Paste this over them:
PHP:
if($config['site']['show_marriage_info'])
{
$marriage = new OTS_Player();
$marriage->load($player->getMarriage());
if($marriage->isLoaded())
{
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>Marital status:</TD><TD>married to <a href="?subtopic=characters&name='.urlencode($marriage->getName()).'"><b>'.$marriage->getName().'</b></a></TD></TR>';
}
}