I like DigDig plugin but only thing what I would like to change is to have shorter URL in tweets(not some .ly shortner) but 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.
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.
This code is function of button in frontend
function dd_twitter_generate($buttonDesign=’Normal’, $source=”){
$post_data = dd_getPostData();
global $globalcfg;
$globalcfg[DD_GLOBAL_TWITTER_OPTION][DD_GLOBAL_TWITTER_OPTION_SOURCE] = $source;
$dd_twitter = new DD_Twitter();
$dd_twitter->constructURL($post_data['link'],$post_data['title'],$buttonDesign,$post_data['id'],false,$globalcfg);
echo $dd_twitter->finalURL;
}