[Evocms-plugins-commits] SF.net SVN: evocms-plugins: [320] am_search_cloud_plugin/trunk/ _am_search
Brought to you by:
blueyed
From: <sk...@us...> - 2007-04-26 16:45:46
|
Revision: 320 http://svn.sourceforge.net/evocms-plugins/?rev=320&view=rev Author: skimler Date: 2007-04-26 09:45:44 -0700 (Thu, 26 Apr 2007) Log Message: ----------- Added param for hover title (w/search term count option) Modified Paths: -------------- am_search_cloud_plugin/trunk/_am_search_cloud.plugin.php Modified: am_search_cloud_plugin/trunk/_am_search_cloud.plugin.php =================================================================== --- am_search_cloud_plugin/trunk/_am_search_cloud.plugin.php 2007-04-26 15:18:31 UTC (rev 319) +++ am_search_cloud_plugin/trunk/_am_search_cloud.plugin.php 2007-04-26 16:45:44 UTC (rev 320) @@ -145,6 +145,7 @@ $params[ 'block_end' ] = ( empty( $params['block_end' ] ) ? '</ul>' : $params[ 'block_end' ] ); $params[ 'before_each' ] = ( empty( $params['before_each' ] ) ? '<li>' : $params[ 'before_each' ] ); $params[ 'after_each' ] = ( empty( $params['after_each' ] ) ? '</li>' : $params[ 'after_each' ] ); + $params[ 'hover_title' ] = ( empty( $params['hover_title' ] ) ? 'Searched #count# times - Read it!' : $params[ 'hover_title' ] ); $sql = 'select hit_uri, hit_referer, hit_blog_ID from T_hitlog where hit_referer_type = \'search\''.( $search_blog == 1 ? '' : ' and hit_blog_ID = '.$search_blog ).' order by rand()'; $all_hits = $DB->get_results( $sql ); @@ -203,7 +204,7 @@ $tmp_Blog = & $BlogCache->get_by_ID( $search_stat->blog_ID ); $full_url = str_replace( array( '&', '&' ), array( '&', '&' ), preg_replace( array( '#tempskin=[^&]+?(&|$)#', '#\?$#', '#index\.php$#' ), '', $tmp_Blog->get('baseurlroot').$search_stat->url) ); $class = ( $mult ? intval( ( $search_stat->count - $min ) / $mult * 10 ) : 5 ); - $output .= $params[ 'before_each'].'<a href="'.$full_url.'" title=" '.$this->T_( 'read what they found' ).' " class="search_cloud_'.$class.'">'.str_replace( ' ', ' ', $search_stat->term ).'</a>'.$params[ 'after_each' ]."\n"; + $output .= $params[ 'before_each'].'<a href="'.$full_url.'" title=" '.$this->T_( str_replace ('#count#', "$search_stat->count", $params[ 'hover_title' ] ) ).' " class="search_cloud_'.$class.'">'.str_replace( ' ', ' ', $search_stat->term ).'</a>'.$params[ 'after_each' ]."\n"; } $output = ( empty( $output ) ? '' : $params[ 'before_all' ].$params[ 'title' ].$params[ 'block_start' ].$output.$params[ 'block_end' ].$params[ 'after_all' ] ); echo $output; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |