Jump to content

evanmcd

Members
  • Posts

    117
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    Boston, MA, USA

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

evanmcd's Achievements

Sr. Member

Sr. Member (5/6)

64

Reputation

  1. Great module. Thanks @matjaz! Looks like https://resmush.it/ is down. Anyone know if the service is still running? I'm thinking it would be good to swap out resmush.it for ShortPixel or TinyPNG as the external service. I'll fork and submit a pull request if I end up tackling that. Anyone else working on image optimization modules like this?
  2. Hi all, I've not been able to upload SVGs into a regular image field, with SVG added in the Valid File Extensions field. The error I'm getting is: Error: Call to undefined function ProcessWire\simplexml_load_string() (line 234 of /var/www/hosts/our_website/Develop/Source/wire/core/Pageimage.php) I tried the ImageRasterizer module, but that didn't fix it. Is there a workaround for folks that don't have the simplexml module installed?
  3. Hi, I'm in the process of moving over some Blogger blogs into ProcessWire. We want the URL format to match what was in place previously, so blogname.com/blog-post-slug/ which would be fine if we just created the posts at the root of the site. The issue is the fact that we have more than 500 posts, which we've setup in a /blog/ folder so as not to clutter the root of the site with a list of posts. I saw this mentioned in another post, but @ryan was not "not confident that PW will be totally happy with it". RewriteRule ^$ /subfolder [L] Is there a ProcessWire core team sanctioned way to rewrite all /subfolder/ URLs to the root? Thanks!
  4. Oh no problem at all @ottogal. Just tried moving the appended region code above my top.php and it worked as @Robin S predicted. Not sure why I didn't just try that before In any case, thanks for the help. I see myself using markup regions with all my sites going forward. So much cleaner that other methods.
  5. Ahhh, sorry, didn't see @Robin Ss post until after I replied. I'll give that a shot. Thanks for the tip.
  6. @ottogal, yes but isn't that the syntax for using markup regions? The 2nd head tag should be removed by PW prior to rendering as I understand it.
  7. Hi all, Just found my first use case for new Markup Regions (at least I think that's what they're being called) feature. Unfortunately, I haven't been able to get it working. I'm using 3.0.57 and have added the $config->useMarkupRegions = true; line to my config file. Next, I put the id in my head tag like so: <html lang="en"> <head id="html-head"> Then the markup in the template file (the head tag is in top.php): <?php include("inc/top.php"); ?> <head id="html-head" class="pw-append"> <link rel="stylesheet" type="text/css" href="/site/templates/css/calculator.css"> </head> When I reload the page that uses the above template, I get that unprocessed code output right after the output of my top.php file - in other words exactly what would happen if there were no such thing as Markup Regions. Am I missing something? I've read through the post here, and I seem to be doing everything needed. Thanks for any help.
  8. I was just going to try this out to setup a test case for a couple core edge-case bugs I want to submit patches for, but I wasn't able to create a site with a new profile, and now even the home page is throwing a 500 error. Hope it comes back up soon - it's a great service for cases just like this.
  9. I'd like to rename Pages to something else and thought I read about a way to do it, but alas I can't find it anywhere on the forum (it's kind of a tough thing to find given that 'change' 'admin' 'pages', etc all have some many other meanings). Of course, I tried doing it right in the Page Tree itself, but the admin pages (once unlocked) throw errors that I didn't quite know what to do with. Thanks to anyone who can point me in the right direction.
  10. This is fantastic Martijn, thanks so much for creating it. Just set it up for exactly the purpose you mention - creating an html email based on content coming from PW. Well done!
  11. Hi, this has been a favorite module of mine, but I'm finding that it doesn't work with v2.5 (specifically 2.5.3). I get this error when loading /setup/selector-test/: Error: Call to a member function getArray() on a non-object (line 700 of /Develop/Source/site/modules/ProcessSelectorTest/ProcessSelectorTest.module) Is there another way to do this using Lister that I don't know about? Thanks.
  12. Thanks Martijn for the great guide. Just wanted to point out that me and my team have used VirtualHostX for years to make managing multiple local hosts easier. It's a bit pricey, but if you work with a lot of local sites it's a huge time saver. https://clickontyler.com/virtualhostx/
  13. Thanks for the responses everyone. Perhaps I wasn't clear enough in my question. Following the server-side detection, I'm redirecting mobile users to an entirely different page. It's not a responsive page for which we are changing the display or structure of the same content on a single page. After thinking about it for a bit, I will say that easy server-side caching is now another pro for a responsive design, but for now the desktop and mobile experiences are different pages. I'll reply back here if/when I come up with a good solution.
  14. Hi, I've come across this issue for the first time and am wondering if anyone else has a better solution than what I've come up with. I have a site that uses PHP to sniff the user agent and redirect if it finds one that matches with mobile. Like this: $iphone = strpos($_SERVER['HTTP_USER_AGENT'],"iPhone"); $ipad = strpos($_SERVER['HTTP_USER_AGENT'],"iPad"); $ipod = strpos($_SERVER['HTTP_USER_AGENT'],"iPod"); $winmo = strpos($_SERVER['HTTP_USER_AGENT'],"Windows Phone"); $opera_mini = strpos($_SERVER['HTTP_USER_AGENT'],"Opera Mini"); $android_mobile = false; if(stripos($_SERVER['HTTP_USER_AGENT'],"Android") && stripos($_SERVER['HTTP_USER_AGENT'],"mobile")){ $android_mobile = true; } $is_mobile = 0; if($iphone || $ipod || $android_mobile || $winmo || $opera_mini) { $is_mobile = 1; } $is_ipad = 0; if($ipad) { $is_ipad = 1; } if($is_mobile) { header("location: m/"); } However, I'd like to use caching on templates that have this detection and have found (not surprisingly of course) that the redirection doesn't happen when caching is enabled - everyone gets served the desktop content. I could use a JavaScript based solution, but that would not be ideal as part of the page would render before the user would be redirected. Just wondering if anybody has any other ways to solve this problem. Would ProCache solve this? Thanks.
×
×
  • Create New...