Ticket #1080: fix_for_podPress_downloadlinks_container_v2.patch

File fix_for_podPress_downloadlinks_container_v2.patch, 5.4 KB (added by ntm, 2 years ago)

contains minor adjustments of the ALT text of the podcast icon and the "Hide Player" and the "Play in Popup" link

  • podpress_theme.php

     
    3636                                $val['dimensionH'] = "''"; 
    3737                        } 
    3838                        $dividerNeeded = false; 
    39  
     39                         
     40                        $podPressEpisodeTitle = __($val['title'], 'podpress'); // if the title is not given by the author then it will be a defaultTitle (see podPress_defaultTitles) 
     41                         
    4042                        if($val['enablePlayer']) { 
    4143                                if($podPressContent != '') {                     
    4244                                        $podPressContent .= "<br />\n"; 
    4345                                } 
    44                                 $podPressContent .= "\n".'<div id="podPressPlayerSpace_'.$GLOBALS['podPressPlayer'].'">&nbsp;</div>'."\n".'<!-- Begin: podPress download link line -->'."\n".'<div class="podPress_downloadlinks">'; 
     46                                $podPressContent .= "\n".'<div id="podPressPlayerSpace_'.$GLOBALS['podPressPlayer'].'">&nbsp;</div>'."\n"; 
    4547                        } 
    46  
     48                         
     49                        $podPressContent .= '<!-- Begin: podPress download link line -->'."\n".'<div class="podPress_downloadlinks">'; 
     50                         
    4751                        if(isset($val['image'])) { 
    4852                                if($val['enableDownload'] && !empty($val['URI'])) { 
    4953                                        $podPressContent .= '<a href="'.$val['URI'].'" target="new">'; 
    5054                                } 
    51                                 $podPressContent .= '<img src="'.podPress_url().'images/'.$val['image'].'" border="0" align="top" class="podPress_imgicon" alt="icon for podpress" />'; 
     55                                $podPressContent .= '<img src="'.podPress_url().'images/'.$val['image'].'" class="podPress_imgicon" alt="'.$podPressEpisodeTitle.'" />'; 
    5256                                if($val['enableDownload'] && !empty($val['URI'])) { 
    5357                                        $podPressContent .= '</a>'; 
    5458                                } 
     
    5660                                        $val['enableDownload'] = false; 
    5761                                } 
    5862                        } 
     63                         
    5964                        if($val['enableTorrentDownload']) { 
    6065                                $podPressContent .= '<a href="'.$val['URI_torrent'].'" target="new">'; 
    6166                                if(strstr($val['image'], '_button')) { 
     
    6368                                } else { 
    6469                                        $torrentimg = 'misc_torrent_icon.png'; 
    6570                                } 
    66                                 $podPressContent .= '<img src="'.podPress_url().'images/'.$torrentimg.'" border="0" align="top" class="podPress_imgicon" alt="icon for podpress" />'; 
     71                                $podPressContent .= '<img src="'.podPress_url().'images/'.$torrentimg.'" class="podPress_imgicon" alt="'.$podPressEpisodeTitle.' - '.__('Torrent','podpress').'" />'; 
    6772                                $podPressContent .= '</a>'; 
    6873                        } 
    6974 
    7075                        $podPressContent .= ' &nbsp;'; 
    71                         $podPressContent .= __($val['title'], 'podpress'); 
     76                        $podPressContent .= $podPressEpisodeTitle; 
    7277 
    7378                        if($podPressTemplateData['showDuration'] == 'enabled' && !empty($val['duration']) && preg_match("/([0-9]):([0-9])/", $val['duration'])) { 
    7479                                $podPressContent .= ' ['.$val['duration'].'m]'; 
     
    9095                                        } else { 
    9196                                                $previewVal = 'false'; 
    9297                                        } 
    93                                         $podPressContent .= "<a href=\"#\" onclick=\"javascript: podPressShowHidePlayer('".$GLOBALS['podPressPlayer']."','".$val['URI_Player']."',".$val['dimensionW'].",".$val['dimensionH'].",'true'); return false;\"><span id=\"podPressPlayerSpace_".$GLOBALS['podPressPlayer']."_PlayLink\">".__('Play Now', 'podpress')."</span></a>"; 
     98                                        $podPressContent .= '<a href="#podPressPlayerSpace_'.$GLOBALS['podPressPlayer'].'" onclick="javascript:podPressShowHidePlayer(\''.$GLOBALS['podPressPlayer'].'\', \''.$val['URI_Player'].'\', '.$val['dimensionW'].', '.$val['dimensionH'].', \'true\'); return false;"><span id="podPressPlayerSpace_'.$GLOBALS['podPressPlayer'].'_PlayLink">'.__('Play Now', 'podpress').'</span></a>'; 
    9499                                        $dividerNeeded = true; 
    95100                                        if($podPress->settings['contentAutoDisplayPlayer']) { 
    96                                                 $podPressPlayBlockScripts .= "podPressShowHidePlayer('".$GLOBALS['podPressPlayer']."', '".$val['URI_Player']."',".$val['dimensionW'].",".$val['dimensionH'].", '".$previewVal."', '".$val['previewImage']."');\n"; 
     101                                                $podPressPlayBlockScripts .= 'podPressShowHidePlayer(\''.$GLOBALS['podPressPlayer'].'\', \''.$val['URI_Player'].'\', '.$val['dimensionW'].', '.$val['dimensionH'].', \''.$previewVal.'\', \''.$val['previewImage'].'\');'; 
    97102                                        } 
    98103                                } 
    99104 
     
    101106                                        if($dividerNeeded) { 
    102107                                                $podPressContent .= $divider; 
    103108                                        } 
    104                                         $podPressContent .= "<a href=\"#\" onclick=\"javascript: podPressPopupPlayer('".$GLOBALS['podPressPlayer']."', '".$val['URI_Player']."',".$val['dimensionW'].",".$val['dimensionH']."); return false;\">".__('Play in Popup', 'podpress')."</a>"; 
     109                                        $podPressContent .= '<a href="#podPressPlayerSpace_'.$GLOBALS['podPressPlayer'].'" onclick="javascript:podPressPopupPlayer(\''.$GLOBALS['podPressPlayer'].'\', \''.$val['URI_Player'].'\', '.$val['dimensionW'].', '.$val['dimensionH'].'); return false;">'.__('Play in Popup', 'podpress').'</a>'; 
    105110                                        $dividerNeeded = true; 
    106111                                } 
    107112 
     
    125130                                        $dividerNeeded = true; 
    126131                                } 
    127132 
    128                                 $podPressContent .= '</div>'."\n".'<!-- End: podPress download link line -->'."\n"; 
    129133                        } 
     134                         
     135                        $podPressContent .= '</div>'."\n".'<!-- End: podPress download link line -->'."\n"; 
    130136                } 
    131137 
    132138                if($podPress->settings['contentAutoDisplayPlayer']) { 
    133139                        $podPressPlayBlockScripts = '<script type="text/javascript"><!--'."\n".$podPressPlayBlockScripts; 
    134                         $podPressPlayBlockScripts .= "\n-->\n</script>"; 
     140                        $podPressPlayBlockScripts .= "\n".'-->'."\n".'</script>'; 
    135141                } 
    136                 return '<div class="podPress_content">'.$podPressContent.'</div>'."\n".$podPressPlayBlockScripts; 
     142                return "<!-- Begin: podPress -->\n".'<div class="podPress_content">'.$podPressContent.'</div>'."\n".$podPressPlayBlockScripts."\n<!-- End: podPress -->\n"; 
    137143        } 
    138144        } 
    139145