Leaderboard
Popular Content
Showing content with the highest reputation on 05/15/2015 in all areas
-
7 points
-
Many comparisons are so superficial. It is therefore no wonder why you never see the clear reasons mentioned in "a comparison" why people ended up with processwire.4 points
-
Just tried a few similar jQuery plugin (including Freewall) to substitute the Uikit dynamic grid on a site but finally I went back to Uikit. It is very basic but easy to use.3 points
-
I understand that, but if you want to write about something, make sure you understood at least the basics.2 points
-
I hear ya - sometimes the brain reaches boiling point and I swear it just goes to mush I see masonry mentioned quite a bit around here, but just to add another option in case folks haven't seen it, I really like Freewall (http://vnjs.net/www/project/freewall/)2 points
-
2 points
-
Now it makes sense, didn't grasp the $fonts in the different codeparts. Essentially you're using this: $fontlist = $pages->get("/fonts/")->find("id>1, …"); vs. $fontlist = $pages->get("/fonts/")->find("keywords=mykeywords")->find("id>1, …"); There it's exactly the difference diogo and I did talk about: The first one is classwise Pages > Page > find(), which works for pagination and the second one is Pages > Page > PageArray > find(), which doesn't. You'd need to build it like this: $parents = $pages->get("/fonts/")->find("keywords=mykeywords"); $fontlist = $pages->find("parent={$parents}, id>1, …"); Edit: To explain the difference a little more. Pages::find() and Page::find() are both searching new pages, which will be paginated. PageArray::find does not search for new pages, it just returns a filtered subset of itself, which is not automatically set up for pagination.2 points
-
I was put on to Mandrill by Pete (thank you Pete). In my experience if your website sends emails to people, for example you have a booking app and people get confirmations, then the confirmation emails may, sometimes, get rejected as spam, regardless of the fact that they're not. TL;DR Whenever in the PW admin there is a field to do with delivery of email from PW, there ought to be a note / link to an article about the benefits of sending email via Mandrill (or similar service) rather than direct. Boring rant version I had tried to solve this lack of 100% reliable email delivery with DKIM and SPF records (good things in their own right) tuning the content of the email so perhaps it would be less likely to apparently trigger some spam pattern recognition code (for example having few(er) HTML links banging my head shouting Nothing worked. I would appear to have a period of reliability where all emails were getting through, relax... Then BAM! Another spam rejection. The only variance? The receiving email systems. As visitors to the site were many and varied so were their email systems and some of those email systems spam detection algorithms were simply too sensitive for their own good. So it was not my fault but nevertheless my client whose website used the booking system kept gettings infrequent but repeated 'lost' email confirmations. So I made one other change, I sent email via SMTP to Mandrill rather than directly to the client. Mandrill then sent it to the client. This resulted in an unprecedented (and continuing) period of 100% success—zero false positive spam rejections. The reason is simple: my client's domain (or your client's domain) has a reputation as a source of email. It is probably average or good. Whereas Mandrill, who send (Mandrill is part of MailChimp and these are the overall numbers) with this many emails have to have an exceptional reputation, and they do. Nothing I can do on a domain or in DNS can compete with this firehose of good reputation provided by Mandrill. Recommendation If I were a newbie to emailing from PW to people then I could well go through this learning curve myself. To help others I would like to suggest that perhaps wherever there is a field in PW that is responsible for sending email that one of those helpful 'Notes' be auto populated with a link to an article on on the benefits of sending email via an intermediary such as Mandrill.1 point
-
Adrian - thanks. Been tying myself up in knots with this one. Trying to integrate with jQuery Masonary grid fried my Friday evening brain. Working now1 point
-
Hi Peter, You can easily limit the images like this: foreach($i->Images->find("limit=5") as $image) {1 point
-
1 point
-
Thanks for spotting! Github issue posted: https://github.com/ryancramerdesign/ProcessWire/issues/11711 point
-
Thank you, Horst, I'll try and muddle through that one. I'll get there in the end - I don't give up!1 point
-
haha yes but it's a solution, all the client cares1 point
-
Solved! Thank you all. My code is: keyword.php: $fonts = $pages->get("/fonts/"); $filter = "keywords=$page"; include("./fontlist.inc"); fontlist.inc $fontlist = $fonts->find("$filter,limit=6, draft=0, sort=-created"); $pagination = $fontlist->renderPager(array( … This way it allows me to set limit, draft, and sort in the font list template whatever the filters. @diogo I am really glad you use and like my projects! It is always a pleasure to see that my work can be useful. Thanks to you, Use & Modify will have keyword pagination bug free!1 point
-
Have you subscribed? I am sending more invites every now and then.1 point
-
Ok so I got what I think is a workable solution... Installed Ryan's Page Edit Field Permission module Created 'language alternate field values' for each of my languages for each field, rather than using the multi-language fields. Added these fields as permissions using Ryan's module. Created roles for each language, so for example 'german_translator' role can only access the German alternate fields. It all seems to work well, and hopefully is pretty much exactly what the client was looking for in my first post.1 point
-
@diogo I did at first just take a look at the small comparison table at the top, but man is the author's view of processwire flawed.1 point
-
It would be nice if PageTables could get some attention in this module. E.g. removing a page from the pagetable will result in an error (line 220).1 point
-
hi apeisa, any news on padloper? i have at least 2 bigger projects where this would be great to have! is there a vague release date?1 point
-
Thx for this Alan, been checking out Mandrill since reading your post earlier, and running some test emails etc. Looks like a pretty sweet system. Will check out the API over the weekend as that looks pretty sharp also I think I'll be moving all my site emails to Mandrill. Cheers.1 point
-
Is there a specific reason you want this to be managed using a button on the field itself? If I was doing this, I'd look at creating a module that just added a hook method (like 'generateSprite()' or something), to the Pageimage class, maybe, which exposes a function to return the generated sprite image URL and CSS content for a given images field. There would be a cache table behind this which saves the generated status and metadata/CSS to prevent processing the images on every request (this would have to be invalidated whenever the images changed). Using this method, there is complete freedom to do all of this from the API. You can still have a configuration page, but the downside of this is that it would be less customisable per field instance in the templates. For example: $sprite = $page->images->generateSprite(); $sprite could be an array of generated CSS and/or path to the image for you to use in the template/code however you like. I think the main consideration in approaching this, is how (and why) you want the sprites to be made.1 point
-
@diogo I was about to write the same thing earlier today, but it's not right. It would be right it were PageArray::find, but $pages->get("/fonts/") returns a Page and not an array of pages. Page::find() does essentially what you suggested. It rewrites the selector to include "has_parent". So no need to do this manually in this case. @rooofl It's strange that it would work without the find() method as you cannot paginate the result of $pages->get("/fonts/"), because it only returns a single page.1 point
-
Does anyone know how to remove the tabs at the top of the modal? Thanks! Great module Antti!1 point
-
sometimes clients need landing pages for marketing/seo that need to live off the root. all of these pages would make a mess in the page tree, so they are stored under /landing-pages/ I always do a hook (as was demonstrated in the CMS Critic Case Study) wire()->addHookBefore('Page::path', function($event) { $page = $event->object; if($page->template == 'landing-page') { // ensure that pages with template 'landing-page' live off the root $event->replace = true; $event->return = "/$page->name/"; } }); on the landing page template: // if someone tries to access this page at it's real location in the page tree, redirect to the fake URL: if(!$input->urlSegment1) { $session->redirect($page->url); } i should also add that on the homepage there is this: /** * First, check to see if there is a URL segment off the homepage * this is used to generate custom landing pages, for marketing etc.. * with a shorter URL, living off the root. * */ if(strlen($input->urlSegment2)) { // we only accept 1 URL segment here, so 404 if there are any more throw new Wire404Exception(); } else if(strlen($input->urlSegment1)) { // render the landing page named in urlSegment1 $name = $sanitizer->pageName($input->urlSegment1); $landingPage = $pages->get(2281)->child("name=$name, include=hidden"); if($landingPage->id) echo $landingPage->render(); else throw new Wire404Exception(); } else { // do the normal homepage... so that's why the segment check on the landing page template, because when it is being rendered from the homepage, if(!$input->urlSegment1) will be true1 point
-
Actually i found the answer $num = count($Page->comments); "<p>Page has $num Comments</p>"1 point