iWeb FAQ - Comments

iWebFAQ.org

 

How can I have users leaving me comments on my website?

La stessa pagina in italiano                             Die gleiche Seite auf Deutsch
 


Chapter 1: Inline comments, having the comments displaying on the page itself

Chapter 2: Have the comments displaying in a box (FancyBox) instead of having them displaying on the page

Chapter 3: How do I moderate the comments?



Chapter 1: Inline comments, having the comments displaying on the page itself


1. Register to Disqus.com and provide the details of your website (Site URL yourdomain.com, Site Name, Site Shortname)

2. Copy the following code:



<div style="width:600px;height:450px;overflow:auto;">

        <div id="disqus_thread"></div>

        <script type="text/javascript">

            var disqus_shortname = 'SITE_SHORTNAME';

            (function() {

                var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;

                dsq.src = 'http://' + disqus_shortname + '.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">comments powered by Disqus.</a></noscript>

        <a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>

</div>



Change SITE_SHORTNAME in the code to your site shortname.

Change width and height to fit your needs. This defines the size the comments box on your page

3. On the pages you want to add Intense Debate Comments add a TextBox with a text code (something like IDCommentsGoHere). It’s recommended to add the TextBox of the size you entered in the HTML code.




4. Publish your website to a folder

5. Open or download MassReplaceIt (freeware)


If this is the first time you use what I call Alternative HTML please make sure you read and go through the Alternative HTML FAQ of this website first. The exercise is important for you to understand how it works and to make sure you have the right settings in MassReplaceIt which in turn ensures it will work properly when going through this tutorial.


6. In the Search field type IDCommentsGoHere (or the text you used)

7. In the Replace field paste the code of step 2


Of course if you’re using MassReplaceIt for other codes as well you can add it to that query.




8. In Files add your website (go the folder you publish to from iWeb and select your site’s folder)




9. Save the query by hitting Command(cmd or Apple)+S and enter a name for it so the next time you publish your website you will only have to hit the Replace button

10. Hit Replace and MassReplaceIt will search for files it has to make changes to

11. Again hit Replace All and MassReplaceIt will automatically replace the text “IDCommentsGoHere” and add the appropriate code instead




Note: You have to repeat the process from step 10 to 11 every time you republish.


This is what it looks like (I will not watch the comments here so if you have questions refer to the Forum and don’t post them here):





Chapter 2: Have the comments displaying in a box (FancyBox) instead of having them displaying on the page


If you don't want to have the comments displaying on the page because you think it is messy and you're looking for a cleaner solution you may want to just have a link on the page and have the comments opening in a FancyBox as in this example...


Add a comment
comments powered by Disqus

How this is done is described in my iWebFAQ.org E-Book (sample)


Known issues: The box closes when people login and they have to reopen the box to leave a comment after they logged in. No fixes for that. No problem if they are already logged in or if they just type in name and e-mail to submit a comment.



Chapter 3: How do I moderate the comments?


1. Go to the Disqus site, click on admin and login with your account

2. You will then see the comments in the moderation queue



Chapter 4: Troubleshoot


The code posted in Chapter 1 of this page also works in HTML Snippets however I would really urge you to follow the tutorial and use Alternative HTML.


When you add an HTML Snippet a new page is created to which the code you add to the Snippet is added and this new Snippet page is then embedded into the page you added the Snippet to with an iFrame. This means that the code is not added to the page itself.


The URL of a Snippet looks like:

http://yourdomain.com/Sitename//Pagename_files/widget6_markup.html


The important part here is this widget6_markup.html especially the number in it. This number changes depending on whether you add new HTML Snippets, remove HTML Snippets, change the position of the HTML Snippets or whatever.


Disqus threads the comments by taking the URL of the page (HTML Snippet page) as the id to define whether a comment belongs to a page or to another. If the URL changes because the number of the Snippet changes of course the comments go nuts. That's the reason why you shouldn't use HTML Snippets for that.




This FAQ is also discussed in my iWebFAQ.org E-Book (sample)


iWebFAQ.org - Tutorials, Tips & Tricks is made with iWeb and for iWeb.

It’s an EBookStoreToday.com company. It’s presented by Cédric Giger and hosted by HostGator.


Thank you for visiting and supporting my website,

- Cédric -


 

 

Share/Bookmark

Share/Bookmark