Plugin Directory

Changeset 787197


Ignore:
Timestamp:
10/13/2013 01:24:31 PM (12 years ago)
Author:
stariy
Message:

add DIY short text function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-sns-share/trunk/sync_functions.php

    r742327 r787197  
    7272       
    7373        // create the weibo, replace the user setting
     74        $text_diy = trim($_POST['WPSNSShare_widget_text']);
    7475        $content = $this_post->post_content;
    75         $weibo = WPSNSShare_create_weibo($options, $postID, $this_post->post_title, $content);
     76        if(empty($text_diy)){
     77            $weibo = WPSNSShare_create_weibo($options, $postID, $this_post->post_title, $content);
     78        }
     79        else{
     80            $weibo = WPSNSShare_create_weibo($options, $postID, $this_post->post_title, $text_diy);
     81        }
    7682        $img = WPSNSShare_getIMG($content);
    7783        // end
     
    326332        echo '选择要同步第几张图片:<input name="WPSNSShare_widget_imgno" size="3" value="1" />';
    327333        echo '</p>';
     334        echo '我要自定义摘要  <input type="checkbox" value="1" onclick="if(this.checked){document.getElementById(\'WPSNSSHARE_TEXT\').style.display=\'block\'}else{document.getElementById(\'WPSNSSHARE_TEXT\').style.display=\'none\'}" />';
     335        echo '<p>';
     336        echo '<textarea id="WPSNSSHARE_TEXT" name="WPSNSShare_widget_text" style="display:none;width:250px;height:50px"></textarea>';
     337        echo '</p>';
    328338        echo '</div>';
    329339    }
Note: See TracChangeset for help on using the changeset viewer.