Index: mythplugins/mythweb/program_detail.php =================================================================== --- mythplugins/mythweb/program_detail.php (revision 6740) +++ mythplugins/mythweb/program_detail.php (working copy) @@ -44,6 +44,23 @@ exit; } +// The user tried to update the recommendation settings - update the database and the variable in memory + + if (isset($_POST['recommendation_save'])) { + if ($_POST['recommend']){ + //REPLACE + save_recommendout($_GET['chanid'], $_GET['starttime'], "", $_POST['recommendation_text']); + } + else { + //DELETE + delete_recommendout($_GET['chanid'], $_GET['starttime']); + + + + } + } + + // If there is a program for this, import its values into the schedule if ($program) { $schedule->chanid = $program->chanid; @@ -135,6 +152,12 @@ else $channel =& load_one_channel($schedule->chanid); +// Load the recommendation + if ($program) + $recommendout = fetch_recommendout($program->chanid, $program->starttime); + else + $recommendout = NULL; + // Load the class for this page require_once theme_dir.'program_detail.php'; @@ -142,7 +165,7 @@ $Page = new Theme_program_detail(); // Display the page - $Page->print_page($program, $schedule, $channel); + $Page->print_page($program, $schedule, $channel, $recommendout); // Exit exit; Index: mythplugins/mythweb/themes/Default/channel_detail.php =================================================================== --- mythplugins/mythweb/themes/Default/channel_detail.php (revision 6740) +++ mythplugins/mythweb/themes/Default/channel_detail.php (working copy) @@ -18,7 +18,7 @@ icon)) { ?> - + @@ -55,7 +55,7 @@ - + title.$additional.''; ?> - + icon)) { ?>channum.' '.$channel->callsign) ?>')" - onmouseout="return wstatus('')"> @@ -259,7 +259,37 @@ $parens = "Rerun"; if ($parens) echo "
($parens)"; + + if ($program->recommendations){ + echo "
"; + + foreach ($program->recommendations as $recommendation) { + if (show_popup_info) { + static $recommendation_id_counter = 0; + $recommendation_id_counter++; + } + echo 'details_list(), NULL, 'popup', $wstatus); + else + echo " onmouseover=\"wstatus('".str_replace('\'', '\\\'', $wstatus)."');return true\" onmouseout=\"wstatus('');return true\""; + echo ' href="program_detail.php?chanid='.$program->chanid.'&starttime='.$program->starttime.'">'; + + if ($recommendation->source->icon) { + echo ""; + } + else { + echo $recommendation->source->name; + } + echo ' '; + + } + + } + + + ?>
Channel channum?>: callsign ?> on
subtitle ?>description ?>description ; + if ($show->recommendations) + foreach ($show->recommendations as $recommendation) { + if ($recommendation->source->icon) { + echo "
source->icon . "\" height=\"40\">
"; + } + else { + echo "
*" . $recommendation->source->name . "*
"; + } + echo $recommendation->description ; + if ($recommendation->icon) echo "
icon . "\" >
"; + + } + ?>
length)?>