Changeset 1340465
- Timestamp:
- 02/01/2016 09:09:35 AM (10 years ago)
- Location:
- channeller-telegram-channel-administrator/trunk
- Files:
-
- 6 edited
-
channeller.php (modified) (3 diffs)
-
includes/ch-notification-metabox.php (modified) (3 diffs)
-
includes/ch-publishsend.php (modified) (2 diffs)
-
includes/ch-send-functions.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
screenshot-2.png (modified) (previous)
Legend:
- Unmodified
- Added
- Removed
-
channeller-telegram-channel-administrator/trunk/channeller.php
r1339911 r1340465 2 2 /** 3 3 * @package Websima Telegram Channel 4 * @version 1.3. 24 * @version 1.3.3 5 5 */ 6 6 /* … … 9 9 Description: Send Text, URL and photo from Wordpress to Telegram Channel using Telegram bot API. 10 10 Author: Websima Creative Agency 11 Version: 1.3. 211 Version: 1.3.3 12 12 Author URI: http://websima.com 13 13 */ … … 75 75 } 76 76 77 function truncate_channeller($text,$limit){ 78 $excerpt = $text; 79 if (strlen ($excerpt) > $limit) { 80 $the_str = mb_substr($excerpt, 0, $limit); 81 } else { 82 $the_str = $excerpt; 83 } 84 return $the_str; 85 } 77 86 function channeller_admin_styles() { 78 87 -
channeller-telegram-channel-administrator/trunk/includes/ch-notification-metabox.php
r1335646 r1340465 43 43 } 44 44 } 45 if (!$options['tchannel_groups'] == '') { 45 46 echo '<br/>'; 46 47 printf(__( 'Send to Groups', 'tchannel' )); … … 58 59 <?php 59 60 } 60 } 61 } 62 } 63 61 64 ?> 62 65 </p> … … 78 81 79 82 80 <p class="textboxchannel"<?php if( $selected == 'contenttext' ) {echo ' style="display:none;"';} ?>>83 <p class="textboxchannel"<?php if(!$selected == 'customtext' ) {echo ' style="display:none;"';} ?>> 81 84 <label for="tchannel_text" style="display: block;"><?php printf(__( 'Custom Message', 'tchannel' )); ?></label> 82 85 <textarea style="width: 99%;"rows="3" onkeyup="countChar(this)" name="tchannel_text" id="tchannel_text"><?php echo $text; ?></textarea> -
channeller-telegram-channel-administrator/trunk/includes/ch-publishsend.php
r1335646 r1340465 18 18 $message = $url.chr(10).get_post_meta ($post_ID,'tchannel_text',true); 19 19 } 20 20 $image = 'no'; 21 21 $media = get_post_meta ($post_ID,'tchannel_media',true); 22 22 if ($media == 'featured') { … … 25 25 $image = get_post_meta ($post_ID,'tchannel_image',true); 26 26 } elseif ($media == 'noimage') { 27 $image = = '';27 $image = 'no'; 28 28 } 29 29 30 30 $options = get_option( 'tchannel_settings' ); 31 31 $token = $options['tchannel_text_token']; 32 if (!$image=='') { 33 $logger = $message.' <br />image:'.$image; 34 32 if ($image == 'no') { 33 $chat_id = $channel; 34 channeller_sendmessagebot ($chat_id,$message,$message); 35 } else { 36 $logger = $message.' <br />image:'.$image; 35 37 $chat_id = $channel; 36 38 channeller_sendphoto($chat_id, $message, $image,$logger); 37 38 } else {39 $chat_id = $channel;40 channeller_sendmessagebot ($chat_id,$message,$message);41 39 } 42 40 } -
channeller-telegram-channel-administrator/trunk/includes/ch-send-functions.php
r1337812 r1340465 19 19 $mime_type = finfo_file($finfo, $photo); 20 20 $chatter = get_site_option( $chat_id ); 21 $caption = truncate_channeller ($caption , 200); 21 22 $fields = array( 22 23 'chat_id' => $chatter, … … 55 56 $options = get_option( 'tchannel_settings' ); 56 57 $token = $options['tchannel_text_token']; 58 $message = truncate_channeller ($message , 3000); 57 59 if ($token) { 58 60 $url = 'https://api.telegram.org/bot'.$token.'/sendMessage'; -
channeller-telegram-channel-administrator/trunk/readme.txt
r1337814 r1340465 5 5 Requires at least: 3.0.1 6 6 Tested up to: 4.4.1 7 Stable tag: 1.3. 27 Stable tag: 1.3.3 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 75 75 76 76 == Changelog == 77 = 1.3.3 = 78 Limit image captions to 200 characters and messages to 3000 characters 79 77 80 = 1.3.2 = 78 81 Supports Html Tags in Messages including a, b, strong, code, em and pre
Note: See TracChangeset
for help on using the changeset viewer.