Leaderboard
Popular Content
Showing content with the highest reputation on 05/28/2015 in all areas
-
Doh! Somewhere in the back of my mind, I remembered solving this issue with session locking before. session_write_close() is what I needed. I'll post back here with a full solution to keep the topic relevant.5 points
-
4 points
-
Hello ProcessWire-Community, I would like to share with you an website I made with ProcessWire for the agency designconcepts, for which I am currently working for. The website is for the interior decoration company von Bergh and is a single page. Although it has very much content to offer through some flexible sections. On top of the website is an classic image slider, which changes the parallax background of the site, depending on which image currently is displayed. The news section is an accordion element inside an tab element, so that it could have multiple news pages. The reference section is an isotope element, which can be sorted and the active reference is loaded with AJAX into an stage container. The company section and footer are tab elements, but the footer is hidden on page load and expands by clicking on the navigation. Further is the website translated into two languages, responsive, optimized for better performance (for example through LazyLoad and Responsive Images). At last here is a short list of modules I used: Template Twig Replace Images with cropping MinifyHTML Trashman Schedule Pages I really hope you enjoy this website and maybe I will post some more, because I am a great fan of the ProcessWire CMS. Best regards, Andreas2 points
-
With everybody else discussing performance: I like the one-page construction very much, and when it comes to neat little details like the imprint fly-in animation the design really convinces me. (Though I'm usually not a fan of one-page-sites!) The many, many references are clearly arranged and especially the different categories of references are beautifully implemented. Well done, Andreas! The only obstacle I found was the long way I needed to scroll down once I clicked on details of the very last references - since that flies me directly to the upper content area, with no link to get back to the end of the list. But this definitely is a minor observation, it doesn't bother me at all. And the performance is all right with me now, the whole page took 2,4 seconds to load on first try. Looks like your server changes paid off! (And caching options with ProcessWire are sweet.)2 points
-
Make CKEditor use absolute paths. Solved: I created a copy of the wire/modules/Inputfield/InputfieldCKEditor/pwlink plugin and named it site/modules/InputfieldCKEditor/pwlink, then I enabled it instead of pwlink. added a function to CKEDITOR inside of newMod/plugin.js : CKEDITOR.absoluteLink = function (href) { var reg = /^https?:\/\//i; if (!reg.test(href)) { var link = document.createElement("a"); link.href = href; if (href.indexOf(link.host) > -1) { //ie subdomain src = link.protocol+"/"+link.pathname+link.search+link.hash; } else { src = link.protocol+"//"+link.host+link.pathname+link.search+link.hash; } return src; } return href; } Then I went ahead and passed the link into the function: var url = CKEDITOR.absoluteLink($("#link_page_url", $i).val());2 points
-
The frontend isn't the only place where you can cache stuff. For me it just took 40 seconds till I got the html response, while the bulk of other requests was done in another ~7 seconds. I don't know what this page is doing, but caching the generated markup to prevent it from doing it on every request will get you a huge speed boost. With all the static files served this fast maybe even ProCache would be a good investment.2 points
-
Despite my fast internet connection the page needs more than 25 seconds to load. Some visitor might jump away before...2 points
-
Just a simple contact form including spam protection. Optional support for Twig (TemplateTwigReplace) as template engine. --- Please have a look at the readme on github! If you upgrade from version 0.0.9 and below, there are some extra steps to be taken. The Guides Installation Module Settings Spam Protection Usage Logging Upgrade Notes1 point
-
The markup module that comes along with kongondo's blog module is just there as a helper - there is no requirement to use it. Just don't use it and write your own markup - either steal from the markup module, or from Ryan's blog profile as a starting point.1 point
-
Sanitize field value is a FormHelper feature Set sanitizer to field as an additional attribute $emailField->fhSanitizer = 'email'; Get sanitized value after form processing / submitted $value = $fu->form->fhValue('emailField') Change sanitizer if needed... $value = $fu->form->fhValue('emailField', 'pageName') Or just do it without FormHelper inside a field processInput hook // hook after field processed (form need to be submitted) $myField->addHookAfter('processInput', function($event) { $currentField = $event->object; $value = $currentField->value; §sanitizedValue = wire('sanitizer')->pageName($value); // Do ... } You can take a look in each FU field (like username field for registration) to see some examples. Or at the wiki plugin examples (register, login). Set additional user field "nickname" based on username during registration (plugin). Just hook before "save", generate the value and set it to the userObj. "userObj" is a temp object of type User. All existing fields will be saved. $fu->addHookBefore('save', function($event) { $form = wire('fu')->form; if(!count($form->getErrors())) { wire('fu')->userObj->nickname = $form->fhValue('username', 'text'); } }); You need an additional field with user input? Add a field with sanitizer and a processing hook... Same as username field So you can use it as starting point $myField = $modules->get('InputfieldText'); $myField->label = $this->_('MyLabel'); $myField->attr('id+name', 'MyField'); //$myField->required = 1; $myField->fhSanitizer = 'text'; // Call hook after field is processed by PW form api $myField->addHookAfter('processInput', function($event) { $field = $event->object; // Value will be sanitized as text with "$sanitizer->text()" $mySanitizedCustomInput = wire('fu')->form->fhValue($field->name); // Do ... // Example: Add value to user during registration wire('fu')->userObj->myField = $mySanitizedCustomInput; // Need to set an field error? // $field->error('Custom field has an error...'); }); // Define the field before you call FU and add it as additional field... $fu->register(array('username', 'email', 'password', $myField)); If You need more examples or have a plugin idea just post it here.1 point
-
I am happy you like the website. I can't take credit for the design, because that was made by an co-worker, but I will let him know. The long scrolling after clicking the last reference is indeed a little obstacle. When I developed the site I didn't expect that there would be so many references. That is one of the disadvantages of a single page design. It seems like the caching is already doing its job, because I didn't switch the server yet. But 2,4 seconds loading time is already an improvement.1 point
-
Hi Nico, thanks a lot for the lightspeed fast reply! What you recommend is working pretty fine! Thank you!1 point
-
1 point
-
For quicker "initial delivery": Try to do a flush() (or {% flush %} as you're using twig) where it makes sense ( see http://www.phpied.com/progressive-rendering-via-multiple-flushes/ ). There is also a setting to use twig cache in the module options of TemplateTwigReplace. If you haven't activated it yet now would be a great time to do it1 point
-
Here you'll get a quick overview over the common caching options in processwire: http://www.flamingruby.com/blog/processwire-caching-explained/1 point
-
It's possible but not automated. A siteprofile is just a bunch of template files and a sql file with all the templates/fields set up. Merging the files should not be difficult and for merging the database I'd suggest using a fresh installation of the blog profile and then export/import fields/templates over. The fastest way to recreate the base structure of the pages is most likely doing it by hand.1 point
-
I eventually built my own. Actually, Kongondo helped me somewhat. All I needed was posts tags categories comments As I needed much finer control over the markup and templates, it was straightforward to build these natively with PW using regular pages and the Page select fields etc. Is that an option for you?1 point
-
For me "<=" is just not working with radio buttons, but it works with a selector like this: "pricelistselect=1|2".1 point
-
This is getting really really great tool for editing, import and now export, too....tell me when you "run slower" forward...that i could translate the missing things to german as well. Best regards mr-fan1 point
-
1 point
-
Thanks Bernhard, that should be safe change, just committed! I also added simple support for adding new pages. Current syntax is this: <?= $fredi->setText("Add new article")->addPage("article", "title|date|summary", $parent) ?> First parameter is template (required), second is fields (optional, uses only title if empty) and third one is optional parent page (uses current page otherwise). It doesn't do much, but works pretty nicely. It redirects to new page after successful save. Name is created from title.1 point
-
The first part of your idea is practicable, the second one not. At least I don't want to add properties to pageimage from a croppableimage cropsettimgs field. For example if someone calls his thumb "crop", it collides with existing pageimage property from new core. Also it has potential that properties from (other) third party modules collides with those properties. I'm not 100% sure, but tend more to no then yes. Best way to contributing is to send pull requests to Github.1 point
-
@dparul: Never heard of most of them... Are they custom made by you? Or could you post a link for all of them?1 point
-
The module uses now the WireMail function instead of php mail. Besides I added the tag "scf" for fields and templates created by this module (just available on a new installation).1 point
-
It would be great if the wireMail function could be used for sending emails instead of the php mail function. This way people would be able to use it together with their favourite mail extensions. For example with SMTP support: wiremail-swiftmailer or wiremailsmtp1 point
-
No more forgetting those key modules https://processwire.com/talk/topic/8410-modules-migratorinstaller/1 point
-
Seeing the forgot password, I want a "forgot module" module. Basically, it automatically installs the module you forgot about......1 point
-
1 point