We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4195
    • 398 Posts
    Quote from: JeremyL at Sep 29, 2006, 12:54 AM

    is there a way to add this to all blog posts without actually having to put the snippet in each post? I want my authors to only worry about content. not snippets needing to be added.

    put the call in the blog template, and use that template for each blog post laugh
      Armand Pondman
      MODx Coding Team
      :: Jot :: PHx
      • 19726
      • 239 Posts
      Quote from: PaulGregory at Sep 28, 2006, 05:39 PM

      Mitch, could you share your badwords list?
      Of course, here it is.
      viagra,adobe,href=,[URL,buy
      It seems that only 1 or 2 bots were spamming my guestbook with the same method over and over again, so the list is pretty short. Do note that my site only has Dutch speaking visitors, so it was no problem for me to put "buy" on the bad words list.
        • 6778
        • 20 Posts
        There seems to be a problem when installing on MySQL 4.0 server.
        Got this message:
        « Execution of a query to the database failed - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ’collate latin1_general_ci NOT NULL, `userid` mediumint(10) NO »
        SQL: CREATE TABLE `modx_jot_subscriptions` ( `id` mediumint(10) NOT NULL auto_increment, `uparent` mediumint(10) NOT NULL, `tagid` varchar(50) collate latin1_general_ci NOT NULL, `userid` mediumint(10) NOT NULL, PRIMARY KEY (`id`), KEY `uparent` (`uparent`), KEY `tagid` (`tagid`), KEY `userid` (`userid`) ) TYPE=MyISAM

        I removed the "collate latin1_general_ci " and created the table manually (with phpMyAdmin).
          • 4195
          • 398 Posts
          The auto-installer feature is a known issue, and the only thing that causes the release to be named BETA .
          I will alter the SQL to be as generic as possible and I also need a good way to check if the tables exist without throwing any errors.
          I’ve looked at the way the MODx installer handles this thing but i’m still not happy about it.

          Jot Beta 4 is available!
          I added the badwords functionality, for usage documentation check the release notes. grin

            Armand Pondman
            MODx Coding Team
            :: Jot :: PHx
          • I use code like this:
            $sql = "SHOW TABLES LIKE 'mytable'";
            $rs = $modx->db->query($sql);
            $count = $modx->db->getRecordCount($rs);

            and create the table/tables if $count is 0, or put up a page indicating that the table/s don’t exist with a form with a button to let the user decide to create the tables or not. I use this for modules, to let the user decide to generate the tables at that point or not.
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 31037
              • 358 Posts
              Wow, this is really a great snippet! It is the first add-on to MODx that I installed and configured without *any* problems! It took me less than 3 hours to make it work the way I want, including translating it and add it as template chunks.

              Before MODx I was using Mambo, and setting up a commenting system there took me over a week, and it didn’t work at all as good as Jot.

              Only thing that worries me is what happens when a newer version get released, as there isn’t separate language files.

              Another great feature would be a "report to moderator" function. Also if it was possible for a moderator to see all comments in one place for keeping bad comments out it would be great.

              Now I’ll try to find out how to get comments count into Ditto, then I’m done.

              Thanks for this wounderfull add-on! smiley
                • 6778
                • 20 Posts
                There is a problem with publishing comments in Beta 4. When I publish a comment all custom fields are deleted.

                I changed in data.db.class.inc.php line 60
                $this->custom = new CJotFields($row["customfields"],"");
                into
                $this->custom = new CJotFields($this->fields["customfields"],"");

                and now it works.
                  • 4195
                  • 398 Posts
                  Quote from: dazze at Oct 01, 2006, 07:25 PM

                  There is a problem with publishing comments in Beta 4. When I publish a comment all custom fields are deleted.

                  I changed in data.db.class.inc.php line 60
                  $this->custom = new CJotFields($row["customfields"],"");
                  into
                  $this->custom = new CJotFields($this->fields["customfields"],"");

                  and now it works.

                  I will include the fix for BETA 5.. thanks for pointing this out smiley
                    Armand Pondman
                    MODx Coding Team
                    :: Jot :: PHx
                    • 6778
                    • 20 Posts
                    If no custom fields in the database the following error occures when unpublishing an comment:

                    Error: Invalid argument supplied for foreach()
                      Error type/ Nr.: 	Warning - 2	 
                      File: 	/.../assets/snippets/jot/custom.class.inc.php	 
                      Line: 	44	 
                      Line 44 source: 	foreach($this->nodes as $n=>$v) { $xml[] = "<".$n.">".htmlspecialchars($v)."</".$n.">";} 	



                    I fixed this with :

                    if(is_array($this->nodes)) {
                    	foreach($this->nodes as $n=>$v) { $xml[] = "<".$n.">".htmlspecialchars($v)."</".$n.">";}
                    }

                      • 4195
                      • 398 Posts
                      Jot Beta 6 is now available!

                      - Fixed issue with autoinstaller
                      - Include bugfix supplied by Dazze

                      also check out the new demo site at: http://projects.zerobarrier.nl/modx/

                      Quote from: Uncle68 at Oct 01, 2006, 04:46 PM

                      Only thing that worries me is what happens when a newer version get released, as there isn’t separate language files.

                      Can you explain this a bit more detailed?
                      I didn’t include language files cause all of the text used is in the template itself and not in the code.

                      Quote from: Uncle68 at Oct 01, 2006, 04:46 PM

                      Now I’ll try to find out how to get comments count into Ditto, then I’m done.

                      Place [!Jot?&docid=`[+id+]`&action=`count-comments`!] in the Ditto template (summary).
                        Armand Pondman
                        MODx Coding Team
                        :: Jot :: PHx

                      This discussion is closed to further replies. Keep calm and carry on.