Jump to content

jacmaes

Members
  • Posts

    293
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by jacmaes

  1. Another small issue when editing fields. There's an overlap:
  2. There are numerous examples in the forum. Here's one here: http://processwire.com/talk/topic/2533-first-site-first-problem/page-2
  3. I've been using this wonderful theme for a few days, and I've run into one minor issue: the date/time picker needs some restyling as the buttons and sliders are invisible. Here's a screenshot comparing the picker with the default admin theme and this theme:
  4. Thanks Pete and Marty. I've used Categorizr before, and the mobile detection and redirection is rather easy. I'm still unclear about the redirection from the subdomain to the main domain and the integration with my current (desktop-only) templates. I understand it would work this way: A mobile user comes to domain.com. I detect it as a mobile user and send him or her to m.domain.com, which is an empty subdomain that somehow points to domain.com. My templates on domain.com detect if the user comes from the subdomain. As Ryan points out above, I could include mobile-specific files within my current templates with the following code: if($config->httpHost == 'm.domain.com') ... At this point, I'm assuming that the URLs the mobile user would see would be http://m.domain.com/page1/, http://m.domain.com/page2/, etc. as is common practice. Am I understanding it right? If so, how would you achieve the redirection from the subdomain to the main domain so that the subdomain remains empty and I don't have to basically duplicate my templates?
  5. I'm trying to figure out how to best add a mobile version to an existing PW site and found this thread. The option that Ryan mentions in his first post seems like a great solution since it doesn't seem to require duplicating all templates, but I'm not sure I understand it fully. First of all, could you elaborate on your first point --"Another possible approach would be to point m.domain.com to just domain.com"? How would you achieve this? Adding a redirect in the .htaccess file, or using a session redirect in an otherwise blank bootstrapped file in the subdomain? Then does this mean also that the subdomain is basically empty since all requests to it are forwarded to the main domain? Thanks for clarifying this.
  6. I think CloudFlare would be a perfect fit for your needs: it is both a cheap (the free version is very, very good) CDN and a formidable ally against all kinds of attacks: https://www.cloudflare.com/ In their blog, they've mentioned many times how they've protected political organisations against attacks. And it looks like Wikileaks has been able to avoid massive DoS attacks thanks to CloudFlare.
  7. You might want to take a look at the site-wide file manager module: http://modules.processwire.com/modules/manage-files/
  8. Great tip, Soma! I just tried with Colorbox and it works a treat, especially with the "&modal=1" trick that I wasn't aware of.
  9. According to the developers, they're using breakpoints.js to load in additional content dynamically depending on screen size: https://mobile.twitter.com/murtaugh/status/275643312877207552 http://xoxco.com/projects/code/breakpoints/ It does look great and loads fast. It's responsive in every way.
  10. Soma, I probably need to mess with the quality settings some more to see if I can achieve better results out of the box without generating unnecessarily large files, which would slow the site down. That said, as you mentioned, all is fine if you have images that are reasonable large enough to start with. If I edit the site myself, that's doable. I can look for artwork with good resolution and size, or request them from my client. But if it's my client who is in charge of updating the content, they often don't have the resources, time, interest or access to good resolution pics. Let me give you an example. I'm finishing a template for an events website that might be used in more than 50 different countries if approved. Each event would have a thumbnail, a larger pic, and an even larger pic (650px x 300px) if this is to be a featured event. The thumbnails usually look sharp enough, but I'm running into problems at larger sizes, especially if the size of the original image is close to the cropped one (let's say 800px x 600px for a featured event), as is to be expected in a real-case scenario since the images would come from various institutions who I know from experience don't care about image quality or size. If the quality is bad to start with, then there's not much that can be done. But I do think a sharpening option would make a difference in most (of my) cases. Let me reiterate that most users would not see much of a difference, and that it's just a minor nuisance for me. But since this is a wishlist thread, I thought I'd mention it.
  11. In my humble opinion, Pixlr serves a specific purpose: it's probably very useful for occasional image adjustments, and apparently is quite powerful. And I see a couple of major problems with it: It's Flash-based, so it's obviously not a future-friendly solution. Flash is dying on mobile devices since Adobe officially killed it (it never really was an option anyway). Who cares, you might say? Who would want to edit images on a mobile device from a PW admin? Well, I already have a couple of clients who are literally in the "post-PC era": they do all their work on tablets. Don't ask them to edit their sites on their laptops or desktops: they don't have one anymore. Most of us might think this is a strange idea to edit a PW site on a mobile device, but this is already happening, and whether we like it or not, it's very likely to become the norm within a few years. I can't just ask my clients on high-traffic websites to open an image-editing module dozens of times each day and hunt for the sharpening tool each and every time that they upload a new picture. They wouldn't do it, and I wouldn't blame them. I wouldn't want them to mess with the other filters either ("I put it all my pictures in sepia because they look prettier that way"). Image sharpening is the only nagging "issue" I have with PW for all the image-heavy sites that I'm developing. Admittedly, most users wouldn't notice that pictures are slightly blurry. But I do, and it bothers me. I want my sites to look as good as I can make them to be, not just acceptable. I'm sure most of you share that philosophy. I can get around the problem by enforcing crops in apeisa's excellent module at a larger size than required and then shrinking the image in my HTML or CSS, but it's not a good solution. It seems to me that image sharpening should be a configurable option globally (whether as a module or included in the core), just like image quality now is.
  12. Ryan, it would be great to have also a sharpening option. I find that rescaled images commonly come out slightly blurry. PhpThumb uses this script to sharpen thumbnails: http://vikjavev.no/computing/ump.php Would that be something you'd consider?
  13. Diogo. That's right, you're from Portugal It should be launched at the end of next week. I'll keep you posted.
  14. Thanks, WillyC. Thanks to you, I realized that I forgot to change the permissions in the parent template for the categories. Everything's perfect now.
  15. I'm confused by how PW handles user permissions. I have created a user role of editor with the following permissions: edit, view and update profile. This is an events website where the editor should be able to add and edit events and cities, but not other pages such as categories that are set once and for all. This is my page tree for the editor: There are a few problems here: The editor should not be able to create new categories ("categorías") The editor should not be able to create other pages at the top level, i.e. there should be no "new" next to "Inicio" The "edit" and "view" permissions are all fine. For example, they should only be able to view the categories, and it works as expected. But it's the page creation permissions that I do not understand. This is the access tab in my "categories" template: In this setup, the editor should not be able to create pages, but it seems to apply only to the children of that template. If I undertand correctly, the page permissions are inherited from the home template, and for the editor to be able to create new events and add cities, I had to tick all the checkboxes (view, edit, create and add children) in the home template for the editor: What am I doing wrong here? Or is this kind of fine-grained control not possible currently with PW?
  16. This php code to retrieve your latest tweets has been updated to use RSS, and it still works for me: http://f6design.com/journal/2010/10/07/display-recent-twitter-tweets-using-php/ This might be useful for those who want to update the module.
  17. Thanks for the clarification. Even shorter that way! Would it work the same for "today" then? Also, now that I'm reading your code again, I'm not sure I understand date_start<=tomorrow +1 day Finally, In my current setup, one-day events do not have an end date, .i.e. I specify a start date but leave the date_end field blank. Would I need to do it anyway with the proposed code? I'm probably making things overly complex. Dates are confusing.
  18. Thanks a million, Ryan. It's the AND - OR that that I didn't know how to reproduce with the API. As usual, it's concise and intuitive. I can't conceive starting a project without PW now!
  19. I'd like to convert an existing Website of mine (that does not use a CMS) to PW to be able to update it easily. Problem is, I don't know how to deal with more complex queries such as this one: <? $tomorrow = date('Y-m-d',mktime(0,0,0,date('m'), date('d')+1, date('Y'))); // Tomorrow's events $query_tomorrow = "SELECT id, city, event, category, description, DATE_FORMAT(date_start,'%M %D') as datestart, DATE_FORMAT(date_end,'%M %D') as dateend FROM events WHERE disabled != '1' AND ( (date_start = '$tomorrow') OR (date_start <= '$tomorrow' AND date_end >= '$tomorrow') ) ORDER BY date_start DESC"; ?> I want to show tomorrow's events, so I'm selecting all events that I marked as active (disabled != '1', because they have not been cancelled for example) and that are either: 1. ongoing but will not end today, 2. or will start tomorrow. How would I achieve the exact same query with PW? Thanks in advance.
  20. Michael, are you talking about minifying or compressing? I can confirm that the HTML output (along with my js, css, and svg files) from PW is correctly compressed with the following line in my .htaccess, which is basically a shorter version of the code from HTML5 boilerplate quoted above: <FilesMatch "\.(js|css|html|htm|php|svg)$"> SetOutputFilter DEFLATE </FilesMatch> The issue might be with your server then. You can double-check what's gzipped here: http://gzipwtf.com/
  21. OK, everything's magically working fine today. It emptied my browser's cache, and that seems to have solved the problem. Thanks to everyone who helped out.
×
×
  • Create New...