Leaderboard
Popular Content
Showing content with the highest reputation on 08/20/2014 in all areas
-
Super cool new feature just added - well at least I think it's cool You can now automatically backup your entire site's database and templates directory during the import process. Backups are archived so you can go back to any previously created version whenever you want. If something goes wrong during the import phase of the migration, or you simply imported the wrong json file, or you changed your mind, you can restore everything with the click of a button! This database part of this functionality relies on Processwire's brand new WireDatabaseBackup class that Ryan committed today, so to use this functionality, go grab the latest dev version of PW and the latest version of this module. Please let me know how it goes for you!13 points
-
This started off as an experiment - tweaking the existing Futura colour scheme using browser dev tools to find the places to edit. I was trying to create a less intimidating admin for my clients. So it's not ideal in that it's not a proper module, and it's not taking advantage of CSS preprocessors etc. But, I thought someone might like to try out this 'subtle' take on the admin theme. Like I said, it's just a hack - so just replace /wire/modules/AdminTheme/AdminThemeDefault/styles/main-futura.css with this version. Then in Modules > Core > AdminTheme choose "Futura". I've only tried it on the dev branch 2.4.13... If there's any interest, I might make a proper theme Module with it... -Brent Edit: added screenshots main-futura.css10 points
-
A highly categorised site is a different beast then a textual 'animal' site. So what advanced is depends a lot from the context of your site. For a big news portal (mainly textual), I used the google search api to search the site. This way all textual content is searched, even in PDF,s. The results I get back from google (json) I store for 1 hour with markupCache to reduce requests to google. I use the urls from the results to get back to the page Objects. This way I let google do the search and ProcessWire the presentation of the results. ( showing thumbnails etc, headlines descriptions etc. ) But if you have a site with a lot of categories, highly structural. I could imagine you build a chain of selectboxes. This search is a Perfect fit for ProcessWire.8 points
-
Hey Martijn - this sounds very interesting - when you have time, it would be cool to see your code - this sounds like a module waiting to happen5 points
-
There's no reference, it's a normal page. The only reference is the pagetable field itself. Ring a bell? $thepage = $pages->get("template=basic-page, mypagetable=$page");4 points
-
I like this too - I think the "Default Admin Theme" module needs a way to support managing and installing third party color schemes and css layout tweaks that can be applied to whatever the current admin theme version is. No messing with functionality from the module,inc,php files - just a way of skinning the theme.3 points
-
I think the screencast I watched must be from old functionality. Is there nothing this module doesn't do?! Can it make the tea!?3 points
-
Dynamic Roles are a powerful access control tool for ProcessWire. They pick up where traditional roles leave off, and allow you to assign permissions at runtime based on any factor present with the user. Once a user receives one or more dynamic roles (at runtime), those dynamic roles then specify what pages the user can view, edit, or add children to. If traditional roles are a sledgehammer, Dynamic Roles are a scalpel, allowing nearly any finely tuned access control scenario. Traditional ProcessWire roles are limited to assignment of view/edit/add access on a per-template basis. Dynamic roles go outside those limitations and enable you to assign that access based on any factors present with a page (i.e. match any field values). Dynamic Roles assign new access, but do not revoke existing access provided by traditional roles. As a result, Dynamic Roles can be used together with traditional roles, and the two work beautifully well together. Though Dynamic Roles can also replace all situations where you would use traditional roles for access control assignments. If using Dynamic Roles to assign page-view access, you would typically want to use traditional roles to revoke view access from at least the "guest" role at the template level. Then use Dynamic Roles to assign view access to those pages in a more granular manner. This module directly affects the results of all page getting/finding operations by applying the access control directly to the database queries before pages are loaded. As a result, it is fast (regardless of scale), pagination friendly, and requires no further intervention by the developer other than configuring the dynamic roles as they see fit. Because it relies upon new features present only in ProcessWire 2.4.6+, it requires the current dev branch. Sponsored by Avoine Concept by Antti Peisa Code by Ryan Cramer PLEASE NOTE: This module is in pre-release state (like the PW dev branch it requires) and is not recommended for production use just yet. Though we do appreciate any testing and/or feedback that you are able to provide. While not required, this module benefits from ProFields Multiplier. If you have ProFields Multiplier installed before installing this module, it will make this module more powerful by making all of your access control selectors have the ability to use OR-group conditions. Depending on your access control needs, this enables you to accomplish more with fewer Dynamic Roles. How to install Make sure you are running ProcessWire 2.4.6 (dev branch) or newer. Download from GitHub (we will add this module to the Modules directory later). Place all files from this module in /site/modules/DynamicRoles/. In your admin, go to Modules > Check for new modules. Click "install" for the Dynamic Roles module (ProcessDynamicRoles). Click to Access > Dynamic Roles for the rest (see example and instructions below). Example and instructions Lets say you ran a Skyscrapers site and wanted a role enabling users with "portmanusa.com" in their email address to have edit access to skyscrapers designed by architect John Portman, with at least 40 floors, and built on-or-after 1970. Yes, this is an incredibly contrived example, but it is an example that also demonstrates the access control potential of this module. 1. In your admin, you would click to Access > Dynamic Roles. 2. Click "Add Dynamic Role". Enter a name for the dynamic role, like: "skyscraper-test-editor" and save. 3. Under "Who is in this dynamic role?" section, click "Add Field" and choose: Email => Contains Text => "portmanusa.com". This will match all users having "portmanusa.com" in their email address. 4. Under "permissions" check the boxes for: page-view and page-edit. 5. For this contrived example, we will assume the user already has view access to all skyscrapers, so we will leave the "What can they view?" section alone. 6. For the "What can they edit?" section: Click "Add Field" and choose: template => Equals => Skyscraper. Click "Add Field" and choose: architect => Equals => John Portman. Click "Add Field" and choose: floors => Greater Than Or Equal => 40. Click "Add Field" and choose: year => Greater Than Or Equal => 1970. 7. Click Save. Now users matching the conditions of your dynamic role will be able to edit the matching pages, but not any others (unless assigned by traditional roles).2 points
-
Hi all, Here's a preview of a Gallery photo album module I am working on (very slowly! ). Development is currently in closed beta testing. The module will consist of a backend (as seen on video below) and a frontend that is framework and lightbox agnostic, aka plugin whatever and it will still work. Features Unlimited number of albums and sub-albums (easy to query using PW API) Multiple methods to add albums and photos (including uploading images and zip files, scanning a folder for FTP'ed photos, etc) Automatic album and photo creation based on names of folders and files respectively Bulk editing (moving, deleting, tagging, etc) Manager themes in several colours A bit of eye candy Etc... This is in beta so it is still rough around the edges. Feature suggestions? Yes please Apologies the video is way too long and you might get bored toward the end...2 points
-
Doesn't sound right . No need to duplicate pages. Where an item can belong to more than 1 category, the 'normal' way is to create categories as separate pages, make them selectable in the items pages using a page reference field....This guy explains it better, have a read here instead: https://processwire.com/talk/topic/3579-tutorial-approaches-to-categorising-site-content/2 points
-
Agreed. Having the page tree always available as an option would really speed up my workflow tremendously. I think it would be great if the technical issues could be overcome and this could be made an option in the new Reno theme. I remember that was one thing I really liked about Silverstripe.2 points
-
@opalepatrick Not everyone knows of Soma's form-process.php. It would have been good to provide a link and/or some code. Secondly, if that link is a thread in the forums, then it would actually be better to post your question on that thread rather than start a whole new topic - it helps with context and continuity..2 points
-
Martijn, I did not make that website and I could not open that site during the day. Flushing my dns resolver cache and changing my dns settings in my network connection to google, telefonica, or vodafone, and also resetting our router here: did not help. I read your post now and while trying again to my surprise I can open that site. That's too bad because now I will never know what really caused the problem. About cookies, yes I can see the slider now too ha ha good one Oh and did you know there is a "hollandse winkel" here and every now and then I go there to buy some "dropjes" - "stroopwafels" and "pindakaas" from holland2 points
-
2 points
-
2 points
-
Hello I've written a little module that backs up your ProcessWire site to Amazon S3 (might add support for other storage providers later, hence the generic name). Pete's ScheduleBackups was used as a starting point but has been overhauled somewhat. Still, it's far from perfect at the moment, but I guess you might find it useful. Essentially, you set up a cron job to load a page every day, and then the script creates a .tar.gz containing all of the site files and a dump of the database, then uploads it to an S3 bucket. Currently, only linux-based hosts are supported currently (hopefully, most of you). The module is available on github: https://github.com/DavidJRobertson/ProcessWire-ScheduleCloudBackups Zip download: https://github.com/DavidJRobertson/ProcessWire-ScheduleCloudBackups/archive/master.zip Let me know what you think EDIT: now available on the module directory @ http://modules.processwire.com/modules/schedule-cloud-backups1 point
-
Hey, The Form API has CSRF protection build in, but if you for some reason don't want to use the API you can however use the CSRF protection. Its very simple but it took some time for me to find out, so i figured i share my findings with the rest. What is CSRF? First you need to create a token and a token name you do that as following: $tokenName = $this->session->CSRF->getTokenName(); $tokenValue = $this->session->CSRF->getTokenValue(); Very simple. Now what you want to do is create a hidden input field like this: $html .= '<input type="hidden" id="_post_token" name="' . $tokenName . '" value="' . $tokenValue . '"/>'; Now this will generate something that will look like this: You are done on the form side. You can now go to the part where you are receiving the post. Then use: $session->CSRF->validate(); This will return true (1) on a valid request and an exception on a bad request. You can test this out to open up your Firebug/Chrome debug console and change the value of the textbox to something else. Basicly what this does is set a session variable with a name (getTokenName) and gives it a hashed value. If a request has a token in it it has to have the same value or it is not send from the correct form. Well I hope I helped someone.1 point
-
Update: Apertus is abandoned in favor of a fork of the far more advanced Admin Theme Reno, "SuperReno". Download the current version on GitHub: https://github.com/marcus-herrmann/AdminThemeSuperReno An AdminTheme meant for developers Still en route to an enhanced version of the Knowledge Base Site Profile I'm now releasing an AdminTheme suited for said profile, sharing its design. This is, as usual, an early, not yet heavily tested release. It is intended to be activated for superusers only, since other themes such as Modesta or the default one are much more apt to customers and editors. Requirements Current ProcessWire 2.4.X Developement version A modern browser (but I think that's the last thing a developer is missing) Download | Project on GitHub Features Some of us work on a large number of ProcessWire installations at once. The following options aim to customize your backends to that extent that you can tell them apart within miliseconds and without looking at the URL. Therefore, within the theme's configuration (meaning: the module's settings), you can change the following: Environment indicator When using a development, staging and production version of a project, use this little switch in the theme's setting to indicate which installation you're currently on. Set main color In order to not confuse installations using Apertus, "color brand" them. Use hex, rgb(a), hsl(a), or named CSS values to your liking, but remember to apply a relatively dark color to prevail contrast. Set project name Lastly, name project backends. Shortcuts Search the forums from within every page of your ProcessWire backend Have all the important API documentation links at hand Check for new modules from every page using the tools upper right (refresh icon) Installation Copy all files from the ZIP archive to your /site/modules/ApertusAdminTheme/ directory. Click "Check for new modules" in ProcessWire Admin Modules screen. Click install for the module labeled: "Apertus Admin Theme". Background The design of this Admin Theme is based on my Knowledge Base Site Profile. Also, it is created to accompany a newer version of said Site Profile. This is the first version of Apertus, not yet heavily tested and therefore bleeding edge. Please use with caution. I named it "Apertus" (latin for open, uncovered) because of the default state of the main navigation (Page, Modules, Access,...). This is a pre-release (0.0.1) needing current dev version of PW to prepare for ProcessWire 2.5. Please help me improving the theme by reporting bugs on GitHub. Thanks! Roadmap Things I intend to implement/change in future versions: Making useful links configurable Proper responsive behaviour Refactoring JS Remove Compass dependency when compiling theme's CSS /edit: Added screenshots clarifying where to find theme's settings1 point
-
What an awesome piece of reading, for this I will kill a tree and sip my coffee. Thank you for your hard work . At the moment the artworks can be categorized under an optional generic template called section. This is pretty much just to break the display of items up and allow for subheadings within the display of an artist's works. This works but none of the items would then have any other category other than the department that they live in and the artist that they are made by (from a page tree perspective). I have just been determining this by an if else check on the parent. I really would like to make the site more categorized and I think you sent me all of the answers right there.1 point
-
hmm, just wondering..? From the example above simply give the .nav margin-bottom. You can also give all elements padding to get some space. Or use semantic tags inside the outer tags. Example: a <section> includes some <hx>, <p>, <figure> and so on. Here you can also use margin or padding.1 point
-
@djr - in case you haven't seen it yet, Ryan has added a WireDatabaseBackup class to the core: https://github.com/ryancramerdesign/ProcessWire/commit/52c09f5ef1980b7cad3876e8332254f3792e795d Maybe you can make use of this directly in your module once PW 2.5 is released.1 point
-
Another way could be to use google webmasters. I believe it can create a spreadsheet of all your indexed pages. The copy that into the redirects module and start adding target links.1 point
-
Without knowing what redirects are needed, it's hard to now the best way to help you out here. You might be better off with a modrewrite rule if it's a standard pattern that you could match so you can rewrite all links with one rule, or a collection of rules that handle your different scenarios. Otherwise, you might be able to write a small script to batch create redirect entries for this module based on a regex.1 point
-
But, in your pagetree, can it be, that artwork under exhibition and under artist could be the same in certain situations? Do you use then two pages for the same artwork or do you use the strength of Processwire to present it in the way you show it now?1 point
-
you can write it shorter. The specific selection from 6 - 8 isn't imho important. <!--[if lt IE 9]> means all IE lower than 9 <!--[if lte IE 8]> means all IE including 8 downwards1 point
-
Really great great module Can't wait to test it and translate it!1 point
-
Hi Horst, No, gte ="is greater then or equal" "greater then" is just gt. Same for lte. So it's selects then IE 6.7 and 8.1 point
-
@pwired, I was talkin about the cookies in the slider, yum yum... But yeah I could see the page & it loads quickly !1 point
-
At the end of the day, when it comes to public voting, I think such contests are really judging assessing popularity rather than 'best in its class' which is a rather more difficult and nuanced concept to assess. So if 10 people like/vote for Joomla and 2 like/vote for ProcessWire, does it mean that Joomla is 'better' than ProcessWire? Not necessarily. Does it mean that Joomla is more popular than ProcessWire? Probably.1 point
-
Greetings, If you don't need to complete all the categories to compete for the Chromebook, then the instructions are false. They clearly state that you need to complete everything to win. Clearly, this will skew results with "blind voting," as Diogo said. I'm not doubting how they ended up with 3. It's just not very useful to have a "best free CMS" category with 3 CMSs! What do the results tell us about anything? Another question: why is Joomla listed as a "free" CMS and also as an "open source" CMS? Shouldn't all 3 be listed twice? Also, why is there a category for "Best Small to Midsize Business PHP CMS"? How in the world did they make that determination? And why is there no "Best Large Business PHP CMS"? Thanks, Matthew1 point
-
Is Joomla better than Processwire? Is Justin Bieber better than Freddie Mercury? I can´t vote because I don´t have finished any of the sites I am creating in processwire. edit : I can vote A few days ago I couldn´t.1 point
-
@adrian Didn't try directory opus, sorry. But I tried Cyberduck and TC is much superior in terms of FTP handling: Encrypted passwords, up to 12 connections in tabs, working off the server, directory bookmarks, batch operations, sync local/remote, diff local/remote, double pane window and so on ... (not to mention the features for local file management) Give it a try. And, if you look for a free solution, TC isn't free but the tryout period is unlimited ...1 point
-
People's choice my friend, people's choice [number of nominations received]1 point
-
You don't need to unless you want to apply to win a Chromebook, and unfortunately they might convince a lot of people to do blind voting. The eager to get more and more people to vote might lead to less accurate result in the end. I also didn't like the "keyboard friendly" form. And I think and I think that, joining to the Chromebook problem that I referred, the result will be: 1. A. CMS with great chances B. CMS with no chance C. CMS with little chances 2. A. CMS with great chances B. CMS with no chance C. CMS with little chances 3. A. CMS with great chances B. CMS with no chance C. CMS with little chances and so on... I don't remember how PW was positioned, so I don't know what are the chances we have1 point
-
Greetings, I really like the idea of this annual competition. But I am not pleased with the way CMS Critic is handling it this year. 1. Offering a free Chromebook, then requiring people to vote in all categories, will ruin the results. Obviously, many people will vote on systems they don't know just to complete the survey. 2. The voting system often hangs up or freezes on mobile (iPad Air in my case). 3. As Apeisa mentioned above, some categories are vague (e.g., "free" vs "open source"). 4. The number of eligible systems is rather unimpressive. I love ProcessWire, but winning doesn't mean much if it is only competing against 2 other systems. I think the idea of the CMS Critic Awards is terrific, and I would love to see CMS Critic gain an even bigger audience. But they are going in the wrong direction here. Thanks, Matthew1 point
-
1 point
-
Cheers Horst. I'll get a chance to try again tomorrow. Appreciate the help.1 point
-
but if it has a single image in it, why do you try to select the ->first() ? I assume you have set the image field to allow only 1 image? Also, if you have set it proper to a single image field, it could be that you have a page without an uploaded image to that field. if($featured->Featured_Image) { echo "<img src=\"{$featured->Featured_Image->getThumb('thumbnail')}\" />"; } ------ Also my questions a post above was thought a bit different. I was trying to get you debug the output in your page, just above the line that raises the error. But I wasn't clear, so it doesn't . The error messages said that it isn't an object or the wrong object, so you can debug it to see what's going on. You expect it to be a cropimage field, therefore it should be an instance of type "FieldtypeCropImage". if($featured->Featured_Image->first() instanceof FieldtypeCropImage) { echo "\n<p>the Featured_Image->first() is a cropimage</p>\n"; } if($featured->Featured_Image instanceof FieldtypeCropImage) { echo "\n<p>the Featured_Image is a cropimage</p>\n"; } // imagefield is: FieldtypeImage Most collections in PW are based on WireArrays, so multiple images fields are too and you can look for that: // or checking for single vs multiple if($featured->Featured_Image instanceof WireArray) { echo "\n<p>it is multiple</p>\n"; } else { echo "\n<p>it is single</p>\n"; } You can also just dump a variable with var_dump($featured->Featured_Image->first()) to see what is in it, but that's mostly not very usefull in PW because objects in PW have way to many references to other objects so that var_dump results into very, very large outputs.1 point
-
Just want to share this with you guys, To commemorate the launching of our new website https://processwire.com/talk/topic/7170-ed-design/ we decided to share a title font that we used on one of our projects under the SIL Open Font License (OFL). The font is available for download as otf and as webfont package on our site here and open for collaboration on Github and Open Font Library (you can also embed it from there). If you like it, use it and enjoy1 point
-
You can now try the font directly from Open Font Library just by adding this to your document: <link rel="stylesheet" media="screen" href="http://openfontlibrary.org/face/grupo3" rel="stylesheet" type="text/css"/> p { font-family: 'GRUPO3'; font-weight: normal; font-style: normal; }1 point
-
Impressive and an a fantastic example of what can be done with Process modules to make a completely customized backend. I predict your name will be lit up in flaming ruby red lights this Saturday1 point
-
Love Phillips work on the theme with the split tree/editing Having used Silverstripe and MODX, split screen editing is much better IMHO. As a new comer to PW, I appreciate that there's a simplicity in displaying only the tree but I'd love to see this as an option.1 point
-
I think the one of the many super cool aspects here is that this beast sits on top of the current role system. So if you have all setup, but you want to add all those users with certain criteria (like email, age, some page relation etc) view or edit something that they currently cannot, then just add this in and all just works. Without this module, those scenarios would be pretty much impossible. Hopefully many of you find this interesting. There are huge possibilities, so this is also pretty big one to test. I am sure there will be few edge cases, but Ryan has already thought many of those (like doing edits, that remove the editing rights, adding new pages and then saving it with values that are not available etc).1 point
-
1 point
-
Well, I want to thank you all for the pointers - It does exist, but I was looking on wrong search terms in the forum and all. I have read a post from Ryan: Quote Actually, you can do this on the dev branch. Lets assume that cities are children of countries and that is reflected in your page structure (i.e. /countries/france/paris/). Create your 2 page fields (country and city), and configure 'country' as a single page field with "parent" set to "/countries/". Next, for the "city" field configuration, use the "Custom selector to find selectable pages", present on the "input" tab. In that field, enter "parent=page.country". Save and try it out. This works with select, selectMultiple and asmSelect fields (and possibly others), though not yet with checkboxes, radios or PageListSelect. - So, I have Skyscrapers - my pages are: provinces - province (drenthe) - - municipal (this) - - municipal (that) - - municipal (some) my templates are: provinces - province - - testing (added fields: province and municipal) my fields are: page field : province > single/null > required > parent selectable pages is Provinces page field : municipal > single/null > required > custom selector is parent=page.province Now it works thanks to you guys! If I select a province (which is required to choose) - I also get a select list for municipals in that province (and is also required to choose). And I do not have to use visibility because I need to choose a province and municipal. But I do wonder why a structure like this is not working? Provinces - a - b Municipal - a - b1 point
-
Thank you, Ryan. My intent was to implement some sort of security auditing such that I would receive a message whenever a CSRF was attempted. So I needed to catch the exception. The following code works for me. try { $form->processInput($input->post); $session->CSRF->validate(); } catch (WireCSRFException $e) { echo "Processing aborted. Suspected attempt to forge the submission. IP logged." . $e->getMessage(); /* * Some code to execute whenever the token gets spoofed * Like sending a notification mail with the spoofer's IP address */ die(); // live a great life and die() gracefully. }1 point
-
Update. Font size is now 14px for all base fonts, heading/nav are mostly 16px. Sidebar action shrink down. I think we now have enough space for most page trees. Removed the boxes around the fields as suggested by apeisa. Thin lines to seperate them, especially the multi-column fields. Not sure about this one, because it' really defines the "look" of the PW admin. Updated setup view added. Now looking forward to do more on those fields. Repeaters and image uploads, fieldset. Note: You can use this design under a Creative Commons BY-SA 3.0 licence. Of course, the ProcessWire logo is owned by Ryan Cramer and the Icons are taken from Entypo. Contact me, if you want the layered files or sliced graphics.1 point
-
There's no "easy" way. There this new module by Ryan, http://modules.proce...eldtype-concat/ but that isn't for this case and use in find(). But you could find the pages and foreach the resulting PageArray, then cycle them and calculate the prices and store them to the page temporarely. Then sort by that property. For example: foreach($products as $p) { $p->endprice = $p->price + ($p->price / 100 * $p->vat); } foreach($products->sort("-endprice") as $p) { echo $p->endprice; } You could make a module that creates a function to $pages, so you could use $pages->findProducts();. Or have an php include with functions that you can use the above with a simple call like "echo getProductsList();" in your templates1 point
-
The page statuses are a bitmask so it's possible for there to be multiple statuses on a page, like unpublished and hidden. So it's best to add and remove statuses with the addStatus and removeStatus functions, i.e. $page->addStatus(Page::statusUnpublished); // same as: $page->status = $page->status | Page::statusUnpublished; $page->removeStatus(Page::statusHidden); // same as: $page->status = $page->status & ~Page::statusHidden; You can also check the status of a page by using the is() function: if($page->is(Page::statusUnpublished)) { ... } // same as if($page->status & Page::statusUnpublished) { ... }1 point
-
Not technically a supported feature at present, but I think you can get the result you want. You'd take a query like this: $pages->find("body*=something"); and convert it to this: $pages->find("body.data{$user->language}*=something"); That should return just the pages that match the current user's language, rather than including the default language.1 point