Jump to content

Hani

Members
  • Content Count

    109
  • Joined

  • Last visited

Community Reputation

58 Excellent

About Hani

  • Rank
    Sr. Member
  • Birthday July 12

Profile Information

  • Gender
    Male
  • Location
    Santa Barbara, CA

Recent Profile Visitors

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

  1. Just a heads up that I added a note about the ModSec rules being tripped in another form post here:
  2. A bunch of my old clients started having this issue on Dreamhost as well. Like @cstevensjr, I noticed that any domains on a VPS weren't affected. However, some domains on shared hosting plans were affected while other ones were not. Probably a difference between servers, but not certain why shared servers would have different ModSec settings. Anyway, I was lucky to chat with a tech that was patient and knew his stuff. (Shout out to John B!) We worked through one of the affected domains and he figured out what ModSec rules were being tripped by the uploads. So he had to add exceptions
  3. Ah. Okay, so Martijn's solution won't work for me. I suppose the implementation I imagine something like this would work is that under a page's "Settings" tab, there is the same configuration setting that we see on a template's "Family" tab that allows us to define what templates the children of this page can use. Given PW's core functionality, would adding something like this by using a module be possible - and if so, would clicking "Add New" be able to take into account the parent page's allowed templates for children?
  4. Beautiful! Thanks, Martijn!
  5. Being able to restrict the templates used for children pages under a template's Family tab has always come in handy (defined under the "Allowed templates for children" setting), but is there a way to restrict the templates used for children pages for a specific parent page (based on ID) rather than the parent page's template? My use case: I have a template called "Data Container" which I use for several pages to keep pages organized. Each of these data containers have children of specific template types. For instance, one data container might have "cities" and another may have "buildings",
  6. There's also another way of pulling calendar information from Google - but you have to have an API key to do so. I have a non-Processwire site (still on the task list of one to convert) where I pull Google Calendar data. This is a snippet of what I recently ended up with once I realized that the full calendar feed was no longer working. // GET NEXT FOUR UPCOMING EVENTS // maxResults = 4 // timeMin = current timestamp in ISO8601 format $url = 'https://www.googleapis.com/calendar/v3/calendars/[EMAILADDRESS]/events/?key=[APIKEY]&timeMin=' . date('Y-m-d\TH:i:s\Z') . '&maxResults=4&
  7. Sorry it took me a few days to respond, Jonathan. Well, the .htaccess file that's in the page's assets directory should automatically redirect any requests to the pass-through page. So, if I were to try to get http://www.mydomain.com/site/assets/files/xxxx/mydocument.pdf the request will instead will be redirected to http://www.mydomain.com/file-download/?page=xxxx&file=mydocument.pdf The template file is used on the page that I've created at http://www.mydomain.com/file-download Does that help at all? At this point, the .htaccess file has to be manually copied into the files f
  8. Thanks for taking the time to create this, ESRCH! You should throw this on GitHub and add then add it to the modules directory. I'll let you know if I experience any problems with it.
  9. Thanks, celfred. That fix worked for me too. I don't think that broke anything else, but of course it's not definitely ideal since we've changed it in the core.
  10. On the site I built that has protected files, I'm still using the .htaccess solution I described. It has the pitfalls Ryan mentioned, and the solution isn't perfect or easily scaleable, but it works! I definitely would be excited if this feature made it's way on the ProcessWire roadmap.
  11. Thanks for all the prompts to get this updated and out on GitHub, everyone. My apologies for not doing it a long time ago! Here's the modules directory entry: http://modules.processwire.com/modules/fieldtype-templates/ Out on GitHub: https://github.com/Hani79/Processwire_FieldType_Templates Shout out to @adrian for fixing the bug reported by @Raul and @lisandi
  12. For anyone else who runs into this issue, a quick, temporary fix is to hack the LanguageFunctions.php file. For all three functions in there, you'll need to wrap each with a check to make sure the functions haven't already been declared. For example, the first function: if (!function_exists ('__')){ function __($text, $textdomain = null, $context = '') { ...snip... } } My best guess is that this not recommended as a permanent solution since it may cause issues with WordPress. And of course, ProcessWire upgrades will overwrite the hack. Best solution? Don't use Wordp
  13. Now that I think about it, shouldn't the .htaccess file not even give Processwire "control" since the /blog/ directory physically exists on the server? This line in the .htaccess file should take care of that, right? RewriteCond %{REQUEST_FILENAME} !-d
  14. I have a Wordpress blog installed in a subdirectory of a PW site (transferring the blog from WP to PW is on my task list) that was working with Processwire 2.2.9. I just upgraded to 2.4 and it broke. The error I'm getting is: Fatal error: Cannot redeclare __() (previously declared in /home/me/mydomain.com/blog/wp-includes/l10n.php:146) in /home/me/mydomain.com/wire/core/LanguageFunctions.php on line 39 Any idea what I can do (temporarily) to get it up and running? Processwire is installed at the root of the domain and Wordpress is installed at /blog. EDIT: I don't have any of the
  15. Yup - the new URL structure for maps doesn't work with the module but I was able to get it working by manually building the URL. For example, this is the simple structure I used: https://maps.google.com/maps?q=Santa+Barbara+CA+93101 That seems to work just fine - even in CKEditor. My guess is that Google will continue to support that URL structure for quite a while. They've typically been pretty good at backwards compatibility and not implementing new methods that break old URLs.
×
×
  • Create New...