Leaderboard
Popular Content
Showing content with the highest reputation on 08/22/2018 in all areas
-
How about renaming the old file before deleting it and adding the new one with the same name?5 points
-
Hi, try this: <?php if ($single->fajli->url): ?> <span <span class='big'>>Velikost: <?= __('Size:'); ?></span><br> <span>{$single->fajli->filesizeStr}</span> <?php else: ?> <span class='big'><?= __('link:'); ?></span> <?php endif; ?>4 points
-
Oh and I also made the dump in the additional tabs open (not collapsed) by default. My thinking on this is that if you dump lots of items, you don't want the default tab to be open by default because it could make for too much scrolling, but for the additional tabs, if you click on them then it's obvious you want to see the content so you shouldn't need to click again to expand the dump. Let me know if you guys don't like this behavior and if you have a preferred approach. See how below I can quickly scroll through to the dump I am looking for (because the default Debug Info tab content is collapsed), but when I switch to the Iterator or Full Object tabs, these are not collapsed.3 points
-
Thanks @szabesz and @Zeka for the kudos - much appreciated! I just added a new optional "Iterator" tab to the dumps output which return the output of PW's getIterator() method which in the case of page objects returns the values of all properties and fields for the page. For other objects, what is return varies somewhat, but in some cases it is more useful than the debugInfo result which is still lacking for many objects. Here is just one example - the debugInfo output for Permissions is basically useless, but the Iterator output contains useful info. Sure, you could manually dump the object with ->getIterator() added to it, but this makes it that much easier when you are looking for different bits of info and you're not sure which option will provide the exactly what you need in the easiest format to find it. An interesting side-effect of the Iterator tab is that the Full Object now also contains values for all the fields when dumping a page object because the getIterator() call queries all those fields and they are now joined to the page object. I have made this optional, so you will need to go to this setting to enable it:3 points
-
I would like to just show my appreciation to ProcessWire and all the guys that have put work in to make it what it is now. I have use many, many CMS's in my time. Statamic, Drupal, WordPress, ConcreteCMS, CraftCMS etc... And they all have their strengths and weaknesses. But I can honestly say, ProcessWire is by FAR the best Content Management System I've ever, EVER used. I can honestly say the only weakness ProcessWire is the lack on eCommerce. But, that isn't even a weakness of ProcessWire. The tools are there for us to create an eCommerce system. I'm a front-end developer but with ProcessWire it empowers me to realise anything. Honestly, when one of the designers asks "Can we do this?" it feels so great to say YES! I, with very little backend experience built a real-estate system that completely runs on ProcessWire pulling in from an external feed (Vebra) and I did it with ease! I just wanted to say thank you, thank you for creating a framework in which, people like myself, who love front-end but find back-end daunting can pick it up and literally do anything with EASE. ProcessWire gives me so much confidence and makes me feel so good about myself. I've recently been working on an WooCommerce website, and I can't tell you how much I've been missing ProcessWire. Thank you @ryan for making a system that is so simple, even simpletons like myself can dream big. Lots of love, Tom Edit: Interestingly I feel like it would be easier to build an eCommerce system using ProcessWire than it would trying to completely reskin WooCommerce, like seriously, WooCommerce stop injecting markup and putting them in core functions.2 points
-
Just do it like this: $mail->mailHTML('alex@gmail.com', 'Hello', '<html><body><h1>Message Body</h1></body></html> without redefining $mail2 points
-
It's not completely redundant - it still determines how dumps in the RequestInfo panel's Field List & Values sections are output. It also defines the default dump for the dump/barDump output for cases where the separate tabs may not kick in - not sure if there actually are any situations where this will happen. It now also controls the output of field values in the Iterator tab. Also with the new option (described below) to choose what tabs you want, if you choose none, then this setting will be relevant to how the one version of the dump is handled. Good idea - done: Thanks for reporting this undefined variable error - it's fixed now and hopefully there shouldn't be any other cases like this, but please let me know if you come across anything else.2 points
-
Thanks for all the recent updates @adrian (and @tpr too). Is the "Use debugInfo() magic method" option redundant now? With this option unchecked I still see a populated Debug Info tab in the dumps panel. Also, do you think it would be possible to include a setting for which dump tab is active (or leftmost) by default, for those of us who most often want the Full Object and the Debug Info only once in a while?2 points
-
@gmclelland thanks, yes that is ProcessWire. Ok I will try to describe and share how I works. In that I use "widgets" and "widgets manager" field. Widget is custom content block, and it has template and fields, and at the end it is a PW page. Also, widget can hold shareable content. Widget "lives" inside independent page tree "Addons". Example of widgets: slider, sidebar news, call to action... Widget manager is a field, and as it's name says, it is used to manage widgets. Manager provide options to select desired widget, set it's template position, ordering (when widgets share the same position), visibility rules, etc... Widgets manager field can be used in different ways, but in my case, I place it on parent pages (Home, categories, sub-categories) using visibility options: "default" (parent+children), "only children", "this page only". How I use all this: 1) build all needed widgets, initial content, very easy, very fast 2) create hidden page tree "Addons" and there place all widgets (sometimes categorized) 3) place widget manager on parent pages and select desired widgets (previously created) What administration can do on parent page (eg. Home)? 1) Place/add new widget from Addons tree. 2) Clone or copy existing widget, edit, and get another (same type, different content). 3) Drag and drop to change on page position (ordering). 4) Switch off desired widget(s) etc... with all of that, they can easily change page visual appearance. Rendering Page ask "do I have widgets?", and that "question" it can ask itself, parent, grandparent... until root parent. After all, here is last step where page itself check for widgets inside some position: // on page widgets call <?php if(isset($pos['body'])):?> <?php renderWidgets($pos['body']);?> <?php endif; ?> Some screenshots: "Addons" page tree and "Widgets manager": Some widgets examples: "Slider" and "Featured" Slider: repeater with 3 fields (image + 2 configuration form fieldtype) Featured: 2 fields (configuration form fieldtype). Here are few demos: miq5, builderfox, restaurant, prteam... In short that's it, please feel free to ask if there is anything that is not clear or need more details. Regards.2 points
-
I knew that request was coming ? I have added all this to the latest version, including the click again on the tab to collapse. Please test and let me know if the behavior is what you are looking for.1 point
-
1 point
-
I like this, but I think when you switch back to the first tab the dump should be expanded. Because in clicking the tab you are saying "show me this tab content", and if you are actually wanting to just reduce the height of the dump container you would click to collapse the dump on the current tab. Maybe a simplified way of handling this would be that clicking any tab a) shows that tab's content and b) toggles the collapsed state of the dump. So dumps in all tabs would be loaded collapsed by default, but clicking a tab also toggles open a collapsed dump so has the same effect as this latest update. It would also allow for an alternative way to collapse the dump on the current tab (i.e. clicking the active tab collapses/opens that dump depending on its current state).1 point
-
I've just read this quickly. Maybe for now your options are: Sanitise separately: i..e, do the email itself bit then append your incoming+account/ Use your own regex to sanitise the email (e.g. using $string = $sanitizer->match(string $value, string $regex); Docs are here) Sanitise as you are doing then re-insert your / afterwards using string replace or similar. Like I said, I read this quickly, so, I might be missing the point ?.1 point
-
Sadly, gitlab has known that the forward slash is problematic for quite a while now but the resolutions keeps being pushed from milestone to milestone. There are a lot of mail servers and webmail clients out there that can't deal with these slashes (MS Exchange and Debian's exim default configurations are such examples), so any solution likely involves moving to more common delimiters in the local part of such gitlab addresses, which in turn means that PHP's built-in email sanitizing filter (which $sanitizer->email uses) will then be sufficient. To speed things up, it might help to upvote the corresponding gitlab issue.1 point
-
I have used a lot of project management tools over the years, and I will say, I do like Monday. I built something (utilizing pw) based off the idea just as a test to my abilities. Unfortunately, I had something go wrong with the db so I had to get a fresh copy up and running. I made a page reference field (projects) for the user template and on the front end you could assign the user to the project (ajax call then selected the appropriate page in the user template). From there, the project page showed all tasks added to it with dates. Ill see if I can resurrect the app and take some screenshots.1 point
-
We use Forecast for these kind of planning. You might get some inspiration from there. It could be possible with PW, but I wouldn't reinvent the wheel when there are other tools.1 point
-
Why have code that executes on every request and saves everything? This works just fine $this->addHookAfter("Pages::saveReady", function (HookEvent $event) { $page = $event->arguments("page"); if(!($page->template->id == 89 && $page->parent->parent->id == 11180)) return; $repeaters = $page->pro_table; if(!$repeaters->count) return; $total = 0; foreach($repeaters as $rep) { $rep->row_total = $rep->days * $rep->day_rate; $total += $rep->row_total; if($repeaters->last === $rep || $repeaters->count == 1){ $rep->row_total = $total; } } });1 point
-
1 point
-
I just did, but I can tell you that is not what actually happens if you try and install it. There's all sorts of installation issues, and even if you work through them, the app doesn't launch because there's an issue with the underlying Graphics library it is using. Laragon looks really cool. Alas, it is only for Windows and I refuse to do Website work on Windows unless it's ASP.NET specific work.1 point
-
Did you check the video on how to install ampps on ubuntu ? http://www.ampps.com/demo =========================================================== Devilbox is a scripted development stack with a bunch of daemons. I tried it but really found it too much of an overkill. Laragon is so easy and convenient for local development.1 point
-
@szabesz - just wanted to let you know that I have implemented more of your ID and count idea to the dumps output. Notice the tooltip titles (and link address below) on the edit links to various PW objects and then in the last one you can see the number of items in the PageArray (which also works with any WireArray, including images, repeater items, etc). Note that the tooltip titles also show you the name of the object which I think is also a nice preview rather than having to open the dumped object.1 point
-
1 point
-
1 point
-
https://www.centura.ca We finally put Centura's national website online. A whole journey of a year and a half that began with an important phase of analysis. Centura is one of Canada's leading distributors of floor and wall coverings. Seven administrative regions with different prices, four user profiles each with their privileges, daily synchronization with an inventory system, an ElasticSearch search and a concern for speed, these are the main challenges in the development of this site. And of course, everything must be adapted to the mobile. It is a smooth launch, without drum or trumpet, to stabilize the site, to know the reactions of the administrators, the pleasures and frustrations of the users. The primary goal was to provide a national showcase for this important distributor. Centura has an inventory system that includes tens of thousands of products, the SKUs. However, this large database does not contain descriptions or groupings by collections. So we used ProcessWire as a central data management point, where images and text meet inventory. Since Centura is divided into seven administrative regions with 14 distribution centres, it was essential to leave control over the local aspects of these divisions, such as opening hours, collections sold in the region, promotions, etc. In addition, one region, London and Windsor, is going it alone. It was important to add it to the list and direct the visitor to the right region (and another CMS). As a distributor, Centura deals with retailers to sell its products. He also negotiates at a higher level with architects and construction contractors. Four types of users were identified. The consumer who can keep favorites in his profile. The retailer who can query the central inventory and who has access to promotions and other documents. The architect or designer who can order free samples. The installer interested in ordering tools or installation products. Apart from consumers, the remaining types of members are managed (approved) by each branch. The branch administrators therefore had to be able to "visualize", to locate this information in the tree structure. This involved creating four types of profiles, four main forms, allowing everyone to have a custom dashboard. People registered in these profiles are registered "under" each branch. Let us not forget the daily synchronization, done at night, in order to reflect new products, price changes, etc.. Since the new SKUs are "orphaned" before being associated to a collection, the import mechanism, inspired at the base of the module the Ryan Cramer, Import Pages from CSV, allows to identify what has been changed from what is new. This last category is placed in the tree structure under a page called Orphaned Skus. The site managers can create collections in the Products section and associates through a Page reference field the SKUs. When saving, since SKUs now have an association, they are pushed under the collection, so administrators can easily spot what belongs to what. This large site required the intensive use of various fields, including Page reference, Repeater Matrix. The ProFields collection was a great help, as was ListerPro, widely used by both us and the administrators. What a choice to create batch actions with custom actions! This last module would however deserve a little more love, because it is a little more difficult to understand for the administrator user. We also used Form Builder, but the programmers preferred to build the four main forms themselves, as too much interaction was needed with other components of the site. The documentation for this module is anemic. If the use of the module speaks for itself, its use by API is immediately more cryptic. However, we promise to explore it further in order to leave as much control as possible to the administrator. Another aspect that could be improved in ProcessWire is language management. The internationalization system is fantastic and we have nothing to say about it, but the translation of coded texts is rather hell. For the administrator user, finding a translation and modifying it is very complicated and sometimes incomprehensible. Indeed, what is marked by the __("token") function can be changed in two places for each translation (English and French in our case). But when the time comes to modify these translations again, you have to remember that it is the "token" that governs the search... Moreover, unlike Drupal, if identical __("token") commands are found in different PHP files, you have to translate them in several places! There are ways to use pages inside the site to feed all translations of the site, this takes time and good planning. You can also use a central translation file, but with large sites, it can become cumbersome. There are two types of search in this site. The search by facets of coating products required the use of Elasticsearch which allowed an almost instantaneous display of products. For tools and installation products, we used a more standard model, built with ProcessWire. Why two search systems? There was a questions of time and budget here. The second search is quite different in practice. Caching the site was of course important. Several obstacles to this one: the use of numerous cookies, in particular those of the choice of region and language by the user, the regional variation of the prices, the variation also of the collections to show. Finally, nginx in node balancing. Unfortunately, we could not use the ProCache module, depending on the htaccess file. It is possible to translate ProCache rules into nginx rules. We were, however, reluctant to depend on something over which we had little control. So we opted instead to pull the strings of the cache, as we saw fit, with the features of ProcessWire. It should also be remembered that nginx also has very powerful caching features. In the near future, however, we will revisit ProCache. We, at Spiria, love working with ProcessWire. The more we create sites with this CMS, the more we develop reusable components, which greatly speeds up the creation process. At the moment, we are setting up four "microsites" of products for another company. These sites will then be linked to a central site for "information exchange". In another case, we have to create two sites that operate in parallel. The customer wants to manage the information in a single site while pushing to a second certain information. Our main challenge remains the notoriety of ProcessWire which is sometimes difficult to sell against giants such as Wordpress and Drupal. However, by creating sites the size of Centura, we are confident that this great CMF/CMS will take its rightful place. Speaking of Centura, the journey continues. An online shop will be created, as well as a blog. ProcessWire makes it possible to create solutions adapted to each company without escalating costs. In other words, you can easily do without Wordpress plugins or Drupal modules, because a customized solution is always more profitable than trying to deconstruct what others have done. Translated with www.DeepL.com/Translator1 point
-
Well, my custom naming thing is something that you should not incorporate ? So I think the naming probably needs some work. Re: parsecsv - maybe it was my inability to use it without Composer. I have not run into issues with PHP 7.2.1 point
-
1 point
-
@Tom re ecommerce stuff...I've used WooCommerce and come out blue, battered & beaten at the other end. I've also integrated the BigCommerce API with PW. Am now working on site with the PW premium module Padloper. IMHO: WooCommerce is horrible on every level BigCommerce and any other SAAS platform, eg Shopify, are easy enough to integrate into PW and while they dont always have the perfect workflow solution, suit bigger shops Premium ecommerce PW module Padloper is raw, pure PW, takes a bit of getting used to and is great for smaller shops1 point
-
Little offtopic and self-promotion here, but you should definitely give RockGrid a try. It's such a great way to list all kinds of content, style it properly, add additional functionality. In the example below you get instant filtering, properly formatted currencies, referenced pages and some hover-action-icons that open that page in a panel or open the PDF invoice directly. The pagetree is great for websites, but it's definitely not for other more complex content management applications ? So true ? (y)1 point
-
Hi all, I've just noticed that when using the Login/Register module if a user on the frontend gets the password wrong too many times in a short time space the SessionLoginThrottle stops them as it is supposed to but rather than showing an error on the form it makes the server throw an internal error page with: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Error has been logged. Administrator has been notified. Should it not render the error next to the form like the back end login?1 point
-
https://github.com/ryancramerdesign/LoginRegister/issues/101 point
-
If it's one page meant to be used site-wide, you might consider creating a template file (let's say styles.php) for it that outputs the css (in the Files tab, set content-type to text/css and tick the box to not append the standard file). Then you can link to that page just like you do with every other stylesheet, and you can even use template cache. That way, your regular templates are kept tidy and you don't send unnecessary styles over the wire with each request. To be able to select the text/css content type, you need to add the following to your site/config.php first: $config->contentTypes = array( 'html' => 'text/html', 'txt' => 'text/plain', 'json' => 'application/json', 'xml' => 'application/xml', 'css' => 'text/css' );1 point