Jump to content

steveooo

Members
  • Posts

    70
  • Joined

  • Last visited

Everything posted by steveooo

  1. Well. Not really. It would be nice for grouping multiple fields inside one, so I simply can embed 1 field on a template and not have to include multiple fields (via fieldset)... If your project is big and complex, it would be good to group them like told. 1 example of how this would simplify stuff: You could create a field called "seo" and inside this seo field, you have all that seo-specific stuff like description, image, opengraph,... and then you only need to set this field to global and voila: SEO fields for every field!
  2. Thanks for this fast answer! Well: For textarea, your solution would be the solution! But "text" and textarea fields were just an example. Maybe I need multiple floats with the same settings. Instead of creating 3 different fields, one field with 3 virtual instances would be nice (float1, float2, float3 field)
  3. As I understand this, the Fieldsetopen field is only for grouping for entering content via backend. I am looking for a field that internally groups multiple fields. Like how you add fields to a repeater field, but without the repeating stuff
  4. Hello, just another wish on my list: Multiple instances for same field. E.g. I have got a simple "text" field that's just a CKEdtior textarea. If I want to use two or more text fields, I need to dublicate the "text" field to something like "text2". I know that every field is unique because of the database structure behind. Is is still possible to make something like this for this problem? Maybe save everything to same table in database but somehow add a "instanceNumber" field that separates "text1" from "text2"? It isn't a big thing, because cloning is easy. I really like to keep redundancies low and cloning fields isn't that great, so I share this wishlist. Maybe there is some way and I don't know about it, so let me know
  5. Hello, One thing that I really would like is a group fieldtype. This group fieldtype is just for grouping other fieldtypes. E.g.: "dates" as group field has "dateStart" and "dateEnd" (both datetime fieldtype) as fields. This would be a great feature! Is something like this currently possible?
  6. Hi Kobrakai, Do you have any links about the topics with the same topic? I did not find anything.
  7. Hello, I am using PW for some time and I am thinking a lot about modularity in ProcessWire. In a German CMS called Redaxo, everything consists of blocks. A page has many blocks and every block has an input and output. It is pretty simple for the user to stack blocks per page to build content for a site. So I can define a "media gallery" block, a "Q & A" block and the user can stack them like he want's. And every block is a file so it can simply reused for the next project. How can I achieve this in ProcessWire and: Is this a good practice in regards of PW's structure? Let's start a discussion about it! I really like PW but I can not really get the gist of modular behavior in PW. I am also searching for some good practices. I currently try to achieve this kind of behaviour by using PageTable and creating templates for each block/component (prefixed with "c-")... Thanks for you answers in advance!
  8. Sorry, it still does not work by disabling ACF. Any other ideas?
  9. Hello, I am using custom styles: CKEDITOR.stylesSet.add('mystyles', [ { name: 'Box', element: 'div', attributes: { 'class': 'box' } }, { name: 'Subheader', element: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'], attributes: { 'class': 'subheader' } }, { name: 'No margin bottom', element: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'], attributes: { 'class': 'no-margin-bottom' } }, { name: 'Intro nav', element: ['ul', 'ol'], attributes: { 'class': 'intro-navigation' } }, ]); The thing is: I see my custom styling in the editor (via contents.css) and my styles are selectable and savable. So I style text and save and it works. On reopening the styles won't apply, even if it was successfully saved (right HTML in database), so when I then save, all styles are gone. Am I doing something wrong?
  10. I am using following code in my module and it still does not work... protected function syncLangProperty($page, $property) { if ($this->modules->isInstalled('LanguageSupport') && !empty($page->{$property})) { $defaultValue = $page->{$property}; foreach ($this->languages as $language) { $page->of(false); $page->setLanguageValue($language, $property, $defaultValue); $page->save($property); } } return $page; }
  11. Hello, when using the default multi-language module, you can set different titles for each language on a page. The logic is: the default language is the source and every non-default language inherits from it if empty. For a use case I have, I need to update all title's on a page for every language via the API. I tried a little with this code but it doesn't work (with no errors): $globalTitle = 'Test'; foreach ($languages as $language) { $page->set('title'.$language->id, $globalTitle); }
  12. Thank you! That was the problem! But is it still a bug? I thought that using PageArray output for the Page field, I get (when only one page is selectable) a PageArray with only one item in it. Kind of return $page vs return array($page).. But thanks again!
  13. Hello guys, hope you all had a great weekend! I made a short screencast that shows the bug and its behavior. Maybe this helps anyone for a fix or for a solution (maybe I am doing something wrong?). The bug is that it should have replaced the Sky-1.jpg item instead of only adding the new one. Here is the video: page-bug.mov Thanks for your answers!
  14. The thing is: Even if I allow the "folder" page that has children (files or another folder), the Page select would give me the children. But It somehow remembers the old selection and does only add to it. Maybe some caching thing even if I disabled all caching? Any idea how I can test it better to find the bug? EDIT: When I select a single page with no children, the Page select also does not work... The behavior is like this: If I change my selection, the old one does not get removed. All previous selections still appear as items in the resulted PageArray. This very seems like a bug. Does it help for you guys (and girls) when I upload a screencast of the bug?
  15. Well. I got a single upload field for and I do not want my clients to select images and files first in order to upload these. So I want a single upload field and this is only possible if I got 1 field. But it seems that I need to separate them..
  16. Ohh.. Okay. I am using a File inputfield -.- Can I somehow transform this File object into an Image object or do I always need a "imageField" and "NotImageFiled"?
  17. Hello, Thanks! I thought this would be the way. I got my file object (one test: I can use $file->ext and get the correct file extension), but still something like $file->size(100, 75) does not work. EDIT: Well, if asked: I only use JPG. Resizing a DOCX would be fun
  18. Hello, for a module that's used in the admin, I need the ->size(x, y) functionality for creating thumbnails of existing images. I tried it but I got following exception: ProcessWire: ProcessPageList: Method Pagefile::first does not exist or is not callable in this context I hope someone can help me with that! Thanks!
  19. Hello guys, I have a Page field for my own global media gallery. When I select one page, I get following PageArray via the API: object(ProcessWire\PageArray)#287 (7) { ["hooks"]=> array(2) { ["PageArray::render"]=> string(60) "MarkupPageArray->renderPageArray() in MarkupPageArray.module" ["PageArray::renderPager"]=> string(56) "MarkupPageArray->renderPager() in MarkupPageArray.module" } ["count"]=> int(3) ["items"]=> array(3) { [0]=> string(29) "/files/unpublished/" [1]=> string(25) "/files/animals/" [2]=> string(23) "/files/sloth/" } ["total"]=> int(3) ["start"]=> int(0) ["limit"]=> int(0) ["selectors"]=> string(0) "" } So I select 1 Page and get 3 Pages in return? How can this happen? From the interface here, everything looked fine: Here is the stuff that created the field (if needed): $data['getFileField'] = new Field(); $data['getFileField']->type = $this->modules->get('FieldtypePage'); $data['getFileField']->name = 'fooBar'; $data['getFileField']->label = $this->_('File select'); $data['getFileField']->parent_id = $files['page']->id; $data['getFileField']->inputfield = 'InputfieldPageListSelect'; $data['getFileField']->labelFieldName = 'title'; $data['getFileField']->allowUnpub = 1; $data['getFileField']->description = $this->_('Select one file or folder. If folder is selected, the first file inside of it is used.'); $data['getFileField']->icon = 'file-o'; $data['getFileField']->save(); Is this a bug? EDIT: Now I am pretty sure it is a bug in PW (3.0.10): If I select a page via the Page field, the PageArray is only with this page. If I change the page via the Page field (and save), I get the old one plus the new one. So somehow it does not get reseted on new selection.
  20. Thanks horst for your answer. Does this memory checking prevent this memory error? And if so: how is the UX for this? Do I get a nice red error message or how does this whole memory checking work? Thanks!
  21. Hello, I am using a media manager based on pages (1 file = 1 page). I would like to move the dummy file page "Dateityp" to the page folder "Jo!". In PW, I can move this file outside the current folder and into a folder, when there is at least one other file in it. I would like to have the feature of dragging a page onto another page (because my media manager does not really have folders, they are all pages) to be inside this dragged-on page. I think PW does not implement this because of some possible issues if the "Family" for these templates/pages isn't configured right (e.g. does not allow children). A ugly workaround is going to settings of this page and changing the "Parent". This works, but is not nice UX... I hope anyone can help me with that. Is this a bug or a feature?
  22. Hello. This looks good! 1 Problem I had was the fact that using the resize feature (via width(), height(), size()) on large images (started already at 1500xY -.-) would crash PW because of PHP memory issues. I read that PNG8 was still routed to the old GD. Will this be fixed so everything uses Imagick? I really don't want a server to crash because of those bad memory issues. I prevented it by using following config: $config->imageSizerOptions = [ 'upscaling' => false, 'cropping' => false, 'autoRotation' => true, 'sharpening' => 'soft', 'quality' => 85, 'hidpiQuality' => 55, 'defaultGamma' => -1, ]; Now after this great announcement of this great module, I commented out this thing and hope that all these memory issue go away.
  23. Hello guys, When developing a module, you can make the module support multi-language by using __() etc. Is there a way / standard to add some language .json files to the module folder for ProcessWire to import automatically? Or do I always have to import these language files manually? Great would be: My finished module auto-imports a translations.json file in the module's directory on initial install. Maybe some standards like https://en.wikipedia.org/wiki/ISO_639-1 so ProcessWire can iterate through the translations.json and checks if each language is installed. If so, then PW automatically imports the needed json language data for this specific language. Thanks for your answers! Steve
  24. Hi. No, I want to change the url to something different. @LostKobrakai: This is only for the "view" link on the page tree actions, right? How can I hook into the "view" link when I edit a page. Any examples? I am not that great in "hooking"
×
×
  • Create New...