Log in

Stats

  • Category: Communication
  • License: GNU General Public License (GPL) version 2
  • Updated: 2011-2-4
  • Downloads: 415
  • Recommendations: 0

Releases


Previous releases:

Other Projects

View Facyla's plugins

Commentus anonymus for Elgg 1.6

Allow public comments (non-members)

Last updated 1175 days ago

<php

/*

This plugin allows public visitors to let comments on your site.

Admin are notified, and there's a textual captcha for spam limitation.

All credit goes to klermor, plugin author. This version is based on his work, and released with minor details modifications (notification settings).

Development was completed after this version, and include a priori moderation (but are not released).

Important note : this plugin is not supported by me, nor its author. Don't expect support.

Feedback and discussion are useful to everyone, so commenting remain open ;)

 

Very important warning : once you've activated comment_anonymous, you MUST NOT disable it, which may break the default annotation framework. You're warned. Note also that plugin re-activation won't correct this behaviour.

So at least, don't test on a production site !!

Important for testing : activation on a multisite install won't affect other sites (only the ones you activate the plugin in).

*/

/*

In case you didn't read the warning, activated the plugin, and disactivated it (or re-eanble it after), here's a tip to get your comments to display anyway :

*/

/*WARNING : once you've activated comment_anonymous, you MUST NOT disable it, which may break the default annotation framework. You're warned.=> Use desactivation settings in the plugin itself instead, if you need to disable public comments.If you already did it, the following piece of code partially corrects this for all sites excepted the one you've disabled the plugin on.. :1. Copy this file2. Rename the copy as : generic_comment.php3. Choose a plugin that's activated on all site that are concerned by comments/annotation ; recommended plugin is your "theme" plugin (or the one that contains all you customized views)4. Move generic_comment.php  to  mod/(your_theme_plugin)/views/default/annotation/5. Add 2 new entries to that plugin's languages files (which are the en.php, fr.php files located in mod/(your_theme_plugin)/languages/ ) :  'anonymous_comments:anonymous_comment' => 'Commentaire public',  'anonymous_comments:anonymous_owner' => 'Visiteur',6. Run upgrade.php to enable the new view*//*Patch qui permet de continuer à afficher les commentaires proprement après désactivation de anonymous_commentNote :1. placer ce fichier generic_comment.php dans votre plugin de patches/personnalisations/thème, dans views/default/annotation/2. ajouter dans le fichier de langues les entrées suivantes :  'anonymous_comments:anonymous_comment' => 'Commentaire public',  'anonymous_comments:anonymous_owner' => 'Visiteur',*/$annotation = $vars['annotation']->value;if ($owner = get_user($vars['annotation']->owner_guid)) {} else {  unset($owner);  $annotations = explode('|', $annotation);  $annotation = $annotations[1]; // Affichage des comment_anonymous, il faut bypasser les metadata (placées avant le contenu)  $metadata = explode(',', $annotations[0]);  $mailurl = 'mailto:' . $metadata[1] . '?subject=Votre commentaire sur la page http://' . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];}?><div class="generic_comment">    <div class="generic_comment_icon">    <?php if (isset($owner)) {      echo elgg_view("profile/icon", array( 'entity' => $owner, 'size' => 'small'));    } else {      echo '<a href="' . $mailurl . '" title="' . $metadata[0] . '"><img src="' . elgg_view("icon/user/default/small") . '" /></a>';    } ?>  </div>    <div class="generic_comment_details">    <?php echo elgg_view("output/longtext", array("value" => $annotation)); ?>        <p class="generic_comment_owner">      <?php if (isset($owner)) {        echo '<a href="'.$owner->getURL().'">'.$owner->name.'</a> ';      } else {        echo elgg_echo('anonymous_comments:anonymous_owner') . ': ' . '<a href="' . $mailurl . '">' . $metadata[0] . '</a> ';      }      echo friendly_time($vars['annotation']->time_created);      ?>    </p>        <?php if ($vars['annotation']->canEdit()) { ?>      <p>        <?php        echo elgg_view("output/confirmlink",array(            'href' => $vars['url'] . "action/comments/delete?annotation_id=" . $vars['annotation']->id,            'text' => elgg_echo('delete'),            'confirm' => elgg_echo('deleteconfirm'),          ));        ?>      </p>    <?php } ?>      </div>  </div>

Release Notes:

  • notification settings (which user(s) will be email-notified of public comments - should be admin users)

Comments

  • TahoeBilly 1175 days ago

    I have a Vazco version running on my sites. I will compare.

  • Jon Dron 1113 days ago

    @TahoeBilly - is that Vazco version available for sale/download? I've scoured the elggdev site but can't find anything similar. This would be an extremely useful plugin for us (we need to open our garden wall a little, not too much) but I am concerned about forwards compatibility and the potentially devastating effects if it is removed.