[mythtv-users] MythRecommend, new version.

Damien Tanner dctanner at gmail.com
Fri Nov 5 17:50:52 UTC 2004


Seems to work nicely. Have to find some nice stars now :)

dc.


On Fri, 5 Nov 2004 12:16:47 -0500, Ryan Steffes <rbsteffes at gmail.com> wrote:
> I needed stress relief over lunch so I whipped something up.  This put
> some rather ugly but eye catching tags onto shows in your recommended
> tables and puts which show flagged the recommendation in the pop up
> box.
> 
> Index: program_listing.php
> ===================================================================
> RCS file: /var/lib/mythcvs/mythweb/program_listing.php,v
> retrieving revision 1.5
> diff -r1.5 program_listing.php
> 43a44,46
> > // Populate the $Recommendations array
> >     load_all_recommendations();
> >
> 50c53
> <     $Page->print_page(&$Channels, &$Timeslots, $list_starttime,
> $list_endtime);
> ---
> >     $Page->print_page(&$Channels, &$Timeslots, $list_starttime, $list_endtime, &$Recommendations);
> Index: includes/channels.php
> ===================================================================
> RCS file: /var/lib/mythcvs/mythweb/includes/channels.php,v
> retrieving revision 1.10
> diff -r1.10 channels.php
> 45a46,64
> >    load_all_recommendations:
> >    Loads all the recommendations from the recommendation table if it exists
> > */
> >    function &load_all_recommendations()
> >    {
> >          global $Recommendations;
> >          if( !is_array( $Recommendations ) )
> >               $Recommendations = array();
> >          $reco_query = 'SELECT rc.title as recommendation, r.title as source,rc.popularity,rc.rating FROM recommend as r, recommendchild as rc'
> >                       .' where r.id = rc.id';
> >          $result = mysql_query($reco_query)
> >               or trigger_error('SQL Error: ' . mysql_error(), FATAL);
> >          while($row = mysql_fetch_assoc( $result ) )
> >          {
> >                  $Recommendations[$row['recommendation']] = $row;
> >          }
> >    }
> >
> > /*
> 83a103
> >       global $Recommendations;
> 115a136,143
> >       // Check for if this program is recommended
> >          if( $Recommendations[$program->title] )
> >          {
> >                  $program->recommended = true;
> >                  $program->recommended_by = $Recommendations[$program->title]['source'];
> >                  $program->rating = $Recommendations[$program->title]['rating'];
> >                  $program->popularity = $Recommendations[$program->title]['popularity'];
> >          }
> Index: includes/programs.php
> ===================================================================
> RCS file: /var/lib/mythcvs/mythweb/includes/programs.php,v
> retrieving revision 1.54
> diff -r1.54 programs.php
> 253a254,258
> >     var $recommended;
> >     var $recommended_by;
> >     var $rating;
> >     var $popularity;
> >
> Index: languages/English.php
> ===================================================================
> RCS file: /var/lib/mythcvs/mythweb/languages/English.php,v
> retrieving revision 1.21
> diff -r1.21 English.php
> 119a120
> > define ('_LANG_RECO',             'Recommendation Source');
> 208a210
> > define ('_LANG_SHOW_TRANSCODE', 'Transcode');
> Index: themes/Default/program_listing.php
> ===================================================================
> RCS file: /var/lib/mythcvs/mythweb/themes/Default/program_listing.php,v
> retrieving revision 1.25
> diff -r1.25 program_listing.php
> 247a248,251
> >       .($program->recommended ?"<tr>
> >           <td align=\"right\">"._LANG_RECO.":</td>
> >           <td>".$program->recommended_by."( ".$program->popularity ." / ". $program->rating .")</td>
> >        </tr>" : '')
> 324a329,332
> >       if ($program->recommended)
> >       {
> >               echo "<BR/><div class=\"recommendation\">Recommendation</div>";
> >               }
> Index: themes/Default/style.css
> ===================================================================
> RCS file: /var/lib/mythcvs/mythweb/themes/Default/style.css,v
> retrieving revision 1.13
> diff -r1.13 style.css
> 101d100
> <     height: 18px;
> 206c205,319
> < .tv_Tiempo         { background-color: #33ff99 }
> \ No newline at end of file
> ---
> > .tv_Tiempo         { background-color: #33ff99 }
> >
> > .leftNav {
> >       display:inline;
> >       float:left;
> >       left: 0px;
> >       top:0px;
> >       }
> > .rightNav {
> >       display:inline;
> >       float:right;
> >       right:0px;
> >       top:0px;
> > }
> > .leftNav li { list-style: none; display:inline; }
> > .rightNav li { list-style: none; display:inline; }
> > .selectors {
> >       display: inline;
> >       text-align: center;
> >       vertical-align: center;
> > }
> > .musicRow {
> >       position:relative;
> >       margin-left: 0px;
> >       padding-top:.5ex;
> >       height:1.7ex;
> >       padding-bottom:.8ex;
> > }
> >
> > .musicRowHead {
> >       position:relative;
> >       height:1.2ex;
> >       border-top:2px solid #9090B0;
> >       border-bottom:2px solid #9090B0;
> >       vertical-align:center;
> >       background-color:#265990;
> >       margin-left: 0px;
> >       padding-top:1ex;
> >       padding-bottom:3ex;
> > }
> > .musicRow li {
> >       list-style: none;
> >       display:inline;
> >       text-align:top;
> > }
> > .musicRowHead li {
> >               list-style: none;
> >               font-size: larger;
> >               display:inline;
> >       }
> >
> > .trackTable{
> >       list-style:none;
> >       margin:0px 0px 0px 0px;
> >       padding: 0px 0px 10px 0px;
> > }
> >
> > .trackTable li:hover { background-color:#265990; }
> >
> > .musicIDBOX {
> >       position:absolute;
> >       left:0px;
> >       top:0px;
> >       width:5%;
> >       height:1.7ex;
> > }
> > .musicTrack {
> >       position:absolute;
> >       margin-left: 0px;
> >       overflow:hidden;
> >       white-space:nowrap;
> >       width:30%;
> >       left:5%;
> > }
> > .musicTime {
> >       position:absolute;
> >       margin-left: 10px;
> >       overflow:hidden;
> >       white-space:nowrap;
> >       width:5%;
> >       left:35%;
> > }
> > .musicArtist {
> >       position:absolute;
> >       margin-left: 10px;
> >       width:20%;
> >       overflow:hidden;
> >       white-space:nowrap;
> >       left:40%;
> > }
> > .musicAlbum {
> >       position:absolute;
> >       margin-left: 10px;
> >       overflow:hidden;
> >       white-space:nowrap;
> >       width:27%;
> >       left:60%;
> > }
> > .musicGenre {
> >       position:absolute;
> >       margin-left: 10px;
> >       overflow:hidden;
> >       white-space:nowrap;
> >       width:13%;
> >       left:87%;
> > }
> > .moveButtons {
> >       position:absolute;
> >       right:0px;
> >       top:0px;
> > }
> > .recommendation{
> >       color:white;
> >       background-color:blue;
> > }
> 
> In file form here:
> 
> http://www.afferentsys.com/~rbsteffes/patch2
> 
> 
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
> 
> 
>


More information about the mythtv-users mailing list