We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15987
    • 786 Posts
    Hopefully its just the one function and there are not others that cause the same problem. If its just the one though it would not be hard to fix.
      • 14281
      • 120 Posts
      Actually, the function is question here is xml_set_object, which is a standard PHP function. So I can’t change it’s declaration. Thanks for trying, Kyle.

      Anyone accomplish this in a PHP 5 hosted environment? My exact PHP version is 5.1.2
        • 6726
        • 7,075 Posts
        Sorry for being late at the party but my, how did I miss this snippet !?!?? (and man, what a cool name !)

        This is AWESOME and will be a dream come true for MODx bloggers grin
        A real must have companion for Ditto smiley

        THANKS !
          .: COO - Commerce Guys - Community Driven Innovation :.


          MODx est l'outil id
          • 18436
          • 135 Posts
          I’ve wanted to start implementing replix as a replacement for the standard commenting system but have a few things I’d like to ask first, so here are my questions in no particular order:

          Q01: When using the snippet with the &folder parameter will it store all (site wide) comments in this folder unless called with another id, and when displaying comments in a page will it automatically display the associated comments?

          Q02: Are you still considering giving the site admin an option of storing comments in seperate db table?

          Q03: After smallscale testing I’ve tried to get the snippet to post using the custom name field but this value gets overwritten by the default "anonymous" name that you specify, what is the correct procedure for it to only use the anonymous title if the custom name field is left blank or is there a way to populate the field value in advance with the anonymous string (guess I can figure this out myself but thought I’d check here first).

          TIA.
            • 4195
            • 398 Posts
            Quote from: Marschant at Jun 15, 2006, 07:05 AM

            I’ve wanted to start implementing replix as a replacement for the standard commenting system but have a few things I’d like to ask first, so here are my questions in no particular order:

            Q01: When using the snippet with the &folder parameter will it store all (site wide) comments in this folder unless called with another id, and when displaying comments in a page will it automatically display the associated comments?

            - if you specify a folder the comments for the current document (where the snippet is called) the comments for that document are stored there. each document has a seperate document with documents (default will be to create a child document). The comment will be placer where the snippet is.

            The snippet displays the comments for the current document unless specified otherwise

            Quote from: Marschant at Jun 15, 2006, 07:05 AM

            Q02: Are you still considering giving the site admin an option of storing comments in seperate db table?

            Yes but i’m first converting Replix to support the TBS plugin (http://modxcms.com/forums/index.php?topic=5110.new;topicseen#new) i created. This will eliminate the unnecessary display logic in the snippet code.

            Q03: After smallscale testing I’ve tried to get the snippet to post using the custom name field but this value gets overwritten by the default "anonymous" name that you specify, what is the correct procedure for it to only use the anonymous title if the custom name field is left blank or is there a way to populate the field value in advance with the anonymous string (guess I can figure this out myself but thought I’d check here first).

            if you have custom fields is they have to be defined comma seperated with $customfield=, if you are using a custom field to be used as the poster name this field has to defined also with &customname=. You can define the default anonymous name with &guestname.
            If the custom name field is there but left blank it will use the name specified with &guestname. If no $customname is defined it will always default to &guestname (of if &guestname isn’t defined it will be Anonymous)
              Armand Pondman
              MODx Coding Team
              :: Jot :: PHx
              • 18436
              • 135 Posts
              Hi thanks for the reply, regarding Q01: So if I call the snippet anytime I use comments and pass the same folder id each time then it will create another document within folder(id) for each document? If so that’s great!!!

              I’ve been battling to synchronise online content containing comments as children of the page with my oflline working copy and vice versa, now all I have to do is manage my SQL queries where the parent id = comment folder id, sweet.
                • 14281
                • 120 Posts
                Some suggestions for Replix:

                In the file replix.inc.php

                Change:
                if(!$modx->isMemberOfWebGroup($modgrp)) {
                	$comment = str_replace('[+moderate+]','',$comment);	
                } else {
                	$comment = str_replace('[+moderate+]','<a href="[~[*id*]~]#" onclick="document.forms.ReplixDelete'.$tagid.'.cid.value=\''.$id.'\';document.forms.ReplixDelete'.$tagid.'.submit();" title="Delete Comment"><img src="manager/media/images/icons/delete.gif" width="16" height="16" alt="Delete Comment" border="0" /></a>',$comment);
                }
                


                to this:
                if($modx->isMemberOfWebGroup($modgrp) || $modx->checkSession()) {
                						$comment = str_replace('[+moderate+]','<a href="[~[*id*]~]#" onclick="document.forms.ReplixDelete'.$tagid.'.cid.value=\''.$id.'\';document.forms.ReplixDelete'.$tagid.'.submit();" title="Delete Comment"><img src="manager/media/images/icons/delete.gif" width="16" height="16" alt="Delete Comment" border="0" /></a>',$comment);
                } else {
                	$comment = str_replace('[+moderate+]','',$comment);	
                }
                

                Now it will allow both users in the right webusergroups, as well as managers, to delete comments. (By the way, are you going to add the ability to edit comments?)

                Add:
                //class for every other comment.
                $altrowcss = isset($altrowcss) ? $altrowcss : 'altRow';
                

                To the top variable checks, and:
                $altRow = ($i%2)==0 ? ' '.$altrowcss : null;
                $comment = str_replace('[+altrowclass+]',$altRow,$comment);
                

                In the template tag replacement loop. Now you can alternate the look of every other comment in a list, like the old UserComments snippet.

                I like what you’ve done with this snippet, bS. I’m probably going to drop support of my UserCommentDocs snippet in favor of using yours.

                Also, the delete buttons are not working for me. It submits the page, and when it comes back up, none of the comments are on the page anymore, almost like one button deleted all of the comments. But when I refresh the page again using the refresh button, the comments are back, including the one I tried to delete. I’m using Firefox 1.5.0.4 on Windows XP.
                  • 4195
                  • 398 Posts
                  Thanks for the suggestions! Edit function is on the list yes smiley

                  I’m currently rewriting most of the code (it is still based on the original UserComments snippet as you can see) and i’m replacing the templating/display logic with new code that supports the TBS plugin i wrote.



                    Armand Pondman
                    MODx Coding Team
                    :: Jot :: PHx
                    • 4195
                    • 398 Posts
                    You can check progress on:

                    http://www.zerobarrier.nl/sandbox/replix/

                    which runs the new development version
                      Armand Pondman
                      MODx Coding Team
                      :: Jot :: PHx
                      • 4195
                      • 398 Posts
                      *bump* 1.7.0 -> Major update

                      (@moderators: can this complete post be moved to the parent forum: Modules, Plugins & Snippets?)
                        Armand Pondman
                        MODx Coding Team
                        :: Jot :: PHx