Jump to content

Alessio Dal Bianco

  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by Alessio Dal Bianco

  1. Hi folks! tonight i searched a tool for create an UML directly from the source code of PW. The result is a 9MB of PNG Enjoy it http://zoom.it/hT0q
  2. Hi Soma! yes, i'm currently maintaining this Language Pack, not so frequently but i am on it. If it needs some other translation i can help willingly I will work on Comments module and the error messages. @italians If some other want to contribute please contact me on pm.
  3. Thank you all for appreciation! @3fingers You are right. Maybe when i will work on the mobile version i will insert the "LanguageSupportPageNames" module. For now i'm using this in header: <link rel="alternate" hreflang="x-default" href="<?php echo $page->httpUrl ?>" /> <link rel="alternate" hreflang="en" href="<?php echo $page->httpUrl ?>?lang=english" /> <link rel="alternate" hreflang="it_IT" href="<?php echo $page->httpUrl ?>?lang=default" />
  4. I all, i have update the module. Some fixes for repeater fields plus the addition of Diderik (Thank you!) ADB
  5. I know this line very better but in this case i removed it, since this site (for now) is only for desktops. In fact apeisa with his android (also on my iphone) was unusable, the page is 960px wide and the device 480px (more or less), and the metatag force the whole page to have the device width; the result is that the page was cut.
  6. The mobile version is a "coming soon". But i can remove the metatag viewport that in this situation is useless :/
  7. I used this one: http://caroufredsel.dev7studios.com/ It have a lot of features!
  8. Hello everyone! I launched yesterday another PW site: http://compab.it The modules that i have used are: • Site wide file manager. • CKeditor • Language Field Tabs • Modules Manager • Site indexer • Ergo ADMIN THEME Enjoy!
  9. Hi all! i have noticed that if enable the cache (for example on homepage), if I switch language the page is always the same, so i imagine that cache file is the same for any language. I wonder if there is any option that can save one cache file for each language. Alessio
  10. Hi jdiderick, Thank you for the addition! I will release a new version soon with your code and some other improvements. ADB
  11. Hi all, i have some problems when trying to add more pages with asmSelect. I have a field called "categorie" that contains an array of pages ( imagine the behavior of categories ). If i try to add one page from that field all works fine, if i try to add more than one page i get this error: I found that "1007" is the id of the default language. Maybe could be useful for reproduce this error. The field config is like this: There is something that i am missing ?
  12. Hi doolak, i've tested it and works fine. But i don't know if there are drawbacks since this function return a string instead of float, and is "hookable" by other modules.
  13. Hello haha, one question: Have you reinstalled processwire and after transferred the templates + database ? The password are "salted" with a key defined in /site/config.php. This key must be the same as previous installation, if not you cannot login. /** * Installer: User Authentication Salt * * Must be retained if you migrate your site from one server to another * */ $config->userAuthSalt = '[alphanumeric string]';
  14. What about to use "number_format" in FieldtypeFloat.module ? It should be reliable because it is language independed and (maybe) when the queries are constructed all the values are treated as strings, so you dont'need to have a "float" value anymore. public function ___sleepValue(Page $page, Field $field, $value) { // Field converted in string with number format. $value = number_format($value, $field->precision, ".",""); return $value; } FieldtypeFloat.module
  15. Hi Manol, if you want to get by an ajax call your URL you must set the header "Access-Control-Allow-Origin: *" where the "*" can be one or more domains; the asterisk says: "Anyone can access to this URL by an ajax call". Not sure if the module Pages Web Service has an option to set that HTTP header. Alessio
  16. Hi all, New changes / features under the hood, check it out! http://modules.processwire.com/modules/indexer/
  17. Hi marco, i'm working on a new version because i'm facing your same problem. It will be released soon!
  18. my fault. Also slice works as expected, because when i was trying there was another same filter below for other meta tags! Thank you diogo!
  19. Hi all, i found a problem regarding filtering items. For example i limit the number of images (4) in this way: <?php if( count($page->images) ) foreach( $page->images->filter("limit=4") as $seoImg ): ?> <meta property="og:image" content="<?php echo "http://".$config->httpHost.$seoImg->size(300,300)->url ?>" /> <?php endforeach; ?> More later in the template i create the main gallery with ALL images (about 10 images): <?php foreach( $page->images as $img ): ?> <li> <div class="text" style="background-image:url(<?php echo $img->width(80)->url ?>)"> <?php echo $img->description; ?> </div> </li> <?php endforeach; ?> But when i call "$page->images" it returns me only 4 items, same behavior with "slice(0,4)". I've tried also with "$page->get('images')" with the hope that in this way i can override the filter... But nothing, it seems that the results of filters override the original results in the property.
  20. I all, @italians Referring to the translation of "Template" i propose to change it in favor of "Tipo di contenuto", because for developers (even non-english one) know the meaning of that word, but the client obviously not. Let me know if this update can be useful. @ryan It seems that some texts are not translatable... Here there are some examples.
  21. Ok Guys, we are online! http://it.processwire.com
  22. I've tried with your patch but it seems that when you make the (float) cast the "," returns public function ___sleepValue(Page $page, Field $field, $value) { $this->message("pre fix - ".$value); // print : 84,3 // handle potential issue with other locales if(strpos($value, ',') !== false) $value = str_replace(',', '.', $value); $this->message("after fix - ".$value); // print : 84.3 $value = (float) $value; $this->message("after cast - ".$value); // print again : 84,3 return $value; } Another solution seems to add "setlocale(LC_NUMERIC, 'en_US');" in LanguageSupport.module: wire('config')->dateFormat = $this->_('Y-m-d H:i:s'); // Sortable date format used in the admin $locale = $this->_('C'); // Value to pass to PHP's setlocale(LC_ALL, 'value') function when initializing this language // Default is 'C'. Specify '0' to skip the setlocale() call (and carry on system default). if($locale != '0') setlocale(LC_ALL, $locale); // Fix for float number with incorrect decimal separator. setlocale(LC_NUMERIC, 'en_US'); Not sure if is the correct way to avoid this problems...
  23. Hi all, I have experienced some weird problems when using the Float field combined with the translation of setlocale() arguments. It seems that with specific setlocale() (in my case setlocale('it_IT')) leads to transform the decimal separator from "."to "," (for example "2.566" is transformed to "2,566") so all queries contains a "," and mysql stores only the integer part (without any errors). Good query: INSERT INTO `field_testfloat` (pages_id, data) VALUES('1024', '24.534') ON DUPLICATE KEY UPDATE data=VALUES(data) Bad query: INSERT INTO `field_testfloat` (pages_id, data) VALUES('1024', '24,534') ON DUPLICATE KEY UPDATE data=VALUES(data) The naive solution is to leave blank setlocale(), but i wonder if it is possibile to correct this behaviour.
  • Create New...