Changeset 430679
- Timestamp:
- 08/30/2011 12:49:59 PM (14 years ago)
- Location:
- wp-newsticker/trunk
- Files:
-
- 5 added
- 3 edited
-
news.php (added)
-
newsticker.php (modified) (1 diff)
-
options.php (added)
-
readme.txt (modified) (3 diffs)
-
screenshot-1.png (modified) (previous)
-
screenshot-2.png (added)
-
scripts (added)
-
scripts/jquery.newsticker.js (added)
Legend:
- Unmodified
- Added
- Removed
-
wp-newsticker/trunk/newsticker.php
r150846 r430679 3 3 Plugin Name: WP-Newsticker 4 4 Plugin URI: http://www.iwebix.de/wp-newsticker-newsticker-plugin-fuer-wordpress/ 5 Description: W p-Newsticker is a plugin to show your recent Posts sliding through your website!6 Version: 1.05 Description: WP-Newsticker is a plugin to show your recent Posts sliding through your website! 6 Version: 2.0 7 7 Author: Dennis Nissle 8 8 Author URI: http://www.iwebix.de 9 9 */ 10 10 11 function newsticker_js() { 12 $gallery_path = get_bloginfo('wpurl')."/wp-content/plugins/wp-newsticker/"; 13 $galleryscript = "<script type=\"text/javascript\" src=\"".$gallery_path."scripts/newsticker.js\"></script>"; 14 echo($galleryscript); 11 $wp_news_options_page = get_option('siteurl') . '/wp-admin/admin.php?page=wp-newsticker/options.php'; 12 13 function wp_news_options_page() { 14 15 add_options_page('WP-Newsticker Options', 'WP-Newsticker', 10, 'wp-newsticker/options.php'); 16 15 17 } 16 add_action('wp_head', 'newsticker_js'); 17 // Content Word Limit 18 function limitcontent($num) { 19 $link = get_permalink(); 20 $ending = '...'; 21 $theContent = get_the_content(); 22 $output = preg_replace('/<img[^>]+./','', $theContent); 23 $limit = $num+1; 24 $content = explode(' ', $output, $limit); 25 array_pop($content); 26 $content = implode(" ",$content).$ending; 27 $imgBeg = strpos($theContent, '<img'); 28 $post = substr($theContent, $imgBeg); 29 $imgEnd = strpos($post, '>'); 30 $postOutput = substr($post, 0, $imgEnd+1); 31 $result = preg_match('/width="([0-9]*)" height="([0-9]*)"/', $postOutput, $matches); 32 if ($result) { 33 $pagestring = $matches[0]; 34 $postOutput = str_replace($pagestring, "", $postOutput); 35 } 36 if(stristr($postOutput,'<img src=')) { echo '<a href="'.$link.'">'.$postOutput."</a>".$content; } else { 37 echo $content; 18 19 add_action('admin_menu', 'wp_news_options_page'); 20 21 function wp_news_add_content_scripts() { 22 23 if ( !is_admin() ) { 24 wp_register_script('jquery.newsticker', WP_PLUGIN_URL . '/wp-newsticker/scripts/jquery.newsticker.js', '', '' ); 25 wp_enqueue_script('jquery.newsticker'); 38 26 } 39 27 } 40 28 41 $theContent = get_the_content(); 29 add_action('wp_enqueue_scripts', 'wp_news_add_content_scripts'); 30 31 function wp_news_cut_content_feat($wp_news_text, $wp_news_chars, $wp_news_points = "...") { 32 33 $wp_news_length = strlen($wp_news_text); 34 35 if($wp_news_length <= $wp_news_chars) { 36 37 return $wp_news_text; 38 39 } else { 40 41 return substr($wp_news_text, 0, $wp_news_chars)." ".$wp_news_points; 42 43 } 44 45 } 46 47 function wp_news_insert_content($wp_news_atts, $wp_news_content = null) { 48 49 include (ABSPATH . '/wp-content/plugins/wp-newsticker/news.php'); 50 51 } 52 53 add_shortcode("newsticker", "wp_news_insert_content"); 54 55 function wp_news_add_script() { 56 57 $wp_news_slide_speed = get_option('wp_news_slide_speed'); 58 59 if(empty($wp_news_slide_speed)) { 60 61 $wp_news_slide_speed = 40; 62 63 } 64 65 $script = '<script type="text/javascript"> 66 67 divScroller("scroll-h", "h", '.$wp_news_slide_speed.', 6000); 68 69 </script>'; 70 71 echo $script; 72 73 } 74 75 add_action('wp_footer', 'wp_news_add_script'); 76 42 77 ?> -
wp-newsticker/trunk/readme.txt
r180908 r430679 2 2 Contributors: IWEBIX, Dennis Nissle 3 3 Donate link: http://www.iwebix.de 4 Tags: newsticker, wp-newsticker, newsticker wordpress 4 Tags: newsticker, wp-newsticker, newsticker wordpress, ticker, slider, sliding text, text, post 5 5 Requires at least: 2.6 6 Tested up to: 2.86 Tested up to: 3.2 7 7 Stable tag: trunk 8 8 9 WP-Newsticker is a nice javascript Newsticker it shows 5 most recent Blog Posts with Date, Title (Permalink) and description.9 WP-Newsticker is a nice javascript Newsticker that show your featured (or latest) posts/pages in a nice flewing ticker. 10 10 11 11 == Description == 12 12 13 W p-Newsticker provides a **powerfull** and nice javascript Newsticker for Wordpress. It can be integrated anywhere on your Blog/Website. This Newsticker shows up the last 5 Posts from your Blog. This is a very nice solution to everybody who wants to have some kind of a magazin style. The following functions are integrated:13 WP-Newsticker provides a **powerfull** and nice javascript Newsticker for Wordpress. It can be implemented anywhere on your Blog/Website. This Newsticker shows your featured content (Set it via Admin Panel). This is a very nice solution to everybody who wants to have some kind of a magazin style. The following functions are integrated: 14 14 15 15 * nice sliding text from right to left 16 * date of the post 17 * title with permalink to article 18 * excerpt of the post containing 8 words 16 * Post date/link/title/small description 17 * Admin Panel to adjust style, speed, order of posts, maximum posts/pages etc. 19 18 20 Check out the DEMOat <a href="http://www.iwebix.de/" target="_blank" title="webdesign">webdesign</a>19 Check out the <a href="http://preview.wp-themix.org/plugins/wp-newsticker/" target="_blank">DEMO</a> at <a href="http://www.iwebix.de/" target="_blank" title="webdesign">webdesign</a> 21 20 22 21 == Installation == 23 22 24 23 1. Upload /wp-newsticker/ to your Plugin directory (wp-content/plugins/) 25 2. Go to the 'Plugins' Page of your Administration Area and activate the Plugin26 3. Place `<?php include (ABSPATH . '/wp-content/plugins/wp-newsticker/wp-newsticker.php'); ?>` in your templates.24 2. Activate the Plugin 25 3. Use shortcode [newsticker] anywhere in content or place `<?php include (ABSPATH . '/wp-content/plugins/wp-newsticker/news.php'); ?>` in your templates. 27 26 28 27 == Frequently Asked Questions == … … 34 33 = Where can I edit the width and height? = 35 34 36 You can edit the width and height in /wp-content/plugins/wp-newsticker/wp-newsticker.php 35 Width is set to 100% of your container's width. You can adjust it in news.php. 37 36 38 37 == Screenshots == … … 40 39 1. This is how the Newsticker looks right under the menu. 41 40 41 2. Admin Panel 42 42 43 == Changelog == 44 45 = 2.0 = 46 * Added Admin Panel 47 * New Options 48 * Optimizing Styling 49 * Fixed Bugs 50 * Security Update 43 51 44 52 = 1.0 =
Note: See TracChangeset
for help on using the changeset viewer.