Jump to content

thomas

Members
  • Posts

    196
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by thomas

  1. Thanks Kongondo, I put of(false) almost everywhere now and most of it seems to work. I still need to catch a few fieldtypes in order to get the right info out of them but I'm getting there. Thanks, thomas
  2. I have a site with lots of templates neatly ordered with tags in the admin. Now whenever I create a new template I have a hard time finding it, since there is no tag. So I'd like to see the ability to add tags to a new template right when I create it. Thanks, thomas
  3. You need to include a bunch of admin JS and CSS files. If you are determined to do this, take a look at /wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module, especially the AJAX save bit. But I would recommend using another upload script, like http://getuikit.com/docs/upload.html to build this instead of trying to reverse-engineer the whole back end.
  4. The method InputfieldPage::getSelectablePages needs to know the page you are editing. This seems to be wrong and it is probably Fredi's fault since you are getting "his" ID. Try disabling Fredi and see if it works. Otherwise you can try to Hook before InputfieldPage::getSelectablePages and make sure it sees the right page $event->arguments(0, $page_you_want); I hope this helps.
  5. Hello, I am trying to build a form which is saved via AJAX, containing text fields, selects and checkboxes. No matter what I do, I can't get rid of the error "Call $page->setOutputFormatting(false) before getting/setting values that will be modified and saved." The problem is mostly with data coming from selects. I compared my Ajax data with the post data from a regular form submit and afaict it matches. My special case right now is for two selects from inputfieldPage ("year" and "schaltgruppe_kurbel"), each configured to hold only one page. The form sends single values (page ids) and the error is thrown. I tried converting all single values to arrays with one element, but no success. This is my script to save the data. It runs in a module: $prod = $this->pages->get($this->id); $prod->of(false); # this doesn't really make a difference but it's here. $form = $this->modules->get('InputfieldForm'); $fields = $prod->getInputfields(); foreach($fields as $f) $form->append($f); $form->processInput($this->input->post); foreach($form as $f) $prod->set($f->name, $f->value); $prod->save(); # ERROR Can anyone help? I'm really stuck here ... Thanks, thomas PS I also tried leaving out the PW admin specific stuff like processInput and set the input data directly, but no change ...
  6. It works! Thanks a lot! Vielen Dank!
  7. Hello, I want to use two page fields, the first one to choose the selectable pages of another pages field. When the first Page Field (category) is selected, the second one appears (using category != "" which works fine). Now the second Page Field is supposed to show only the pages with the category (a field in the second selections template) selected in the first field. I used this as a custom selector: parent=/products/,category=category,sort=title Now this does not work. Am I doing something wrong or is this not supposed to work? Are there any ways to achieve this? (parent /products/ has a view thousand children so I need some sort of pre-selection) Thanks, thomas *Edit*: custom PHP code return $pages->find("parent=/produkte/,category=$page->category"); works, but the page needs to be saved first and it's not really dynamic ... I was hoping for a better solution ...
  8. Is there a way to set the attributes of Checkbox Options? Thanks, thomas
  9. This is pure genius. Thanks!
  10. I am building an angular app with Processwire and in order for the forms to work I need 'ng-model="<?=$field->name;?>"' added to every Inpufield. Now this doesn't work all the time. I am macgyvering my way through the Hooks now to add the attribute to radios and selects but it would be nice to have it for every Inputfield. Thanks, thomas
  11. Well my next step after this was asked and rejected would have been to copy processUpgrade with my own module directory url and reverse engineer the JSON data it produces. So the purpose of my original question was actually to dodge some work
  12. Wouldn't you only need to set up a service that serves a JSON file with URLs and versions of your "private" modules?
  13. Hi Pete, thanks for the answer. I wasn't aware of the approval process and of course no one should need to approve my makeshift modules My problem isn't so much about the installation but more keeping everything up-to-date. I have 7 quite similar PW sites running and I always try to keep track of the changes and apply them to all the sites. I was thinkiung, maybe processUpgrade could help me with that. @Dave, that might be an option too. That way I could build my own module directory Thanks, thomas
  14. Hello, this might be a really special case which no one but me is interested in but I'll post it anyway since it seems rather easy to implement: I have a few really special plug-ins or modified versions of existing plug-ins that wouldn't really be of any use for anything but my special cases. But I run these plug-ins on several sites and in my quest to keep everything up to date and n-sync I was wondering if it was possible to add "private" modules to the modules directory, which won't show up publicly but I can use processUpgrade to keep them up to date across my army of sites. Maybe this would help someone else, too. Just a thought, thomas
  15. Ah, alright. Thanks for the clarification. You are right, that's not exactly what I'm looking for since I need to pick the latest 3 articles from 2354 ...
  16. It does? For me it definitely doesn't. I use $pages->find("template=article,sort=-published,limit=3") and it sorts by created. No matter if I use "published" or "-published". I use 2.6.17 now btw
  17. Hello, my client wants to schedule his posts and since I haven't had any issues with 2.6.16 in development I decided to update his site to the dev version in order to use "publish" date. The DB was properly updated, "published" shows up in the pages table, I can use $page->published but $pages->find("sort=-published") doesn't seem to work. Is this correct or am I missing something? Thanks, thomas
  18. I now manually include the CSS and JS files and everything works. I have no idea, why those files don't automatically include anymore. Like I said, my suspicion is it stopped working with the 2.6.1 update but everything else works so there really is no reason. I remain confused ...
  19. Not sure what's going on. Seems like the module *is* loading but it's not loading any of JS or CSS files. I know this is pretty vague but I wouldn't even know where to start posting code ...
  20. Hello, I'm building a custom Fieldtype / Inputfield and all of a sudden it doesn't load anymore ... Nothing in the console, nothing in errors.txt ... init() is called but that's it. In the "modules" page it shows as loaded (also in the debug mode tools) but everywhere else ... nothing. How can I debug this? I updated PW to 2.6.1 and it *seems* like the problem started after this. Thanks for any hints!
  21. Hi Bernhard, since it's a product cataloque and all that's needed in site A is the products I simply restrict site B's API to the products folder and it's children.
  22. Servus mr-fan, thanks for the hints. I now built the inputfield pretty much like described above. I duplicated PageListSelectMultiple for site A and changed the code so it loads JSONP data from site B. On site B I have a simple API that returns data suitable for ProcessPageList. Needs more testing but seems to work so far. Thanks, thomas
  23. This ancient thread just really helped me ...
  24. Hello, I need to connect two PW sites, both with rather big pagetrees. When adding a page to site A, the editor should be able to select one or more related pages from site B (one is an editorial news site, the other a product cataloque) My idea was to build an API for site B which writes JSON data of the applicable pages and feed that into my custom inputfield which would be heavily influenced by PageListSelect. Now my questions: Has anyone built something similar? Since this would be my first custom field / inputfield, where should I look for help? Does this sound like a reasonable approach or are there other ways to connect two PW sites? Thanks for any help, thomas
  25. Adrian, sorry for the late reply. Thank you very much for the module. It solved my problem for once and will hopefully teach me to do that stuff myself Thanks, thomas
×
×
  • Create New...