Show Latest Comments

jschmittat

Joined: 2005-08-28
Posts: 25
Posted: Thu, 2005-11-10 00:58

Hi,

I tried to extend the comment module so that it can show all latest comments on one page. I am quite of new to the gallery coding stuff but in the end it worked.

Your can see the result here: http://www.schmittat.com/gallery2/main.php?g2_view=comment.ShowAllComments

Only the comments and photos are shown, the user has the permission to see.

This is just a first version, still missing:

- Option, how many comments are shown [right now: 5]
- Show only comments for a specific album and its subalbums
- better design:-)

Looking forward to your feedback!
Johannes

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-11-10 01:10

nice :)
could you also post a diff to the current cvs version?
and better base your changed on the current cvs version of G2 / the current comments module...

 
jschmittat

Joined: 2005-08-28
Posts: 25
Posted: Fri, 2005-11-11 01:35

Good idea to use the latest version:-)

I updated my files and also added the possibility to set the number of shown comments in the admin menue.

Diff of module.inc

see below for latest changes

Diff of GalleryCommentHelper.class

see below for latest changes
 
jschmittat

Joined: 2005-08-28
Posts: 25
Posted: Fri, 2005-11-11 09:52

BTW, if you want to test the feature, just upload the files in zip file to your gallery and upgrade the comments module in the Site Admin area.

 
jschmittat

Joined: 2005-08-28
Posts: 25
Posted: Fri, 2005-11-11 19:11

Ok, i worked a bit more on this feature:

- Now, the ShowAllComments page shows only the comments that are children and grandchildren of the current item. That means, if you click on the "Newest Comments" link on the main page, you will see all comments you have the permission to. If you open this view from within an album you just see the comments of that album.

- There is now an option to turn this feature on and off

- I included the captcha feature for anonymous users (http://gallery.menalto.com/node/38933#comment-146386) in a slightly modified version into my comments module. This includes the option to decide in the Admin area whether to use this captcha feature or not.

Ok, here are the diffs:

Index: module.inc
===================================================================
RCS file: /cvsroot/gallery/gallery2/modules/comment/module.inc,v
retrieving revision 1.82
diff -c -r1.82 module.inc
*** module.inc	4 Nov 2005 21:56:41 -0000	1.82
--- module.inc	14 Nov 2005 17:31:45 -0000
***************
*** 21,27 ****
   */
  /**
   * @package Comment
!  * @version $Revision: 1.82 $ $Date: 2005/11/04 21:56:41 $
   * @author Bharat Mediratta <bharat@menalto.com>
   */
  
--- 21,27 ----
   */
  /**
   * @package Comment
!  * @version $Revision: 1.83 $ $Date: 2005/11/11 02:13:41 $
   * @author Bharat Mediratta <bharat@menalto.com>
   */
  
***************
*** 40,49 ****
  	$this->setId('comment');
  	$this->setName($gallery->i18n('Comments'));
  	$this->setDescription($gallery->i18n('User commenting system'));
! 	$this->setVersion('1.0.4'); /* Update upgrade() function below too */
  	$this->setGroup('data', $gallery->i18n('Extra Data'));
! 	$this->setCallbacks('registerEventListeners|getItemLinks|getItemSummaries|' .
! 			    'getItemAdminViews');
  	$this->setRequiredCoreApi(array(6, 0));
  	$this->setRequiredModuleApi(array(2, 2));
      }
--- 40,49 ----
  	$this->setId('comment');
  	$this->setName($gallery->i18n('Comments'));
  	$this->setDescription($gallery->i18n('User commenting system'));
! 	$this->setVersion('1.0.6'); /* Update upgrade() function below too */
  	$this->setGroup('data', $gallery->i18n('Extra Data'));
! 	$this->setCallbacks('registerEventListeners|getItemLinks|getSiteAdminViews|' .
! 			    'getItemAdminViews|getItemSummaries');
  	$this->setRequiredCoreApi(array(6, 0));
  	$this->setRequiredModuleApi(array(2, 2));
      }
