Leaderboard
Popular Content
Showing content with the highest reputation on 09/05/2012 in all areas
-
I wanted to give you a little preview of a new module I've been working on recently: the Form Builder module. This module lets you create simple-to-complex forms and place them in your site without any need for development. In this video we show how we can create, publish and test a simple contact form in less than 5 minutes. Then we take a quick look at a more complex form (already produced). I recommend viewing the full screen + HD 720p version so that you can see it more clearly than in this small forum embed. (note: there's no sound, so no need to adjust your volume) More about the Form Builder The Form Builder has many options for the developer to customize output and create their own themes, markup, etc. But the goal here was to build something that could enable you (or your client) to publish a form in less than 5 minutes, so that's the focus of this video. This tool is literally easy enough for your clients to create and manage their own forms. Or from a developers perspective, it takes something that used to consume hours and makes it happen in minutes. Form results save in the database and optionally can be CC'd to you by email. Result entries and be viewed, filtered by date, and even edited in the admin. You can export results to a spreadsheet as well. I'm working on the ability to export to pages, though that isn't quite ready yet. How the Form Builder will be licensed This module will be individually licensed on a per-site basis for a small license fee. It will also be available for free personal use to established forum members. Basically, I want to see if I can substitute some of my client work to focus on ProcessWire instead. And in order to do that, I need to have an income (I have a family to support). So I thought that building a special tool like this would be a way to make a go of it. A lot of you have asked to make donations to the ProcessWire project, and while we still won't be able to take donations, you will be able to support the ProcessWire project by purchasing and using the Form Builder in your own client projects. So a lot of motivation for this module came from wanting to provide something really special for all that had wanted to support ProcessWire. After a few months of work, I'm pretty happy with how this module has turned out -- it's already saved me tons of time in my client projects. So I'm thinking and hoping you guys will really like it too. I look forward to your feedback.9 points
-
Thanks for all the great feedback. Much more enthusiasm than I expected! Yes. The FormBuilder adds a new $forms API variable to your installation from which you can grab forms, results, etc. However, they aren't initially as comprehensive as something like the $pages API var. It initially creates the page in Setup, but you can move the page to be wherever you want it in the admin. This is exactly what I did for a client this week, I dragged /processwire/setup/form-builder/ to /processwire/form-builder/, so that it shows up as a "Forms" nav item in their top admin nav. There are a few reasons, but I worry that taking donations might give a one-man project impression and discourage others from getting involved. We will probably be able to take donations once ProcessWire is incorporated as its own company/organization, and donations would then go specifically towards predefined operating costs and marketing, rather than some individuals wallet. Basically I want to make sure we've got the right structure in place.5 points
-
Currently fieldtype creates a new file with suffix like filename_1, filename_2 when files with same filename is uploaded. Most of the time this is good, but sometime it would be good to allow overriding the file. Would it be difficult to check if similar file exists and offer a js confirm wheter to override or create a new file? This is of course for multifile fields, since single file fields override always (not sure if that is every time preferred without confirmation?). I will take a look at this myself at some point, but interested to hear what others think about this? Which would be best UI here?2 points
-
http://icomoon.io/ is super awesome for an icon font. Also includes the vectors. I use this all the time. http://www.famfamfam.com/lab/icons/ Rocks the casbah too. http://iconkits.com/ I have purchased a few sets from these guys http://somerandomdude.com/work/bitcons/ - awesome smallness http://somerandomdude.com/work/iconic/ - graphics ,vectors, and fonts http://www.yummygum.nl - Iconsweets & iconsweets2 psds and dont forget the noun project: http://thenounproject.com/2 points
-
I think apeisa or maybe it was originally from Ryan meant $page->addHookAfter("render", $this, 'myFunc'); Will add a hook to the one $page render method. $this->addHookAfter("Page::render", $this,'myFunc'); Does add a hook to the render to ALL pages (admin, frontend...). So you would want to limit it to the context you want, using either what Page or template or path or whatever. protected function login(HookEvent $event) { ... } HookEvent is the type of the event (it's good pratice to add it) it will make sure the $event argument is of the right type. However what you get with $event depends on what you are hooking actually and how and where. What class and what method. So in this case hook after Page::render, $event->return will hold a string with the html being rendered. $event->object will be the page object that is rendered. In case of Inputfield::render, $event->return would be the string of an inputfield's html that is being rendered (all Inputfields that's gonna render in the admin for example will call render, thus also your hook). $event->object would be the current Inputfield object. There's many more but would go to far to write and list all, actually I don't know them all out of my head. EDIT: Somebody correct me if I'm wrong please2 points
-
One of the ways you can show support for ProcessWire is to help get the word out by including a small "Powered by ProcessWire CMS" tagline (ideally linking to processwire.com) in the footer of sites that you develop. This is a big help to the ProcessWire project. But I know there are many cases where it just doesn't work to do that because the client thinks of it as gratuitous. I think it's important to communicate to your client that it's not gratuitous at all. It is doing the right thing by showing appreciation and support for a software that is running their site at no cost. Even so, it's not always as simple as that, and I completely understand. We have no requirement or expectation that sites developed in ProcessWire do this. We just encourage and appreciate it when you can. Let your client decide One thing I've been doing lately is to put the control into my clients hands. They really appreciate that I've given them control over it… more so than if I'd left out mention of ProcessWire completely. It also makes them feel good as they are the one showing support, not just their site developer. Here's how to do it in 1 minute: 1. Create a new "checkbox" field in Setup > Fields called "toggle_powered" (or whatever you want to call it), and enter the following for label and description: 2. Add the "toggle_powered" field to your homepage template. 3. Edit the homepage and check the box (if possible in your situation). 4. Edit the template file or include file that contains the site footer and paste in the following: <?php if($pages->get('/')->toggle_powered): ?> <p> <a id='processwire' target='_blank' href='http://processwire.com'>Powered by ProcessWire Open Source CMS/CMF</a> </p> <?php endif; ?> The code above is an example, so adjust the markup, size, wording and placement to suit the site.1 point
-
We'll use this thread to discuss PW 2.3 features as they are being worked on. I've just added one of the first components. This is the "Page Path History" module. It's now in the PW core as a beta module (uninstalled by default). If you are interested in helping to test, just install the module from Admin > Modules > Page > Page Path History (after doing 'Check for new Modules'). The Page Path History module keeps track of the previous URLs for any pages that have been moved or renamed. It then sets up automatic redirects (301, permanent) to ensure the old URLs redirect to the new ones. This is best demonstrated by a few examples: Lets say you had the page /about/contact/ and you moved it to /contact/. With the Page Path History module installed, anyone accessing /about/contact/ will get redirected to /contact/. You had a page called /our-products/ and you renamed it to be /products/. Any accesses to /our-products/ will now get redirected to /products/. Those are simple examples, but this module can handle more complex situations too: Lets say you had the page /our-products/furniture/whoopie-cushion/ and you did like in the previous example and renamed /our-products/ to be /products/. The /our-products/furniture/whoopie-cushion/ URL will now redirect to /products/furniture/whoopie-cushion/ Later on you decide to rename /products/ to just /inventory/. All the /our-products/ and /products/ URLs will continue to work with redirects. You decide that whoopie-cushion really belongs in /services/ rather than /inventory/, so you drag it to /services/whoopie-cushion/. It's old URL in /inventory/furniture/whoopie-cushion/ redirects to it's new URL. TL;DR (am I doing this right) -- you can move or rename any pages and all the old URLs will redirect to the new, automated behind the scenes, without any thinking on your part.1 point
-
Awhile back, I made an Ajax API for querying pages in the admin via the ProcessPageSearch module. It is used by [for example] the PageAutocomplete Inputfield. I thought this capability would be useful on the front-end too, so this module brings it to the front-end as a page in your site that you can put wherever you want to. The way you use it is exactly the same as the one in ProcessPageSearch, but this one is a little more strict, given that it's publicly available on the front-end. By "more strict" I mean that you have to define what you want to allow in terms of input and output in the module's configuration. The web service takes it's query from GET variables in the URL and returns results in JSON format. It installs a page called /service-pages/ in your site, and you are welcome to move that page wherever you want. Here is the official page at modules.processwire.com: http://modules.processwire.com/modules/service-pages/ Once installed, you should view the /service-pages/ page that it installs because it outputs detailed instructions and examples on how to use it in your own projects. But here's a few excerpts from what you'll find on that instructions page: Input The /service-pages/ page can be queried with GET variables in the URL to return JSON-format results. The query string should follow a ProcessWire selector format ([field][operator][value]), but modified a bit for use in a URL query string. Here are a few format examples: Specify a single value: ?field=value Specify multiple fields and values to match: ?field1=value1&field2=value2&field3=value3 Specify multiple fields where at least one must match the value. Note use of "," rather than "|", something we had to settle for to make it work as a URL key: ?field1,field2,field3=value Specify one field with multiple possible values (it's fine to use "|" as a separator here): ?field=value1|value2|value3 Note that unlike regular ProcessWire selectors, multiple field=value sets are split with an ampersand "&" rather than a comma ",". Allowed Values The allowed values for field are set with the module configuration. You may also specify the following modifier keyword=value pairs: sort=[field] (Specify field name to sort results by) debug=1 (Enables debug mode producing human readable output) limit=[n] (Specify the max number of pages to return) start=[n] (Specify the result number to start with) include=hidden (Include pages that are 'hidden') Allowed operators The operator demonstrated by the "=" sign in the examples above may be replaced with any of the following operators in the query string: = Equal to != Not equal to < Less than > Greater than <= Less than or equal to >= Greater than or equal to *= Contains the exact word or phrase ~= Contains all the words %= Contains the exact word or phrase (using slower SQL LIKE) ^= Contains the exact word or phrase at the beginning of the field $= Contains the exact word or phrase at the end of the field As an example, this ProcessWire selector: template=property, body*=luxury, bedrooms>5, bathrooms<=3 ...would be specified as a query string to this web service like this: ?template=property&body*=luxury&bedrooms>5&bathrooms<=3 Allowed templates For security, the search will only be performed on pages using templates that are defined in the module's configuration. Output The returned value is a JSON format string in the following format (populated with example values): { selector: "title*=something, template=basic-page, limit=50", total: 2, limit: 50, start: 0, matches: [ { id: 1002, parent_id: 4525, template: "basic-page", path: "/test/hello/", name: "hello" }, { id: 1005, parent_id: 4525, template: "basic-page", path: "/test/contact/", name: "Contact Us" } ] } Each of the 'matches' values will also include all the fields you have specified to appear with the ServicePages module configuration. If an error in the query prevented it from being performed, a JSON string in this format will be returned: { errors: [ "Error message 1", "Error message 2 (if there was one)", "And so on..." ] } The web service honors user view permissions. As a result, if you are accessing this service from a superuser account, you are likely to get pages that others users may not see. Superusers get an "include=all" automatically, unless you override it with an "include=hidden". Returned field values The following field values will be returned for all matched pages: id (integer) parent_id (integer) template (string) path (string) name (string) Any other fields may be included from the module's configuration screen. Pagination To paginate, simplify add a "page[n]" url segment to the request URL, i.e. /service-pages/page2/?template=basic-page&sort=name1 point
-
I'm always keeping an eye out for new icons, but for interface design I've relied heavily on Yusuke Kamiyamane's Fugue icon set. I think I first found the set back when there were "only" around 2,000 icons in the set, and now there are over 3,400 and counting. A couple of intranet projects have benefitted from this set, and the one-off price tag is quite reasonable for the amount of icons, including their .PSD source files and variants. Does anyone else have sets that they'd care to share? I know there are tonnes out there, but the real gems are hard to find in amongst the rest.1 point
-
rather then namen "nofile_*" u.cann also do $this alsos $tamplons = ''; foreach($templates as $t) { if(!$t->filenameExists()) $tamplons .= $tamplons ? "|$t" : $t; } foreach($page->children("template!=$tamplons") as $babby) { // $babby.not tamplon } cd ..1 point
-
It isn't outputting anything... can you try what I said on the post above? echo "<br>{$page->title}<br>{$page->template}<br>"; I also noticed that on your code, there is a problem with the tags sequence: You have <div><a><img/></div></a>, and should be <div><a><img/></a></div>1 point
-
I think you understood it maybe wrong. Let's speak some code. foreach($page->children as $child) { if(!$child->viewable) continue; echo "<li><p><a href='{$child->url}'>{$child->title}</a><br /><span class='summary'>{$child->summary}</span></p></li>"; } Just spinning this further with selectors, you could even do a search for all template's that don't have a "view" and exclude them in find()/children(). Eeasiest name the templates "nofile_name". Then use this in navigation find()/children(): $tmpls = $templates->find("name^=nofile_"); foreach($page->children("template!=$tmpls") as $child) { echo "<li><p><a href='{$child->url}'>{$child->title}</a><br /><span class='summary'>{$child->summary}</span></p></li>"; } Just love to think of different ways as PW is so flexible and easy. Edit: also posting your solution, may help others too.1 point
-
Actually, that's not a review--that's our marketing copy. Looks like they copied and pasted it from these two pages: http://processwire.com/about/what/ http://processwire.com/about/why/ We allow this usage with our press releases, but not with our site copy. The ProcessWire site copy is not open source, so whoever posted this should have asked for permission before doing so.1 point
-
This value can be edited in the backend. revert your changes in the module and goto setup/languages and edit your german pack. Click the "translate new file" link at the bottom of the page and use this path: /wire/modules/LanguageSupport/LanguageSupport.module Now you can edit the locale. Hope this helps. I think the LanguageSupport files should be added to the german language pack too..1 point
-
max_execution_time AND max_input_time set to 30? I remember also had once a problem when setting these values too big. Another thought: Mod_security active?1 point
-
1 point
-
This sounds good to me. I'm guessing we could do the JS confirm pretty easily from the ajax upload, though probably not from the oldschool one. So might be good to have a setting that goes with the file field as to whether the default behavior is to overwrite or rename. It'll also require some changes in the WireUpload class, but I don't think anything too major.1 point
-
Actually $page->viewable(); does check if the template file exists. See the viewable() function in the file /wire/modules/PagePermissions.module. One of the first checks it performs is $page->template->filenameExists(). If you've run into some scenario where viewable() isn't responding properly, let me know how to reproduce? What doesn't check if a template file exists are any functions that return a Page or PageArray. So you can end up with pages that don't have template files from a non-specific $pages->find() call, or $page->children call, for instance. These functions are only bound by access control (defined in the template) and page status (hidden, unpublished, etc.). The intended way to exclude pages from results like this is to use the 'hidden' status that you see on the 'Settings' tab of every page. Once page has a 'hidden' status, it's not going to show up in any find() or children() results unless you add "include=hidden" (or include=all) to your selector string. Soma's suggestion to use specific selectors to include only the things you want (or exclude the things you don't) is also a good way to go.1 point
-
This is not a straight answer to your question but if you work a lot with messy data, cleaning and data transformation you could take a look at Google Refine . This is a really powerfull tool and not hard to use. I haven't used it for a while but i think it would be quite easy to transform the data to the format you desire.1 point
-
This is just amazing! I'll will check it as soon as I fly back to Russia. Can't wait to try it!1 point
-
1 point
-
excellent work, will definitely buy it. hope that enough people opt for it, so ryans plan will work! btw. why don't you accept donations?1 point
-
I've got a habit of first reading the "definitive documentation", source code that is . That's where that filenameExists() came up. I mentioned viewable() as it's definitely something that's supposed to be used (as everything else in the documentation) rather than going for something undocumented. Still, it seemed to me that it's ok to use filenameExists() if that would solve your problem. I'm sure Ryan will tell if I were wrong.1 point
-
This is really amazing! Would it be possible to use custom styling (css, jquery) besides/instead JqueryUI?1 point
-
Ryan, you're insane. In a good way, but still insane. This is … wow. Just wow.1 point
-
This is the greatest thing ever! Yes, I will more than gladly pay for this. Just debit my bank account directly. hahaha Couple of thoughts... Can I access all that data with the API just like I do with pages? I create a lot of forms and I would love to use the API to manipulate and display my form data... guessing yes. I would love to see a main navigation item for forms in the admin. Because site administrators would be looking for the form data and I don't want them poking around in setup. Just off the top of my head I am thinking that I would love to have forms and submissions as part of my main page tree. Fantastic Work Ryan!!! I am amazed by PW every single day. This is probably the number 1 feature ever. You just saved me thousands of hours. Again! Thank you!1 point
-
Pinch me. And, I think I need a hug. Edit: Forgot to ask: is there an eta on when this will be released?1 point
-
1 point
-
Thanks guys, glad you like what you see so far. The product will be relatively simple in the first version (like what you see in the video), but I'll continue to expand it to be more and more capable. Things like multi-page forms, double-post URLs (like for Salesforce integration), multi-language forms, publish to pages and more are already planned and getting attention. But much of the direction will also come from what the audience wants most. Making themes is really easy. You just go here to do it. Then click "download" theme. Rename the CSS file included in the theme to jquery-ui.css and place it in /site/modules/FormBuilder/themes/[your-theme-name]/. Copy the /images/ directory that comes with it too. I'll include more detailed instructions with it, but just wanted to get across how simple it is to theme it. That's all assuming that you decide to even use jQuery UI for theming. You can certainly disregard jQuery UI output entirely and style it yourself with your own CSS. But I prefer the quick and easy Themeroller for most cases. Also, if you are using Datepicker or asmSelect inputs in your form, then you'll probably prefer jQuery UI css as I think it would be less fun to style those things manually. The Form Builder uses the same Inputfields as ProcessWire, so you can download more input types (like Soma's color picker, for example).1 point
-
You can always reset your password just by pasting this temporarily into any one of your templates, and then viewing a page that uses the template: $u = $users->get('admin'); // or whatever your username is $u->of(false); $u->pass = 'your-new-password'; $u->save();1 point
-
Thanks guys! I started using thomas' suggestion when I read it, and it works great. It's not perfect but at least most of it is properly aligned. I guess I have to let it go and stop worrying about indentation. Although sometimes, I really have to, because I teach part-time and I want the students to be able to read my examples easily. And yes, I'm introducing processwire to my students, instead of joomla and drupal which other schools usually use to teach cms. So there's hope that future web developers would be using processwire more and more! Thanks again!1 point
-
The ProcessWire equivalent of the suggested code that I just added to StrategyCore is: <meta name="generator" content="ProcessWire <?php echo $config->version ; ?>" /> <!-- This website is powered by ProcessWire ProcessWire is a free open source Content Management System created by Ryan Cramer and licensed under the GNU/GPL. ProcessWire is copyright <?php echo date('Y', time()); ?> by Ryan Cramer. Modules are copyright of their respective owners. More information can be found at http://www.processwire.com --> There's a bit of PHP in there to always show the latest PW version that's running, as well as the current year in the copyright line. @ryan - would you suggest any changes to that?1 point
-
Thanks a lot Ryan. I just wanted to make sure that the folder name doesn't appear in the final URL. BTW, I'm having a total blast with PW! Lovin' it1 point
-
Sneak Preview (everything configurable, styling mostly controlled by admin theme):1 point