Leaderboard
Popular Content
Showing content with the highest reputation on 10/12/2015 in all areas
-
1 Enable/install Reno, under modules->core->admin 2 Go to your user profile and select Reno for the Admin Theme setting Yes, Reno is the profile in use on the demo. The Admin Theme setting is on a per user basis.3 points
-
New update to support random images within RTE textarea fields. You can specify whether to include images, and the positions that they might be placed in. You can reload the page several times and the images will change positions/alignment randomly. I would very much like to hear suggestions from anyone using this if they have any ideas for improvements - do you want more configuration options - eg size of the embedded images, captions, etc?3 points
-
2 points
-
Easiest way would probably be to have a template file with the redirection and set those templates to use it on the "files" tab of the template settings.2 points
-
Sometimes you have clients who will login to the admin, and they perhaps only need to access a few areas of the site, such as: a product or blog list (ListerPro) site settings formbuilder entries specific front end pages documentation helpdesk backup interface Server health or server status (for example site5 has a page for every server to see it's status) Link to a bookmark (page tree bookmark for example) - this is awesome by the way Run a special action like clear a wirecache or other custom caching Add a billing or late payment notice Add an alert about upcoming server maintenance The Problem: How can you collate all of these diverse links and messages into 1 page, as fast and easy as possible, make it hassle-free to add stuff to it, maybe some messages, change the order of the links etc. In some systems this is called the Dashboard. You can make one in a few minutes using: 1.) Admin Custom Pages 2.) ready.php in your site folder Steps: Install ACP create a file inside templates for your dashboard (e.g. _ac_dashboard.php). Create your dashboard page below the admin branch of the page tree, assign it to ACP, and set the template to use to the one you created. This example will display a table of quicklinks. Contents of the dasboard file: <?php wire('modules')->get('MarkupAdminDataTable'); ?> <h3>Title of site here</h3> <div id='ProcessFieldList'> <table id='AdminDataTable1' class='AdminDataTable AdminDataList AdminDataTableResponsive AdminDataTableSortable'> <thead> <tr> <th>Item</th> <th>Comment</th> </tr> </thead> <tbody> <tr> <td><a href='<?php echo $config->urls->admin?>blog/'>Blog</a></td> <td>Filterable/Searchable listing of blog posts.</td> </tr> <tr> <td><a href='<?php echo $config->urls->admin?>news/'>News</a></td> <td>Filterable/Searchable listing of news items.</td> </tr> <tr> <td><a href='<?php echo $config->urls->admin?>projects/'>Projects</a></td> <td>Filterable/Searchable listing of projects.</td> </tr> <tr> <td><a href='<?php echo $config->urls->admin?>page/'>Page Tree</a></td> <td>A hierarchical listing of the pages in your site.</td> </tr> <tr> <td><a href='<?php echo $config->urls->admin?>settings/'>Site Settings</a></td> <td>Global site settings</td> </tr> </tbody> </table> <script>AdminDataTable.initTable($('#AdminDataTable1'));</script> </div><!--/#ProcessFieldList--> You only need this if you want to redirect logins to the dashboard: add to ready.php (where 1234 is the ID of your dashboard page): if($page->template=="admin" && $page->id == 2) $session->redirect($pages->get(1234)->url);1 point
-
I'm currently developing about 4 websites in ProcessWire as I've moved all my bespoke development away from WordPress. I'm so happy I've found ProcessWire and I've been recommending it to all my developer friends. Seriously @Ryan, you are a very smart man. Thank you for bringing us such a great CMS/CMF and releasing it for free. --- Jump-Inc is the first site that I have released using ProcessWire, I'm very keen on staying active the the PW community and I will be sharing which sites I have completed using PW. http://jump-inc.uk/ Jump-Inc is a trampoline park opening in the UK, I have used the responsive framework UiKit and for the parallax slider I have used Revolution Slider. I have used @Soma 's ColorPicker module for the gradient picker. Keep up the great work Soma, I love the fact that you can define a selectable colour pallet. Thanks again ProcessWire and the people who contribute to the project.1 point
-
In the beginning I saved code snippets in one large txt file each separated with it's own title so I could find them back with the search option in my editor. Nowadays I save each code snippet separately as a txt file in one folder. The name of each code snippet file is a description of what the code snippet is about. This makes me find a specific code snippet much faster. Having your own library of code snippets can save you a lot of time with reusable code.1 point
-
1 point
-
You can set it for all users as well. https://processwire.com/talk/topic/9513-is-it-possible-to-over-ride-admin-theme/ There is also the config module that will let you modify settings from the admin.1 point
-
<?php // URL: www.domain.com/tags/?showme=events,films,outdoor&for=education // // Alt. URL with different template than tags overview: // www.domain.com/tags/multiple/?tags=events,films,outdoor $showme = $sanitizer->selectorValue($input->get->showme); $for = $sanitizer->selectorValue($input->get->for); $taggedPages = $pages->find("…, showme=$showme, for=$for");1 point
-
1 point
-
http://dbv.vizuina.com/ My Googleism is pretty amazing today, lol. Looks like a pretty cool project.1 point
-
Thanks, guys, for your help and taking the time. It is very much appreciated. Here's what I've learned: 1. kongondo, you were right, of course, about my module's class name and the method names inside of it. I revised my method name to "notifyNow()" instead and the associated hook and those errors cleared up. 2. As a result, it seems, my wire('users')->find() call seems to now be working as I felt it should all along. My theory is that the errors with the class/method naming was preventing ProcessWire from doing the necessary bootstrapping to make that call work. Doe that sound right? 3. My goal is to notify users via email. I'm just using $this->message( ) to do interim debugging. Thank you all again!1 point
-
What Martijn said. Just to expound...constructors are run before the other stuff. Since your notifyByRole declares that is accepts one argument/parameter called $event, PHP (now treating the method as a constructor due to the identical names with the class) looks for and doesn't get the variable $event. Either way, renaming your method resolves your problem. I've tested your code and it works fine.. Thanks Martijn1 point
-
@FuturShoc, the code I posted above was an example to test the selector, not something you would use in your Hook method If you want the notification to be shown within the page save and only for supersusers, you could do something like this: public function notifyByRole2($event) { $page = $event->arguments[0]; if($this->user->hasRole('superuser')) $this->message("Hello World! You saved {$page->path}, {$page->parent->path}."); } Or if you wanted to notify those who don't have that role: public function notifyByRole2($event) { $page = $event->arguments[0]; if(!$this->user->hasRole('superuser')) $this->message("Hello World! You saved {$page->path}, {$page->parent->path}."); }1 point
-
Actually I do think that notifyByRole is run as constructor. So it's acts as a __construct and it is fired before any hook is attached. http://php.net/manual/en/oop4.constructor.php1 point
-
Thank you for your rapid answer! Your suggested solution seems to work. laufi1 point
-
Servus James and welcome to pw! 1) I think what you are talking about is called delayed output. There is a tutorial here: https://processwire.com/docs/tutorials/how-to-structure-your-template-files/page4 And a helpful thread here: https://processwire.com/talk/topic/740-a-different-way-of-using-templates-delegate-approach/ 2-4) sorry on mobile but don't really get your questions. Did you already do the hello world tutorial from the docs? Also have a look at the site profiles and as how Ryan does it Have fun with processwire und liebe grüße aus Wien PS: I think one thread per question is easier to understand and answer1 point
-
I found there's some issues with pages changing values that are used on rules for a dynamic role. It's when I have a filter viewable that says: "on the parent of this page the value on a page select must match, then the user can view the page", as soon as I start change value on that parent page field, subpages won't get updated to reflect this. But they are rebuilt when I change and save the dynamic role. I guess that's by design that it doesn't check for children/parent relations. Which is limiting to how I was trying to use dynamic roles.1 point
-
Hi @laufi and welcome to PW. I think you'll be able to fix the problem by modifying the sessionFingerprint setting: This will show you the options, but remember that you shouldn't modify anything in the wire folder, so adding the option to your site/config.php file. https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/config.php#L184 0 or false will definitely work, but you may want to try another option if suitable.1 point
-
We take a look at the modules logout() method public function ___logout ($redirect) { $this->session->logout(); $this->session->redirect($redirect, false); } So just do what you want in the template. With the redirect above and the modules logout method it looks like that. // logout the current user $fu->logout($pages->get('/')->url); If you use a combined login / logout page or a redirect to the current page you need if / else in the template like that. if ($user->isGuest()) { // do login or just write a "You're logged out..." message } else { // do logout } I could add a check to prevent a loop, but with a redirect to the current page you have to handle it with if / else to serve the correct page for guests / loggedin users...1 point
-
It works just fine lads... $us = wire('users')->find('roles=editor'); echo count($us);//returns 2 foreach ($us as $u) { echo $u->name . '<br>'; } ...But haven't tested in the same context as FuturShoc (hooking).... What I don't get is the internal server error... @FuturShoc, if you can show us some code and the exact error you are getting....1 point
-
Hello, I was getting a setOutputFormatting error for a CKEditor field that had Content Type set to "Markup/HTML with image management" while trying to save HTML to that field in the course of importing about 150 pages through the API. This happened although $p->of(false) was set. It took me quite a while to figure out that this error was thrown only when there were image tags in the HTML that should be saved to that field. Then I went and switched Content Type for that field to "Unknown". Now the import worked fine. After switching Content Type back to "Markup/HTML with image management" and running the import again, there were no errors anymore. I just thought I'd mention this here in case someone else is facing similar problems. This happened on a 2.6.15 dev install.1 point
-
Currently no (unless there is some selectors I don't know about). It is something I have been thinking about, creating a method() to accomplish this. I think it would make this module even more powerful. It wouldn't be too complicated to implement, I think; Just a simple raw SQL PDO query. Implementation would be similar to a get and a find (for many). Edit: Silly me; half asleep probably. This already works. See next post I also think for the row and columns, one should be able to search not only by ID but by $page and title. E.g. find the price (value) of a product that is 'red' (title [row]) in colour and 'small' (title [column]) in size. Could you please file your query as a request in GitHub so that I don't forget? Thanks. I can't promise when I'll be able to get to it though, unfortunately.1 point
-
1 point
-
I was confused with this in my early days of PW too Have a read through this thread and the pages that are linked to throughout it: https://processwire.com/talk/topic/4094-publishunpublish-a-page-setting-required-to-edit-published-pages/1 point
-
Looks like saving the Page 'quietly' is sufficient. <?php // 'quiet' => boolean - When true, modified date and modified_users_id won't be updated $pages->save($your_page, array(quiet => true));1 point
-
Hi guys! Padloper is officially released today: https://www.padloper.pw All of you who did purchase it during beta: your license has been upgraded into developer license - big thanks for all the feedback I have got. You can download the latest version from your order confirmation email. If you don't have it anymore, please contact me. Most significant late addition was shipping classes - now it is possible to define different shipping rates based on country/state and/or per product. I have also added tutorial how to use PageTables to handle product variations. PS: there is nice release sale going on. Single site license is 50€ and developer license only 120€.1 point
-
Anyhow, to the subject at hand - if you don't want to merge my changes, can you post here and let me know when similar changes have been implemented on your codebase? I'd like to pursue the namespace-conversion, but as mentioned I can't continue from my own branch since your changes would not be identical to mine...1 point