-
Posts
4,956 -
Joined
-
Last visited
-
Days Won
100
Everything posted by LostKobrakai
-
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
-
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.
-
The 404 page is a system page like the trash and therefore only visible to superusers.
-
if else failing (but working in HannaCode)
LostKobrakai replied to Peter Knight's topic in General Support
Shortening and possibly avoiding if/else statement is such a great improvement to code -
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.
- 2 replies
-
- 1
-
- shopware
- integration
-
(and 1 more)
Tagged with:
-
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.
-
auto-populate field x when field y is changed
LostKobrakai replied to douglas81's topic in General Support
http://modules.processwire.com/modules/fieldtype-runtime-markup/ -
What's the php version on both machines? Also did you check the chmod of those modules?
-
If you won't need any markup you can use strip_tags(). Otherwise it will be a bit more complicated.
-
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.
-
I've not used it myself, but this one does also support lot's of different modes: http://chocolat.insipi.de/
-
Imho the best lightbox script out there: http://photoswipe.com/
-
Read this one: https://processwire.com/blog/posts/composer-google-calendars-and-processwire/
-
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/
-
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.
-
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.
-
There's already CroppableImage and it's kinda predecessor Thumbnails.
-
Changing field type after making field
LostKobrakai replied to electricarts's topic in General Support
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. -
Changing field type after making field
LostKobrakai replied to electricarts's topic in General Support
Yeah, those two are not compatible to each other as the underlying structure is completely different. -
Changing field type after making field
LostKobrakai replied to electricarts's topic in General Support
The fieldtype will always stay "Options", the used inputfield is selected in the Details tab. -
Saving a custom text field within a Page field
LostKobrakai replied to yuanliu's topic in Module/Plugin Development
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. -
Need help to create my own Fieldtype
LostKobrakai replied to kreativmonkey's topic in Module/Plugin Development
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. -
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); …
-
Saving a custom text field within a Page field
LostKobrakai replied to yuanliu's topic in Module/Plugin Development
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. -
That's down to my not so perfect english. Thought this would mean a bit more of "liking something" instead of "understanding something".