Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by jacmaes

  1. I added the two required .js language files for CodeMagic to work. It did work prior to upgrading the latest version.
  2. @apeisa: The jQuery Core is 1.6.2, and jQuery UI is 1.8.14. @soma: No, I'm not using that module as far as I'm aware. The only thing that I've not updated as recommended is the .htaccess file, but I don't think that's related. Everything else in TinyMCE is working fine, except that new fields that I created after updating do not seem to register CodeMagic. And I might be using the dev branch without realizing. I clicked on the "Download .zip" button on the following page: https://github.com/ryancramerdesign/ProcessWire/archives/master
  3. Nope, no third party module installed. I just have a multi-language setup (spanish by default + english) and I'm using CodeMagic. The rest is pretty much the default setup. The error in Chrome's Web Inspector seems to refer to line 17 of JqueryCore.js (JqueryCore.js:17)
  4. I've just upgraded to the latest version of PW (from 2.2.3). Now I'm getting the following error whenever I try to insert a link to another page from TinyMCE: Error Call to undefined method stdClass::attr() (line 56 of ....../public_html/wire/modules/Process/ProcessPageEditLink/ProcessPageEditLink.module) In the Console Tab of Chrome's Web Inspector, there's the following error: "Failed to load resource: the server responded with a status of 500 (Internal Server Error) ..../processwire/page/link/?id=1176&modal=1"
  5. Thanks, Nik! I wasn't sure on the syntax. As usual, it's easier than anticipated.
  6. In the "search.php" template that comes with the download of PW, this line allows you to search for "title", "body" and "sidebar" fields: $matches = $pages->find("title|body|sidebar~=$q, limit=50"); But how do you search for content inside a repeater field? Thanks.
  7. Thanks, slkwrm. It seems, then, that much of the work has to be done through the API, and that the use of the standard backend for regular users is pretty much out of question. I'm not too worried about that since there an administrador would review all posts before they are actually published on the site.
  8. I've been asked to consider the viability of the following project: a sort of collaborative blog where any Spanish expat could register and post small articles, videos and photos about their experiences as Spaniards living in the U.S. The trick here is that users should only have the options to view and edit their own posts, and should not have access to the posts of anyone else. I'm guessing then that the traditional user roles and permissions (user, editor, administrator...) do not apply here. It must be the summer heat, but I can't think how to achieve this with Processwire. Any thoughts? As usual with PW, it must be easier than I think.
  9. Soma, Pete, I stand corrected In any case, it's clear that Cufón is not a good option anymore now that @font-face support is broad enough. Apart from the inability to select text, enlarge it without pixelating, Cufón is slow to render and routinely suffers from FOUT (Flash of Unstyled Content) without resorting to hacks.
  10. Two useful bookmarklets for testing responsive designs: http://responsive.victorcoulon.fr/ http://www.benjaminkeen.com/open-source-projects/smaller-projects/responsive-design-bookmarklet/
  11. One small correction: Cufón does not generate PNG images. It generates canvas text. This is the code Cufón outputs for <h1>Find a degree in Spain</h1> <h1><cufon class="cufon cufon-canvas" alt="Find " style="width: 47px; height: 19px; "><canvas width="60" height="20" style="width: 60px; height: 20px; top: 0px; left: -1px; "></canvas><cufontext>Find </cufontext></cufon><cufon class="cufon cufon-canvas" alt="a " style="width: 18px; height: 19px; "><canvas width="31" height="20" style="width: 31px; height: 20px; top: 0px; left: -1px; "></canvas><cufontext>a </cufontext></cufon><cufon class="cufon cufon-canvas" alt="degree " style="width: 74px; height: 19px; "><canvas width="87" height="20" style="width: 87px; height: 20px; top: 0px; left: -1px; "></canvas><cufontext>degree </cufontext></cufon><cufon class="cufon cufon-canvas" alt="in " style="width: 24px; height: 19px; "><canvas width="37" height="20" style="width: 37px; height: 20px; top: 0px; left: -1px; "></canvas><cufontext>in </cufontext></cufon><cufon class="cufon cufon-canvas" alt="Spain" style="width: 53px; height: 19px; "><canvas width="58" height="20" style="width: 58px; height: 20px; top: 0px; left: -1px; "></canvas><cufontext>Spain</cufontext></cufon></h1> For use of ease, I suggest using Google Web fonts which are super easy to implement: http://www.google.com/webfonts/
  12. Akamai's brand new tool is very useful to test the performance of your website on a mobile device: http://mobitest.akamai.com/
  13. I started building responsive sites more than a year ago, and like everyone else I quickly realized that the weakness of that new method / philosophy is serving the same image to all devices, from mobile to desktop. Matt Wilcox's Adaptive Images (server-side resizing) works great, but like JeffS above, I'm interested in optimizing content for device groups, i.e. content optimized for mobiles, tablets, desktop and even smart TVs. I've come to the conclusion that to do this efficiently, device detection has to be done on the server. There's even a buzzword for this new technique: RESS, or Responsive Design + Server Side Components as coined by Luke Wroblewski. WURLF is the most famous device detection database, and there are some good tutorials to get you started such as NetMagazine's, but it seems to me way too complicated for simple projects, and WURLF has turned into a commercial project anyway. I've been looking at two recent projects that seem very promising: Detector Categorizr Categorizr is by far the simpler approach, and I like how it turns the traditional and much-decried User-Agent sniffing on its head: it assumes that whatever is not detected as desktop and TV (which are relatively easy and safe to detect) is a mobile device. In other words, it's a mobile-first based device detection. Clever. Here's a test page I created using Categorizr and that you can check on your mobile, tablet, or computer that will show different content according to the device used (disclaimer: not fully tested): http://www.arqyestud.../categorizr.php Combining this server-side detection technique with the versatility and power of PW could make for very powerful and easily-maintainable 'hybrid' responsive sites. What do you guys think?
  14. I second Jeff's opinion of CloudFlare. I've been using the free version for a couple of months on 3 different websites, and the bandwidth saving + speed improvements do make a difference. Threat protection is a nice bonus too, and seems to work really well according to the statistics they provide. The $20-a-month pro version is tempting as it adds SSL encryption and two brand-new server-side image optimization services: what they call Mirage and Polish. Polish "applies 'lossless' or 'lossy' image optimization to reduce your image sizes by 35% on average". That's nice, but a program like ImageOptim does the same thing: http://imageoptim.com/ What really looks amazing is Mirage which "automatically resizes images for optimal display based on the screen size of your visitors' device." I haven't tried since I'm on a free plan, but that kind of server-side automatic resizing looks like the perfect solution to optimize loading time on mobile / responsive sites.
  15. Thanks a million, Soma. Your code fix did work. I think this should be fixed on the instructions page mentioned above. I have developing another bilingual site, and the module you suggested looks like a perfect fit. I'll let you know if I run into any issue.
  16. I've been trying to set up a bilingual site with Spanish as the default language, and English as the second choice. I've chosen the third option --"Example 3: Display a different language based on URL pre-segment"-- on the page: http://processwire.c...anguage-fields/ I've placed the following code in the "language-gateway.php" as indicated (I think) in the tutorial: <? $user->language = $languages->get($page->name); $path = '/'; foreach($input->urlSegments as $segment) { $path .= $segment . '/'; } $mypage = $pages->get($path); if(!$mypage->id || !$mypage->viewable()) throw new Wire404Exception(); // echo $mypage->render(); // the line above is commented out to avoid a "rendering" the page twice $out = $mypage->render(); $regex = '{(<a [^>]*href=["\']/)(["\']'; $topnav = $page->parent->children(); foreach($topnav as $p) $regex .= "|" . $p->name; $regex .= ")}"; $out = preg_replace($regex, '$1' . $page->name . '$2', $out); echo $out; ?> Everything works great, except that the regular expression does not seem to work. My links in the English version (which again is NOT the default option in my setup) are outputted as "domain.com/enabout/" for the About page in the default PW template instead of "domain.com/en/about/". Notice that there's a trailing slash missing after "en". What am I doing wrong? Any help would be greatly appreciated.
  17. That makes more sense this way. Thanks Soma.
  18. Man, that was so obvious, I feel like a fool. Thanks, apeisa. As always, PW is simpler than you'll assume it is.
  19. But how do you change the default language from English to another language? I'm building a site that has to be in Spanish by default (English would be the second choice). It's probably simple, but I'm stuck. I've managed to get the correct language based on URL pre-segments (i.e. domain.com/es/ displays the site in Spanish and domain.com/en/ in English), but how can I display domain.com in Spanish by default? Thanks
  20. Here's my first draft for the Spanish translation. Please note that: It's fairly complete, but not quite ready for production. Spanish is not my mother tongue (I'm French), but I've been living in Spain for 10 years so it should be acceptable. Contributions and suggestions are welcome. I will post updates as necessary. This is Spanish for Spain. Some parts of the translations might not be appropriate in South American countries for example. In particular, I've used the less formal, more direct version of "you": "tú" as opposed to "usted", which is much more common in Spain. I love ProcessWire and I'm glad I can contribute to this awesome project. UPDATES: December 10, 2013: Translation files updated for dev version 2.3.8 (see "spanish-spain-december2013.zip" below) March 4, 2014: I've created a Github repository that I plan to update whenever possible. All updates will be posted there from now on. June 16, 2014. Update to 2.4.4. spanish-spain.zip spanish-spain-december2013.zip
  21. Would love to take a look at it too and pick it apart to learn more
  • Create New...