We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13577
    • 302 Posts
    Rev 1624

    I find it a little confusing to have two each of "AjaxSearch" and "UltimateParent" snippets.

    Also: "FirstChildRedicrect" Should probably be "FirstChildRedirect"

    And another idea I had... would it be nice to create a category for snippets/chunks by default... something like "MODx installed" or something? So that the items that come with MODx are lumped together. I think that would be cool - but I wouldn’t set out to actually do it without other’s input.
      Standard Disclaimer
      I could be totally wrong.
      • 25663 MODX Staff
      • 12,272 Posts
      Jared, take a peek at the categorization and snippets at http://modx.it/... the demo content hasn’t been touched and will come from there. Let me know if you need a login (catch me on IM) smiley
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 6726
        • 7,075 Posts
        Quote from: rthrash at Oct 06, 2006, 09:11 AM
        It’s definitely a language issue and should be readily easy to resolve. I believe all the QuickEdit code should use the local language files in assets/modules/quick_edit/

        Is your french file there?

        Yes, as I said, it is there.

        Please bear in mind that as far as the "main" language file is concerned, I use the new english file from Paul and the new french file, and those don’t have quickedit strings.

        Hmmm, wait, I just checked the english file bundled with rev1624 and some qe strings are there... is it normal ?

        Quote from: rthrash
        I think all bets are off on the Firefox issues as that seems to be a rendering bug with their code. Try it in 1.5.0.7 or IE (or Safari or Opera) and you should see the right presentation. Let me know if this isn’t the case.

        No it’s not working with any browser, neither on my Mac with FF/Safari/Opera nor on my PC with IE/FF/Opera.
        Which means if it’s just me there is something in my MODx install which screws things up.

        I’ll try a new clean install from scratch to sort this out.
        If nobody has these problems, I’ll stop bug you with this and check things out one by one...
        Both install which exhibit this issue are 0.9.2.1 upgrades.

        But it’s not just my install, I mean the modx.it website exhibits the same quickedit issue I have here... huh
        (I know it’s a rev 1417, but for me QuickEdit worked better with earlier revs. I think it broke after upgrading to rev 1584 or something, not sure).

        I’d be curious to know if you experience the same problem @modx.it ?

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


          MODx est l'outil id
          • 25663 MODX Staff
          • 12,272 Posts
          I think it would be tremendously helpful to get http://modx.it upgraded to the latest SVN trunk 1624 rev. There are way too many core differences that may be clouding this QE issue. If there’s an issue with upgrades also we clearly need to address that. MODx.it definitely doesn’t work for QE.

          When you’re upgrading, are you uploading the updated modules/plugins from the assets folder?

          I’ve got a local (clean) install and have switched it to french and have no problems seeing the QE toolbar even in Safari with French translations. :/
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 6726
            • 7,075 Posts
            Thanks Ryan.

            Okay... well yes as you know I have done a boatload of upgrades, I did as usual : overwrite all existing files. Plus, as I said, I deleted and re-uploaded the quickedit module files (did not do the same with the plugin though, but I will).

            I’ll try a clean install and report, this thing is quite frustrating !

            NB: I have not yet provided the new french file, I am attaching it to check if it’s not what’s wreaking things havoc. Plus it’s now tested and corrected, it can be added to next rev.
              .: COO - Commerce Guys - Community Driven Innovation :.


              MODx est l'outil id
              • 25663 MODX Staff
              • 12,272 Posts
              Just added your French UTF8 file with no issues. QuickEdit works great. Ditto with the ISO-8859-1 (Western European) encoding. Speaking of which, which one should be distributed... I lean towards UTF-8 only.
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 6726
                • 7,075 Posts
                Well, I would have too, but it causes problems for MODx install previously encoded in Latin 1 (accented characters are turned into gibberish then...). And I am not sure how complex creating a Latin1 to utf8 converter would be. DotClear has one, I’ll give it a look.
                  .: COO - Commerce Guys - Community Driven Innovation :.


                  MODx est l'outil id
                  • 22815
                  • 1,097 Posts
                  Ooo. Given that you can change the encoding at any time in the admin config, it would probably be useful to have a "convert from one encoding to another" function that was fired off when that is changed. It sounds like a big job, but indeed one that is probably Already Out There in open-source land.

                  Actually this reminds me that I haven’t fathomed Chinese & Japanese yet...
                    No, I don't know what OpenGeek's saying half the time either.
                    MODx Documentation: The Wiki | My Wiki contributions | Main MODx Documentation
                    Forum: Where to post threads about add-ons | Forum Rules
                    Like MODx? donate (and/or share your resources)
                    Like me? See my Amazon wishlist
                    MODx "Most Promising CMS" - so appropriate!
                    • 6726
                    • 7,075 Posts
                    Here is DotClear’s tool to convert Latin1 to utf-8

                    Hope it helps...

                    Edit: Just added the lib.util file which does the actual work, namely util::latin1utf8 (check line 97 and below)


                    Might as well post the code :

                    	
                    	# Converti une chaîne Latin1 en UTF-8 et effectue la translation
                    	# des caractères litigieux.
                    	function latin1utf8($str)
                    	{
                    		$conv = array(
                    		chr(194).chr(128) => chr(226).chr(130).chr(172),
                    		chr(194).chr(130) => chr(226).chr(128).chr(154),
                    		chr(194).chr(131) => chr(198).chr(146),
                    		chr(194).chr(132) => chr(226).chr(128).chr(158),
                    		chr(194).chr(133) => chr(226).chr(128).chr(166),
                    		chr(194).chr(134) => chr(226).chr(128).chr(160),
                    		chr(194).chr(135) => chr(226).chr(128).chr(161),
                    		chr(194).chr(136) => chr(203).chr(134),
                    		chr(194).chr(137) => chr(226).chr(128).chr(176),
                    		chr(194).chr(138) => chr(197).chr(160),
                    		chr(194).chr(139) => chr(226).chr(128).chr(185),
                    		chr(194).chr(140) => chr(197).chr(146),
                    		chr(194).chr(145) => chr(226).chr(128).chr(152),
                    		chr(194).chr(146) => chr(226).chr(128).chr(153),
                    		chr(194).chr(147) => chr(226).chr(128).chr(156),
                    		chr(194).chr(148) => chr(226).chr(128).chr(157),
                    		chr(194).chr(149) => chr(226).chr(128).chr(162),
                    		chr(194).chr(150) => chr(226).chr(128).chr(147),
                    		chr(194).chr(151) => chr(226).chr(128).chr(148),
                    		chr(194).chr(152) => chr(203).chr(156),
                    		chr(194).chr(153) => chr(226).chr(132).chr(162),
                    		chr(194).chr(154) => chr(197).chr(161),
                    		chr(194).chr(155) => chr(226).chr(128).chr(186),
                    		chr(194).chr(156) => chr(197).chr(147),
                    		chr(194).chr(159) => chr(197).chr(184)
                    		);
                    		
                    		$str = utf8_encode($str);
                    		
                    		return str_replace(array_keys($conv),array_values($conv),$str);
                    	}
                    	
                    	/**
                    	Reconnait une chaîne en UTF-8
                    	Taken from http://www.php.net/manual/fr/function.mb-detect-encoding.php#50087
                    	*/
                    	function isUTF8($string)
                    	{
                    		if (preg_match('%^(?:[\x09\x0A\x0D\x20-\x7E])*$%xs',$string))
                    		{
                    			return false;
                    		}
                    		else
                    		{
                    			// From http://w3.org/International/questions/qa-forms-utf-8.html
                    			return preg_match('%^(?:
                    				  [\x09\x0A\x0D\x20-\x7E]			# ASCII
                    				| [\xC2-\xDF][\x80-\xBF]				# non-overlong 2-byte
                    				| \xE0[\xA0-\xBF][\x80-\xBF]			# excluding overlongs
                    				| [\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}	# straight 3-byte
                    				| \xED[\x80-\x9F][\x80-\xBF]			# excluding surrogates
                    				| \xF0[\x90-\xBF][\x80-\xBF]{2}		# planes 1-3
                    				| [\xF1-\xF3][\x80-\xBF]{3}			# planes 4-15
                    				| \xF4[\x80-\x8F][\x80-\xBF]{2}		# plane 16
                    			)*$%xs', $string);
                    		}
                    	}
                    	
                    	/**
                    	Encodage d'une chaine en mime Quoted printable
                    	*/
                    	function mimeEncode($s,$charset='UTF-8')
                    	{
                    		$s = preg_replace('/([^\x21-\x3c\x3e-\x7e])/e','"=".strtoupper(dechex(ord("\1")))',$s);
                    		
                    		return '=?'.$charset.'?Q?'.$s.'?=';
                    	}
                    }
                      .: COO - Commerce Guys - Community Driven Innovation :.


                      MODx est l'outil id
                      • 13577
                      • 302 Posts
                      Another odd language thing (rev 1624) as noted in Flyspray 552

                      Strange thing happened. I added another manager user. But he complained that when he logged in, his language was foreign. English wasn’t default. Turns out he was getting Japanese.

                      A short while later, I changed my own manager settings to use a new theme (that’s the ONLY thing I changed). When I logged back in, MY language was Japanese.

                      For usability’s sake, English should be the default and at the top of the list (since most of users are English speaking).

                      Is this happening for anyone else?
                        Standard Disclaimer
                        I could be totally wrong.

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