Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/27/2017 in all areas

  1. Sounds so good! And I just want to add my voice to @tpr's proposal made in the comments to one of the previous blog posts to integrate the best of the AOS features in to the core universal admin theme. So we can then just style them or turn them on and off like in the mentioned module. Maybe we can not only bring some new look but improve functionality at the same time.
    6 points
  2. Properties like $this->session and $this->input are only available in Wire-derived class, so you need either use wire() syntax throughout or extend Wire in your class declaration.
    3 points
  3. Welcome to the forums, @danielsl! You could do this: $p = $pages->get('/advert_page/'); $repeater_names = $p->fields->find('type=FieldtypeRepeater')->explode('name'); foreach($repeater_names as $repeater_name) { foreach($p->$repeater_name as $item) { // output your repeater item } } If you have repetitive markup that is used in several places also remember that you can put it an in an include to avoid repeating yourself.
    3 points
  4. mikeuk, I appreciate the kind words. The sidebar navigation is something I use very heavily myself, and I know a lot of people prefer that layout. That said, I think there are probably just as many who prefer the navigation where it is in the default theme. The ideal solution would be to make that configurable. There's been a lot of discussion around that in other threads, so I won't go into all the detail here. My hope is that at the end of this process we have a single core admin theme that can be tailored to a variety of layout & color scheme preferences.
    3 points
  5. @vwatson I was able to duplicate this issue when selecting text in a <td> and dragging the selection a little bit past the actual text. What I found is that you've got to be really careful with the link selection in a table cell, or else CKEditor will include part of the <td> element in the selection. The result is that when inserting a link of that selection, you get an invalid link, which isn't allowed there, so CKE moves it above the table. So far I can't figure out how to automatically modify that selection to narrow it in, but I did figure out how to detect it and cancel the action. I've also set it to show an alert box telling you to re-try the selection. This at least prevents the insertion of the invalid link. Please replace your /wire/modules/InputfieldCKEditor/plugins/pwlink/ directory with the contents of the attached ZIP file. Do you find this also resolves the issue there? Thanks. pwlink.zip
    3 points
  6. @Robin S's code is an excellent approach, @j00st! The ConnectPageFields module is great to have the admin user manage the relations is a much easier way. I have to implement it on this site the screenshot came from yet, as when I developed these connections the module wasn't available. As for your question, the code I used to create this page shown on the screenshot is taken from Ryan's blog profile tag template, mine version is below: /** * Generate a list of tags A-Z * * Used by the /site/templats/tags.php template file. * * VARIABLES: * ========== * $tags PageArray of tags * * Each of the tags has a numPosts property containing the number of posts used by the tag. * */ $lastLetter = ''; $out = ''; $letters = array(); $tags = $page->children(); foreach($tags as $tag) { $letter = strtoupper( substr( $sanitizer->pageName($tag->title, true) , 0, 1 ) ); if($letter != $lastLetter) { if($lastLetter) $out .= "</ul></div>"; $out .= "<div class='letter-group'>"; $out .= "<h3 id='letter_$letter' class='bg-tags text-center'>$letter</h3>"; $out .= "<ul class='no-bullet'>"; $letters[] = $letter; } $lastLetter = $letter; $page_count = $pages->count("tags=$tag"); $class = $page_count >= 10 ? 'u-strong' : ''; if($page_count > 1) { $out .= "<li class={$class}><a href='{$tag->url}'>{$tag->title} <span class='color-tags-dark25'>({$page_count})</span></a></li>"; } } $out .= "</ul></div>"; /I'm using TemplateLatteReplace module to outup to a view file. $view->letters = $letters; $view->tag_list = $out;
    3 points
  7. I don't believe it is a core module in processwire. However, if you go to Modules->New and paste in "TracyDebugger", you can add it to your processwire install.
    2 points
  8. @k07n and everyone else who uses this module. I just committed a pretty major revision to the API export method. It now works like this: $modules->get('ProcessTableCsvExport'); // load module // field name, delimiter, enclosure, file extension, multiple values separator, names in first row, columns to export, selector(filter) string // columns to export can be index starting at 1, or column names $page->exportTableCsv('table_field_name', ',', '"', 'csv', '|', true, array('col1', 'col2'), 'year=2017'); Unfortunately this is a breaking change, but I realized that the old approach didn't allow calling the method on an alternate page. This new version also supports limiting the exported columns (an array of column names, or indices starting at 1), as well as defining of a selector filter. Please let me know if you have any problems.
    2 points
  9. It depends. The admin.php is only executed if you visit the admin backend. If you add pages as part of any other page in your website the hook would need to be in site/ready.php. Also your hook was not correct. There's no Page::added hook (nor function), and in the Pages::added you can retrieve the saved page from the functions arguments. $this->wire()->addHookAfter('Pages::added', function($event) { $page = $event->arguments(0); if($page->template != 'xxx') return; $page->setAndSave([ 'page_select_field' => 1042, 'text_field' => 'Default Value' ]); });
    2 points
  10. $msg->children("sort=-created, limit=3")->reverse(); Is this what you're looking for?
    2 points
  11. Last update: June 2024 Current stable version: 1.5.4 Dev version: github dev-branch You can find the module on Github and in the modules directory : https://modules.processwire.com/modules/duplicator/ https://github.com/flydev-fr/Duplicator/archive/master.zip Screenshots / Features Dir and files exclusion CRON job Advanced settings Local and Cloud storage duplicator.mp4
    1 point
  12. NOTE: This thread originally started in the Pub section of the forum. Since we moved it into the Plugin/Modules section I edited this post to meet the guidelines but also left the original content so that the replies can make sense. ProcessGraphQL ProcessGraphQL seamlessly integrates to your ProcessWire web app and allows you to serve the GraphQL api of your existing content. You don't need to apply changes to your content or it's structure. Just choose what you want to serve via GraphQL and your API is ready. Warning: The module supports PHP version >= 5.5 and ProcessWire version >= 3. Links: Zip Download Github Repo ScreenCast PW modules Page Please refer to the Readme to learn more about how to use the module. Original post starts here... Hi Everyone! I became very interested in this GraphQL thing lately and decided to learn a bit about it. And what is the better way of learning a new thing than making a ProcessWire module out of it! For those who are wondering what GraphQL is, in short, it is an alternative to REST. I couldn't find the thread but I remember that Ryan was not very happy with the REST and did not see much value in it. He offered his own AJAX API instead, but it doesn't seem to be supported much by him, and was never published to official modules directory. While ProcessWire's API is already amazing and allows you to quickly serve your content in any format with less than ten lines of code, I think it might be convenient to install a module and have JSON access to all of your content instantly. Especially this could be useful for developers that use ProcessWire as a framework instead of CMS. GraphQL is much more flexible than REST. In fact you can build queries in GraphQL with the same patterns you do with ProcessWire API. Ok, Ok. Enough talk. Here is what the module does after just installing it into skyscrapers profile. It supports filtering via ProcessWire selectors and complex fields like FieldtypeImage or FieldtypePage. See more demo here The module is ready to be used, but there are lots of things could be added to it. Like supporting any type of fields via third party modules, authentication, permissions on field level, optimization and so on. I would love to continue to develop it further if I would only know that there is an interest in it. It would be great to hear some feedback from you. I did not open a thread in modules section of the forum because I wanted to be sure there is interest in it first. You can install and learn about it more from it's repository. It should work with PHP >=5.5 and ProcessWire 3.x.x. The support for 2.x.x version is not planned yet. Please open an issue if you find bugs or you want some features added in issue tracker. Or you can share your experience with the module here in this thread.
    1 point
  13. DEPRECATED - this module will not see any updates. I'm short before releasing RockGrid as commercial module. If you are interested contact me via PM this is a preview of a module that i'm working on for quite a long time. I needed it for an intranet office management application that i'm still working on. It makes it very easy to create very customized Datatables using the awesome jquery datatables plugin (www.datatables.net) Download - sorry, removed as it changes too frequently; closed alpha - contact me if you think you can contribute Remarks: The module is intended to be used on the backend. Loading styles is at the moment only done via adding files to the $config->styles/scripts arrays. Also the communicaton to javascript is done via the $config->js() method that is built into the admin and would have to be implemented manually on frontend use. But it would not be difficult of course Installation: Nothing special here, just download + install edit: removed some parts, because i made a complete rewrite of the module (and may not have been the last one)! [...] removed Why i created this module: of course i know @Soma s module but i needed a lot more features and the newer datatables version. also i like to define all the columns as objects and have everything on one place. lister & markupadmindatatable: nice for basic tables but lacks of features to modify the appearance of the cell values (like rendering icons, background colors and so on) datatables provides a great frontend API for filtering, showing/hiding columns, getting data, modifying it... it also plays well together with frontend charts like google chart api in this case: todo / roadmap: reload only one row add filters to all columns (in future also dropdowns, smaller than, bigger than, Regex, ...) make it possible to add table on frontend pages make buttons look like pw buttons make it possible to set settings globally and only for one table provide easy way of colorbars (percentage, red/green), maybe at different positions (left, top, right, bottom) provide easy way of adding action items (edit, show, link etc - visible or onhover) make own layout for tables (topleft, topright, bottom etc to make it easy to create extensions and show messages) privide way of simple javascript plugins (like I already have for row sums etc) provide easy way of handling actions for all selected items (delete selected, update selected...) provide easy way of reloading data (--> easy when using ajax source) easy way of showing/hiding columns excel/csv/clipboard export GUI for table setup processmodule to show different tables (lister replacement)
    1 point
  14. Of course, I waited for this all day I may try to implement the full-width bcePageName layout tomorrow too if you don't mind.
    1 point
  15. Great updates, thanks! My only concern is the styling (again :)) of the new tooltip. It's too big here and all uppercase, I guess some CSS is interfering. My only idea that could work is adding a +/- icons to the end of the rows (or start), and clicking on them would open a full-width row below the actual line containing all these details. Of course this would require a click to work (and another to close) but maybe it would worth it. But it's just an idea.
    1 point
  16. Yes, the full rule is... #ProcessListerResults select, #ProcessListerResults textarea, #ProcessListerResults input[type="url"], #ProcessListerResults input[type="email"], #ProcessListerResults input[type="text"] { width: 100%; } ...in ProcessPageListerPro.css So you could override that specific rule or use a more generic rule like in my previous post to try and force the filterbox input to always be width:auto - whichever you think best. Thanks.
    1 point
  17. I don't have ListerPro but I can add this line if you say it fixes it. I've searched for 100% width in AOS but it seems that it's coming from ListerPro, right?
    1 point
  18. @tpr, I noticed that the filter box icon is out of alignment on Lister Pro pages. Not sure if you have Lister Pro available to test on but the culprit is a CSS rule that sets text inputs to 100% width inside #ProcessListerResults. Maybe force the width back to auto for the filterbox? html.aos div.filterbox input[type="text"] { width:auto !important; }
    1 point
  19. Thanks again @tpr for the feedback. I have changed the icon to the info-circle. I have added a new tooltip which provides a summary of titles/names for all languages: For the Add New page problem - I decided to go with populating the default language with the values for the current user language so there is at least valid entries for these that can be edited later if needed. Note that I also added a Language label at the top of the table (rather than being added to several columns in the table). I would also like to mention the awesome Language Switcher in your AOS module - I think that having that enabled along with the new changes to BCE actually makes for a pretty decent start to multi-language support because it makes it so easy to instantly switch languages. I think this new version is ready for release, but will attach here for one more review by you (and anyone else who is interested). Thanks, Adrian BatchChildEditor.zip
    1 point
  20. I have already upgraded to MAMP Pro 4 so I cannot be of much help here, but you might want to know that it is easy to "turn on" ImageMagick with MAMP Pro 4: EDIT: I forgot to mention that it is MAMP Pro 4 I use...
    1 point
  21. What does phpinfo() output in that regard (ini file location and whether ImageMagick is enabled)? Is the file you edited the correct one (and, if you're using MAMP Pro, could it be that it was overwritten by its template mechanism)?
    1 point
  22. Hi @Nukro, Hmm, the default setting is to skip duplicate media. So, if media is being replaced the user must have set it so in the settings. A warning popup would just be an extra, to affirm what they've already set. I am not sure it will be easy/practical to implement since uploading is done via Ajax. I'll have a think. [Edit: should be easy enough as a checkbox to confirm before hitting upload ] By the way, I was not able to finish my write-up as promised in a previous post. I am determined to do this by the end of this week. Thanks for being patient with me.
    1 point
  23. Thank you szabez!! Your post looks ideal for me and helped a lot selector arrays would be much better in other places of my projects code as well
    1 point
  24. Ok, I can reproduce here. I'll commit the fix shortly, but in the meantime, replace line 107 with this: $rows = $p->$actualFieldName(ltrim($this->wire('input')->get->filter, ',')."limit=".$totalRows);
    1 point
  25. Wow! Thanks for all the examples @Sérgio & @Robin S! I'm going to run through them again, and see how I can best put them to use! If this won't work, I don't know what will Thanks again!
    1 point
  26. You're the man!!! benggg....problem solved
    1 point
  27. Swithcing to "selector arrays" might help to workaround this limitation: https://processwire.com/blog/posts/processwire-3.0.13-selector-upgrades-and-new-form-builder-version/#selector-engine-array-support
    1 point
  28. Yeah … maybe I'll give it a try. Had just a short look into the code, don't know if I understand everything And that could be the bottle neck, if I need to update it somewhen
    1 point
  29. @suntrop That decision is up to you of course. Since the module is released open source, you are free to change the code according to your needs - should you need any starting point ;-)
    1 point
  30. Ha ha guessing isn't a good habit when programming. However, I just checked and this code will have my system user as created and modified $c->created_users_id = $this->systemUser; $c->modified_users_id = $this->systemUser; $c->save(array('quiet' => true));
    1 point
  31. if anyone wants to allow e-mail and name in admin login with PW 3.x (and i guess 2.8) the module from @mindplay.dk wasn't working for me, i guess because ProcessLogin::execute is not pageName sanitizing the name.. this one works for me (PW 3.0.51) and allows either name or e-mail (you could change the name label to reflect this too of course) // change login name input label to e-mail-address $wire->addHookAfter('ProcessLogin::buildLoginForm', function(HookEvent $event) { // on liner as we don't change anything else $event->return->get('login_name')->set('label', $event->_('E-Mail-Address')); }); // hook into session::login to get user by mail $wire->addHookBefore('Session::login', function(HookEvent $event) { // need to get email from $input as processLogin::execute is pageName sanitizing $email = $event->input->post->email('login_name'); // stop here if login_name not a valid email if (!$email) return; // new selector arrays don't seem to work on $user so using $pages here $user = $event->pages->get([['email', $email]]); // if valid user set login name argument if ($user->id) $event->setArgument('name', $user->name); }); i've got those in a _hooks.php included in my site/init.php but you could of course outsource it into a separate module etc..
    1 point
  32. Thanks horst. Couldn't work out how to do this, and was early enough in the process to re-start.
    1 point
  33. Repeater items are stored under the admin tree in ProcessWire, thus they are only visible in find() calls for users with admin permissions. You can circumvent that by adding "check_access=0" to your selector.
    1 point
  34. I want to thank you Ryan for organizing this community effort. Inviting and encouraging to participate in development, making it this straight forward is something rare and yet unusual even for such a great community as ours. It is interesting how things will turn out. Seems like @renobird is going to be leading this endeavour. What could be our strategies to participate? P.S. By the way, do not forget to check out the off-canvas menu in the demo.
    1 point
  35. Yes, correct on both. One advantage of the Connect Page Fields module is that it can make the generation of your tags page more efficient. How much so depends on what you want to show on the tags page. To explain... For a page like the screenshot from @Sérgio, with a count next to each tag link, the typical way using only common API methods would be something like: $tags = $pages->find("template=tag, sort=title"); foreach($tags as $tag) { $count = $pages->count("tags=$tag"); // count how many pages have this tag selected // now output the tag link and count } And if you happened to want to list the articles that use each tag underneath that tag you would do something like: $tags = $pages->find("template=tag, sort=title"); foreach($tags as $tag) { $tagged_pages = $pages->find("tags=$tag"); // find pages that have this tag selected // now output the tag and the list of pages } A $pages->count() has less overhead than a $pages->find(), but it's still a lot of DB queries if you have a lot of tags. You'd probably want to cache this if you did it this way. With Connect Page Fields, the pages that use the tag are stored in a Page field so you can easily get a count or the pages themselves directly: $tags = $pages->find("template=tag, sort=title"); foreach($tags as $tag) { // you probably wouldn't bother assigning these to variables but just for demonstration $count = $tag->articles->count(); $tagged_pages = $tag->articles; // output your tag, count, etc } And for one more option involving a single SQL query on the tags table see this:
    1 point
  36. Have you tried replacing your entire wire folder? Also, what version are you running - I assume 3.x, but perhaps try upgrading to the latest to see if that helps.
    1 point
  37. I know this is a little late and it shouldn't happen when using the built-in front-end editing, but when I use frontend forms that need some core js, like AsmSelect fields, since PW 3, I now need to do this to define "ProcessWire" in js. <script type="text/javascript"> <?php $jsConfig = $config->js(); ?> var ProcessWire = {config: <?php echo json_encode($jsConfig); ?>}; </script>
    1 point
  38. @Nurguly Ashyrov, this is really awesome. My front-end work is mostly JS/SPA work these days and I learnt to love the “headless”/“api first“ approach of commercial CMSes like Contentful. So I often thought about what a perfect and easy to manage back-end ProcessWire would be with a solid HTTP-based api built right in to allow uncoupling actual front-end/ui parts like admin and user interfaces (as actual self-contained apps) from the CMS itself. A module like yours makes a huge leap in this direction and will make ProcessWire much more interesting for a lot of front-end devs and e.g. as a flexible and fast to set up back-end for app prototyping/mvp development. A pity this didn’t exist 9 month ago!
    1 point
  39. You need to initialise/reset the $selected variable in each iteration of the loop. Otherwise two things will happen: 1. If the first child of /sectors/ is not in the whitelist array you will get an undefined variable notice. 2. After one child name is found in the whitelist array and $selected is defined as ' selected ' then all subsequent iterations will output ' selected ', regardless of if that input is in the whitelist array or not. This is the problem you are getting now. So it should be something like: foreach($pages->get("/sectors/")->children() as $sec) { $selected = ''; if(is_array($input->whitelist->cb_sectors) && in_array($sec->name, $input->whitelist->cb_sectors)) $selected = ' selected '; // echo, etc... }
    1 point
  40. I have no idea why you have such a setup but anyway, here goes. As per the instructions, your Hook needs to return a PageArray. This is untested: $wire->addHookAfter('InputfieldPage::getSelectablePages', function($event) { if($event->object->name == 'result_judge_challenge') { $page = $event->arguments('page'); $event->return = $page->parent->parent_multi_page_field;// this should return a PageArray } }); You might want to add checks to see if the parent page actually has items in its page field.
    1 point
  41. $input->whitelist does not store values. It does just mark $input variables of the current request, so they can be appended to (pagination) links as ?my_data=xyz variables, which on the next request can be read again. If non of those links is clicked the values are gone. The most prominent use case is preserving any user filter values while going through pages of results. Having the values in the url also makes sure you can send that url to your peer and he or she can open it as well. Anything you don't want the user to see/modify you'd use the session.
    1 point
  42. You are missing an echo statement:
    1 point
  43. What form do you mean? A Page Edit form? You could look at these as a starting point: http://modules.processwire.com/modules/form-template-processor/ https://gist.github.com/somatonic/5011926
    1 point
  44. Hi, a related topic: If you want to be fully flexible, you have to implement your own forms. Of course, you can do it by relying on the ProcessWire API, but not the Form API of the backend. EDIT: I forgot to bring your attention to this one:
    1 point
  45. This footer looks like it contains lists of links. My first thought would be to create a repeater field "footeritems" consisting of a text field "label" and a page field "links" configured to hold multiple pages. Then you add a repeater item, give it the label "Category" and add all the pages like "Tanks & Spaghettis", "T Shirts & Polo T Shirts", ... Your PHP template then only needs to loop over the repeater, output the label as the heading and the pages as list items. Of course, this assumes that all the links shown exist as actual pages and not just URL segments. foreach($page->footeritems as $item) { echo "<div class='uk-panel'><div class='uk-panel-title'>{$item->label}</div><ul>"; foreach($item->links as $link) { echo "<li><a href='{$link->url}'>{$link->title}</a></li>"; } echo "</ul></div>"; }
    1 point
  46. Hello @Kass and welcome to the forum ! Your issue is easy to solve. So just after your div/container, add another div, for example : <div id="meanmenu-container"></div> after that - I am sorry I included the minified version of meanmenu - edit jquery.meanmenu.min.js and seek the property meanMenuContainer then add as value our new div: '#meanmenu-container' [...] meanMenuContainer: '#meanmenu-container', // Choose where meanmenu will be placed within the HTML [...] Now the languages bar should be above of the responsive menu (thanks Kongondo)
    1 point
  47. Here is a tipp for you if you want to check for validation errors in inputfields before processing php code inside a Hook function. My goal was to run the code inside the Hook function only if there are no errors after processing the form in the backend. $pages->addHookBefore('saveReady', function($event) { $page = $event->arguments[0]; //count errors during input process $errors = $page->errors('all'); $errors = count($errors); if ($errors == 0) { ......//run your code } }); In this case I run a Hook before "saveReady" inside my ready.php. But I only want to run my php.code inside this Hook function if there are no errors in the form submission. So I need to check for errors in the form submission first. These 3 simple lines of code are necessary: $page = $event->arguments[0]; //count errors during input process $errors = $page->errors('all'); $errors = count($errors); The first step is to define the page variable $page; Second step is to get the error array Last step is to count the entries in the array to get the number of the errors Thats all! Afterwards you can use the number of errors in an if-statement to run the code only if there are no errors. Hope this will be helpful for someone.
    1 point
  48. It's because the events are being triggered too early, before the Color Picker's HTML is even added to the DOM, and also the event was missing for the standard repeater (which I've added). This version of InputfieldColorPicker.js is working now. I can't confirm it works for the repeater matrix, but if the class names used in the JS code above are correct, it should just work. I also added safeguards so that multiple events are not applied to the same elements. /** * An Inputfieldtype for handling Colors * used by the FieldtypeColorPicker/InputfieldColorPicker * * created by Philipp "Soma" Urlich * ColorPicker jQuery Plugin by http://www.eyecon.ro/colorpicker/ * * Licensed under LGPL3 http://www.gnu.org/licenses/lgpl-3.0.txt * */ function initColorPicker() { $('div[id^=ColorPicker_]:not(.color-picker-init)').addClass('color-picker-init').each(function(){ var $colorpicker = $(this); $colorpicker.ColorPicker({ color: $(this).data('color').toString(), onShow: function (colpkr) { $(colpkr).fadeIn(500); return false; }, onHide: function (colpkr) { $(colpkr).fadeOut(500); return false; }, onChange: function (hsb, hex, rgb) { $colorpicker.css('backgroundColor', '#' + hex); $colorpicker.css('background-image', 'none'); $colorpicker.next('input').val(hex).trigger('change'); } }); }); $('a.ColorPickerReset:not(.color-picker-init)').addClass('color-picker-init').on('click',function(e){ e.preventDefault(); var color = $(this).data('default') && $(this).data('default') != 'transp' ? '#' + $(this).data('default').toString() : 'transparent'; $(this).parent().find('input').val($(this).data('default')).trigger('change'); $(this).parent().find('div[id^=ColorPicker_]').ColorPickerSetColor($(this).data('default').toString()); $(this).parent().find('div[id^=ColorPicker_]') .css('backgroundColor', color) .css('background-image', 'none') .attr('data-color', $(this).data('default').toString()); if(color == 'transparent') { var modurl = $(this).data('modurl'); $(this).parent().find('div[id^=ColorPicker_]') .css('background-image', 'url(' + modurl + 'transparent.gif)'); } }); /* additions (swatches) by @Rayden */ $('div.ColorPickerSwatch:not(.color-picker-init)').addClass('color-picker-init').on('click',function(e){ e.preventDefault(); var color = $(this).data('color') && $(this).data('color') != 'transp' ? '#' + $(this).data('color').toString() : 'transparent'; $(this).closest('.ui-widget-content, .InputfieldContent').find('input').val($(this).data('color')).trigger('change'); $(this).closest('.ui-widget-content, .InputfieldContent').find('div[id^=ColorPicker_]').ColorPickerSetColor($(this).data('color').toString()); $(this).closest('.ui-widget-content, .InputfieldContent').find('div[id^=ColorPicker_]') .css('backgroundColor', color) .css('background-image', 'none') .attr('data-color', $(this).data('color').toString()); if(color == 'transparent') { var modurl = $(this).closest('.ui-widget-content, .InputfieldContent').find('.ColorPickerReset').data('modurl'); $(this).closest('.ui-widget-content, .InputfieldContent').find('div[id^=ColorPicker_]') .css('background-image', 'url(' + modurl + 'transparent.gif)'); } }); } $(function(){ /** * Looks like its due to events being fired too early. */ function delayedInit(event) { console.log(event.type); setTimeout(initColorPicker, 500); setTimeout(initColorPicker, 1000); } $(document).on('opened', '.InputfieldRepeaterItem', delayedInit); $(document).on('repeateradd', '.InputfieldRepeater .InputfieldRepeaterAddLink', delayedInit); $(document).on('repeateradd', '.InputfieldRepeaterMatrix .InputfieldRepeaterMatrixAddLink', delayedInit); initColorPicker(); }); Hope that helps.
    1 point
  49. Hello OLSA, I don't know exactly how the structure of your template folder is, but I had the same error message "Call to undefined function __()", when I tried to use an translatable string inside an php include file like this: echo __("String to translate"); I solved this error by using the $this->_() wrap mentioned in the documentation: echo $this->_("String to translate"); Maybe this will solve your problem. Personally I never had problems with the template compilation, but If you have and want to disable the template compilation, you should be sure to add the ProcessWire namespace at the beginning of your template files. I wouldn't disable the module compilation, because most of the modules aren't yet compatible with PW3 without the module it. If Wamp supports PHP7 you could try if it improves your back end performance. Regards, Andreas
    1 point
  50. If you really want to use automatic deployment you need to do it the same way as in every other framework and not use any GUI at all for everything which needs to be created in the deployment. I recently created just a small process module, that does list all migration classes in a certain folder, which do just have a update and downgrade function. With the api and some small helper functions one can mimic the things you do in the GUI quite easily and you've the benefit that every change is also source controlled (and/or versioned). I'm currently using it manually, but these can also be called automatically by a deployment script.
    1 point
×
×
  • Create New...