Jump to content

ryan

Administrators
  • Posts

    16,715
  • Joined

  • Last visited

  • Days Won

    1,516

Everything posted by ryan

  1. I agree, good to see experiments like this. Though without knowing exactly what the result is, it also looks like a lot of work and code. Which is to say, I don't totally understand what I'm looking at just yet, but am interested–please keep posting. For another MVC-style approach, also check out the blog profile.
  2. Peter, check your module settings for MarkupRSS (Admin > Modules > Markup > RSS). It sounds like there are some default settings that the values may be coming from. Regarding the copyright symbol, I'm not sure about that one but isn't a copyright symbol redundant since the field is a dedicated copyright field? I think the right thing to do there would be to not have any copyright symbols in there since the field already implies that. If it's data going into an RSS feed, then that would be public, right? You could always bypass that by adding "include=all" to your selector while keeping your pages inaccessible, but I think it's more secure to keep public data public and private data private, regardless of whether something maps to a viewable page or not. Another option is to use "hidden", and have "include=hidden" in your selector. For data container pages, you can always choose not to implement a template file too. Or you can have a template file that does something like this: if(!$user->isLoggedin()) throw new Wire404Exception();
  3. I don't actually have any experience with IIS, and have only rarely come across it over the years. As a result, I'm not sure how to provide support for it, and that's why I've always kept Apache as a requirement for PW. But I know there are others here successfully running PW under IIS, so it certainly seems possible. The biggest issues will likely be centered around the .htaccess file. If there is something that makes IIS understand an Apache .htaccess file (including especially rewrite rules), that would be desirable for sure. I don't think this could be an IIS-specific issue. Double check that you've installed the new admin theme in /site/templates-admin/ and that it is fully readable by IIS. This also doesn't sound like an IIS-specific issue. Instead, it sounds like the pages might not be set for manual sorting. Either that, or a potential browser issue. What browser/version are you using?
  4. ryan

    ProcessWire on the web

    From what I understand, the US has much poorer quality consumer internet than the rest of the world. Even in my case, I pay quite a bit for a Comcast business internet connection, but even it struggles with video content. If I want to watch a video (like from YouTube), I usually have to use my cell phone, disable WiFi and use an LTE connection (and even that doesn't always work).
  5. I really prefer to keep images in their own fields, separate from a textarea/TinyMCE field. It's not about any limitations at all. I've just found this to be the most flexible way of managing this over a long period of time. ProcessWire has always been built to what was ultimately most flexible rather than trying to do the same thing as other CMSs. But I do recognize that it's controversial and may seem unfamiliar if one is already used to a different way. I'm not against alternative patterns for this if it helps appeal to more coming from other CMSs, though not at the expense of the current one which I think is the ideal (at least for my needs). So I always try and keep an open mind about it and am open to supporting more options for those that want them in the future.
  6. Your first condition would always match even if there were no page breaks. That's because $input->pageNum is always 1 or greater (1 is the lowest possible value for $input->pageNum). As a result, the if($currentPage) part is not even needed. This if() condition will match regardless of whether there are page breaks or not: if($currentPage && isset($pageBreaks[$currentPage-1])) Technically your "else" condition is only executed if someone specifies a page number in the URL that is out of bounds. Try page99 in the URL, and you will likely get the entire text. Instead, you probably want a 404 in that situation. That's why I think your else condition should throw a 404.
  7. Nice work! Please add this to the modules directory when ready.
  8. Thanks k07n, I have applied that update.
  9. Yes, this is basically what Pageimage does internally. You can use PHP's copy() command.
  10. If phpmotion.com supports oembed, then it is feasible for TextformatterVideoEmbed to support it in the same way as YouTube/Vimeo.
  11. I'm not sure that I understand the full context of what you are trying to do, but one thing that may be helpful is to consider that a Pageimages array is an extension of a WireArray and shares all the same methods and capabilities. ProcessWire 2.3 also has some new functions like insertBefore(), insertAfter() and replace(), that you may find handy here (though they aren't yet in the documentation page, I need to update it). I'm not exactly sure what you mean about "execute", but you would need an image file to be present on the server before you could determine what the dimensions are. If you have an image that is just a filename, and not yet a Pageimage, then you could use the traditional PHP method of determining width/height, and that would be to use the PHP getimagesize() function.
  12. I'm happy to setup a subdomain like we did for the German site (http://de.processwire.com)
  13. Field dependencies are coming to ProcessWire and FormBuilder later this year, though won't be ajax driven. This probably would not be a good use case for FormBuilder. You can create your own themes with FormBuilder. They are based upon jQuery UI's theme framework. What you are talking about sounds pretty custom, and seems to me more like something one would build from markup rather than with a form building tool.
  14. IIS isn't technically supported by ProcessWire. Though I understand that several people are successfully using PW in IIS. But just want to point out that this is not the recommended environment for PW, and it would not surprise me if some things don't work. Actually, I'm impressed that it apparently works for the most part–maybe someday we can officially support IIS. This is one component that is LAMP-specific at present. You will have to unzip the language pack locally and upload the JSON files individually. I'm hoping to convert the unzip process to one that is cross-platform before long.
  15. There's only 3 threads in this particular board, so no worries about this thread getting lost. But I totally agree it deserves to be highlighted. I've gone ahead and pinned it so it always stays at the top. That way when this board grows, nobody will miss this thread.
  16. This is a really excellent example of a job posting, thanks Jason! You included all the info that I think people would be looking for. I also think it's very good that you included a timeframe, budget info, and screenshot/mockup. I'm going to point people to this the next time someone asks how they should post a job.
  17. Thanks for posting. It looks to me like you shouldn't need to have a #pagebreak# at the top with your current code, given that you are subtracting 1 from $currentPage. Also, your "} else {" condition should probably "throw Wire404Exception()" rather than defaulting to $pageBreaks[0].
  18. You don't really need any kind of multi-site support if you are just talking about subdirectories. If you want them to use the same database, then just make them all run from the same PW install. If you want them to run from separate databases, then just install PW in the root and the subdirectory… should you want to share the same core, then make /subdir/wire/ a symlink to /wire/. Though when I'm running more than one PW install on the same account, I usually just keep their cores separate so that I can upgrade and test them separately. But it's perfectly fine to run multiple PW installs on the same domain.
  19. Do you receive this error when uploading files to other pages too? Do you receive this only if uploading a ZIP, or do you get it when uploading the language pack .json files individually? The error message most likely indicates that the directory where PW wants to store language files doesn't exist, and it's unable to create it. You could try creating the directory manually, but I think you will still have issues until you can determine what file system permission is blocking access. If you want to try creating the dir manually, edit your language pack and note the ID in the URL. Now create a dir based on that ID in /site/assets/files/. So if the ID is 1234 then you'd create the directory /site/assets/files/1234/ and make sure it's writable to PW.
  20. For security, I'd avoid implementing solutions that would let anyone enable debug mode. So GET vars aren't ideal unless you can get enough "security by obscurity" with the GET variable (perhaps by name or value). My IP address doesn't change often, so I usually enable debug mode directly from my /site/config.php with a line like this: $config->debug = $_SERVER['REMOTE_ADDR'] === '123.123.123.123';
  21. Most of these options are meant for ProcessWire (core) development, so they aren't meant to be documented as part of the settings you would typically use in site development. But for people that want to experiment with them, the inline documentation is pretty good. Of course, feel free to post questions here about any of the options too.
  22. ryan

    ProcessWire on the web

    That's great about the ProcessWire presentation. I really enjoyed the slides. I can't get the video to play more than one frame at a time, and I don't know what's being said either (I don't have multi-language support installed). But it looks like it went on for a good long time. Anyone that speaks German have a summary of what was said / how it went? Also, who did it? Big thanks to the presenter for taking the time to do this.
  23. The scope of the project you mention sounds pretty broad and will be a big investment on your part regardless of what system you build it in. I think part of your decision has to come from budget. If you are testing the waters rather than dedicating your full time to this project, then I would pursue whatever path has the most components already built, even if the result is not 100% what you want. I think that means looking into what's available and built through WordPress and IPS. I especially like the IPS option in your case. Maybe it's not perfect, but it does at least get you more than half way there and has the level of integration between components that you are looking for (including ecommerce). There's no doubt that you could build this all beautifully in ProcessWire, but I wouldn't recommend such a big project being your first in any CMS or framework. Whether ProcessWire or another platform, you'd want to have some significant experience developing apps/sites before pursuing such a big project in [x] platform. Unless you've set aside a large budget or don't have a full-time job already, find the tool that gets you closest to your needs before having to get into code. Then, once you've proven the concept or made it a success, develop it exactly the way you want it in ProcessWire or a full-blown framework. But stay with us here and start learning ProcessWire in smaller chunks and on smaller projects, and before long you'll be ready to build anything you can imagine.
  24. In future versions of ProcessWire, including the current PW 2.3 dev branch, you can also do this: if(count($options['pageStack'])) { // don't include header/footer, etc. } $options['pageStack'] is an array of pages that called render(); before the current one. It basically gives a way for a page to discover the context it is being rendered in.
  25. It's not necessary, as anytime you create something new the output formatting state is off. Of course, there's no harm in a $user->of(false); call either, but it's not technically necessary. Another way you can create a new user: $u = $users->add('ryan'); The password is actually one thing (and probably the only thing) that you really shouldn't sanitize, because you don't want to change the password they entered. What you should do instead is validate it, making sure that it's a string with some length and at least [n] characters (whatever your requirements are). By validate vs. sanitize, I mean don't sanitize (clean) what they entered, but give them an error and make them enter something new if it doesn't validate.
×
×
  • Create New...