2 cslepage Nov 01, 2008 03:07
![](https://forums.b2evolution.net/media/users/cslepage/profile_pictures/.evocache/test2.jpg/crop-top-80x80.jpg?mtime=1372015408)
cslepage,
The unique website name is the name you give your site on disqus. If you go to disqus and click on "Add Website" from your profile it asks you for a url, name, and shortname (slug). The unique website name is this "short name".
On mine the url is http://www.ianlewis.org/, the name is "Ian Lewis' blog" and the shortname is ianlewisblog.
Once you set that up it should work and start displaying the comments on your blog entries.
Take care,
Okay, it appears to be working now for me, now that I've put in the correct "unique name."
One thing I've noticed, however: the comment field appears after the "more" tag in the post, and not at the actual end of the post.
Thanks for the report. Lemme check that out.
Hi, plugin installed, but nothing appear.
I've write well my unique name, but nothing on pages seems to be appear.
Thanks for your help. :)
Honorgate,
Did you register your blog with Disqus? The unique name is the name you register with disqus.com
Yes i think so :)
As you can see with this screen :
http://img267.imageshack.us/img267/415/11012009capt000is6.png
The Disqus plugin is a renderer plugin so it needs to have the "Disqus Plugin" check box checked when you make a post. This is analogous to enabling comments for a particular post. It should default to on however so it would be odd if that was the reason it wasn't showing up.
I understand, but (i'm sorry) where shall i find Disqus check box on my 2bevo ?
Anyway, thank you very much for your help ! :)
I did find a bug today where the check box didn't show up. So it may not be showing for you.
If it is showing then you will see it in the right hand side under "Text Renderers" when you are writing a blog post. Let me know if it is there.
Well i'm afraid not : :-/
http://img205.imageshack.us/img205/1079/12012009capt000uk3.png
Hi!
I had install the plugin disqus in my blog (2.4.2) and i receive ths message:
Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /home/.nickie/oigreslima/sergioflima.pro.br/blogs/plugins/disqus_plugin/_disqus.plugin.php on line 133
If I take on the plugin my blog crash
http://sergioflima.pro.br/blogs/index.php/sergio-blog
Can you help-me?
IanLewis wrote:
http://manual.b2evolution.net/images/f/fd/Disqus-logo2.png
The first version of the [url=http://manual.b2evolution.net/Plugins/disqus_plugin]Disqus plugin[/url] has been released!
The Disqus plugin allows you to use comments from the social commenting website Disqus. It embeds javascript to show comments when viewing a particular blog post and shows how many comments a post has when viewing a blog post list. Find out more about what Disqus does [url=http://www.disqus.com/docs/about/]here[/url]. You can see how the plugin works [url=http://www.ianlewis.org/en/]here[/url].
Download: [url=http://downloads.sourceforge.net/evocms-plugins/disqus_plugin-0.1.zip]disqus_plugin-0.1.zip[/url]
Honorgate wrote:
Well i'm afraid not : :-/
http://img205.imageshack.us/img205/1079/12012009capt000uk3.png
I have the same problem. I enabled the plugin in global settings, thinking it may be that.
It also looks like it can only be enabled for one blog. If I add details on disqus about another I won't have anywhere to put the details.
Same here. No checkbox for me.
Going to install this one and remove my custom edit (since there was no plugin yet when I started using disqus :p )
So ? What can i do ? :-/
bump
The plugin is working great for me, but I would like the option to disable it for intro posts.
I ahd an issue getting it set up at first, but I was putting the unique web address instead of just the unique name. Working fine now!
I too am missing the check box to enable Disqus.
Yeah, it sounds like there is no checkbox, it just gets enabled
using Opt Out
I have no check box and its NOT enabled.
using Always
I have no check box and its NOT enabled.
using Stealth
I have no check box and its NOT enabled.
So I'm uninstalling until it's fixed, thanks!
If I change the way my blog handles links to posts, will that affect the current disqus comments? THanks!
something odd and I wonder if you have an answer. In installed this on a blog but it still shows the default commenting box right under the disqus one.
you have to disable comments and then it will look fine.
I would be something that simple huh?
I have a multi-user, multi-blog site and want the author of the post to get notified when new comments are posted. Is it possible to set up disqus to notify individual authors of new comments?
Thanks!
not only author of post can get notified anyone who wants to can subscribe to any post.. but if you want an auto notification for authors i dont know about that
Has anyone figured out how to keep Disqus from rendering immediately after the "Read More" break? I'm considering using this system, but I force the blog in question to use page breaks. At this point, I'm just not using Disqus because of this frustrating issue.
Sam, quick question for you. I'm trying to implement Disqus on my blog, but the Disqus comment render pops in after the -more- separator and before the remainder of the post. All of our posts use -more- in them, to conserve space. I've seen another template you created (which is spectacular) at http://www.comiclist.com, and they use Disqus for commenting. They don't have the problem of Disqus rendering immediately after the post. Any idea why this might happen? I haven't been able to find any help in Disqus discussions, and I'm worried it might be something with the Mystique skin.
Also, the skin on that site above, was that a custom job?
Thanks as always!
Eric
Well, I tried a few different skins and figured out that it's not Mystique, which is good.
Now I just need to figure out how other blogs accomplish using Disqus without the comment box showing up after the -more- separator (I've run into several now).
Sorry to bog down the Mystique discussion for something unrelated. Now I know.
Eric
What is exactly wrong with Discus comments? I've never used that service.
Do you want to disable b2evo comments and display Discus comments the same way?
Well, on the blog my writers always put a -more- separator after the first paragraph, so that readers have to click on "Read More" to get to the rest of the article. We decided to use Disqus comments because they have built-in spam control and handle all the registration. We installed the Disqus plugin and set it up accordingly.
When someone clicks on the "Read More" link on the main page, the blog post loads as it should, but the Disqus plugin renders between the -more- command and the follow up. In other words, if I have a writer insert the -more- after two sentences, the reader will see the two sentences, the Disqus comment area, followed by the rest of the post once they chose to read that article. Normally, comments come after the post - these come in the middle of the post. Others have had this issue, but there was no resolution in the Disqus thread on the B2Evo forum.
My blog is at http://www.phonecan.com
Click on one of the posts to read more, and you'll see what's happening.
Eric
Edit the following block in /plugins/_discus.plugin.php
You just need to comment out one line
/* Define HTML Hook */
function DisplayItemAsHtml( & $params )
{
// Don't show the links or comments on admin pages or in post previews.
if ($this->display_links && !$params['preview']) {
if ($params['dispmore'] ) {
$this->insert_disqus_block( & $params ) ;
return true ;
} else {
// $this->insert_disqus_link( & $params ) ;
return true;
}
}
}
Well, that takes the per-post link off the main page, but doesn't move it inside the actual post. Normally, on the main page, before the "Read More" link, there's a link on the right of each post saying how many comments there are. When I tried commenting out the previous line, it took the Disqus part out entirely.
Ok, I'm gonna install that plugin and see how it actually works
I found someone who was using Disqus on their B2Evo blog with more separators, and emailed them. They wrote back telling me they inserted the Disqus javascript into page.main.php and single.main.php. Mystique doesn't use these, so I tired borrowing these files from other skins, knowing it would change the skin slightly on each post (which it did).
I'm not sure where I would put the code to effect the comments.
What script did they give you?
You can insert it in top of index.main.php
add_js_headline(' jQuery(document).ready(function() {
// Put your scripts here
})');
// HTML HEADER INCLUDED HERE
skin_include( '_html_header.inc.php' );
This is what Disqus provided for code:
<script type="text/javascript" src="http://YOUR-URL.disqus.com/combination_widget.js?num_items=5&hide_mods=0&color=blue&default_tab=people&excerpt_length=200"></script><a href="http://disqus.com/">Powered by Disqus</a>
They also have a section for installing to specific platforms (such as Wordpress), though no B2Evo. They did have a section of generic code with instructions.
Step 1: Copy and paste the following embed code anywhere into your page.
<div id="disqus_thread"></div>
<script type="text/javascript">
/**
* var disqus_identifier; [Optional but recommended: Define a unique identifier (e.g. post id or slug) for this thread]
*/
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://YOUR-URL-ID.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript=YOUR-URL-ID">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
Step 2: Copy the following comment count code and paste it right before the closing </body> tag.
<script type="text/javascript">
var disqus_shortname = 'YOUR-URL-ID';
(function () {
var s = document.createElement('script'); s.async = true;
s.src = 'http://disqus.com/forums/YOUR-URL-ID/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>
Step 3: Append #disqus_thread to the end of permalinks. The comment count code will replace the text of these links with the comment count.
For example, you may have a link with this HTML:
<a href="http://example.com/my_article.html#disqus_thread">Comments</a>
The comment count code will replace the text "Comments" with the number of comments on the page http://example.com/my_article.html
I tried your suggestion without success, using the first JavaScript provided. I have no idea where to fit all the generic code.
Sam, did you ever have any success with this plugin?
Sorry, I missed your reply.
The above code shouldn't go in <head> section so don't put it in add_js_headline()
You may want to PM [url=http://forums.b2evolution.net//profile.php?mode=viewprofile&u=4937]cslepage[/url] since he uses discus comments on http://www.comiclist.com
I got a lead on this today. Cslepage gave me a bit of code to put in the Post Bottom Widget:
<!-- Disqus --><div id="disqus_thread"></div><script type="text/javascript" src="http://disqus.com/forums/YOURDISQUSCODE/embed.js"></script><noscript><a href="http://YOURDISQUSCODE.disqus.com/?url=ref">View the forum thread.</a></noscript><a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
Which worked. I now have Disqus comments on each post.
Only problem is, the Mystique skin renders the Disqus code on the main page, too. And oddly enough, it renders each of the posts on the main page (which I have set to ten) all on the top post.
So cslepage had a bit of code to add to index.main.php:
<?php
if( $disp == 'single' )
{
// -------- "Post bottom" CONTAINER EMBEDDED HERE ---------
skin_container( NT_('Post bottom'), array(
'block_start' => '<div class="PostBottom">',
'block_end' => '</div>',
) );
// ----------------- END OF "Post bottom" -----------------
}
?>
Only problem is, it doesn't seem to be compatible with my theme (Mystique). So now I'm one step closer, one step back. Any suggestions?
Mystique skin already has that Post bottom container, it's in _item_block.inc.php:180
All you need to do is wrap it with "$disp == 'single'" to display the code in single post mode only.
if( $disp == 'single' )
{
// Container
}
That did it!
Two months of occasional frustration trying to get it up and running (which is why I posted it here, in case anyone else runs into this).
Thank you, thank you, thank you sam2kb and cslepage!
No problem :)
You are very welcome, and thank you sam2kb for finding the final solution!
I'm not sure what to do now that this is fixed... write on my blog, perhaps? :)
@cslepage
Yeah, the solution was to contact you :) Thanks for helping
New minor tweak request for the Disqus workaround.
I'd like to be able to put the Disqus comment count on each post on the main blog screen. Since I've disabled the b2evo internal comment system, I need to find a way to replace that missing comment count indicator.
Disqus indicates that the following "universal" code should work:
From this page:
http://docs.disqus.com/developers/universal/
Comment count
Most websites implementing Disqus will want a way to display the comment counts on the index page. We offer an easy to use JavaScript code snippet which displays the number of comments for pages with Disqus embedded.The following is the code that should be included on a page which needs to display the comment counts (typically this is the index page of your blog or website). The code should be included at the bottom of the webpage, right before the closing </body> tag,
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'example'; // required: replace example with your forum shortname/* * * DON'T EDIT BELOW THIS LINE * * */
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>
Next, you need to tell Disqus which links to look up and return the comment count. You can do this by appending #disqus_thread to the end of the href attribute of your links.Disqus can look up the comment count by the URL or by a Disqus identifier. Specifying a Disqus identifier is highly recommended. To do this, add a special attribute data-disqus-identifier to your links. If you cannot use Disqus identifiers with your install of Disqus (e.g. static webpages), you can simply not add this attribute and Disqus will look up threads by the URLs in the href attributes of the links. Since URLs can change, we highly recommend using the Disqus identifier.
Examples for using the comment code script
For the following link, Disqus will fetch the comment count by the identifier: article_1_identifier <a href="http://example.com/article1.html#disqus_thread" data-disqus-identifier="article_1_identifier">First article</a>
For the following link, Disqus will fetch the comment count by the URL: http://example.com/article2.html <a href="http://example.com/article2.html#disqus_thread">Second article</a>
Disqus will ignore the following link because its href attribute does not end with #disqus_thread <a href="http://example.com/" data-disqus-identifier="over-9000">Anchor</a>
The recommended approach is to use the identifier (the first example) because this is most consistent.
I need to see if it's possible to implement their comment count on each post, before "read more."
All help is welcome.
Thanks.
Was just thinking about something. The original Disqus plugin did exactly what I'm looking for in the way of a comment count. It rendered at the bottom of each post in the main blog page. The problem with the Disqus plugin was that the comments themselves rendered after the <!--more--> separator, but the counts rendered in the right place before viewing the individual post. If possible, all I might need to do is modify the Disqus plugin code to eliminate the comment render and keep the count render.
Looking into the plugin's code, maybe I'll see something.
Successfully got JUST the Disqus counter working.
I commented out the "$content" line in the following code:
{
$content = & $params['data'] ;
$item = & $params['Item'] ;
$disqus_code = '<hr/>';
$disqus_code .= '<div id="disqus_thread"></div><script type="text/javascript" src="http://disqus.com/forums/'.$this->Settings->get("websitename").'/embed.js"></script><noscript><a href="http://'.$this->Settings->get("websitename").'.disqus.com/?url=ref">'.T_('View the discussion thread.').'</a></noscript>';
// $content .= $disqus_code;
return ( true ) ;
}
And now I only get a link for comments and trackbacks on the main page, on each post. The Disqus comments do not render immediately after the <!--more--> separator, which the plugin was doing in error (but by design). Since I am using different Disqus code in the Post Bottom container in Widgets, the Disqus comments load at the bottom of the post, as they should.
Whew!
Well done!
Could someone create a plugin file for the working version of this? :]
It would make life easier for all involved!
I've installed the plugin, but so far I have seen no difference.
The only real setting I see is the "Disqus Unique Website Name", which I think in my case would be "http://comiclist.disqus.com/".