Advanced search  

News:

cpg1.5.46 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter recently discovered vulnerabilities. It is important that all users who run version cpg1.5.44 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: HOWTO: Add Disqus commenting system AND show last Disqus comments  (Read 5953 times)

0 Members and 1 Guest are viewing this topic.

flapane

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: it
  • Offline Offline
  • Gender: Male
  • Posts: 249
    • Flavio's page

I made a little modification to my gallery and thought I'd share it with you.
Social sharing plugin, http://forum.coppermine-gallery.net/index.php/topic,70221.0/nowap.html allows to enable Disqus commenting system.
All you have to do is register on Disqus and then create a new FORUM.
Then, copy the FORUM name in the Social Sharing Plugin (Disqus Shortname for the Disqus Comments function. Register with Disqus to get one.)

You're set! You can disable the plain old CPG commenting system and leave just DISQUS one.

However there's no way to show the last Disqus comments for the whole gallery.

This article ( http://aaronjwhite.org/index.php/component/content/article/5-php/18-updated-recent-comments-widget-in-php-for-disquss-api ) helped me to create a little php script that shows the last comments for a given Disqus FORUM.
Follow the instruction in the article (I repeat, please follow the instructions) and upload your script somewhere.

However, Coppermine menu still shows the link to the old cpg "recent comments".
You have to edit your theme.php and substitute
Code: [Select]
<a href="{LASTCOM_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{LASTCOM_LNK}">{LASTCOM_LNK}</a>
with

Code: [Select]
<a href="/your_lastcomments_script.php" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{LASTCOM_LNK}">{LASTCOM_LNK}</a>
This is the result on my website: http://www.flapane.com/gallery_lastcomments.php

I themed it with some css code:
Code: [Select]
<style type="text/css">
/*disqus - last comments su gallery coppermine*/
.dqCommentAvatar
{
  height:40px;
  width:40px;
}

.dqCommentThread
{ font-weight : bold; }

.dqCommentAuthor
{ font-weight : bold; }

div.dqAvatarWrap {
float: left;
padding-right:5px;
}

div.dqCommentMeta {
float: right;
}

div.dqCommentHead div.dqCommentMeta span.dqCommentTime {
    font-size: 10px;
}

div.dqCommentHead div.dqCommentMeta span {
    display: block;
}

div.dqCommentText { font-style : italic; }
</style>

Hope it helps. :)
« Last Edit: January 17, 2013, 02:04:42 pm by Αndré »
Logged

flapane

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: it
  • Offline Offline
  • Gender: Male
  • Posts: 249
    • Flavio's page
Re: HOWTO: Add Disqus commenting system AND show last Disqus comments
« Reply #1 on: January 13, 2013, 10:47:49 pm »

Woops, I posted the article containing the old version of the script.
MODs please substitute the link in the original post with: http://aaronjwhite.org/index.php/component/content/article/5-php/18-updated-recent-comments-widget-in-php-for-disquss-api

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15369
Logged

plancast

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: HOWTO: Add Disqus commenting system AND show last Disqus comments
« Reply #3 on: March 27, 2015, 02:42:22 pm »

Hi,

Could you let me know how to disable comments to allow Disqus to work?  Also, do a completely lose all previously made comments?

Thanks,

Chris
Logged

flapane

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: it
  • Offline Offline
  • Gender: Male
  • Posts: 249
    • Flavio's page
Re: HOWTO: Add Disqus commenting system AND show last Disqus comments
« Reply #4 on: March 27, 2015, 06:40:13 pm »

Yes, you loose all your comments.
You can manually create and import a Disqus backup file (check the Disqus documentation, I don't remember the exact steps), but it makes sense if you only have a bunch of comments.
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 21 queries.