Changeset 227955
- Timestamp:
- 04/12/2010 03:27:30 PM (16 years ago)
- Location:
- protwitter/trunk
- Files:
-
- 4 edited
-
admin/protwitter_options.php (modified) (1 diff)
-
admin/protwitter_twitter_counter.php (modified) (1 diff)
-
protwitter.php (modified) (2 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
protwitter/trunk/admin/protwitter_options.php
r226150 r227955 1 1 <?php 2 if( $_POST['protwitter_hidden'] == 'Y') {2 if(isset($_POST['protwitter_hidden']) && ($_POST['protwitter_hidden'] == 'Y')) { 3 3 //Form data sent 4 4 $twitter_id = $_POST['protwitter_twitter_id']; -
protwitter/trunk/admin/protwitter_twitter_counter.php
r226150 r227955 1 1 <?php 2 if( $_POST['protwitter_hidden'] == 'Y') {2 if(isset($_POST['protwitter_hidden']) && ($_POST['protwitter_hidden'] == 'Y')) { 3 3 //Form data sent 4 5 //$twitter_id = $_POST['protwitter_twitter_id'];6 //update_option('protwitter_twitter_id', $twitter_id);7 8 9 10 4 $template_id = $_POST['protwitter_template_id']; 11 5 update_option('protwitter_template_id', $template_id); -
protwitter/trunk/protwitter.php
r226149 r227955 5 5 Description: Profesional plugin for your twitter 6 6 Author: Haotik 7 Version: 0. 1.0 beta7 Version: 0.2 8 8 Author URI: http://www.haotik.ro [romanian] 9 9 */ 10 10 11 11 12 … … 99 100 } 100 101 102 error_reporting(E_ALL); 103 add_action("widgets_init", array('ProTwitter_Counter', 'register')); 104 register_activation_hook( __FILE__, array('ProTwitter_Counter', 'activate')); 105 register_deactivation_hook( __FILE__, array('ProTwitter_Counter', 'deactivate')); 106 107 class ProTwitter_Counter { 108 function activate(){ 109 $data = array( 'title' => 'Twitter Counter'); 110 if ( ! get_option('ProTwitter_Counter')){ 111 add_option('ProTwitter_Counter' , $data); 112 } else { 113 update_option('ProTwitter_Counter' , $data); 114 } 115 } 116 function deactivate(){ 117 delete_option('ProTwitter_Counter'); 118 } 119 function control(){ 120 $data = get_option('ProTwitter_Counter'); 121 ?> 122 <p><label>Title: <input name="ProTwitter_Counter_title" type="text" value="<?php echo $data['title']; ?>" /></label></p> 123 <?php 124 if (isset($_POST['ProTwitter_Counter_title'])){ 125 $data['title'] = attribute_escape($_POST['ProTwitter_Counter_title']); 126 update_option('ProTwitter_Counter', $data); 127 } 128 protwitter_counter_display(); 129 } 130 function widget($args){ 131 $data = get_option('ProTwitter_Counter'); 132 $title = ($data['title']=='')?'Twitter Counter':$data['title']; 133 echo $args['before_widget']; 134 echo $args['before_title'] . $title . $args['after_title']; 135 protwitter_counter_display(); 136 echo $args['after_widget']; 137 } 138 function register(){ 139 register_sidebar_widget('Twitter Counter', array('ProTwitter_Counter', 'widget')); 140 register_widget_control('Twitter Counter', array('ProTwitter_Counter', 'control')); 141 } 142 } 143 101 144 ?> -
protwitter/trunk/readme.txt
r226149 r227955 6 6 Requires at least: 2.3 7 7 Tested up to: 2.9.2 8 Stable tag: 0. 18 Stable tag: 0.2 9 9 10 10 Allow you to have a lot of twitter options on your blog. … … 27 27 28 28 = I install and activate the plugin but Twitter Counter don't apear on my page = 29 You must put in your theme in sidebar.php the following code: 29 Go in Admin Panel -> Apperance -> Widgets -> Twitter Counter and drag and drop to your sidebar. 30 Or put in your theme in sidebar.php the following code: 30 31 <?php if (function_exists('protwitter_counter_display')) protwitter_counter_display(); ?> 31 Wigdget version comming soon.32 32 33 33 == Screenshots == … … 39 39 == Changelog == 40 40 41 = 0.2 = 42 * Adding widgeting to Twitter Counter. 43 41 44 = 0.1 = 42 45 * First version of ProTwitter. 43 46 44 47 == Upgrade Notice == 48 49 = 0.2 = 50 Adding widgeting to Twitter Counter. 45 51 46 52 = 0.1 =
Note: See TracChangeset
for help on using the changeset viewer.