All Activity

This stream auto-updates     

  1. Yesterday
  2. LostKobrakai

    There's lots of tooling and services available for po/mo files though. People might not want to translate things manually if there are ways to outsource or automate that task. So not needing to touch the JSON files is not necessarily an advantage.
  3. Macrura

    @LAPS form-builder.inc: /** * * Add custom scripts to the form. * */ $forms->addHookBefore('FormBuilder::render', function($event) { $form = $event->arguments(0); $config = wire('config'); switch ($form->name) { case 'name-of-form': $config->scripts->add($config->urls->templates . "libraries/chosen/name-of-js.js"); $config->styles->add($config->urls->templates . "libraries/chosen/name-of-css.css"); $config->scripts->add($config->urls->templates . "FormBuilder/custom-js-init-file.js"); break; // other forms can be added below... } }); in your init file: $("#Inputfield_name_of_input").chosen({ no_results_text: "The planet exists not", allow_single_deselect: true, width: '100%' });
  4. Beluga

    So a pretty cool thing happened
  5. dragan

    No. Read the instructions and infos here: https://modules.processwire.com/modules/textformatter-soundmanager/ Support forum:
  6. LAPS

    @Macrura, I do not understand how to configure the assets from within my formbuilder.inc file in my templates folder and how to add a init js file that would init the inputfield. Can you provide some more detailed guidelines to use ChosenSelect in FormBuilder to use pages? BTW/Note: I'm using ProcessWire 3.0.98
  7. tooth-paste

    How do you handle the back-end and upload. Is every file a page?
  8. Hi everyone, I have problems once again. This time it's about setting a certain field of a repeater item from a different page. This is what I have so far: I create a new repeater item on Page A via api using following code: // template of page A $item = $page->repeater_field->getNewItem(); //set content to fields.. $item->save(); $item_id = $item->id; //returns e.g. for $item_id = 1222 Now the goal is to set a field of that particular repeater item from Page B. But I am not able to get to the particular repater item to set a field. // template of page B $ref = $pages->get($page->page_a_reference->id); //With following code I get the repeater field items, but I cannot access (or determine) the repeater item I would like to get (with ID 1222). $rep = $ref->repeater_field; //Following code returns null //$rep = $ref->get(1222); What do I do wrong, or better asked, how can I set a field of a repeater item from different page?
  9. rick

    Thank you @Zeka. Your solution does work. The base images field allows for a local zip file to be added via the Choose File option. I haven't found a means to accomplish this from the API. For example, from the API: Download the desired file.zip file to a local folder. $this->config->paths->assets . "some-folder/" . basename( $url ); Pass the file from that local folder path to the images field. $page->images->Add( "/var/www/test/site/assets/some-folder/file.zip" ); Save the page. Does not work. However, if I select Choose File and navigate to that same folder, select file.zip, and click Open, the zip file contents are added to the images field. So there is a difference I haven't yet been able to determine.
  10. Macrura

    the Soundmanager2 module works well for me, using it on like 8 sites now, no problems so far.. Allows api use (e.g. code output in template) or shortcode, like in an RTE, insert an audio player; Rock solid, HTML5, read id 3, skins... really a dream module for audio in PW.
  11. Macrura

    You'd really need to be checking to see if there is an image, here in your code it takes the assumption there is always an image; but instead you'd want to check if there is an image prior to running size on it; that would solve your issue. $image = ''; if(count($page->images)) $image = $page->images->first(); $thumb = ''; $dims = ''; if($image !='') { $thumb = $image->size(100,100)->url; $dims = $image->width . 'x' . $image->height; } $data = array( 'title' => $page->title, 'thumb' => $thumb, 'img_dims' => $dims, 'edit_src' => $page->editUrl ); '<div class="item" style="width:100%;">' + (item.thumb ? '<div class="image-wrapper" style="float:left;"><img src="' + escape(item.thumb) + '" alt=""></div>' : '') + '<div class="info-wrapper" style="float:left; padding:5px;">' + '<span style="font-size:14px;font-weight:bold">' + escape(item.title) + '</span><br>' + '<span>Type: ' + escape(item.type) + '</span><br>' + (item.img_dims ? '<span>Dims: ' + escape(item.img_dims) + 'px</span><br>' : '') + '<a class="pw-modal pw-modal-medium" href="' + escape(item.edit_src) + '">Edit <span class="ui-icon ui-icon-extlink"></span></a></div>' + '</div>'
  12. dragan

    Why is JSON bad? It doesn't get much more convenient than PWs way of translating strings. You edit them right inside PW, under Setup > Languages > click on a language, then choose the language, and select a JSON and hit "edit" - you'll see text input fields for each string. No need to directly touch and edit the JSON file with a text editor.
  13. JSON files is bad. Need a convenient method of translation.
  14. wbmnfktr

    My fault. Even in Dev Tools / Inspector there is nothing. Ok... you found it already.
  15. dragan

    Found the culprit: I updated Admin On Steroids from 1.5.8 to the latest version and everything's fine again.
  16. dragan

    This only shows you the original HTML code. You have to open up the inspector to see the rendered code. Also, you can do CTRL + SHIFT + F in Chrome to search across all files (HTML, JS and CSS).
  17. modifiedcontent

    Can you use something else than page ID here? Like 'name = pagename' or 'name = $somepage'. What would be the right syntax? Or could you find/get that page ID earlier in the script and put it in a variable?
  18. flydev

    hehe this was sure !
  19. psy

    @flydev Well spotted! Thank you Turned off LastPass and all good
  20. flydev

    Yep I see, it happen to me with LastPass (could be something different here) but to be sure, did you tried by disabling the PasswordManager ?
  21. psy

    I do use LastPass but ensured that Barney's password field was blank before saving his record. When I changed Barney's username to 'barney', PW said the user already existed and changed it to fred-1, ie PW thought I editing Fred's record (I think!)
  22. flydev

    Could the culprit can be a Password Manager like LastPass or another one ?
  23. I recently upgraded a client site to the latest dev version of PW. All good there. Then wanted to ensure another superuser used the UiKit theme without them having to do anything. Scenario with names changed to protect the innocent: My username: Fred Other username: Barney Fred logged in and edited Barney's user account. Username now shows as 'fred' with Fred's email address, ie PW thinks it's Fred although Display Name shows Barney Rubble and the page id is definitely Barney's. Barney's username and email address are lost??? Regardless of what I put in Barney's username field, PW still thinks it's Fred and changes Barney's username to fred-1 and puts Fred's email address in Barney's user record email field. Is this expected behaviour or a bug? How can I change Barney's user account back to its original values? - Using PW v3.0.106
  24. wbmnfktr

    ProcessWire 3.0.106 and no inline styles so far.
  25. dragan

    https://www.google.ch/search?q=ckeditor+bug+copy+and+paste+from+word It seems like there are many others encountering that same bug. Someone here e.g. suggests to only use "basic HTML" instead of "full HTML" https://www.drupal.org/project/drupal/issues/2940054 https://github.com/ckeditor/ckeditor-dev/issues/595 ^ seems like pasting on mobile browsers is/was also an issue...
  26. Zeka

    I think you have to unzip it firstly and then add images to your images field $zip = $config->paths->cache . "archive.zip"; $dst = $config->paths->cache . "temp-zip/"; $items = $files->unzip($zip, $dst); $page->of(false); if(count($items)) { foreach($items as $item) { $page->images->add($item); } } $page->save();
  1. Load more activity
  • From Twitter

    • Get notified of updates

    • ProcessWire Weekly #215 - June 23 2018
      In the 215th issue of ProcessWire we take a closer look at two new third party modules, Log Maintenance and RockPdf, and also cover the latest post at the processwire.com blog co-authored by Ryan and Jonathan Lahijani. Read on! / Subscribe / More at weekly.pw