***************
*** 80,85 ****
--- 80,101 ----
  	 	    return $ret->wrap(__FILE__, __LINE__);
  	 	}
  	     }
+ 	     
+             $def = array( 'comments.show' => 10,
+                           'default.comments.show' => 10,
+                           'comments.captcha' => 0,
+                           'default.comments.captcha' =>0,
+                           'comments.latest' => 0,
+                           'default.comments.latest' =>0
+                           );
+ 
+             while ( list( $key, $val ) = each( $def ) ) {
+         	  $ret = $this->setParameter( $key, $val );
+         	  if ($ret->isError()) {
+         	    return $ret->wrap(__FILE__, __LINE__);
+         	  }
+             }
+ 
  	     break;
  	     
  	case '0.9.6':
***************
*** 100,106 ****
  	case '1.0.1':
  	case '1.0.2':
  	case '1.0.3':
! 	    
  	case 'end of upgrade path':
  	    /*
  	     * Leave this bogus case at the end of the legitimate case statements so that we
--- 116,122 ----
  	case '1.0.1':
  	case '1.0.2':
  	case '1.0.3':
! 
  	case 'end of upgrade path':
  	    /*
  	     * Leave this bogus case at the end of the legitimate case statements so that we
***************
*** 183,188 ****
--- 199,224 ----
  			array('text' => $this->translate('Add Comment'),
  			      'params' => $params);
  		}
+ 
+ 
+                 /* Show Latest Comments? */
+                 foreach (array('comments.latest') as $key) {
+                     list ($ret, $value) = GalleryCoreApi::getPluginParameter('module', 'comment', $key);
+ 	            if ($ret->isError()) {
+ 	                return array($ret->wrap(__FILE__, __LINE__), null);
+ 	            }
+                 }
+ 
+                 If ($value==on) {
+ 
+                     $links[$item->getId()][] =
+           		    array('text'   => $this->translate('View Latest Comments'),
+            			  'params' => array(
+        			                            'view' => 'comment.ShowAllComments',
+                                                     'itemId' => $item->getId()
+                                                     )
+                             );
+ 		}
  	    }
  	}
  
***************
*** 260,264 ****
--- 296,309 ----
  
  	return $rules;
      }
+     
+         /**
+      * @see GalleryModule::getSiteAdminViews()
+      */
+     function getSiteAdminViews() {
+ 	    return array(GalleryStatus::success(),
+ 		     array(array('name' => 'Comments',
+ 				 'view' => 'comment.CommentSiteAdmin')));
+     }
  }
  ?>
