[mythtv] [PATCH} Mythweb: Added left/right arrows to program listing view

Chris Delis cedelis at uillinois.edu
Sat Mar 13 20:55:21 EST 2004


I sort of like the left and right arrows in MythTV's EPG that lets me
know if a program 'starts before' and/or 'ends after' the currently
listed time slot.

Disclaimer: This is my first patch and I haven't spent too much time
studying the Mythweb code.  But, so far it seems to work well for me. :)

Attached is the patch file along with 2 arrow images which belong in:
themes/Default/img/

--Chris


-------------- next part --------------
Index: mythweb/themes/Default/program_listing.php
===================================================================
RCS file: /var/lib/mythcvs/mythweb/themes/Default/program_listing.php,v
retrieving revision 1.20
diff -u -r1.20 program_listing.php
--- mythweb/themes/Default/program_listing.php	17 Feb 2004 03:31:27 -0000	1.20
+++ mythweb/themes/Default/program_listing.php	14 Mar 2004 01:45:07 -0000
@@ -268,6 +268,12 @@
 		$mouseover .= 'return true;"';
 	// Print a link to record this show
 		echo '<a id="program_'.$program_id_counter.'" href="program_detail.php?chanid='.$program->chanid.'&starttime='.$program->starttime.'"'.$mouseover.'>';
+
+	// Is this program 'Already in Progress'?
+		$display_starttime = $list_starttime - $timeslots_used * timeslot_size;
+		if ($program->starttime <= $display_starttime - timeslot_blocks * timeslot_size)
+			echo '<img src="themes/Default/img/leftwhite.png">';
+
 		if ($percent > 5) {
 			echo $program->title;
 			if (strlen($program->subtitle) > 0) {
@@ -301,6 +307,11 @@
 	// Finally, print some other information
 		if ($program->previouslyshown)
 			echo "<BR><i>(Rerun)</i>";
+
+	// Does this program 'Continue'?
+		if ($program->endtime >= $list_starttime + timeslot_blocks * timeslot_size)
+			echo '<img src="themes/Default/img/rightwhite.png">';
+
 	?></td>
 <?php
 	}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: leftwhite.png
Type: image/png
Size: 181 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20040313/5cec2203/leftwhite.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rightwhite.png
Type: image/png
Size: 180 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20040313/5cec2203/rightwhite.png


More information about the mythtv-dev mailing list