我喜欢DigDig插件但只有我想改变的是在推文中使用较短的网址(不是缩短版),而是使用example.com/?p=123而不是example.com/2013/。 ./ .. / ...我在我的自动推文推文插件上做到了这一点,但它无法正常运行,但我不能让它在这个插件上工作。
此代码正在构建网址
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);
我希望该网址看起来像$url = 'example.com/?p=' . $postId;
但是当我输入此代码时,它没有显示任何链接。
此代码是前端按钮的功能
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;
}