Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/02/2018 in all areas

  1. Thanks to all that have been helping us to wrap up issue reports on GitHub in preparation for the next master version of the ProcessWire core. Unless any major issues surface, most likely 3.0.95 (next week) will be the next master version. Like last week's version 3.0.93, this week's version 3.0.94 continues along the same path in clearing up new and existing issue reports, and fine tuning little details for the master branch. If you come across any new significant issues please submit them in the issues repository. Or if you opened an issue awhile ago and we haven't fixed it yet, please check that the issue is still applicable and reply to let us know. No blog post this week because I don't have anything else new or interesting to write about other than this. But I am definitely getting excited about having a new master version ready. There's no doubt, this is a really nice upgrade relative to the current master 3.0.62. Have a great weekend!
    14 points
  2. Hi, A) it is not a problem that PW has. Every one with this meaning should have a closer look to the screen that you have posted to dropbox: The software is running without problems. It informs you, the superuser, about something language related, at a stage where it cannot know what you want to do with the site. B) It is not a bug, it is a warning or information to the superuser which is the admin. These sort of informations are never displayed to users, only to superuser(s). Superusers are some sort of bus drivers, right? They need to know how much fuel is available and if the tire pressure is to low or not. The other users don't need to know all that informations, they are not driving the bus. C) If you use a default english windows system, bought as a german in germany, and it has no de_locale settings, is this a bug? Or is it disrespectful, that it doesn't assume that the most clients may be germans and may want to use german language with german dates and german float numbers? I don't want to become nitpicking here. If a user has no knowledge of the nature of default PHP installations, how should he know that it is set for EN-locale and not DE? Does the hosting company welcome you in english or in german on their websites? (If they do in german, it is a clear sign for me that they assume you are a german person.) Maybe one can say that both ways have their pros and cons? If a PC-software informs you about a configuration of your system, that has potential to be not correct for your usage, it is one way that may help users with no knowledge about a special fact. But other then a hosting company in a special country, PW cannot "assume" the most used language there, PW is installed around the world. IMO, a hosting company may assume this, but also don't need to act upon it! It is like with a car dealer, he can buy you a car or ten cars, without to care if you can drive or have a driver licence. Should he do care? An example: If a person with no knowledge uses something two years long, without to get confronted with some facts that may need recognition or a decision, the person will have the same level of knowledge in this regard after the two years. If a person gets confronted with those facts and get pushed a bit to start to look behind the scenes of some things, he/she will have more knowledge after the two years. Is more knowledge usefull or obstructive? (You see, we are now on the floor called philosophy. ) As another example, take your own current situation: You don't understand exactly what this locale thing is or means. Is it a bug, is it an information, is it related to PHP, to PW, to something else? You are sitting between all chairs of your friend, a hosting company and some PW lovers. Not as comfortable as it could be. If you would have get some knowledge about that thing in the past, you simply would know all relevant facts about it on your own and you now already would have done some experiments with building your site. You already would have made your hands dirty with coding. IMHO, its PWs philosophy to force the (super)users into a bit more knowledge. But it is up to you, the superuser (or bus driver), which route you want to follow. Do you want to take the red pil or the blue pil? https://youtu.be/OuJ87X9YX3c?t=57 Maybe you know the SELFHTML project in germany? It's slogan was or is: Die Energie des Verstehens (The energy of understanding). It was my ever goto reference since I started with webstuff in 1998/1999. (Now you know the time when I decided to take the red one ) To sum up: Neither the hosting company is wrong, not to assume a default language, nor PW is. It's only my personal opinion when I said that it could be more by the hosting company to assume a default language, than it could be by PW. But neither the web host is buggy nor PW is in this regard. PS: Also, for me it is not a question which pil is yours. Only question for me is: Do you already have taken it, or are you just in the moment before it?
    6 points
  3. It's a known issue that was fixed in 3.0.80.
    4 points
  4. Just wanted to say how great all these new ASM tweaks are - thanks @tpr and @Karl_T
    4 points
  5. 3 points
  6. Hi Theo, Just to confirm that "mod_security" was indeed the problem on our particular hosting environment with the "ProcessWireUpgrade " module downloading the requisite .zip file for upgrade to the cache, but not being unable to access it to install. With "mod_security" disabled it was possible to install without creating a backup first. Hope this helps. Regards, Hackasacka
    3 points
  7. Ok, that thing wasn't that successful so @Karl_T's workaround was kept to keep the scroll position, thanks! Works quite well now, that was the missing piece to the cake I haven't made keeping the scroll position optional but did that for the searched term.
    3 points
  8. In a project I had to add the attribute 'disable' to some options of a select field (page reference) to show them but make them unselectable. Since I could not find an integrated solution, I wrote a tiny module and a hook. This could also be a POC to similar needs. Install module Add the Module to InputfieldPage in the module settings to make it selectable as Inputfield for page reference fields Create a hook in ready.php to manipulate attributes of the <option> tag for specified items Module <?php namespace ProcessWire; /** * POC Inputfield Select Hook Add Option -- Replacement for InputfieldSelect * * Selection of a single value from a select pulldown. Same like InputfieldSelect * except this version provides hookable addOption() function which allows to modify * attributes of the <option> tag (i. e. 'disabled' to show items but disallow to select them * * @author Christoph Thelen aka @kixe * */ class InputfieldSelectHookAddOption extends InputfieldSelect { /** * Return information about this module * */ public static function getModuleInfo() { return array( 'title' => __('Select Hookable Add Option', __FILE__), // Module Title 'summary' => __('Selection of a single value from a select pulldown. Same like InputfieldSelect. except this version provides hookable addOption() function which allows to modify attributes of the <option> tag (e.g. \'disabled\' to show items in dropdown but disallow to select', __FILE__), // Module Summary 'version' => 100, ); } /** * Hook in here to modify attributes */ public function ___addOptionAttributes($value, $label) { return array(); } /** * @see InputfieldSelect::addOption() * */ public function addOption($value, $label = null, array $attributes = null) { if (!is_array($attributes)) $attributes = array(); $attributes = array_merge($attributes, $this->addOptionAttributes($value, $label)); return parent::addOption($value, $label, $attributes); } } Hook /** * This example hook modifies the attributes of the selectable options of a Pagereference field named 'test'. * The selectable pages have the template 'test' assigned which includes a checkbox 'disallow'. * The attribute 'disabled' will be added to the selectable page if the user does not have the role 'user-extended' and 'disallow' is set. * */ $wire->addHookAfter('InputfieldSelectHookAddOption::addOptionAttributes', function($e) { // quick exit if ($e->object->name != 'test') return; if ($this->wire('user')->isSuperuser()|| $this->wire('user')->hasRole('user-extended')) return; // disable items (pages) in select $restrictedPageIDs = $this->wire('pages')->find('template=test,disallow=1')->each('id'); if (in_array($e->arguments[0], $restrictedPageIDs)) $e->return = array('disabled' => 'disabled'); });
    2 points
  9. What is one to do when someone willingly chooses not to read the provided instructions or refuses to abide by any restrictions that are prominently explained? A lack of adequate documentation is one thing and should be brought to the attention of the Module Developer.
    2 points
  10. Now i've had a hard time with strange results until I found out that MySQL WHERE IN () does not necessarily retain the sort order of the ids you pass it. You have to pass the ids again in an ORDER BY statement. $pagesset = implode(",", $pages); $sql .= "\nFROM\n pages AS p"; $sql .= "\nWHERE\n p.id IN (" . $pagesset . ")"; $sql .= "\nORDER BY FIELD(p.id," . $pagesset . ")"; echo '<pre>' . $sql . '</pre>'; $results = $this->database->query($sql); $event->return = $results->fetchAll($type);
    2 points
  11. Thanks but this case this signals that the field is ready, but select2.js needs asmSelect to be ready too. I used a 700ms setTimeout to fix (using the reloaded event) but that was less reliable and much slower too. In fact it may work now that I modified my stuff a lot but I think requestanimationframe works just fine, no need to swap out.
    2 points
  12. I think your are outputing things wrong I see this line: <?php foreach($pages->find("parent=1034") as $item) { echo "<li><a href='index.htm#' data-filter='.{$item->select->category}'>$item->title</a></li>"; } ?> </li> You say the category field is named category? what is that select field you are accessing? I would have expected the code to be like this: <?php foreach($pages->find("parent=1034") as $item) { echo "<li><a href='index.htm#' data-filter='.{$item->title}'>$item->title</a></li>"; } ?> </li> This should output the category title. And on the actual portolio items: <div class="portfolio-item {$item->category->title}<?php echo $single->category->title ?> ">
    2 points
  13. Maybe you can hook Page::path and check if there is urlSegment and then append /amp/. wire()->addHookAfter("Page(template=news)::path", function($e) { $input = wire('input'); if($input->urlSegment1) { $e->return = $e->return . "amp/"; } }); In that way, if a user visits AMP version of a page all links will be linked to AMP versions of other pages.
    2 points
  14. A minor gripe but one that trips me up every time. When there's naming error on a field, ALL the field values are erased and I have to setup everything again. IE name, type, label and descriptions details and sometimes notes. Would be really helpful if ProcessWire didn't zap all the values but just cleared the illegal field name.
    2 points
  15. One of ProcessWire's strength is its .htaccess file. I've never come across another CMS which such a useful one. A lot of security and other issues are taken care of, most of the time we just have to read the inline comments and comment/uncomment lines. If that is not enough, ProcessWire's documentation is adequate in this area, but just in case one runs into issues not yet documented, this forum is full of help. For example, I wanted to remove www from the domain, and in the forum there is a good solution to do just that. Sure, first impression does matter but .htaccess issues can be complex, and most of the time ProcessWire just runs without modifying anything in .htaccess.
    1 point
  16. Looks like a bug in the new ASM tweaks. It's fine if at least one item is selected: But. if you remove the selection in the first ASM, then the field is broken: Here is the js error: Uncaught TypeError: Cannot read property 'length' of null at HTMLSelectElement.<anonymous> (aos.min.js?ts=1.7.8_2018030213:1) at Function.each (JqueryCore.js?v=1519661844:2) at init.each (JqueryCore.js?v=1519661844:2) at HTMLDocument.<anonymous> (aos.min.js?ts=1.7.8_2018030213:1) at l (JqueryCore.js?v=1519661844:2) at Object.fireWith [as resolveWith] (JqueryCore.js?v=1519661844:2) at Function.ready (JqueryCore.js?v=1519661844:2) at HTMLDocument.A (JqueryCore.js?v=1519661844:2)
    1 point
  17. This sounds strange. If you say "can choose one": Did you hack the table plugin so they have an actual dropdown-menu for table-classes? Or do you mean they can manually add one of your table CSS classes inside CKE? In an existing table, I can simply right-click anywhere in the table and choose "table properties" (Tabellen-Eigenschaften), and I see the same popup. This also works if I use frontend-editing. Provide some more details (browser, PW version etc.) please, then we can perhaps narrow down your specific problem.
    1 point
  18. I don't use multi-instance support but looking at the code it's a bug for me. The culprit is here: $parts = explode('/', $rootPath); Since windows path doesn't start with a slash, $parts is different on nix and windows. Temporary detour (until Ryan fix it) could be using / as the first character in the path: $path = "/F:/vhosts/sandpit.dev/site-mediamanager"; // OR // $path = "\\F:\\vhosts\\sandpit.dev\\site-mediamanager" I'm not sure what impact would that have later on...
    1 point
  19. I've dealt in the past with a web host who enabled some ModSecurity or Custom settings that were geared towards protecting WordPress installations. This affected some of my clients PW sites on shared hosting. Once I sent a message to the web host, letting them know these weren't WP sites and that their changes were impacting the PW sites, they relented and removed the WP-specific host settings.
    1 point
  20. @kongondo I do. I would be able to test it tomorrow if still needed.
    1 point
  21. You could also just use selector arrays and avoid the mess of that selector string. https://processwire.com/blog/posts/processwire-3.0.13-selector-upgrades-and-new-form-builder-version/#building-a-selector-string-with-user-input-example
    1 point
  22. I think checkboxes are sometimes confusing to users and replacing them with an on/off switch can go a long way to making it more obvious. For example, a Yes/No button is more obvious/clear than the assumption that "if this is checked it means yes, and if this is not checked it means no"; For example i'm using this library (incorporated and initialized on some checkbox inputs): https://github.com/olance/jQuery-switchButton Here is my initialized checkbox in PW admin: This still doesn't solve the conundrum of where you want to have it checked by default... the checkbox reversed module is a clever way to solve that...other than js to set the checked attrib..
    1 point
  23. Oops, that was my mistake. the radio input and select were sharing a name, product_id. I have renamed them to product_id_color and product_id_angle respectively. This does not solve your problem though. If you want to combine the values of product_id_color and product_id_angle, you need JavaScript. You can either create a hidden input product_id whose value is dynamically changed to be the combined values of product_id_color and product_id_angle or on form submit, do the combination then. This assumes you cannot do the combination server-side. That combined value could look like 1234_5678 where 1234 is the value of the color and 5678 is the value of the angle. Server-side, you split/explode the string at "_". I could write some JavaScript later (for the values combination) if you are struggling with that. On the server-side, how are you handling things? Where is the form being submitted? Are you using Padloper? What post input does your system expect, product_id? We can help better if we have this info. Or maybe you mentioned this already and I missed it?
    1 point
  24. This is most likely because you had bad HTML in your markup. Your angles <select> does not have a name attribute; instead you put the name attribute in the <option>. See my code above with the refactored code.
    1 point
  25. Maybe the code can be cleaned up a little? E.g. no need for two loops. I've also cleaned up the HTML a little bit (e.g. id=color_page_id rather than id=page_id), given the select an ID so you can space it out as needed instead of using a <br>, etc . It also needs a name attribute. $colors = ''; $angles = ''; foreach ($page->variations as $p){ // add colors if ($p->color_choose->title){ $colors .= "<input class='{$p->color_choose->title}' type='radio' name='product_id_color' id='color_{$p->id}' value='{$p->id}'>" . "<label class='{$p->color_choose->title}' for='color_{$p->id}'></label>" . "</input>"; } // add angles if ($p->angle_choose->title) { $angles .= "<option value='{$ps->id}'>{$ps->angle_choose->title}</option>"; } } } $angles = "<select id='angles' name='product_id_angle'>{$angles}</select>"; // add colors and angles markup to $addcart $addcart .= $colors . $angles;
    1 point
  26. theres a installation manual with this informations https://processwire.com/docs/install/ And the troubleshooting https://processwire.com/docs/install/troubleshooting/
    1 point
  27. Concerning this warning about the missing locale: Indeed one should just exactly do, what the warning says - open the given links to the Core Translation Files, look for the "C" and then enter "en_US.UTF-8" for the locale, which should be used for PHP. When you want to change this again later, you will find that under Setup -> Languages -> Language and then the "edit" link in the section "Core Translation Files". If you need German (or any other) as language - you have to add it first in Setup -> Languages using "Add New". Hope I got it all right - because so far I have exactly no experience with ProcessWire at all. This is just what I found out by looking at it (really).
    1 point
  28. The searchable AsmSelect feature is cool! Just wanted to add: ajax-loaded inputfields (via inputfield visibility setting or repeater item setting) trigger a "reloaded" event on the inputfield to signal when the field is loaded. So you could use this instead of the requestAnimationFrame trick if you want. See InputfieldAsmSelect.js for an example of how this event can be used. $(document).on('reloaded', '.InputfieldAsmSelect, .InputfieldPage', function() { console.log('The AsmSelect inputfield was ajax-loaded'); });
    1 point
  29. Minor update: instead of higlighting the searched term now the cursor is moved to the end of the text in the asmSelect search box. Re-download aos.min.js if you have already updated the module to 1.7.8 as version number haven't changed.
    1 point
  30. Hi, 755 for folders and 644 for files (with FileZilla, for example, you can easily do it - recursively). But you can/could lower the permissions for some files like site/config.php, .htaccess, index.php, ready.php, etc., depending on your hosting environment, as long as it works. See also https://processwire.com/docs/security/file-permissions/ Perhaps you should empty your site/assets/cache/ folder. You can also look at the results in Google for the following request: site:processwire.com/talk 'failed to open stream: Permission denied' warning Edit: verify the site/assets/ folder permissions as well as the permissions of all its (sub-)folders and ("sub-")files. (Perhaps, also try refreshing the modules cache.)
    1 point
  31. Maybe a bit an aside from what you are trying to achieve but, for me, the simplest solution would be using Snipcart custom-fields (of course this is something somewhat unrelated from PadLoper and its various payments gateways integration, it is a different approach as a whole). I would create 10 Fields of type Page for colours, and other 3 for angles or whatever (it could be accomplished also with 2 Select Options Fieldtype). You don't even need to insert those fields inside every product page, they could live under whatever "setting" page you want. You iterate and then you echo them as options on frontend on the product page. The user can then choose which combination of the 30 would have for his product and, at checkout stage, you pass those options as custom fields and alter the product price based on those criteria. As I said it is a completely different approach, but I would probably follow that route.
    1 point
  32. ecbho sounds like I'm down with the kids though I think - I'm sure it's one of those made-up words they use nowadays *shakes walking stick whilst muttering about the good old days*
    1 point
  33. You are quite right. Currently this requirement in completely undocumented, however it should be. Such a hint is not enough, this issue deservers more than that. Could you please add a request similar to this one: https://github.com/processwire/processwire-requests/issues/148 You might want add the links to @jmartsch's example in this topic and to these topics as well: https://processwire.com/talk/topic/16967-confused-about-server-locales https://processwire.com/talk/topic/15691-warning-about-server-locale-after-update-from-3052-3053-help/
    1 point
  34. Now I understand you clearly. You are right, 30 inputs are not great, even with selects. I see several options all of which involve JavaScript for the friendly front-end side of things Together with the inputs you currently have above (your colour and angle inputs), add hidden markup, maybe a <ul> list with the values for each combination, e.g. <li data-colour='green' data-angle='90' data-some-value-for-this-combination='abc'>green-90</li>, etc. On click add to cart, if both colour and angle have selections, use JavaScript/jQuery to get the <li> whose data-colour == "selected colour" AND data-angle == "selected angle". You then update your cart depending on the selected combination, e.g. using its data-some-value-for-this-combination, which could be its ID. @note: if the some-value is a price, you only use it for visual feedback to the user. Prices should be determined server side Something similar to above except we send the selected combination server-side immediately using Ajax so that we return and display the value of "some-value-for-this-combination" I had another option but I have forgotten it in the course of typing, hehe! OK, server-side, you need somewhere to stay your combinations and their values. I don't know how you are storing this but it should be pretty straightforward to find your product using value of data-colour and data-angle. If you have the different colours and angles stored as pages, then the markup should ideally have the respective page IDs and send these back using Ajax. E.g., rather than green, you would have data-colour="1234" and data-angle="5468". Hope the above make sense.
    1 point
  35. I can make them configurable. As for the scroll position I will try your fix and also try something else.
    1 point
  36. It really depends. User like me use prefix on field name would benefit from keeping the search term. The reason why I prefix fields is to distinguish what inputfield the field are using. For page reference field for product I name it page_product, so I can quickly spot the field when I search "product" or "page". I also believe many developers here like you do not use prefix a lot too. It seems like no perfect solution here unless everyone name and use fields in the same way. The best way might be that the keeping search term and scroll position could be toggle on/off. Anyway, they are relatively minor, the search function is already a great efficiency boost for me and also saves me from future client's complaints.
    1 point
  37. Great thanks for this. Efficiency boost a lot! I have tried a bit to solve the jump and search value removal after selecting. I have changed aos.js(around line 1411) to below. It seems working good for single instance. var selectScrollTop,searchText; // this selecting save the scroll position and search value $(document).on('select2:selecting', '.asmSelect', function (event) { selectScrollTop = $(".select2-results__options").scrollTop(); searchText = $(".select2-search__field").val(); }); $(document).on('select2:select', '.asmSelect', function (event) { var $asmSelect = $(this), src = event.target || event.srcElement; if (src.tagName === 'SELECT') { // var inputSelector = '.select2-search__field', // searchTermAttr = 'data-select2-search-term', // searchTerm = $(inputSelector).val(); // save search term in parent's data attr // $asmSelect.parent().attr(searchTermAttr, searchTerm); // change and rebuild + reopen $asmSelect.val(null).trigger('change.select2'); $asmSelect.select2('destroy'); if ($asmSelect.parent().find('[data-asm-placeholder]').length) { select2Config.placeholder = $asmSelect.parent().find('[data-asm-placeholder]').attr('data-asm-placeholder'); } $asmSelect.select2(select2Config); $asmSelect.select2('open'); // the below 2 lines are added to restore the scroll position and search result $(".select2-search__field").val(searchText).trigger('keyup').trigger('input'); $(".select2-results__options").scrollTop(selectScrollTop); // restore previous search term // $(inputSelector).val($asmSelect.parent().attr(searchTermAttr)); // $(inputSelector).trigger('keyup').select(); } }); Edit: I overlooked. You have already made the search term restoration but you have commented them. Any considerations for this?
    1 point
  38. Hi @fermion, willkommen in der wunderbaren Welt und der hilfreichen Community von ProcessWire. Wir schreiben hier meistens in Englisch, damit es alle verstehen können. Ich hoffe du verstehst was die meisten hier schreiben. Now I will continue in english: Regarding your question about a risk for setting the locale. I would recommend to set the locale and date format to the corresponding language. Here is the code I use on a large website in my _init.php: $lang = $user->language->name; if ($lang == "default") $lang = "de"; $date_lang = array(); switch ($lang) { case 'en': setlocale(LC_ALL, 'english_gbr', 'english_britain', 'english_england', 'english_great britain', 'english_uk', 'english_united kingdom', 'english_united-kingdom'); $date_lang[0] = "%A %B %dth %Y at %I:%M %p"; $date_lang[1] = "%B %dth %Y"; $date_lang[2] = "%I:%M %p"; $date_lang[3] = "%A"; break; case 'nl': setlocale(LC_ALL, 'english_gbr', 'english_britain', 'english_england', 'english_great britain', 'english_uk', 'english_united kingdom', 'english_united-kingdom'); $date_lang[0] = "%A %B %dth %Y at %I:%M %p"; $date_lang[1] = "%B %dth %Y"; $date_lang[2] = "%I:%M %p"; $date_lang[3] = "%A"; break; case 'fr': setlocale(LC_ALL, "fr_FR", "fra", "fr_FR.UTF8", "French_France"); $date_lang[0] = "%A %d %B %Y à %kh%M"; $date_lang[1] = "%d %B %Y"; $date_lang[2] = "%kh%M"; $date_lang[3] = "%A"; break; default: setlocale(LC_ALL, 'de_DE.UTF8', 'de_DE@euro', 'de_DE', 'deu_deu', 'German_Germany.1252'); $date_lang[0] = "%A, den %d. %B %Y um %k.%Mh"; $date_lang[1] = "%d. %B %Y"; $date_lang[2] = "%k.%Mh"; $date_lang[3] = "%A"; break; } Yes, normally your content is embedded in "fields" in ProcessWire. Then in your template file you output the content of the field in a HTML structure you like, for example a div or a metatag. I agree, that there are not much german tutorials that cover ProcessWire, but I think this is because almost the whole developer community is used to speak and understand english. Anyways: Here is a nice tutorial in german (there are more in the same channel) You will find a nice blog post "Warum ProcessWire die beste Wahl für Ihre Website ist (nicht immer, aber in den meisten Fällen)" on my website, which isn't a tutorial, but an explanation, why and when to use ProcessWire.
    1 point
  39. HELLO! I released my first mobile game! As well as working on web projects, i'm trying to make more games. As a portfolio piece I recently created and published my first game for Android and iOS- http://fullcolourtiles.com/ Check it out, its a free puzzle game available now!
    1 point
  40. for the most part, the hidden field option i think is best, but does take some logic and page saving; If you do want to have them be virtual, then you can do a hook wire()->addHookProperty('Page(template=product)::rating', function($event) { $product = $event->object; $event->return = $product->points / $product->votes; }); but you will be limited to in-memory selection, since the property is not in the database
    1 point
  41. Here's a document I've been working on https://docs.google.com/document/d/1peY-FUpevKgy87cKOxIVz8jwcv2-3c61zbiJr3QKO6c/edit?pli=1# Flexible Page Layouts in Processwire. It's still rough, but I've been using it to help collect all my thoughts/notes on all the ways to achieve flexible layouts in Processwire. I love hearing about other ways people are structuring their websites. Here is another document that helps me wrap my head around some of the different field types in Processwire. (all on one page) https://docs.google.com/document/d/1VcSluQyjl9AhMBcJA3R4-uZb9IUYdKXGSh7Phclf34Y/edit?pli=1#heading=h.ysvx3k7ssuw7 Hope it helps someone.
    1 point
  42. I'm in the web design since 1998, and I remember when the war against inline styles began, you put a little style="margin-bottom:10px" in a unique element in the project and you are a renegade man from the old days, you need to create a new css class for it ... after decades learning to avoid them at all cost.. now in 2017 the new trend that coder influencers propose as good modern practices (because of React, etc) is using it! you get this and is OK.. Whaaat? !! ..hahaha.. the previous was a joke.. but seriously.. the best practice is to be practical, logic and simple always as @BitPoet said
    1 point
  43. If Jquery is removed i'd like to see plain vanilla js and no framework in between. Just like like there is no PHP framework in PW.
    1 point
  44. To get the correct locales for YOUR server (each server might use different ones) just use the below code. <pre><?php passthru("locale -a"); ?></pre> It will show you a list with all locales installed on your server.
    1 point
  45. Between a lot of big, not-web-related projects at work, I could squeeze in having a little a fun with ProcessWire too. What was needed was a shop-like solution where employees can order lunch snacks from our local butcher. Previously, this was handled with hand-written lists in each production hall that would be forwarded over fax to the butchers, leading to all kinds of transliteration and pricing errors. Our Central Services department looked at different software packages for that, but none of them did exactly what they needed. ProcessWire to the rescue. In little more than two days, I got a fitting solution up and running: PW 3.0.52 The only two non-standard modules used are @adrian's AdminActions and my own DatetimeAdvanced Role based template access UIKit 3 with modals, flex layout, mobile-ready with hamburger menu on smaller devices Everything is a page Synchronisation of employee accounts from time management software (> 600) into PW (120 lines, runs twice a day) Mixed authentication (Windows Active Directory if user is available there, local password if not) Account balance system with manual deposits and automated checking / detuction / refunding for orders, complete transaction history visible for the user Article categories (page reference), product images (not used yet), simple product variants (1 level, text + price) Ordering contents of a shopping cart for a single day or multiple days ahead of time within (admin configurable) time constraints (order window for following day ends X hours before, holidays excluded, etc.) Delivery locations (buildings) changeable by users themselves Integrated favorites system Management area in frontend for balance bookings, managing articles, previewing orders Daily collected orders for the butchery are printed into PDF through fpdf with a tiny wrapper Product images option with thumbnails (currently not used) Small additions like price validity dates or saving and re-using shopping carts will be added over the next months The shop landing page with all relevant information: Articles are grouped by category and have dropdowns for variations (with optional price addition/discount): Editable shopping cart with option to order same selection for multiple days: Minimallistic product item editor:
    1 point
  46. drowning in webshops - too many for my coding level
    1 point
×
×
  • Create New...