Leaderboard
Popular Content
Showing content with the highest reputation on 06/27/2015 in all areas
-
This module was already introduced in another thread yesterday, but since each module should have a thread of its own, here we go. Login Scheduler adds a couple of new fields to user template(s) and provides support for disabling login for non-superuser accounts either instantly (with a checkbox, "Login disabled") or by specifying a time range ("Login allowed starting from", "Login allowed until"). If a user is already logged in when login access is disabled, logout should be triggered during next session validity check (usually next page load). Starting from version 1.1.0, superuser accounts are not affected by this module at all. This is a safety mechanism and prevents you from locking yourself out of the whole system. You can grab this module from GitHub: https://github.com/teppokoivula/LoginScheduler.6 points
-
I am pleased to announce the full release of version 2.6.1 of the language pack. (Versioning now moving to match that of PW itself) I setup a new module info section in the modules repo. http://modules.processwire.com/modules/french-language-pack/ (might not be live as you read this) Also, the GitHub repo is moving to https://github.com/plauclair/pw-lang-fr/. Head over to the releases page for download https://github.com/plauclair/pw-lang-fr/releases. Enjoy!2 points
-
I think something like PW should be a page on FB rather than a group. If you have a page, you post from the page's name not from your own. So you do not annoy your family and friends)) As all meaningfull discussion is here in the forums I do not see any reason for maintaining a PW group. As a page we can have presence on FB with announcements and so bringing FB public to this forum. Private group will not serve as a kind of ad for PW.2 points
-
Hi, first of all I'd like to thank you all, and in particular Ryan, for this great project which is ProcessWire. I'm using ProcessWire for the first time and frankly I'm finding it quite good, despite my lack of experience. Anyway, I created this post to introduce you the following module, on which we are working, and I'd like to share it with the community which could benefit from it and maybe improve it. You can find the module here: https://bitbucket.org/mauro_mascia/processwire-social-login/ Basically, it adds the ability to allow a social login (using the HybridAuth library - https://github.com/hybridauth/hybridauth) as well as a standard login, user profile and registration. The module is clearly not complete and it is at its first stage of maturity and I hope you can forgive me if I have not fully complied with the PW best practices1 point
-
Hi, after looking at the 300 open "issues" on Github, it turns out that a lot of them, including some of mine, are labeled "enhancement" / "feature request". To get the increasing number of issues down there (which might give a wrong impression on how well maintained PW is), and to do sort of a cleanup I was planning to set all of my "issues" which are labeled "enhancement"/"feature request" as closed. I am assuming that the idea was either good enough and had been recognized for an enhancement consideration and thus stored in a to-do list somewhere else, or the the idea was not good enough and did not survive. In either case, an "issue" like this,does not need to be open forever, imho. Is closing it the best way to deal with it - or should we leave the step to Ryan (or anyone maintaining this)? (Also there are many "fixed" / "completed" issues that could be closed eventually.)1 point
-
Hey, I really love the functionality of Hanna Code. But it's 45mb (!!!) because of the ACE editor. So my idea is to change it to work like my Template-Editor module: Use ACE in case it is installed and otherwise implement only a tab functionality. That should work as well and save some space (and upload time!). Here's the part of codes that could just be copied into hanna code: https://github.com/NicoKnoll/ProcessTemplateEditor/blob/master/ProcessTemplateEditor.js#L1-L19 Thanks, Nico1 point
-
I've just found the Killer Wordpress Checklist... http://capsicummediaworks.com/killer-wordpress-checklist/ Beside it is funny to read points like these (with some comments compared to PW): development and launching checklist have some very general hints so the are in fact important but some special WP ones i'm getting some bad feelings... Change DB Table names (kidding?) Delete Sample Config File (what?) Remove Default Content (this i've done with the installation?) Make a Plugin List - few recommended Plugins <about 20 items list> (Hmm lets see i think i need my favorite 5 Helper modules to get started and watching for special needs) Implement Security (Is this weird my whole cms should be secure i need not to "implement" this..hmm) And at the end the two funniest points are for sure security and maintaince...some hand picked prevent directory access (PW default) use iThemes Security (Ahh right i've to implement security somehow...no need in PW) The most points are very general on Webdesign or building a blog...but some funny things are listed and it such "lists" are maybe a Marketing Tool if some designer have spare time we could setup a sleeker checklist for a "best practice" PW website? regards mr-fan1 point
-
Since you are working locally, check your local environment for Xdebug.max_nesting_level setting: http://xdebug.org/docs/all_settings#max_nesting_level1 point
-
I'm also using a small module to hook the ace extended module into the "Custom PHP Code" option of page-fields and it just falls back to doing nothing if ace is not installed.1 point
-
Here you go: https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/core/Fields.php#L30.1 point
-
You are welcome. Thats what the forum (besides others) is for: asking for help with problems you cannot solve yourself. It is not bothering. So, - nice to hear it is solved now! PS: also I only was able to think about that solution because of your well sorted and formulated question / description. At least, _you_ gave the answer by yourself. I only was able to see it, whereas you wasn't because you did not have had the distance for a clear view.1 point
-
I'm sorry to have bothered you. It was a good idea to look at the source code. That was the mistake! I didn't noticed it while copying :-( Now everything works fine Best regards and thank you very much - for the good thought and the really quick response. Frank1 point
-
1 point
-
Sorry all, this is not going to happen today. There is a iOS bug that I can't seem to find; it only happens for non-superusers.1 point
-
PageArray::has() only accepts a single object. You need a loop, here's an example: $found = false; foreach ($user->locations as $location) { if ($page->locations->has($location) { $found = true; break; } }1 point
-
1 point
-
Each page in processwire has a name and a title. When I create a new page and give it a title, the name is created automatically. That name creates the URL of that page. This works great for English sites. However, for international users this doesn't work as nicely. If I create a new page and give it a title that's not in English, then the name field is left blank and I must write a "fake" title in English. I work with sites in Arabic and in Hebrew and this is the biggest difficulty I see when working on non English sites with Processwire. Even for an experienced user, this is an annoyance every time. For comparison, in WordPress I can have multilingual titles and URL's out of the box. This is an advantage WordPress has when it comes to international users. I would like to see this change, and perhaps help bring this change. What would it take for Processwire to support multilingual URL's and page names? What would be the best route to achieve this?1 point
-
1 point
-
Not tested, but should be a sufficient blueprint. <?php /** * Add own PageList actions * * ProcessWire 2.x * Copyright (C) 2014 by Ryan Cramer * Licensed under GNU/GPL v2, see LICENSE.TXT * * http://processwire.com * */ class AddPageActionsToPageList extends WireData implements Module { public static function getModuleInfo() { return array( 'title' => 'Page Actions to Page List', 'version' => 1, 'summary' => 'Adds PageActions to Page List actions', 'singular' => true, // Limit the module to a single instance 'autoload' => true, // Load the module with every call to ProcessWire ); } public function init() { $this->addHookAfter('ProcessPageListActions::getExtraActions', $this, 'addActions'); $this->addHookBefore('ProcessPageListActions::processAction', $this, 'exeActions'); } /** * Add the new actions */ public function addActions($event) { $page = $event->arguments[0]; $actions = $event->return; // We do not overwrite existing core actions $actions = array_merge($this->createActions($page), $actions); // $event->return = $actions // Shouldn't be needed } /** * Create the actions */ protected function createActions($page){ $actions = array(); if($page->id == 1 || $page->template == 'admin') return $actions; if($page->template->noSettings || !$page->editable('status', false)) return $actions; $adminUrl = $this->wire('config')->urls->admin . 'page/'; if($this->wire('user')->hasPermission('action-email', $page) && !$page->isTrash()) { $actions['action-email'] = array( 'cn' => 'Email', 'name' => 'Email', 'url' => "$adminUrl?action=PageActionEmail&id=$page->id", 'ajax' => true, ); } return $actions; } /** * This is run when an action is initiated * * This can only been called if a page is editable. */ public function exeActions($event) { list($page, $action) = $event->arguments; $actions = $this->createActions($page); // This way checking for roles or other access rules is not duplicated. // If the action is still created, it's also actionable. if(!isset($actions[$action]) || !$page->editable()) return; $success = false; $needSave = true; $message = ''; $remove = false; $refreshChildren = 0; // If $action is the name of the module if(strpos($action, "PageAction") === 0){ $module = $this->modules->get($action); if($module){ $module->action($page); $success = true; $message = $this->_("Email sent"); } } // If no module was supplied select manually if(!$success){ switch($action){ case "SomeOtherAction" // Do stuff break; } } // Return if success, otherwise move on to the hook function if(!$success) return; else $event->replace = true; // Return information $event->return = array( 'action' => $action, 'success' => true, // Fails are managed later by hooked function 'message' => $message, 'updateItem' => $page->id, // id of page to update in output 'remove' => $remove, 'refreshChildren' => $refreshChildren, // also available: 'appendItem' => $page->id, which adds a new item below the existing ); } }1 point
-
Nice and airy, thanks for sharing! One thing I noticed is that it isn't responsive (also checked on my mobile). Is it by design? It could be relatively easily made responsive (the site design would allow it). Of course if the target audience doesn't need that then it's unnecessary.1 point
-
I'm using 2.6.1. And the Hello World module works as expected. According to Ryans comments in the ProcessHello module, it's possible to use *.info.json or *.info.php.1 point
-
I was actually thinking of converting all feature request/enhancement issues to something in the PW website (powered by PW pages). Something like the sites directory, with the ability to "like" requests, so that the most requested ones could rise to the top and get more focus. This would also get them out of GitHub, so the focus there can be on issue reports. Though I think it's good to still submit feature requests at GitHub, but I would just move them to the more dedicated system and close them out there once that's done.1 point
-
1 point
-
For those who want to upgrade to the latest core version like me, I added the following command: Common Upgrade Checks and optionally installs core upgrades. $ wireshell upgrade Available options: $ wireshell upgrade --dev --just-check --just-download Output Example ❯ wireshell upgrade A ProcessWire core upgrade is available master 2.6.0 Downloading ProcessWire Version 2.6.0... 9.35 MB/9.35 MB ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100% Preparing new core version... Upgrade files copied. Installing new core files. Your index.php file is confirmed identical to the one included with ProcessWire version 2.6.0 so it should be safe to replace without further analysis. We have detected that your .htaccess file may contain site-specific customizations. Please double check before replacing it. Upgrade completed. Now double check that everything works. You have to replace htaccess.txt manually. A lot of the code is taken from Ryan's ProcessWireUpgrade Module.1 point
-
Added registration with confirmation email and activation link I've mainly followed this thread https://processwire.com/talk/topic/4066-activate-user-account-via-email/ The user who registers is created with the unpublished status: $new_user->addStatus( Page::statusUnpublished ); and when she/he clicks on the confirmation link received via email the status turns published: $activate_userid = $this->sanitizer->text( $this->input->get->userid ); $activate_hash = $this->sanitizer->text( $this->input->get->hash ); $this_user = $this->wire('pages')->find( "template=user,id=$activate_userid, include=all" )->first(); if ( is_object( $this_user ) && isset( $this_user->id ) ) { if ( strcmp( $this_user->activation_key, $activate_hash ) == 0 && $this_user->is( Page::statusUnpublished ) ) { echo __( "Thank you! Your account has been activated!" ); $activate_user = $this_user; $activate_user->of(false); $activate_user->activation_key = "0"; $activate_user->removeStatus( Page::statusUnpublished ); $activate_user->save(); } } In the attached pic the configuration page which allows to specify email's fields. As a side note, I've initially tried to get the user with his username: $this->wire( 'users' )->find( "name=$activate_username, include=unpublished" ); but the returned object was really complex and completely protected, so I've changed the behaviour using the user's id.1 point
-
Hi there, @jacknails! This thread over here might be worth checking out. Same subject, different name. Currently ProcessWire roughly follows the URI spec (RFC 3986), while what you're describing would require support for the IRI spec (RFC 3987). +1 for this from me, though it doesn't seem to be very common need yet. This is probably the third time or so I've seen it asked for. Once there's enough need for it, I'm sure Ryan will take it into more serious consideration.1 point