Jump to content

LostKobrakai

PW-Moderators
  • Posts

    4,956
  • Joined

  • Last visited

  • Days Won

    100

Everything posted by LostKobrakai

  1. This might be a nice quick to grasp intro to using composer dependencies for a fieldtype (and creating a fieldtype): https://github.com/LostKobrakai/FieldtypeCountrySelect
  2. These are hardcoded in the ProcessPageList core module, so probably not. On the reasoning behind it you'll probably have to wait for Ryan to answer.
  3. The 404 page is a system page like the trash and therefore only visible to superusers.
  4. Shortening and possibly avoiding if/else statement is such a great improvement to code
  5. You probably need to call shopware's autoloaded before starting the zend session. Also make sure that you're not trying to call a namespaced class.
  6. Now, that's some nice first post to have in the forums, so first of all welcome here. I just wanted to add a word of caution here. The export functionality should work well for core fieldtypes, but 3rd party fieldtypes might not export/import their settings correctly. Especially for more complex (db-wise) fieldtypes like Table or maybe Matrix it's often not so simple to export to a text format. E.g. FieldtypeOptions didn't export it's options for quite some time. Also I'd be cautious with calling modules discontinued, which is, at least for my module, not the truth. Not seeing a weekly changelog is not necessarily a bad thing.
  7. http://modules.processwire.com/modules/fieldtype-runtime-markup/
  8. What's the php version on both machines? Also did you check the chmod of those modules?
  9. If you won't need any markup you can use strip_tags(). Otherwise it will be a bit more complicated.
  10. A simple fieldtype might be "Name", where you enter a firstname and a lastname, which is stored separately and maybe a computed property for the fullname. I think it shouldn't hold more values, as it'll probably become complex just for the amount of fields. Also interesting might be other often extended core classes/modules like Process or Textformatter, with the latter actually being quite simple with often just a single method.
  11. I've not used it myself, but this one does also support lot's of different modes: http://chocolat.insipi.de/
  12. Imho the best lightbox script out there: http://photoswipe.com/
  13. Read this one: https://processwire.com/blog/posts/composer-google-calendars-and-processwire/
  14. And here is how you'd really make classes for pages which can hold custom methods: https://processwire.com/docs/tutorials/using-custom-page-types-in-processwire/
  15. isNew() will only be true, if a page was never saved to the db, which in terms of backend creation of pages is only till after the page add screen, where you put in the title/name of a page.
  16. Thanks Mike for that honest and transparent answer to the discussion. Being low on budget will always force projects to make trade-offs even if one would like to not make them. And as you've experienced it: Not everything that looks shiny in the first place will ultimately be as simple, which is also a valuable insight for anyone here needing to tell that to customers.
  17. There's already CroppableImage and it's kinda predecessor Thumbnails.
  18. Checkbox does not have any specific fieldtypes it's compatable with, therefore it's listing all Fieldtype – but not FieldtypeMulti – subclasses. It's rather damn strange that FieldtypeRepeaters is not a subclass of FieldtypeMulti. Options and Page fields on the other hand are, which is why they're not listed.
  19. Yeah, those two are not compatible to each other as the underlying structure is completely different.
  20. The fieldtype will always stay "Options", the used inputfield is selected in the Details tab.
  21. You'd need to keep in mind, that InputfieldSelector cannot repopulate it's selectors from just the id's. If you need that you need to store the selector somewhere as well.
  22. I'm not sure about your requirements, but by using things like autojoin you should already have quite nice performance. I'm not sure if building a fieldtype for the sake of not joining a few tables would rather be considered premature optimisation. But I don't want to discourage you if you're also doing it for educational purposes. To your issue: ___sleepValue() and ___wakeupValue() are your friend when debugging what going into the db and what comes out of it.
  23. If you only need the images to be created and you know the sizes upfront, then simply call those width functions as part of the import process. $img = … // Create thumbs $img->size(700, 300); $img->width(200); …
  24. FieldtypePage will simply save all the page-id's which are in $_POST[$fieldname]. So you could use a hidden field for single values, but for multi values a <select> is probably easier to setup. But in the end ProcessWire won't care how the values got send, as long as the POST data are in the correct format.
  25. That's down to my not so perfect english. Thought this would mean a bit more of "liking something" instead of "understanding something".
×
×
  • Create New...