Leaderboard
Popular Content
Showing content with the highest reputation on 05/05/2016 in all areas
-
I'm currently on mobile, so I won't add much here. I just think people should know this: https://medium.com/@jitbit/target-blank-the-most-underestimated-vulnerability-ever-96e328301f4c#.4u4t4drfs5 points
-
5 points
-
Try check_access=0 in your selector: http://cheatsheet.processwire.com/selectors/built-in-page-selector-properties/check_access-0/ foreach ($top->children("check_access=0") as $child)3 points
-
https://processwire.com/talk/topic/383-module-import-pages-from-csv-file/?p=1193903 points
-
2 points
-
Hi Zeka, Removing these lines and I got the module running on 3.0.x.2 points
-
Major vulnerability, doesn't seem to have a patch yet.. http://arstechnica.com/security/2016/05/easily-exploited-bug-exposes-huge-number-of-sites-to-code-execution-attacks/1 point
-
1 point
-
Hi Bernhard, I finally made some time to add a validator panel. At the moment it only works with live sites because I am using the standard "doc" method for sending the URL to the validator.nu service. If you guys are interested in a version that also works with local dev sites, let me know and I'll add that too - looks like it's possible, but this was the easiest way to get started to see what you think. The debugger icon is changed based on the report so you have a quick visual of the result. The panel is not enabled by default. Anyway, let me know what you think.1 point
-
Yes right, it's not even in your code... My fault, sorry. Did you make sure all caches are emptied (if applicable) and also disabled the cache of the page's template? What you maybe also could take a closer look at is the cat_rank (?) field which seems to be involved too. Maybe check the field and it's option values etc. maybe something changed or is wrong there? Hope it helps1 point
-
Thanks, that's what I have been looking for! I just told my wife how fast you have been in helping me. That's awesome.1 point
-
Well, that was a huge case of overcomplicating things by me.. It now works using: echo "<div class='container inner-{$page->switchColor->title}'>";1 point
-
Looking back at my code I did exactly what you suggest here and made the video field required.1 point
-
This is the github demostrating the problem https://mathiasbynens.github.io/rel-noopener/1 point
-
As with most code in this forum this is not real and best practice code as macrura also points out. Once there's no image it will fail. Also body I asume is a RTE field and will have a <p> already.1 point
-
Are you sure the server does actually have an equivalent amount of horsepower available compared to your computer? Image resizing is highly cpu intensive and therefore dependent on the servers hardware.1 point
-
also to be safe you should make sure that there is a logo.. foreach ($pages->get("template=case-studies")->children("logo!=") as $child) {1 point
-
I think creating https://laracasts.com quality tutorials but with Processwire will really help people understand the joy and power of Processwire.1 point
-
I know this thread is old, but happened to notice someone browsing it today so I thought I should "close" this now that the Users page in the admin uses the Lister interface which makes it very easy to search and sort users.1 point
-
Just for the information: I have answered and moved questions from here into private Padloper forum (and will continue to do so in the future). There isn't any automation to get access into Padloper forum, so it will always take me some time (day or two usually) to grant access, so it is perfectly fine to ask questions here though.1 point
-
Just wondering, why are you against (or just not going to use) using media queries to handle the sites layout? I feel it would save you all the extra work and would be easier from the start.1 point
-
Nice one. I also employed a little trickery in my EmailNewUser module, although I took a slightly different approach. $this->addHookBefore('InputfieldPassword::processInput', $this, 'removeRequired'); public function removeRequired(HookEvent $event) { $event->object->required = false; //hack to remove required status so that automatically generated password can be added on save }1 point
-
Seems like this feature is still missing (in repeater, reperater Matrix and PageTable as well). I think It would be very usefull to have both min and max amount for them. Hope It will be implemented.1 point
-
There's a little bit of trickery involved when adding back a "save unpublished" button for user pages as InputfieldPassword has its own little piece of logic that sets itself to required when processing input for an unpublished page, but here's a quick-n-dirty attempt at a module.1 point
-
We already check for correct filetypes (imageformats) before processing images. We use PHPs function getimagesize(), what internally uses this magic-byte-check for format detection, I assume. But will check this further. EDIT: Yes they do: https://github.com/php/php-src/blob/1c295d4a9ac78fcc2f77d6695987598bb7abcb83/ext/standard/image.c#L41 https://github.com/php/php-src/blob/1c295d4a9ac78fcc2f77d6695987598bb7abcb83/ext/standard/image.c#L12461 point
-
First off: listen to BitPoet You want a different templates folder all together? Try this to use different templates folder. (hint)1 point
-
Are you sure you want this? If you do, you'll have to define for yourself what makes a browser a "mobile" device. Nowadays, neither UserAgent-sniffing nor screen resolution or touch feature testing alone are enough as a sorting criterion. Any libraries I've seen out there use a mix of all those, and they need constant updating as browsers change their features and mobile devices grow larger screens. A lot of laptops support touch now too, but you don't want to serve the mobile version to a 4k-displayed ChromeOS notebook just because the browser window doesn't take up the full screen width at the moment it visits your page. I'd call successful separation of regular and mobile devices a science for its complicatedness, but for a science, it's far too imprecise. If you decide to go down that path anyway, there are a number of libraries out there, just googling "Javascript detect mobile browser" gives me quite the list. You'll have to decide yourself which version supports the features you regard as distinctive. I'd then use a JS popup to let the user decide if they want to go mobile or stay on the main site, add mobile/full version links on every page and add another site directory for m.mydomain.com with the mobile templates and auxiliary files.1 point
-
It sounds like you are assuming that the file compiler works like a cache converting the values of these variables into hard values at the time of compilation? As LK and ryan mention, this is not the case - the file compiler is really just for dealing with Namespace issues (although it can be used for other things like tags compiling). The key thing is that the resulting file is still all php with variables intact.1 point
-
@shamus - sorry for the delay in getting back to you - I have made a start on investigating this and improving the importing in general - stay tuned! @Robin S - I posted about this here: https://processwire.com/talk/topic/10517-frontend-password-reset/?p=119386 - it's a bug in the Password Reset module, but I have implemented a check in BCE that will prevent the error - instructions on how to implement are also in that thread.1 point
-
The unknown template error is due to a bug in the settings for the password-reset template. 67 password-reset 121 0 0 {"childTemplates":[120] There is no template with an id of 120 in my system. 120 refers to the fieldgroup for the password-reset-request template, rather than the id of that template itself. This is the culprit: https://github.com/plauclair/PasswordReset/blob/master/PasswordReset.module#L279 That said, I have added an additional check to BatchChildEditor so the error won't occur. I am currently working on some other changes to BCE so I won't commit this fix just yet, but you can do it yourself by changing: https://github.com/adrianbj/BatchChildEditor/blob/master/BatchChildEditor.module#L711 if(!$this->isAllowedTemplateAdd($templateId, $pp)) continue; to: if(!$t->id || !$this->isAllowedTemplateAdd($t, $pp)) continue;1 point
-
Did you test AdminRestrictBranch with 2.4 or are you just basing it on what it says in the modules directory? If you did test and got an error, could you post for me - maybe it will be an easy fix - no promises - I don't want to spend a lot of time making it work with such an old version of PW, but if I can help, I will.1 point
-
$rf = "repeater_field"; //repeater field name $pt = "basic-page"; //page template name foreach($p->$rf as $r){ $np = new Page(); $np->of(false); $np->template = $pt; $np->parent = $page; foreach($r->fields as $f){ $np->$f = $r->$f; } $np->save(); }1 point
-
Solved now - $sanitizer->textarea works just fine with no options needed. I just couldn't see the line breaks because I put the plain text message in WireMail's bodyHTML.1 point
-
1 point
-
Bumped to 1.5.2 - Fixes an issue pertaining to URL sanitization. If you used a period in a destination (tested only with "robots.txt"), the URL was sanitized, and "http://" was added. This issue is now fixed. Using Git Gui now, instead of Desktop - it seems to prefer the fast-forward merge. Am using an older version, but it doesn't matter, really.1 point
-
I got the same problem, having a slider (carousel) with the first N pages, then the rest are listed below that (and paginated). Using "start" screwed things up. However, getting pages to exclude first and then building up the pages to paginate worked: $carouselItems = 2; $itemsPerPage = 5; // get page IDs to exclude $carouselItemIDs = wire('pages')->find('limit=' . $carouselItems . ', sort=-publish_date')->id('|'); // get pages for pagination (without carousel pages) $myPages = wire('pages')->find('id!=' . $carouselItemIDs . ', template=recipe, limit=' . $itemsPerPage . ', sort=-publish_date');1 point