Hello. I have this table in characters.php (quest log):
Is it possible to show only 3-5 quests and add at the bottom of table text: "Show more" and after click on it drop-down full table with all quests?
PHP:
$id = $player->getCustomField("id");
$number_of_quests = 0;
$main_content .= '
<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%>
<TR><td colspan ="2" height="22" background="' . $layout_name . '/images/news/newsheadline_background.gif" CLASS=white><b><center>Quests</center></b></td></TR>';
$questCount = 0;
foreach ($config["site"]["quests"] as $questName => $questData)
{
$backgroundColor = is_int($questCount / 2) ? $config["site"]["darkborder"] : $config["site"]["lightborder"];
$questCount = $questCount + 1; $questStatus = $SQL->query("SELECT * FROM `player_storage` WHERE `player_id` = ".$id." AND `key` = ".$questData["storageid"].";")->fetch();
$questPercent = round((($questStatus["value"] - $questData["startvalue"])/$questData["endvalue"]) * 100,2);
$main_content .= "<tr bgcolor=\"".$backgroundColor."\"><td height=\"22\" width=\"55%\"> ".$questName."</td><td width=\"45%\" style=\"text-align:center;\"><font color=\"black\">".$questPercent."%<div style=\"background-color:white; margin-top:-15px; margin-left:3.8px; width: 97%; height: 16px;\"><div style=\"background: #009900; width: ".$questPercent."%; height: 16px;\"></div></div></td></tr></font>";
}
$main_content .= "</table>";
Is it possible to show only 3-5 quests and add at the bottom of table text: "Show more" and after click on it drop-down full table with all quests?