Index: AddComment.inc
===================================================================
RCS file: /cvsroot/gallery/gallery2/modules/comment/AddComment.inc,v
retrieving revision 1.37
diff -c -r1.37 AddComment.inc
*** AddComment.inc	23 Aug 2005 03:49:01 -0000	1.37
--- AddComment.inc	14 Nov 2005 17:42:44 -0000
***************
*** 28,33 ****
--- 28,36 ----
   */
  
  /**
+   * require necessary classes
+   */
+ /**
   * Add a comment to an item.
   *
   * @package Comment
***************
*** 63,68 ****
--- 66,101 ----
  		$error[] = 'form[error][comment][missing]';
  	    }
  
+             if (empty($error)) {
+                 /* Get all the login plugins */
+                 list ($ret, $pluginInstances) =
+                      GalleryCoreApi::getAllFactoryImplementationIds('GalleryValidationPlugin');
+                 if ($ret->isError()) {
+                     return array($ret->wrap(__FILE__, __LINE__), null);
+                 }
+ 
+                 foreach (array_keys($pluginInstances) as $pluginId) {
+                    list ($ret, $pluginInstances[$pluginId]) =
+                        GalleryCoreApi::newFactoryInstanceById('GalleryValidationPlugin', $pluginId);
+                    if ($ret->isError()) {
+                        return array($ret->wrap(__FILE__, __LINE__), null);
+                    }
+                 }
+ 
+                 /* Let each plugin do its verification */
+                 foreach ($pluginInstances as $pluginId => $plugin) {
+                     list ($ret, $pluginErrors, $continue) = $plugin->performValidation($form);
+                     if ($ret->isError()) {
+                         return array($ret->wrap(__FILE__, __LINE__), null);
+                     }
+ 
+                     $error = array_merge($error, $pluginErrors);
+                     if (!$continue) {
+                         break;
+                     }
+                 }
+             }
+ 
  	    if (empty($error)) {
  		/* Add the comment */
  		list ($ret, $comment) =
***************
*** 140,145 ****
--- 173,180 ----
       * @see GalleryView::loadTemplate
       */
      function loadTemplate(&$template, &$form) {
+         global $gallery;
+ 
  	/* Load our item */
  	list ($ret, $item) = $this->_getItem();
  	if ($ret->isError()) {
***************
*** 152,157 ****
--- 187,204 ----
  	    return array($ret->wrap(__FILE__, __LINE__), null);
  	}
  
+         /* Load Variables */
+         $CommentsVar = array();
+         foreach (array('comments.captcha') as $key) {
+        	    list ($ret, $value) = GalleryCoreApi::getPluginParameter('module', 'comment', $key);
+ 	    if ($ret->isError()) {
+ 	        return array($ret->wrap(__FILE__, __LINE__), null);
+             }
+             $key = explode('.', $key);
+             $CommentsVar[$key[0]][$key[1]] = $value;
+ 
+         }
+ 
  	if ($form['formName'] != 'AddComment') {
  	    $form['formName'] = 'AddComment';
  	    $form['subject'] = '';
***************
*** 168,174 ****
  	$AddComment['host'] = GalleryUtilities::getRemoteHostAddress();
  	$AddComment['itemId'] = $item->getId();
  
- 	$template->setVariable('AddComment', $AddComment);
  	$template->setVariable('controller', 'comment.AddComment');
  
  	list($ret, $module) = GalleryCoreApi::loadPlugin('module', 'comment');
--- 215,220 ----
***************
*** 177,182 ****
--- 223,278 ----
  	}
  
  	$template->title($module->translate('Add Comment'));
+ 	
+ 	       /* Check if we are the anonymous user. If so, load up captcha */
+        $activeUserId = $gallery->getActiveUserId();
+ 
+        $userId = GalleryUtilities::getRequestVariables('userId');
+        if (empty($userId)) {
+            $userId = $activeUserId;
+        }
+ 
+        list ($ret, $anonymousUserId) =
+            GalleryCoreApi::getPluginParameter('module', 'core', 'id.anonymousUser');
+        if ($ret->isError()) {
+            return array($ret->wrap(__FILE__, __LINE__), null);
+        }
+ 
+        if (($userId == $anonymousUserId) and ($CommentsVar[comments][captcha]==on)) {
+            /* See if the CaptchaValidationPlugin is installed */
+            /* Get all the login plugins */
+            list ($ret, $allPluginIds) =
+                GalleryCoreApi::getAllFactoryImplementationIds('GalleryValidationPlugin');
+ 
+            if ( $ret->isError()) {
+                 return array($ret->wrap(__FILE__, __LINE__), null);
+            }
+            /* Let Captcha load it's template data. Set security to HIGH so
+            * Captcha will display immediately */
+            /* Let each plugin load its template data */
+ 
+            $AddComment['plugins'] = array();
+            /* If No ValidationPlugins are installed, allPluginIds array is empty and foreach will
+             * no load the ValidationPlugin
+             */
+            foreach (array_keys($allPluginIds) as $pluginId) {
+                list ($ret, $plugin) =
+                    GalleryCoreApi::newFactoryInstanceById('GalleryValidationPlugin', $pluginId);
+                if ($ret->isError()) {
+                    return array($ret->wrap(__FILE__, __LINE__), null);
+                }
+                list ($ret, $data['file'], $data['l10Domain']) =
+                    $plugin->loadTemplate($template, $form, 'HIGH');
+                if ($ret->isError()) {
+                    return array($ret->wrap(__FILE__, __LINE__), null);
+                }
+                if (isset($data['file'])) {
+                    $AddComment['plugins'][] = $data;
+                }
+            }
+ 
+        }
+        $template->setVariable('AddComment', $AddComment);
  
  	return array(GalleryStatus::success(),
  		     array('body' => 'modules/comment/templates/AddComment.tpl'));

Index: GalleryCommentHelper.class
===================================================================
RCS file: /cvsroot/gallery/gallery2/modules/comment/classes/GalleryCommentHelper.class,v
retrieving revision 1.15
diff -c -r1.15 GalleryCommentHelper.class
*** GalleryCommentHelper.class	4 Nov 2005 21:56:41 -0000	1.15
--- GalleryCommentHelper.class	11 Nov 2005 14:59:51 -0000
***************
*** 22,28 ****
  
  /**
   * @package Comment
!  * @version $Revision: 1.15 $ $Date: 2005/11/04 21:56:41 $
   * @author Bharat Mediratta <bharat@menalto.com>
   */
  
--- 22,28 ----
  
  /**
   * @package Comment
!  * @version $Revision: 1.16 $ $Date: 2005/11/11 00:18:41 $
   * @author Bharat Mediratta <bharat@menalto.com>
   */
  
***************
*** 107,112 ****
--- 107,178 ----
      }
  
      /**
+      * Return all comments
+      *
+      * @param array int GalleryItem id
+      * @return array (object GalleryStatus a status code,
+      *                array (entityId => GalleryComment, ...)
+      * @access private
+      * @static
+      */
+     function fetchAllComments($itemId, $count=null, $orderDirection=ORDER_ASCENDING) {
+ 	global $gallery;
+ 
+ 	switch($orderDirection) {
+ 	case ORDER_ASCENDING:
+ 	    $direction = 'ASC';
+ 	    break;
+ 
+ 	case ORDER_DESCENDING:
+ 	    $direction = 'DESC';
+ 	    break;
+ 
+ 	default:
+ 	    return array(GalleryStatus::error(ERROR_BAD_PARAMETER, __FILE__, __LINE__),
+ 			 null);
+ 	}
+ 
+ 	$query = '
+         SELECT
+           [GalleryComment::id]
+         FROM
+           [GalleryComment]
+         ORDER BY
+           [GalleryComment::date] ' . $direction . '
+         ';
+ 
+ 	list($ret, $searchResults) = $gallery->search($query,
+ 						       array($itemId),
+ 						       array('limit' => array('count' => $count)));
+ 
+ 	if ($ret->isError()) {
+ 	    return array($ret->wrap(__FILE__, __LINE__), null);
+ 	}
+ 
+ 	/* Get all of our ids */
+ 	$allIds = array();
+ 	while ($result = $searchResults->nextResult()) {
+ 	    $allIds[] = $result[0];
+ 
+ 	}
+ 
+ 
+ 	/* Load all the comments at once */
+ 	$comments = array();
+ 	if (!empty($allIds)) {
+ 	    list ($ret, $comments) = GalleryCoreApi::loadEntitiesById($allIds);
+ 	    if ($ret->isError()) {
+ 		return array($ret->wrap(__FILE__, __LINE__), null);
+ 	    }
+ 	}
+ 
+ 	return array(GalleryStatus::success(), $comments);
+     }
+ 
+ 
+ 
+ 
+     /**
       * Return the number of comments associated with the given item ids
       *
       * @param array int GalleryItem ids
Index: AddComment.tpl
===================================================================
RCS file: /cvsroot/gallery/gallery2/modules/comment/templates/AddComment.tpl,v
retrieving revision 1.26
diff -c -r1.26 AddComment.tpl
*** AddComment.tpl	12 Jul 2005 10:07:38 -0000	1.26
--- AddComment.tpl	11 Nov 2005 16:26:59 -0000
***************
*** 71,76 ****
--- 71,81 ----
      {/if}
    </div>
  
+   {* Include our extra ItemAddOptions *}
+   {foreach from=$AddComment.plugins item=plugin}
+      {include file="gallery:`$plugin.file`" l10Domain=$plugin.l10Domain}
+   {/foreach}
+ 
    <div class="gbBlock gcBackground1">
      <input type="submit" class="inputTypeSubmit"
        name="{g->formVar var="form[action][preview]"}" value="{g->text text="Preview"}"/>

The files
CommentSiteAdmin.inc
ShowAllComments.inc
AllComments.tpl
CommentSiteAdmin.tpl
and
ShowAllComments.tpl are new

 
jschmittat

Joined: 2005-08-28
Posts: 25
Posted: Fri, 2005-11-11 19:16

I am also thinking about asking guest users to post a name when writing a comment.
How do I add a new field to the comment table in the database the best way? Using a query in the update section? Probably not...

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-11-11 20:35

nope, not like that.

cd modues/comment/classes/
open GalleryComment.class in an edit
add commenterName or something like that as a new member. see commenterId etc.
the php comments above the commenterId is more than just a comment, it's XML. add such XML also above your commenterName and change it accordingly.
at the top of the class, change the schema version from 1.1 to 1.2

cd modules/comment/classes/GalleryStorage/DatabaseStorage/schema/xml-src/
copy A_GalleryComment_1_0.xml to A_GalleryComment_1_1.xml
change the file according to your change, there are other examples in modules/core/classes/GalleryStorage/DatabaseStorage/schema/xml-src/

cd modues/comment/classes/
gmake
modules/core/classes/GalleryStorage/DatabaseStorage/schema/
gmake

 
SanderT

Joined: 2005-11-13
Posts: 5
Posted: Sun, 2005-11-13 14:13

I've tried to install it, but in the Site Admin module its tells me it requires Module API 2.2, where i have 2.0. I've upgraded my gallery to 2.1, but its still giving the same error. How do i upgrade my Module API to 2.2? Can't find proper documentation on upgrading the Module API. Can you help me on this one?Thx

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-11-13 14:33

get the latest nightly snapshot.
downloadpage -> g2 nightly snapshots from jmullan

 
SanderT

Joined: 2005-11-13
Posts: 5
Posted: Sun, 2005-11-13 15:05
valiant wrote:
get the latest nightly snapshot.
downloadpage -> g2 nightly snapshots from jmullan

Thx!One more question. I've downloaded the latest nightly snapshots from jmullan. I have a slightly modified gallery, do i need to upload all of the files, or only some of them to upgrade my module API to 2.2.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-11-13 15:30

you better should upload all files.
and your modifications shouldn't be in any official .tpl file. move your customizations into templates/local/ folders or into your own themes.
and if you need to customize .inc / .class files, make a list of your changes such that you don't forget to reapply them. or better move them into your own modules.

 
SanderT

Joined: 2005-11-13
Posts: 5
Posted: Sun, 2005-11-13 21:17

Ok, everything set and done.
I created an new fresh and clean install of gallery2 using the latest nightly snapshots from jmullan.
But when trying to upgrade the comments module in the Site Admin area, i get the following error:

Error Detail -
Error (ERROR_BAD_PLUGIN) : Unknown module version 1.0.4

* in modules/comment/module.inc at line 153 (gallerystatus::error)
* in modules/core/classes/GalleryModule.class at line 175 (commentmodule::upgrade)
* in modules/core/AdminModules.inc at line 85 (commentmodule::installorupgrade)
* in main.php at line 201 (adminmodulescontroller::handlerequest)
* in main.php at line 88
* in modules/core/classes/GalleryEmbed.class at line 155
* in index.php at line 132 (galleryembed::handlerequest)
* in /home/httpd/vhosts/techno-kitty.com/httpdocs/modules.php at line 68

System Information
Gallery version 2.0.1+
PHP version 4.3.8 apache2handler
Webserver
Database mysql 4.0.25-log
Toolkits ImageMagick, NetPBM, Gd
Operating system Linux us1.1-eurohost.com 2.4.22-1.2199.nptl #1 Wed Aug 4 12:21:48 EDT 2004 i686
Browser Mozilla/5.0 (Windows; U; Windows NT 5.1; nl-NL; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

The current comment module version is 1.0.4.
Anyone who can help me fix this one?

 
jschmittat

Joined: 2005-08-28
Posts: 25
Posted: Sun, 2005-11-13 22:08

Hi SanderT,

sorry, my fault. Please change the following in the file modules/comment/module.inc beginning at line 118:

  case '1.0.2':
  case '1.0.3':
!             $def = array( 'comments.show' => 10,

to

  case '1.0.2':
  case '1.0.3':
  case '1.0.4':

!             $def = array( 'comments.show' => 10,

This happend because I was not using the latest CVS when starting my modifications. Hope this works.

Edit: Updated the diffs and files above.

 
SanderT

Joined: 2005-11-13
Posts: 5
Posted: Sun, 2005-11-13 22:23

Thx, got it upgraded now. And i can see the link to the latest comments in the sidebar, but to bad its not working yet. I get the following error, when clicking on Show Latest Comments:

Error (ERROR_MISSING_OBJECT) : Missing object for 0

* in modules/core/classes/GalleryStorage/DatabaseStorageExtras.class at line 1780 (gallerystatus::error)
* in modules/core/classes/GalleryStorage/DatabaseStorageExtras.class at line 321 (databasestorageextras::_identifyentities)
* in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 343 (databasestorageextras::loadentities)
* in modules/core/classes/GalleryStorage.class at line 121 (mysqldatabasestorage::loadentities)
* in modules/core/classes/helpers/GalleryEntityHelper_simple.class at line 82 (gallerystorage::loadentities)
* in modules/core/classes/GalleryCoreApi.class at line 2187 (galleryentityhelper_simple::loadentitiesbyid)
* in modules/comment/ShowAllComments.inc at line 142 (gallerycoreapi::loadentitiesbyid)
* in modules/core/classes/GalleryTheme.class at line 689 (showallcommentsview::loadtemplate)
* in modules/core/classes/GalleryView.class at line 312 (matrixtheme::loadtemplate)
* in main.php at line 335 (showallcommentsview::doloadtemplate)
* in main.php at line 88
* in main.php at line 81

Any thoughts?
Thx in advance.

 
jschmittat

Joined: 2005-08-28
Posts: 25
Posted: Mon, 2005-11-14 17:17
SanderT wrote:
Thx, got it upgraded now. And i can see the link to the latest comments in the sidebar, but to bad its not working yet. I get the following error, when clicking on Show Latest Comments:
[...]
Any thoughts?
Thx in advance.

Sorry, no idea. I don't get the same error. I installed a new, clean version of the latest CVS and uploaded my changed files to see if there is a problem but it works and I don't get your error. Did you try cleaning the template cache?

Did someone else try my modifications and got it running?

 
syntaxerror

Joined: 2005-11-14
Posts: 1
Posted: Mon, 2005-11-14 21:21

I was able to install the updated module on the 2.0.1 release by changing the "Module" module requirements back to 2.0 and it works beautifully. I just want to thank you for your hard work on this HIGHLY requested feature.

Works beautifully!

 
SanderT

Joined: 2005-11-13
Posts: 5
Posted: Wed, 2005-11-16 01:43

Got it working now!

TablePrefix (g2_) and columnPrefix (g_) needed to be gallery defaults. I had customized prefixes and that didn't work out. Now its up and running and i'm already receiving positive feedback from users. It was a kind of let down, that this feature was missing, when i migrated Gallery 1 to Gallery 2.
Of course credits go to jschmittat for his work on this feature, and valiant thanks for all the help.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2005-11-16 20:45

This code is now integrated into comments module, thanks for the contribution!
Changes I made:
- check for comment.view permission before showing link for ShowAllComments
- don't check userId request param (was that for testing?) when checking for anonymous user
- make sure we're using validation plugins in AddCommentController before loading them up
- removed isDefault in SiteAdminView (unused)
- removed default.* parameters ("reset" in site admin views means reset to last-saved values)
- in site admin check if there are any available validation plugins
- ShowAllComments was loading all comments in the db and filtering out parent and max# to show and permissions check in php.. I put this logic in the query.
- include Comment.tpl instead of duplicating; removed AllComments.tpl

I also added an $offset parameter in the helper function, in case someone would like to add pagination to the comments view (ie to see the next 10 or whatever).

 
jschmittat

Joined: 2005-08-28
Posts: 25
Posted: Wed, 2005-11-16 21:03

Thank you, mindless! I am very happy that you reviewed the code and integrated it into the comments module.

About the loading of the comments: I am very curious to see how you solved it, as I was not able to do it. Well, that's the difference to a gallery professional:-)

Looking forward to the next CVS files...

 
RalphTheWonderLlama

Joined: 2005-07-16
Posts: 68
Posted: Fri, 2005-11-18 08:49

sweeet, thanks guys! I will have to try this soon.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Fri, 2005-11-18 18:33

Forgot to mention, I went ahead and added pagination so you can access all the comments on multiple pages now.

 
jschmittat

Joined: 2005-08-28
Posts: 25
Posted: Mon, 2005-11-21 22:07

I would like to add the new phrases and words used in this modification to the German localization file. Problem: I am working on a windows pc. Can anyone tell me if there is a possibility to run gettext and make on a windows pc?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-11-22 01:30

there are gnu utils and binutils for windows.
or you could get cygwin (a linux emulator for windows) and in the cygwin installer, make sure to select make etc.

 
DiaperDad
DiaperDad's picture

Joined: 2005-10-11
Posts: 9
Posted: Tue, 2005-11-22 03:22

BTW, sorry for the ignorance but may I ask how do I update an existing and installed module in Gallery? I want to use this new feature but I'm afraid I might screw up my existing install of Gallery.

Do I disable and uninstall the existing comment module first?

Thanks.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-11-22 14:32

just extract the new nightly snapshot of g2 over your existing g2 and upgrade.

if you just want to upgrade a specific module, extract the new module over the old and upgrade the module in site admin -> modules.
sometimes a module depends on the latest g2 (core module) version, then it will show a message and you can't upgrade until you upgraded g2.

FAQ: How to upgrade Gallery2?

 
ommma

Joined: 2005-10-03
Posts: 52
Posted: Sun, 2005-12-11 09:51

Hello,

I am really happy with this module, this was the one feature I missed one the new Gallery! There's just one problem i have, when i'm logged in as "admin" i can see the link: View Latest Comments on the MainPage, but when i'm logged in as a normal user, or guest, i can't see the link on the main page, but in the sub-albums i can see it. Do you have any idea what to do?

thanks

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sun, 2005-12-11 19:24

check permissions on your root album. sounds like Everybody group doesn't have view comments permission.

 
LeeUmm

Joined: 2005-09-14
Posts: 23
Posted: Wed, 2005-12-14 04:52

Is the attached file in this post the latest version of this module or is there a place to download it? The gallery website still shows it as version 1.0.0

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Thu, 2005-12-15 06:31

current CVS or nightly snapshot has this feature.

 
wal-d

Joined: 2006-01-07
Posts: 1
Posted: Sat, 2006-01-07 01:09

hey! thanks everybody for making this really nice update to the comment module. the lack of this function was the reason sticking with coppermine. it's time to change ;)

thanks again!