0
我使用的是PHP變量設置在disqus_config
功能this.page.url
,就像這樣:Disqus顯示錯誤的URL這是建立與PHP
$permalink = 'http://example.com/post/2016/my-favorite-post-today';
,然後我也表達了相同的變量設置this.page.url
:
this.page.url = '<?php echo($permalink); ?>';
我預計在管理頁面的鏈接到我的溫和評論菜單上的意見是像上面的變量,而是我發現:
'http://example.com/post/2016#comment-1234567'
這是無用的,因爲我無法使用該鏈接在我的帖子中查找我的評論(因爲/my-favorite-post-today
部分從鏈接中丟失)。
編輯:
下面是我從disqus安裝指令得到的代碼(連同當然其他代碼):
var disqus_config = function() {
this.page.url = String({$permalink});
// Desperately using js String() function after countless failed attempt
this.page.identifier = '<?php echo($row["id"]); ?>';
this.page.title = '<?php echo($row["title"]); ?>';
};
這裏是我創建的永久鏈接VAR:
$permalink = "http://example.com/post/{$request_ary[2]}/{$request_ary[3]}";
request_ary
數組元素取自url參數,例如:/2016/my-post-created-tonight
Disqus?你使用WordPress的? –
@PraveenKumar不,我創建了一個簡單的博客使用PHP,並決定使用Disqus作爲評論系統 – GPraz
因此disqus使用哪個SDK? PHP還是JS? –