Jump to content

ryan

Administrators
  • Posts

    17,231
  • Joined

  • Days Won

    1,699

Everything posted by ryan

  1. I don't think any of us like pagebreaks for these kinds of things. But the reality is that the folks in the marketing department like that one article can generate 4 pageviews (for instance) rather than 1. And we sometimes have to meet the needs of marketing whether we like the result or not. ProcessWire should be flexible enough (and hopefully is) to accommodate needs like this.
  2. I agree with the value of GitHub here. But GitHub is not necessarily a simple thing for everybody. I was intimated by it for a long time (and still am in some ways). So I don't want to have a GitHub requirement that would dissuade any would-be translators. Still, for those that are comfortable with it, it's hard to beat for this sort of thing.
  3. I've never seen a .jpe image myself. I'm guessing it comes about when another system encounters a .jpeg, only supports 3 character extensions, and truncates it to .jpe ... like in the old MS DOS days.
  4. I like that approach. I think that's something we'll probably want to offer as a config option in the future.
  5. Any chance that it might be a 'file' rather than 'image' field? That would explain the lack of a size() function.
  6. Default values are something we'll likely have at some point, but I'm a little conflicted about it. I like the idea that when you create a new page and assign no values to it, it doesn't place any values in the database. There's a clear distinction between set and not set. There's a nice simplicity to that. So I translate that to the way I name and use fields. If I have a checkbox that I want to enable some behavior, I'll name it toggle_behavior and if I have a checkbox that I want to disable some behavior, I'll call it toggle_no_behavior or toggle_disable_behavior. You end up with a smaller and faster database if you are naming and using fields in a manner that veers towards the empty state being the more common one, and assigning any defaults at runtime rather than storing more duplicate 'default' values in the database. But I also recognize that these benefits are more technical than functional, which is why I say we'll likely have them at some point.
  7. Thanks for the updates Soma, the theme works beautifully.
  8. Soma, the code we're using right now to find the upload temp directory is this: $dir = ini_get('upload_tmp_dir'); if(!$dir || !is_writable($dir)) $dir = sys_get_temp_dir(); sys_get_temp_dir() is only used as a fallback if the system has no defined upload_tmp_dir. I would think that if a host were to be using open_basedir() they should at least set an upload_tmp_dir in their PHP, or at the very least, allow you to set it (with a site-specific php.ini or something). It seems like their PHP settings may be set to discourage use of file uploads. Here's a couple of related threads: The error you are getting with the $_ENV['TMPDIR'] indicates that there's no value set for TMPDIR. So your realpath() call is very likely operating on the value NULL and returning the web root (which may be writable, but not desirable). --- Edit: just added a new $config->uploadTmpDir that you can set in your /site/config.php. This will override PHP's upload_tmp_dir for ajax uploads only (I don't think we can override that on non-ajax uploads). I recommend creating this dir: /site/assets/uploads/ Then add it to the disallowed directories in your .htaccess file. Basically add it in with the other assets dirs like cache and sessions. Then update your /site/config.php: $config->uploadTmpDir = dirname(__FILE__) . '/assets/uploads/'; Now see if it works?
  9. Thanks for finding this Diogo. Looks like I missed the ui-helper-clearfix class when the last inputfield in a form was reduced width. This has been fixed in the latest commit.
  10. Sorry guys--looks like a bug, thanks for finding it. Just fixed this in the latest commit. When you get a chance, please confirm that it fixes it on your end too.
  11. Soma, try setting PHP to use a different upload tmp dir, from your /site/config.php ini_set('upload_tmp_dir', dirname(__FILE__) . '/assets/cache/');
  12. Nice job, thanks Jacmaes!
  13. Soma, send me the phpinfo if you can. I'm wondering about any safe mode or open basedir settings.
  14. Biotech, I agree with the idea to use a '#pagebreak#' tag or something like that. In your template your code would look something like this: $pageBreaks = explode('<p>#pagebreak#</p>', $page->body); if($input->pageNum && isset($pageBreaks[$input->pageNum])) $body = $pageBreaks[$input->pageNum]; else $body = $pageBreaks[0]; echo $body;
  15. 32k-64k is way too small a limit for PW site. I like to think PW would be happy up to a million or more pages. So will have to make sure the file system isn't interfering with the scalability. It seems to make more and more sense that we don't keep empty directories.
  16. This is correct. My own sites depend on it.
  17. /site/templates/categories.php <?php if($input->urlSegment1) { // you'll have to enable urlSegments in your categories template $s = $sanitizer->pageName($input->urlSegment1); $category = $pages->get('/products/categories/$s/'); if($category->id) echo $category->render(); else throw new Wire404Exception(); } Let me know if this is what you were looking for?
  18. I tried Magento as well before going with Drupal UberCart. I felt like there is probably a lot of great stuff there, but wasn't accessible for me to learn it in the time I had to setup a store for the client. I contacted Magento to assist, and they wanted $30k USD to get the basics going. Perhaps that's a good deal for some, but it was out of reach for me. It made me think that Magento was probably too complex and expensive for me. After successfully getting Drupal and UberCart setup and running (which is somewhat complex in its own right) I was glad that I didn't continue with trying to get Magento going.
  19. Thanks Soma, tested here and all seems to work well! Thanks for resolving this issue.
  20. Continuing from the Repeaters thread about the field-template context… This video demonstrates how you can adjust the admin context of individual fields according to the template they are placed in. When you adjust the context in this manner, it only changes the settings for when a field appears in that template. This expands the reusability potential of fields across different templates, hopefully preventing the need to create another field if all you really needed was a different title, description or width. You can do this same type of configuration when editing a field in a repeater too. View this full screen which should put YouTube into HD mode, where it's much easier to see.
  21. You guys are right about that. Looks like I removed a check_access=0 from the selector to make sure it was working and neglected to add it back. Sorry about that. It is fixed in the latest commit.
  22. Christoph, it's hard for me to tell for sure how to locate the error without actually seeing it. If you have an admin login you can PM to me, that might help me to see what's going on. Another thing to look at is: Pages > Admin > Repeaters > [your field name] > for-page-5799 (this is where it stores the repeater pages), and see if there's anything there that doesn't look like the others. As for displaying the repeater pages, could I see the block of code you are using to display them?
  23. Soma, I actually did run into the issue where I couldn't change a URL for an existing link recently. It happened on a client's site. Then I couldn't reproduce it locally, but clearly there's an issue. Thanks for your work in helping to resolve this. If you think it's ready, I will go ahead and commit your solution to the source (unless you prefer to do a pull request). Or let me know if you think more testing is needed here and I will plan to work on it as soon as possible.
  24. Welcome everfreecreative--Thanks for your great feedback. But you guys are way too kind. Still, I was having a bad day yesterday (got stuck attempting to fix a client's server issue all day) and these posts turned it around for me--ended the weekend on a positive note--thanks for this! I appreciate the enthusiasm and it is contagious--makes me want to work on PW all day.
  25. Pages would work just fine for this. But that's a pretty specific need and Oliver's recommendation is a good one. If you wanted something quick 'n dirty, you might also use a small text field and spell out what I was wanting from the site editor in the field's description. During output, if the value doesn't match the expected format then you skip it or substitute a default.
×
×
  • Create New...