Leaderboard
Popular Content
Showing content with the highest reputation on 10/02/2017 in Posts
-
Hello everyone, I spend my sunday hacking a playground for the new admin theme together. Unfortunately it took almost the whole sunday, Fortunately it was raining anyway. If you find bugs or annoyances, please feel free to tell me about them. What is it? It is a backend with an integrated skin editor. In this weeks blog post @ryan showed how easily skinnable the new admin theme is. Now that can be done online without having to set up ProcessWire and LESS compilation (I did that for you). Show me http://pwadmin.youbility.de/processwire/ username: admin password: admin123 Why did you do that? I really think the new backend is one of the three key factors for ProcessWires future success (as well as the new website and the documentation; basically the things a user sees first when he's deciding for a CMS). Many many weeks ago, when Ryan introduced the new theme, he said he will need help from the designers in the community to create the best experience possible. As far as I've seen, since then there was not that much input from the community. I hope a ready-to-run theme editor can improve that a bit. How does it work? Right of the search field there's a new icon which opens the editor. Simply create a new skin and start playing with it. The skin will be available throughout all the session, even if you refresh or change to another skin. When you log out or lose your session the skin will be gone, so save your final result somewhere else too!! What other features will come? Probably none, unless there's something heavily requested. I could probably add something to store the skins permanently through LocalStorage. Or I could add more possibilities for customization than just the LESS file. But first I'd like to see if this is used and there's even the need for those features. Can I show my created skin to others? Of course. Right now just "default" and "pw-theme-reno" are public. I would love to show more skins there. Just post the content of your skin in this thread and I will add them to the public skins. I hope you find it useful and it helps making the most efficient and polished CMS backend out there.6 points
-
Hi and welcome to the forum. The H2 come from the code of the module on line 518 (link). As it look like there is no option to define your own markup (maybe yes, I am taking my first coffee..), you must change it by translating the file. To do so, first install the core's module LanguageSupport, then translate the module's file : Once saved, you should be able to see the change on your page. Did you mean you already added an image field to the system template user ? if yes, then you need to add the permission profil-edit to the user so he can modify his profile. If its not the case, let us know. If you encounter difficulties, just ask on the forum. Enjoy5 points
-
Suppose you have an images field and you want editors to upload a specific number of images to that field. Using a hook in /site/ready.php you can display a field error in Page Edit if the number of images in the field does not match the required number. Just like the standard "required" behaviour, the requirement does not prevent the field being saved if the number of images is not correct so you would still want to check the image count in your template. $wire->addHookAfter('InputfieldImage::processInput', function(HookEvent $event) { $inputfield = $event->object; // Only for this field if($inputfield->hasField != 'images') return; // Only in ProcessPageEdit if($this->process != 'ProcessPageEdit') return; $page = $this->process->getPage(); // Only for this template if($page->template == 'home') { if(count($inputfield->value) !== 4) $inputfield->error("Please upload exactly 4 images to this field"); } });4 points
-
@fbg13, thanks, that might have been what I was remembering. I found a better method in the same class: randomPass(). It gives you a lot more control over the generated password and avoids similar characters like I/1 and O/0. I still think it would be handy to have something that can pull settings from a given FieldtypePassword field though. And a "Generate password" button in the inputfield would be cool too.4 points
-
I like big titles on backend and navbar, reno style is better than old one, nice work @ryan ! @ryan @adrian @teppo @maxf5 I have a forked repo for AdminThemeUikit admin theme : https://github.com/trk/AdminThemeUikit/ following @ryan changes and applying changes to my repo. I separated less files and organized these less files for more flexibility, and removed uikit folder added nodejs package.json with dependencies. For modify and customize AdminThemeUikit firstly we need to add less @variable for each class property. On this https://github.com/trk/AdminThemeUikit/blob/master/theme/less/styles/reno.less file, as you see, variables specific for @reno theme, not useful for styling AdminThemeUikit theme. Less @variables must be global for styling. // Currently @reno-text-color: #354b60; @reno-link-color: #e83561; @reno-link-hover-color: darken(@reno-link-color, 10%); @reno-dark-background: #1C2836; @reno-muted-background: #f0f3f7; @reno-muted-text-color: #8d939e; @reno-muted-text-color-alternate: #6c8dae; // Must be @theme-text-color: #354b60; @theme-link-color: #e83561; @theme-link-hover-color: darken(@reno-link-color, 10%); @theme-dark-background: #1C2836; @theme-muted-background: #f0f3f7; @theme-muted-text-color: #8d939e; @theme-muted-text-color-alternate: #6c8dae; My work structure for multiple styled themes: theme.less includes main html structure and styles, uikit (this is not main uikit files) folder includes uikit modifications (customizations for uikit), style- prefixed files have only variables with different values for styling theme. I am importing theme.less file from style- prefixed files and compiling style-prfixed-file.less for css output for each style. Structure like i use or structure like uikit use will be better for create your own style, just duplicate existing one and change variables (padding, margin, colors, etc...) without need to modify classes. If we need custom classes, we can use it like : @style = default; // Import Style @import (optional) "style-@{style}.less"; // Style based & when (@style = one) { apply for style one } & when not (@style = one) { apply when @style not equal to style-one }3 points
-
That's the first thing for me too and I just came up with an other idea: In the installation process, there is already a select field to set the color scheme (which I personally never changed, because the basic colors just fit perfectly). Why isn't there a selectbox to choose the Reno theme, to make it even easier for new users to recognize there is an alternative?3 points
-
3 points
-
Remember that ModuleToolkit can batch install modules with a list of module class names.2 points
-
2 points
-
Perhaps a pw-bootstrap.php that could be run after the installation? <?php return [ 'installs' => [ 'FieldtypeRepeater', 'InputfieldPageAutocomplete', 'AdminThemeUikit' => 'https://github.com/ryancramerdesign/AdminThemeUikit/archive/master.zip' ], 'fields' => [ ['body' => ['type' => 'textarea']], ['views' => ['type' => 'integer']], ['products' => ['type' => 'table']] ], 'templates' => [ ['post' => ['label' => 'Post']], ['blog' => ['label' => 'Blog']], ['listing' => ['label' => 'Product Listing'], ['product' => ['label' => 'Product', 'urlSegments' => 1]] ], 'pages' => [ '/blog/' => ['template' => 'blog'], '/blog/test-post/' => ['template' => 'post'], '/products/' => ['template' => 'listing'], '/products/test-product/' => ['template' => 'product'] ] ]; Which then could be used to perform a quick setup like this: $bootstrapPath = './pw-bootstrap.php'; if (!file_exists($bootstrapPath)) return; $setup = include($bootstrapPath); function installModule($name) {...} function createField($name, $opts) {...} function createTemplate($name, $opts) {...} function createPage($path, $opts) {...} foreach ($setup as $type => $items) { switch ($type) { case 'installs': foreach ($items as $module) installModule($module); break; case 'fields': foreach ($items as $fields => $opts) createField($field, $opts); break; case 'templates': foreach ($items as $template => $opts) createTemplate($template, $opts); break; case 'pages': foreach ($items as $page => $opts) createPage($page, $opts); } } Performing these manually takes at least 10min, but with an automated system it wouldn't take more than 10-20 seconds2 points
-
As a side note you could also use the PW functions wireRenderFile() or wireIncludeFile() or if you prefer objects $files->render() and $files->include() https://processwire.com/api/ref/files/render/ https://processwire.com/api/ref/files/include/2 points
-
For high mail volumes something like Mailgun is probably better. I've only used WireMail Mailgun in one project so far but it worked great.2 points
-
Menu Builder As of 29 December 2017 ProcessWire versions earlier than 3.x are not supported Modules Directory Project Page Read Me (How to install, use, etc..) For highly customisable menus, please see this post. If you want a navigation that mirrors your ProcessWire page tree, the system allows you to easily create recursive menus using either vanilla PHP or Soma's great MarkupSimpleNavigation. In some cases, however, you may wish to create menus that: 1. Do not mirror you site's page tree (hirarchies and ancestry); and 2. You can add custom links (external to your site) to. That is primarily where Menu Builder comes in. It is also helpful if you: 3. Prefer creating menus via drag and drop 4. Have a need for menus (or other listings) that will be changing regularly or that you want to allow your admin users to edit. The issue of custom menus is not new here in the forums. The difference is that this module allows you to easily create such menus via drag and drop in the Admin. Actually, you can even use it to just create some list if you wanted to. In the backend, the module uses the jQueryUI plugin nestedSortable by Manuele J Sarfatti for the drag and drop and is inspired in part by the WP Custom Menu feature. Please read the Read Me completely before using this module. For Complex or highly-customised menus, it is recommended to use the getMenuItems() method as detailed in this post. Features Ability to create menus that do not mirror your ProcessWire Page Tree hierarchy/structure Menus can contain both ProcessWire pages and custom links Create menu hierarchies and nesting via drag and drop Easily add CSS IDs and Classes to each menu item on creating the menu items (both custom and from ProcessWire pages) or post creation. Optionally set custom links to open in a new tab Change menu item titles built from ProcessWire pages (without affecting the original page). E.g. if you have a page titled 'About Us' but you want the menu item title to be 'About' Readily view the structure and settings for each menu item Menus stored as pages (note: just the menu, not the items!) Menu items stored as JSON in a field in the menu pages (empty values not stored) Add menu items from ProcessWire pages using page fields (option to choose between PageAutocomplete and AsmSelect [default]) or a Selector (e.g. template=basic-page, limit=20, sort=title). For page fields, you can specify a selector to return only those specified pages for selection in the page field (i.e. asm and autocomplete) For superusers, optionally allow markup in your menu titles, e.g. <span>About</span> Menu settings for nestedSortable - e.g. maxLevels (limit nesting levels) Advanced features (e.g. add pages via selector, menu settings) currently permissible to superadmins only (may change to be permission-based) Delete single or all menu items without deleting the menu itself Lock down menus for editing Highly configurable MarkupMenuBuilder - e.g. can pass menu id, title, name or array to render(); Passing an array means you can conditionally manipulate it before rendering, e.g. make certain menu branches visible only to certain users [the code is up to you!] Optionally grab menu items only (as a Menu object WireArray or a normal array) and use your own code to create custom highly complex menus to meet any need. More... In the backend, ProcessMenuBuilder does the menu creation. For the frontend, menus are displayed using MarkupMenuBuilder. Credits In this module's infancy (way back!), I wanted to know more about ProcessWire modules as well as improve my PHP skills. As they say, what better way to learn than to actually create something? So, I developed this module (instead of writing PW tutorials as promised, tsk, tsk, naughty, naughty!) in my own summer of code . Props to Wanze, Soma, Pete, Antti and Ryan whose modules I studied (read copied ) to help in my module development and to Teppo for his wonderful write-up on the "Anatomy of fields in ProcessWire" that vastly improved my knowledge and understanding of how PW works. Diogo and marcus for idea about using pages (rather than a custom db table), onjegolders for his helpful UI comments, Martijn Geerts, OrganizedFellow, dazzyweb and Mike Anthony for 'pushing me' to complete this module and netcarver for help with the code. Screens1 point
-
I've just upgraded the forums due to an important security patch being released. There was a bit of a dilemma in that the forum upgrade was guaranteed to break the theme that blended the forum software into the rest of the site design as it was a fairly major release that contained the fix. I chose to upgrade the forums anyway as the security issue was big enough to warrant a little discomfort in the short-term. Please bear with me over the next 24 hours as I get things looking back to normal again.1 point
-
This might be because the "complexify factor" is something internal to the JS library used in InputfieldPassword - perhaps difficult or too time-consuming to port to PHP. I'm putting together a little module that adds a "Generate password" button to InputfieldPassword and from my testing it seems you can probably ignore the complexify setting in your EmailNewUser module because when set to the advised range of 0.5 - 1.0 then any randomly generated password seems to satisfy the complexify setting. Incidentally, I'm not a fan of vague settings like "complexify" because it's totally meaningless to the user who is setting the password. Imagine getting feedback like "Sorry, your password is 0.1 units not complexified enough." The inputfield currently says "too common" when failing the complexify setting but that's not really accurate because a random string can fail a high complexify setting. Settings like this can make for infuriating UX. I noticed that and found it very strange. It must be deliberate because the method comment says: But surely if you are setting a max length you want a max length for the whole password? Can't think why Ryan would have designed it that way. I have put in a feature request on GitHub.1 point
-
I would argue that as @louisstephens pointed out, much of the php you need is simple echo'ing and foreach'ing and a willingness to learn. As for the problem with the blog, perhaps we should get the blog module author @kongondo in on the discussion to see if he can get you up and running.1 point
-
Fbg13 is right, in that you will need a working knowledge of php. However, my knowledge of php is not up to par (to some of the members here), but I am still able to code out a lot of "complex" pages. It can be as simple as getting the page title/body (very basic example. <h1><?php echo $page->title; ?></h1> <p><?php echo $page->body; ?></p> I guess what I am saying is not to get too discouraged. A simple site (with a bit of knowledge in php) can be made quite quickly. I have learned more than ever with just doing and various other forums. Also, the forums here are great to search through to find answers to your questions. Looking back, I have asked some pretty "silly" questions that now I can tackle no problem.1 point
-
@gebeer Regarding to @cstevensjr link: you can add custom headers in the modules configuration page.1 point
-
That's still a lot for Gmail. Simply knowing about Gmail's Bulk Sending Guidelines should help you since you want to keep using them.1 point
-
You need to know php to use processwire. Read this post and the replies to it. And maybe this too1 point
-
1 point
-
i knew it but still i would prefer a solution during install. the topic is maybe also related to wireshell... personally i don't use either of the mentioned solutions. maybe i'm just too lazy. but maybe there could be a more streamlined or standardized way of doing this... or maybe i should start using moduletoolkit. i'll have a second or third look on my next project1 point
-
OK. This could have been an oversight on my end. I now see the FieldsetPage option in the dropdown when creating the field. My apologies.1 point
-
i vote for the clear cache admin to be in TD; I do find it necessary to sometimes look at and/or clear caches in wirecache ($cache)..1 point
-
you can double click the Pages item to page tree, or you can re-enable the Tree submenu item (i always do that).1 point
-
Menu Builder doesn't support that out of the box, and so you'll need to use getMenuItems(), which allows you to build your menu the way you want it. Here are some gists that could guide you for your menu.1 point
-
Or you could bootrap your apps in Processwire pages. Any access would go through Processwire then. (For good or ill) Like: One template and a page for any app, set user access per template. In the template file, bootstrap your app.1 point
-
I'm making extensive use of migrations for a project and had a question regarding writing migrations for matrix fields. When creating a new FieldtypeRepeaterMatrix field, I usually need to create two migrations. The first actually creates the blank matrix field, and then the second populates it with types/fields. This is because the template associated with the matrix is not actually created when the initial save() method is called when creating the field. Does anyone know if it is possible to force PW to create this template via the API? Wanted to also say how useful this module is. Would love to see migrations built into the core one day as it's totally changed how we use PW. I've been thinking about submitting a pull request with some new migration classes I've been building, would be great to have some reusable templates for complex situations like this. EDIT: I just realized I could probably just create the template as I would any other template on the initial field setup. But if there is an alternative save() method that would let PW handle the template creation that would still seem easier!1 point
-
Ups! Ich habe das nicht bemerkt. Having a way to tap into install routine would be great though. Maybe in the next topic.1 point
-
Nice idea. And a textarea to post the names of modules to install automatically. And an URL field to post the URL to a gist with a basic setup ^^1 point
-
Can you drop your own sample into a CodePen or similar? Anytime I've had margin or padding issues with UI kit it's because I was missing a uk-grid or had my own CSS interfering with the flow.1 point
-
You're absolutely right - I thought the links were opened with Javascript and that therefore I couldn't control the target tab, but I was getting them mixed up with the parent class link which just toggles the list of class methods open and closed. So all good, thanks.1 point
-
Hi @Robin S - glad you like it Yes, if the API Explorer is installed it will link to those and if not, it will link to the API docs on the PW website. On a related note, the links from the API Variables and Core Classes sections on the Debug Mode panel behave the same way. As for opening in new tab - I am honestly not sure about this. I struggle with this a lot - I used to be all about new tab for external links and same tab for local links (so long as it wouldn't result in a broken form submission / loss of user input). However these days I mostly don't go with new tab for external links at all - I think the user should have the choice. Also, in this case the user of Tracy is going to be a developer and they know about middle-click, three-finger-click, or right-click new tab, so I am tempted to leave it up to them. I would like input from other Tracy users on this though, because it is a grey area and it could result in a loss of form data. Keep in mind that all links from Tracy (especially the PW Info panel) are same tab, so I think I have been consistent here. Any strong thoughts from any of you out there?1 point
-
@tpr, just following up a request from a while back. I think this is similar to the issue @szabesz raised the other day - it affects both the core Lister and Lister Pro. I'd like to keep the Lister tweaks active in AOS because the "Show action buttons on hover" is handy but I'd like to have a way to turn off the fixed selection of columns. I think if the columns AsmSelect is empty for a Lister then AOS should take that as meaning "do nothing to this Lister's columns".1 point
-
@adrian Sending copies to a list of users would certainly come in very handy! For debugging user registration scripts, I'd usually have to switch Bcc recipients regularly. As for re-branding the Bcc option as "notify other users": sounds good, too. I'm fine with the way it works now and would see the ability to send multiple copies as a priority, but I certainly see your point in simplifying it.1 point
-
Hi @adrian I just discovered the feature where the Captain Hook panel links the hookable method name to the API Explorer (if it is installed I guess). This is very cool. But just wondering if you could have it open the API Explorer in a new tab, to avoid navigating away in the current tab?1 point
-
I almost always regret it when I copy paste some code. It takes many times more to debug than just write the code again / refactor it1 point
-
just pushed an update to support ajax fields and also fields inside repeaters1 point
-
1 point
-
I wasn't really sure what was the real issue here, but by manually removing Modules.wire and Modules.site entries from caches table in DB, the issue was resolved after a brief Teamviewer support .1 point
-
This is a simple loader for LessQL, an ORM alternative for PHP. It is based on NotORM, and provides a quick way to access and find things in a database, including traversals and back-traversals. As discussed in some earlier topics, there are times when you'd like to store some data away from ProcessWire's pages/fields/templates structure for whatever reasons. However ORMs are sometimes cumbersome and requires a lot more effort to deploy. LessQL offers a quick way to just up and go like you're using an ORM but without the added complexity and configuration files. Module: https://github.com/alguintu/LessQL This modules simply loads the LessQL library into ProcessWire and exposes a $lessQL variable (configurable in settings) that gives access to your database. It uses the same database specified in $config by default, but can be set to use a separate database, along with its credentials. Usage given a table person : $people = $lessQL->person()->select("id, firstname, lastname")->where("firstname LIKE ?", "%alex%")->orderBy("firstname")->limit(10); It uses lazy loading and doesn't execute the query until it needs to. Checkout www.lessql.net for more info on LessQL. Module wrapper is pretty much lifted from @teppo's RedBeanPHP module, but with a few modifications.1 point
-
To check if there's any events involving current contributor, use $fe->count, then with a simple if block, you can decide whether to show the events <?php $fe = $pages->find("contributors=$page, template=event"); // $page is the current page ?> <?php if ($fe->count): // dont show if there arent any events ?> <div class="written_list_participant"> <h2>Events</h2> <ul> <?php foreach ($fe as $e): ?> <li><a href="<?= $e->url ?>"><?= $e->title ?></a></li> <?php endforeach; ?> </ul> </div> <?php endif; ?>1 point
-
I can also vouch for Mailgun. Its great, never had problem for the last 3 years I've been using it. Free tier is very generous too.1 point
-
Oh, google only blocks Thunderbird, Outlook, 60% iOS apps and some more. Yes, of course, the only reason is security for users. ? @gebeer you may recherche on phpclasses.com, if the smtp class of Manuel Lemos has enhancement for this already. Im totaly behind my time schedules atm. Sorry.1 point
-
I prefer it immensely and hope that it stays available/supported (maybe not as the default). We all need choices. I am glad to see and support progress on additional Admin themes.1 point
-
Have you ever tried to work with reno for some time? my first steps for every project: - reno - tracy - AOS but it took me some time to get used to reno but it's much nicer to work with imho. you have the quicklinks on the left side always available AND you have more space on the right. i guess i didn't like it in the beginning, because it reminded me of the look and feel of wordpress hope we see some action on the new admin theme soon too. and i agree with you guys that the website looks way more old fashioned than processwire is. It's like visiting a website that has the latest news entry saying "merry christmas 2007 to all our visitors!" i always "apologize" for the look&feel when i present processwire to other devs and i tell them that they should take a look under the surface.1 point
-
1 point
-
Hey all, yesterday evening I started playing with the new uikit admin theme and I have to say I really like the way @ryan has developed it, it's relatively easy to modifiy it further. It took me around 10 minutes to prepare the development pipeline (from installation, setup the build processes and grasp the directory structures), so I highly encourage every designer in here to get their hand dirty and start without any fear I'm going to post in this thread my progresses, since my will is to dedicate every evening 1 hour or so with the purpose to release a visually pleasing and stable admin theme. If you want to post your progresses in this thread too, you're welcome!1 point
-
No need, @Cesco. You can do this on your current installation. To use Italian as your default language on the frontend, and considering your want "example.com/" to open in Italian and "example.com/en/" to change to English, do the following: As this is a new installation, and you have no real data yet, delete all languages but the default one, of course. Change the default language title to Italiano Upload Italian translation files to it Create a new language, name "en", title "English" Edit the homepage and set the "en" language as active and the url as "en".1 point
-
Just committed a small, but I think quite useful option. You can now choose to replace the SVG thumbnail in the admin page edit view with a rasterized version - primarily for speed of display. All the details about the image will still refer to the original SVG, and viewing the full sized version (in the lightbox) will still be the SVG. The reason I added this is that on one site we have been uploading many very complex SVGs and using the rasterize() API method to display them on the site. We still want the originals to be in SVG though so that resizing results in no loss of quality, and also so we can offer the SVG as a downloadable version. The problem was that during page edit, the SVGs were taking too long to render in the browser. Hope this helps others too.1 point