Leaderboard
Popular Content
Showing content with the highest reputation on 07/04/2014 in all areas
-
Here is a website I nearly finished(Still waiting for decent photos from client for gallery) for a hairdresser in Slovakia so it's all in Slovak. http://www.milujsvojevlasy.sk/ This is the first site that I used profields. I used pro fields table on the price list page: http://www.milujsvojevlasy.sk/cennik/ Using Profields table made it really nice and simple for the client to update prices in the admin. For the booking system I integrated a separate script. Used my own grid system / framework http://www.cutegrids.com to make it responsive. and of course built using the fantastic Processwire and Profields.6 points
-
Ok. We just launched our new website today, of course now running on ProcessWire. A long journey with many iterations and somewhat experimental. Still a work in progress, as much as never finished. There's a lot of inter-linkage going on between content news, projects and competence pages. Modules worth mentioning: TextformatterAutoLinks Markup RSS Feed http://update.ch (IE < 9 not supported, sorry. Old Androids may experience strange things)5 points
-
TemplateEngineFactory The main idea of this module is to support the developer separating logic from markup. This is achieved by turning ProcessWire templates into controllers which interact over a new API variable to template engines like Smarty or Twig. The TemplateEngineFactory ships with a default engine "ProcessWire" that uses the internal TemplateFile class to render the templates (some of you may already be familiar with this concept). However, the module is constructed in a way that any template engine can be used, implemented as separate modules. Please check out the readme on GitHub for more details how it works: https://github.com/wanze/TemplateEngineFactory ... or in the modules directory: http://modules.processwire.com/modules/template-engine-factory/ Implementation of Smarty: https://github.com/wanze/TemplateEngineSmarty Implementation of Twig: https://github.com/wanze/TemplateEngineTwig Implementation of Jade (by dreerr, thanks!): https://github.com/dreerr/TemplateEngineJade How does it work? A controller (aka ProcessWire template) can have an associated template file which contains the markup to render. The folder where those templates are stored is configurable for each installed engine. If the Factory finds a template file with the same name as the controller, an instance to access the template is provided with a new API variable (called "view" by default). Over this API variable, you can set the dynamic variables that should be rendered. Hopefully the following example makes things clearer: // In controller file: /site/templates/home.php if ($input->post->form) { // Do some processing, send mail, save data... $session->redirect('./'); } // Pass variable to the template $view->set('foo', 'bar'); $view->set('show_nav', true); $view->set('nav_pages', $pages->get('/')->children()); As you can see, there is no markup echoed out. The corresponding template file is responsible for this task: // In template file: /site/templates/view/home.php <h1><?= $page->title ?></h1> <p>Foo: <?= $foo ?></p> <?php if ($show_nav): ?> <ul> <?php foreach ($nav_pages as $p): ?> <li><a href="<?= $p->url ?>"><?= $p->title ?></a></li> <?php endforeach; ?> </ul> <?php endif; ?> In the example above, "ProcessWire" is used as engine. If Smarty is the active template engine, the corresponding template file could look like this: // In template file: /site/templates/smarty/home.tpl <h1>{$page->title}</h1> <p>Foo: {$foo}</p> {if $show_nav} <ul> {foreach $nav_pages as $p} <li><a href="{$p->url}">{$p->title}</a></li> {/foreach} </ul> {/if} Note that the API variable acts as a gateway which connects you to the activated template engine. We can switch the engine behind without changing the controller logic! (I know that this is probably not a very common need, but it's a cool thing anyway ) For further information, please check out the readmes on GitHub. Please ask questions if anything makes no sense - sometimes it's hard to get my explanations Cheers4 points
-
TemplateEngineTwig This module adds Twig as engine to the TemplateEngineFactory. Screenshot of the available configuration options: Project on GitHub: https://github.com/wanze/TemplateEngineTwig Project in modules directory: http://modules.processwire.com/modules/template-engine-twig/ Only Twig related things should be discussed in this thread. For common problems/features/questions about the Factory, use the TemplateEngineFactory thread.3 points
-
Hi Blad, You can do this with some additional logic: if( $this->input->get->sSearch ) { $q = $this->sanitizer->text($this->input->get->sSearch); if (is_numeric($q)) { $selector .= "id=$q,"; } else { $selector .= "title|body%=$q,"; } }3 points
-
TemplateEngineSmarty This module adds Smarty as engine to the TemplateEngineFactory. Screenshot of the available configuration options: Project on GitHub: https://github.com/wanze/TemplateEngineSmarty Project in modules directory: http://modules.processwire.com/modules/template-engine-smarty/ Only Smarty related things should be discussed in this thread. For common problems/features/questions about the Factory, use the TemplateEngineFactory thread. Edit: I added a section to the readme on GitHub how I think Smarty works best in combination with the TemplateEngineFactory and ProcessWire. I used this technique in a recent project and I'm very happy with it.2 points
-
I just read a nice article which I feel is related to this topic: How we use feature based development to give better quotes. https://offroadcode.com/blog/1519/how-we-use-feature-based-development-to-give-better-quotes/ There are many points there regarding pricing and dealing with clients that can help. I like the idea of breaking needs, wants , wishes and targets into different parts. I think this can really help with the process and building for the client what he can actually afford while at the same time not overworking your original quote or doing more than what you are paid for.2 points
-
@adrian is right; apart from sending loads of email, external services make it much easier to get your messages through. Setting up a mail server is simple, but there are lots of factors that matter when it comes to spam prevention. Formatting and encoding everything properly, having correct DNS records (SPF etc.) and configuring the server itself are (usually) no-brainers, but things like age and reputation of the server also affect scores.. and of course there are various blacklists and whitelists in use too Based on my experience so far, I'd never recommend relying on local mail server or putting one together yourself if it's critical that the users receive messages correctly 100% of time. In this case I can't really say if it's a critical issue if one or two people here and there don't get their messages -- sounds to me like it wouldn't matter that much, but you'll probably know better. Even if you do go with your own, local mail server, at least check it with something like http://mxtoolbox.com/diagnostic.aspx. Tools like that can check that your IP isn't already on one or more blacklists and also make sure that you've got most other basic things in order. Hope that helps a bit.2 points
-
Interesting link that. I have made similar points with main stream advertising. For instance with music: if an advertiser has a piece of music created by someone who has no artistry, then even if all the messaging is perfect, the advert will completely undermine the brand. The biggest mistake any company can make is to underestimate their audience. It is not uncommon for a company to think they can throw any rubbish at potential customers because "what do they know?" What is forgotton is that every listener to adverts or users of the web use thousands of websites and most of those will be by huge companies like Google; what ever you think of them, these companies will have websites that work perfectly for what they are doing. The result is that even if the customers cannot appreciate what the technical or design differences between a good or bad site, or a good or badly produced piece of music, never the less, they will sense that it is cheap and nasty, and that is how they will judge the company. If you want to completely undermine a brand, even a well established one, commission something that people will view as being "amateurish." Always remember the lesson of Gerald Ratner. During a conference, he remarked, "People say, "How can you sell this for such a low price?", I say, "because it's total crap." Although customers knew his stores sold low quality goods, at least they had been treated like good customers. His statement completely undermined the brand and the customers simply stayed away. It knocked £500 million off the market value of the company. An imaginative, or clean, clear and well written website does not need to cost more money that a crap one - but the damage that can be done by a site that is badly made, poorly written and pays no attention to the brand could cost a client a fortune. Maybe their entire business.2 points
-
The site is already on the live server since days and I've created 5 users out of which one can't log in: "request aborted because it appears to be forged." Even more strange: I can log in with the users credentials and the same browsers, no problem (I'm of course at my desktop and not at my users office). The user swears that he has used the right credentials. bowser.plugn messings with session or.heis browser. is hackked2 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).1 point
-
This Textformatter module for ProcessWire enables you to break up a single textarea field (using either TinyMCE or CKEditor) into multiple pages. You include all of the content in a single rich text field and separate each pagination with a line of hyphens (5+). When rendered on the front-end, the user will see pagination links at the bottom of the page enabling them to move forward and backward through the content/article. Also included is the option for title pagination. That means assigning a title/headline to each pagination and giving the user a list of those titles they can click on to move to each section of the article. Example of this module in action Documentation and customization options GitHub Page Module Page Download ZIP Install class: TextformatterPagination1 point
-
After months of silence on the forum I've decided to speak out and introduce a brand new admin theme for ProcessWire 2.4.x I've made the theme initially for our internal business project and I've decided to share it with you all The theme itself is designed only for ProcessWire 2.4.x and up because it's wrapped as a module (new theming design approach introduced in ProcessWire 2.4) and it also has it's own options you can configure. It has all the bells and whistles as Default Admin Theme of PW 2.4 as well as some of my own You can download it from here: https://github.com/nvidoni/AdminThemeModesta and please let me know of any mistakes you find during your workflow... Changelog: v1.0.1 Added unpublished pages status icon next to username (fires modal window with unpublished pages list that you can edit) Improved PageList (children are more indented with arrows before them, hidden pages have more lighter color and icons have more darker color - by suggestion from Martijn Geerts) Other CSS improvements UPDATE: You can find version compatible with Processwire 2.4.4 and up on dev branch: https://github.com/nvidoni/AdminThemeModesta/tree/dev and also let me know about any mistakes that should be fixed. Dev version isn't updated to v1.0.1 yet because of strange problem with theme not switching right (doesn't activate) - it started to happen from 2.4.5 dev version of PW...) and it seems it happens only in Windows environments...), hopefully we'll fix this soon. To sum it up and let the images do the talking, here we go:1 point
-
1 point
-
Id is integer and not fulltext. You can't mix them with % but maybe with * . But you may need to have some additional logic to check if search is an Id or text.1 point
-
@blad - welcome to the forums! not totally sure here, but could possibly be an issue with trying to sanitize as text, since ID is (int). have you tried it without the sanitizer, and also have you tried it with different operators like *= and ~=?'1 point
-
For sending one message to one user at a time with a download link should be fine via PHP mail(), however, to reduce the potential spam score of the message, it is often preferable to send via a properly configured smtp server, which is where these modules come in: http://modules.processwire.com/modules/wire-mail-smtp/ http://modules.processwire.com/modules/wire-mail-swift-mailer/ I can't see any real reason to use an external service in this case.1 point
-
Don´t forget about this: https://processwire.com/talk/topic/6822-module-dynamic-roles-for-pw-246/ http://modules.processwire.com/modules/form-builder/ http://modules.processwire.com/modules/wire-mail-smtp/1 point
-
You may want to have a look at TemplateDataProviders which is pretty similar to your module1 point
-
e) they're outsourcing to a country with a lot cheaper workforce. My money is on this.1 point
-
Can you have him uninstall, delete and reinstall Firefox?1 point
-
Thanks for the headsup adrian. will use this "easteregg" in the future! To bad for the license on Redactor. But hey, this gives me a reason to start coding my own jquery sexy lightweight editor.1 point
-
Oh, this is perfect timing! Taking this for a test drive as soon as possible. Lately, I was aiming at the exact same thing. But this looks perfectly done with the possibility to plug in your favorite template engine! Thanks, Wanze!1 point
-
yeah pdf generation seems to be kind of 1980. it probably get's better after wanze's update do you created a page specific template under /templates/pages2pdf/ ? it was important for me and and hat to tweak a lot I'm outputting only via heredoc to keep all "double quotes" instead of 'single quotes' (you could escape them of course)1 point
-
i understand this is a very old question... if $page is available wherever you define the shortcode closure: $shortcode->add('foo', function ($atts) use ($page) { //NOW I CAN USE $page here! }); but of course, wire() makes all the pw api vars available to you.1 point
-
empty need.real variabble nots one come.from no public objecto.proptery empty not triggers__get or __call in objectos.stop using it u will1 point
-
Nico They are just the normal WP grid - I try and avoid extra plugins other than a lightbox, but that is a template/jquery issue. I often have one image at the head of the article, then the rest at the end as a grid: http://www.foodloversdiary.com/allotment-diary/weeding-in-the-rain/ The way WP handles these has changed a bit over the years - in the old system you would have all your page uploaded images appear as a gallery, unless you hand wrote exclusions into the hanna code, for instance if you did not want to repeat any images in the rest of the article. I am not sure how the new system works. Of course, my blog is old enough to have both! This is why I think that any modules that are available via the PW website, need to be ones that have been checked first, especially for security issues. Same with things like profiles and so on.1 point
-
There seems to me to be a growing misunderstanding of what a website actually is. Leaving aside ecommerce, which is a very specific and obvious function, I think many companies look at a website as basically another advert. My background is in above the line media, especially TV and Radio, and I have spent a huge number of years creating adverts that bring a customer to a clients door. Once they are there, it is the client's responsibility to make sure the customer buys something, gets some sort of satisfaction or service and wants to come back. It is a very simple, linear process. When website designs first started, there intent was a little more blurry - they were not quite an advert, nor a brochure, could contain a huge amount of information and could be as stuffed full of words as you wanted. A lot of companies seem to work on the principle that if people found your website, you should give them lots of value in the form of information so they would then want to hit the contact button and consolidate some sort of relationship. Then along came the SEO position developers. They threw out the idea of value relationships and instead turned websites into instant ads. The entire idea was to drag people to the website at any cost and with any luck, get them to contact you. The perfect SEO website is formulaic, basic, fast, uncluttered to the point of utilitarian and offers no customer value at all - that is not what it is there for. It is back to my radio and TV ads where all we tried to do is get the customer to the clients place of business; to their door. The problem is that a website is not the clients place of business. There is a very good chance with an SME that it is impossible to monitor it, have live chat or anything else that a customer would get if they actually turned up at the place of business. The site is just another ad - so all that has happened is that you spend possibly a lot of money on SEO and online advertising just to persuade people to go to a web address to simply see another advert .... probably a not very well designed one at that. But that is where we are at. Companies that make their lively hood online are spending money on their websites because those really ARE their businesses. But companies that are using the web simply to tell people about themselves are being persuaded by cheap, SEO orientated marketing companies to produce low value, template based, formulaic adverts that address no brand considerations what so ever. Indeed, my very little experience with these companies trying to sell ME a website for my music company has shown that they never ask a single question relating to my brand, brand values, product targeting or the million and one other facts that are kind of basic for any serious advertising campaign. I can write copy that will make a company dance and sing - I really am very good at it. I can make cute things dimple like a Disney princess, make serious services like lawyers sound like sage advice from your favourite grandpa, or make your garage service sound like the best thing since sliced Model T Ford. But that does not fit with the formula. Copy and design like that needs research, time spent with the client and that thing that scares people most of all - imagination. And none of that is cheap. The hard part is persuading the client that the monthly standing order he is paying for the seo driven, same-as-everyone-elses template site might be getting him a handful of orders, but in the long term could seriously undermine his brand. I have no idea how to do that as I find more and more that when I deal with people and talk about the importance of brand, of good customer relations and of building something of value, that they look at me as if I am talking a foreign language. I am beginning to feel a little old!1 point
-
you are right, I forgot to publish. (it's Friday, end of the day, excuses and such)1 point
-
New updates to the theme - I've added a counter next to username that counts unpublished pages and shows them in modal window. Check out the first post for changelog.1 point
-
I think we might one day wake up and realize we have a "forum creation framework": pieces of the puzzle like the UserGroups module will continue to appear and eventually reinventing the wheel will not be such a huge task anymore.1 point
-
That is caused by Session Login Throttle. With code below you can force Session Login Throttle to delete the entries. And make the account work again. $u = $users->get('admin'); $u->of(false); $u->pass = 'type-in-your-pass'; $u->save(); just throw it somewhere in you template, and call it with a browser visit.1 point