Leaderboard
Popular Content
Showing content with the highest reputation on 09/29/2017 in all areas
-
This week we’ve got another update to the new Uikit 3 based admin theme, AdminThemeUikit. It now has the flavor of Tom Reno’s fantastic AdminThemeReno, and now it's starting to feel like home. In this post we take a closer look with screenshots and more. https://processwire.com/blog/posts/uikit-3-admin-theme-updates/17 points
-
I completely agree. As much as I think whitespace/padding is important, I still prefer the default theme in this regard. I also think that the size of <h1> tags needs to be reduced significantly - it makes the title when editing a page huuuuuuge! Actually, can we go back to the default theme here also - no need for the title - just put it back in the breadcrumb and put the save/publish buttons on the same line as the breadcrumbs too. These are big showstoppers for me at the moment. The top of the Content / Children / Settings tabs is 215px down compared with 113px. That's 102px of wasted real estate at the top of the page! BTW - I really do like this new version of the UiKit theme - nice work Ryan Another idea I have - what about having the off-canvas menu (accessible from the PW icon) look like the sidebar menu on large screens. I don't think there is any functionality in duplicating the Setup, Modules, Access, User/Profile menus. I think the ability to bring up the page tree exactly the way it looks with the "Pagetree sidebar navigation" would be much more useful.5 points
-
$sane = $sanitizer->pageName('Prospère Jouplaboum', Sanitizer::toAscii); $exists = $pages->count("name=$sane") > 0;5 points
-
5 points
-
Its because you are storing/sending a Google Account password on your own instead of using a "secure" flow like OAuth2 apps. E.g. using less secure apps is not possible with a 2FA account. https://support.google.com/accounts/answer/6010255?hl=en3 points
-
Thank you for yet another interesting friday night (for me) blog post. This definitely looks hot Is this going to be the default skin in the future or is that still open to discuss? From the UI side I have a couple points. I know this is not supposed to be a final version, but the input probably won't hurt either. 1. the tabs on top (content, settings, etc.) in the screenshot "page editor with language tabs active" might be a bit confusing for some. Since the borders all have the same weight it seems that they might just change the title field. 2. The top navigation bar still looks quite big/high, unnecessarily wasting space. Would still have to see that in action though. 3. In the search suggestion field the section labels might fit better on the left. It probably depends on the available screen width, but labels on the left can make the field look sleeker.2 points
-
Playing around with the UIKit theme this morning and tweaking it. It's called UIKit Classic and it's a nod to the Classic theme. For me the Classic theme always sticks in my mind as being most definitively Processwire-ey because It was my fist intro to PW I thought the colours were quite unique and like the mix of blue, pink and green. They're very distinctive and I'd hate for PW to look like just another WP install. In a crowded CMS marketplace I think it's good to differentiate visually. The two screengrabs are just the same screen. A before and an after. I put this together using the Chrome the web inspect tool so there's no fancy mixins or LESS etc. Actually there's not even any CSS now that I've refreshed the page. I do think there needs to be a detailed comprehensive through tutorial for people wishing to make their own themes. Probably 85% here don't need it and understand the directory structure and how it's all compiled but equally I think there's another 15% here with the design skills but not the tech chops to get this done. If we want designers to design themes then we need the process with screengrabs, list of software (I have CodeKit, Dreamweaver, Sublime etc). Anywho - just my 2€ worth The before shot below...2 points
-
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; ?>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
-
Hey @Robin S - I can't find it, but I am pretty sure I posted about this issue quite a while ago. I think this is critical and should be fixed in the core. I am sure there are more than a few modules that rely on a "repeater_{$field->name}" pattern for getting the template. They probably shouldn't, but it's also just one of those inconsistencies that shed a less than stellar light on PW (in my humble opinion). BTW, templates can use alternate fieldgroups - not sure how often this happens in practice, but that is the origin of that separation.2 points
-
Font Awesome 5 Pro for ProcessWire At Github: https://github.com/outflux3/FontAwesomePro I whipped up a font awesome pro module so that i could use those icons in the admin; it will be one of those "BYO vendor files", so you'd load your own Font Awesome 5 Pro assets once you buy it (about 1 day left to get the discounted pro license!)... Just posting this here in case anyone else ...is working on something similar ...already built something like this ...wants to collaborate on it} The webfont version basically works well in current admin theme but requires a custom css with fontface redefinition to refer to legacy 'fontAwesome' which is used in the admin css. The svg framework seems to work well, and leaving in the legacy font-awesome means that any icons that can't be replaced by JS are still visible (like :after psuedo classes); SVG framework only works with solid, probably because the new prefixing (fal for light, far for regular..) This is also going to be interesting for future admin themes, and the new 'regular' style is cute... Solid (default): dashboard example showing more icons: SVG framework:1 point
-
I discovered that when you rename a Repeater or RepeaterMatrix field, the template and fieldgroup used for the Repeater items keep the old name. So I wrote a little function for renaming a Repeater field including the associated template and fieldgroup. To be clear, you do not need to use this function to rename a Repeater field in normal circumstances. The Repeater template is a system template so it's not something you see normally, and as for the fieldgroup... what on earth is a fieldgroup, right? So this is just for perfectionists. Or if you are doing something like checking the template name in some hook and you don't want to have to deal with the old field name. /** * Rename a Repeater / RepeaterMatrix field, including template and fieldgroup * @param string $old_name The existing name of the Repeater field * @param string $new_name The new name for the Repeater field */ function renameRepeaterField($old_name = '', $new_name = '') { // Both arguments are required if(!$old_name || !$new_name) { wire('log')->error('renameRepeaterField(): Both $old_name and $new_name arguments are required.'); return; } // Rename repeater field $f = wire('fields')->get($old_name); if(!$f) { wire('log')->error("renameRepeaterField(): Field '$old_name' not found."); return; }; if(!$f->type instanceof FieldtypeRepeater) { wire('log')->error("renameRepeaterField(): Field '$old_name' is not an instance of FieldtypeRepeater."); return; } $f->name = $new_name; $label = str_replace('_', ' ', ucfirst($new_name)); $f->label = $label; $f->save(); // Rename template $t = wire('templates')->get('repeater_' . $old_name); $t->flags = Template::flagSystemOverride; $t->flags = 0; $t->save(); $t->name = 'repeater_' . $new_name; $t->flags = 8; $t->save(); // Rename fieldgroup $fg = wire('fieldgroups')->get('repeater_' . $old_name); $fg->name = 'repeater_' . $new_name; $fg->save(); } // Use the function in a one-off operation like this renameRepeaterField('sucky_old_name', 'shiny_new_name'); The function derives a label for the field by replacing underscores with spaces and capitalising the first letter of the field name. If you want a different label you can just edit the field in admin afterwards.1 point
-
You're right; I created a new issue for this: https://github.com/processwire/processwire-issues/issues/395 I know, I was just kidding a bit because I think for most people fieldgroups are one of the more arcane aspects of PW.1 point
-
@Peter Knight I absolutely love the modifications you did. Looks super clean and unique. Thank you for that demo1 point
-
PagesEditor class uses $sanitizer->pageName() a bit differently. // Users.php add() -> PagesType::add() // PagesType.php public function ___add($name) { // ... $page->parent = $parent; $page->name = $name; // ... try { $this->save($page); } // ... } // PagesEditor.php protected function savePageQuery(Page $page, array $options) { // ... if(strpos($page->name, $this->untitledPageName) === 0) $this->pages->setupPageName($page); $data = array( 'parent_id' => (int) $page->parent_id, 'templates_id' => (int) $page->template->id, 'name' => $this->wire('sanitizer')->pageName($page->name, Sanitizer::toAscii), // ... ); // ... }1 point
-
@flydev I'd like to test too. (Especially after I tried to set up backup/sync cron jobs via a server's crappy control panel where everything just works half-baked...)1 point
-
I think you can do this with your own function with a str_replace inside and passing the field string and the values array like in this post from @Macrura https://processwire.com/talk/topic/12969-intermediate-template-structure-without-string-concatenation/?do=findComment&comment=117616 in your case the variable $tpl is filled with the content of your field instead of file_get_contents1 point
-
Hey, Rudy! I couldn't fully understand your use case. I guess you want to restrict access to certain entities, like your other site. It is very easy to restrict access to certain ip address. Just before serving GraphQL API you could check for the requested entities ip address and behave accordingly. For example: <?php if ($_SERVER['REMOTE_ADDR'] == 123.234.34.1 ) { echo $modules->get('ProcessGraphQL')->executeGraphQL(); } else { echo 'Access Denied'; } I can't say for sure if that's what you are asking though. If not, please give more details on what you are trying to achieve.1 point
-
Try using an absolute URL for the redirect. $pages($contactPageID)->httpUrl . '#form-top'; This one works for me // test-template.php $session->redirect($pages(1)->httpUrl . '#target'); $session->redirect($pages(1)->url . '#target'); // this one works as well // home.php <div class="" style="min-height: 110vh;"></div> <div id="target">heyylo</div>1 point
-
No, I don't know. But I see, that you have not set the sendBulk param to true. For automatic messages, you should set it to true, even if you send single emails.1 point
-
Interesting topic: I'm a bash scripter too. I usually have 2 remote webspaces: 1 htaccess-password protected dev environment and 2. a production environment. Both envs are exactly speced the same. At the beginning the production environment is the development-environment and is password-protected. Once the first release of the website is published, the htaccess protection will be deleted and a clone of the production website via bash script is going to be deployed to the development environment. Both environments authenticate passwordless against each other via RSA public key through SSH. The scripts do an incremental file backup and sync and a database backup and sync. dev can be deployed to prod and vice versa with a single command in bash. (or via putty under windows) Updating Processwire to a new version is also done with a bash script, first in dev, afterwards, if all runs smoothly, i run the deployment script dev -> prod. My IDE (Netbeans) is connected via SFTP to the dev environment. Bottom line is i need 3 scripts: deploy-dev-prod.sh deploy-prod-dev.sh update-pw.sh This workflow is a bit static though, if e.g the content of the production site is changing heavily DURING development of the development site (where structural changes take place, like changes in the pages hierarchy, new content structures or others) problems arise.1 point
-
I have puzzled over this too, but I think the confusion comes from a non-standard use of the word "absolute" in relation to the URL. So ProcessPageEditLink never inserts an absolute URL in that it never includes the protocol or domain. But I think the absolute option means absolute relative to the site root. So the link URL starts with '/' as opposed to the two relative options which can give a link URL like '../some-page/'. The current behaviour is a good thing, because otherwise all links would break when the root domain changes (e.g. going from dev to live environment). But it would help if the meaning of the absolute option was clarified.1 point
-
1 point
-
1 point
-
1 point
-
I feel sorry again to make you guys waiting again, I got some works to finish asap, but theses tasks made me test Duplicator extensively and I think its ready for the release. It will not work for each hosting providers, but its a start. Finally, it will come with a new feature: AutoDeploy. With this feature, you will configure the FTP account and database informations, and the module will deploy automatically the web-site without having to run the installer manually.1 point
-
medkit - ok thanks, wasn't sure which one! Yes, the module does do some of the field and template installation, however so many things have to be assumed, because around 5 of the fields are page reference, so there needs to be populated items in the tree to even setup those fields correctly; i know it can be done, but would take some interaction or module config settings; right now the module config does need you to specify the root of the widgets themselves; but the other fields, like the shortcut select needs a branch holding all of the shortcut definitions; also each widget has view access settings for user, role and permissions, and for some reason those fields are not being fully setup correctly through the api; i will try and get the current version up on github soon and see if anyone else can work on it; i was also considering how to not use any PW fields or templates and make the whole thing be configurable from the module settings.1 point
-
The dashboard module definitely works well and saves a lot of headaches for me as far as interacting with clients. For some reason most of my clients have an incredibly hard time using computers. I have to make everything as simple as possible; The dashboard was the only way to accomplish this, e.g. allow users to interact with a complex website, with a lot of data, moving parts, etc, and make it where they can log in and within 1 click either be editing a new content item, viewing a list of content items, recent formbuilder entries etc. The module is dependent on several types of fields, like FieldtypeColor (for the color of the widget header bar), FontIconPicker, for the icon to use for shortcuts, and Selector field for setting up the custom mini-listers. The module requires about 13 fields and 2 templates, as well as 3 page tree branches to hold the widget types, shortcuts, and widgets themselves; it hasn't been easy to port the dashboard from site to site, but i have gradually been able to automate some of the process of creating fields and templates (using some methods in the module that read the json export of fields and templates), or have used the built in export/import of fields and templates, as well as the new pages import/export. This screenshot is a simple example from a testing instance of PW.1 point
-
offtopic, but see also field rendering https://processwire.com/blog/posts/processwire-3.0.7-expands-field-rendering-page-path-history-and-more/#field-rendering-with-template-files wireRenderFile() https://processwire.com/blog/posts/processwire-2.5.2/#new-wirerenderfile-and-wireincludefile-functions and markup regions https://processwire.com/blog/posts/processwire-3.0.62-and-more-on-markup-regions/1 point
-
A client has asked for a grid (table-based) calendar display on their website. I don't want to spend hours reinventing the wheel, so I thought I'd ask: Does anyone know of existing calendar software that could integrate with Processwire? I found this example and it seems like it may be a good start, but I'm not sure how to use it with PW. Any suggestions would be welcome. Thanks.1 point
-
Set $event->cancelHooks and $event->replace to true in your first hook. Edit: First one should be enough.1 point
-
@Neo Have you seen this? You might utilize it on the frontend with something like: http://www.hongkiat.com/blog/useful-calendar-date-picker-scripts-for-web-developers/ Do not forget that you might want to let your users partially access the admin, so that they can do both... But this is just an idea.1 point