Support » Plugin: Digg Digg » Short URL in Twitter

  • Amazing plugin it is missing only 2 things: support and shorlinks in Twitter button.
    I need to use example.com/?p=123 instead of example.com/2013/../../… I did that on my autoposting tweets plugin it is working perfectly but I can not make it working on this plugin. So maybe someone to help me with it. I will be glad to help improve this function to plugin also

    This code is constucting URL

    public function constructURL($url, $title,$button, $postId, $globalcfg = ''){
    
        if($this->isEncodeRequired){
            $title = rawurlencode($title);
            $url = rawurlencode($url);
        }
    
        $twitter_source = '';
        if($globalcfg!=''){
            $twitter_source = $globalcfg[DD_GLOBAL_TWITTER_OPTION][DD_GLOBAL_TWITTER_OPTION_SOURCE];
        }
    
            //format twitter source
            $this->baseURL = str_replace(self::VOTE_SOURCE,$twitter_source,$this->baseURL);
    
            $this->constructNormalURL($url, $title,$button, $postId);

    I want that URL to look like this $url = 'example.com/?p=' . $postId; But when I enter this code it is not showing any link.

    http://wordpress.org/extend/plugins/digg-digg/

  • The topic ‘Short URL in Twitter’ is closed to new replies.