-
Posts
378 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MuchDev
-
Looks fine to me. If you are obsessed with clean code you should read up on the api, there is tons of stuff that will save you some lines. For instance your couple lines could be blitzed with one little line of code. http://cheatsheet.processwire.com/pagearray-wirearray/getting-items/a-implode/ //no need to loop the results to an array if that is what you want $query = $page->tags->implode("|","id"); $results = $pages->find("tags=$query")->shuffle();
-
Hey, I was just googling for the lazycron documentation and this post popped up #2 so I figure I will throw my implementation of the exact same thing in this post in case anyone looking needs another idea. The only thing that differs in my code is that I compared the creation time to current to allow users an amount of time to validate their account. I also have it log so you can keep an eye on what your server was up to while you weren't looking. public function init() { $this->addHook('LazyCron::every10Minutes', $this, 'userPrune'); } public function userPrune(HookEvent $e) { $usersToValidate = wire('pages')->find('template=user,include=hidden,active=0'); if(count($usersToValidate)){ $log = wire('log'); $now = time(); $invalid = $now - (1*60*60); foreach($usersToValidate as $u){ //if user was created longer than 2hrs ago then delete them if($u->created < $invalid){ $entry = date('Y-m-d',$now)." ".date('H:i:s',$now)." | ".$u->title." | ".$u->email."\r\n"; $u->delete(); $log->save('user-delete-log', $entry); } } } }
-
I think $100 is a bit steep for something with this functionality but I would happily spend $30 in a heartbeat on it with a yearly support fee like Ryan's modules. If there was a developer here who was interested I bet some of us could band together and commit to purchasing the module so that the incentive was clear. And absolutely no offense to pwfoo at all, I think they would be a great dev to possibly take on the project if they were interested as they already have written a good portion to what I would imagine the final product would be. I would love a module that had front end user administration as a core to the module. Something that possibly even separated front end users from administrators and allowed for really slick integration with custom fields for front end users.
-
Yes me too. $30 bux happily.
-
A great way to learn would be a framework that has a responsive design already. The word you are looking for is responsive. There are tons of frameworks that will help you, or you could code everything from scratch and write all of your own media queries as well. I learned a lot from bootstrap and skeleton about this . http://www.awwwards.com/what-are-frameworks-22-best-responsive-css-frameworks-for-web-design.html
-
I think I could learn a thing or two from you .
-
True, but I was interested in what you are hoping to develop and as this is processwire, there are more people here who would rather help you do it for free than take your money. Well if you decide to do it yourself I think you should check out clsource's rest helper class that he made. It seems to really cover almost all your bases and then some. https://processwire.com/talk/topic/7159-rest-helper-for-processwire/
-
Well as this is a one off solution and you don't feel comfortable with modules yet why don't you try to just create a blank template that takes post requests. You could also do this with a module and there are some great examples from people whom have done the same thing, but a template should be a pretty simple way to implement the webhook. Using a template approach you could do something like this. I am just looking at the documentation and this looks to be how one would go about it. If you don't get anyone to sign on I think you should post some questions in the regular forum and really nice snazzy people will help you make exactly what you want. if($input->post->eventName){ //parse your json and update based on your data }else{ header('HTTP/1.1 400 Bad Request'); //do you need to return from a template if it is already set? I don't know I am just copying. return; }
-
Well I am interested to see what people have to say, I have looked at snipcart in the past for a project and really like what it can do. I would imagine that you would want to either write a bit of code to intercept an ajax call on your checkout page or when you add an item to your shopping cart to remove one from the quantity of that item. You could also write a module that took care of that throughout your site. Where are you stuck?
-
So are you wanting to manage your inventory through snipcart or processwire? Where are you currently managing your quantity?
-
This is really cool! I would love to throw a site up to see how it runs. Thanks for the heads up. **Runs amazingly well, the only trick is they use buckets like amazon and the server only uses a 10gb fixed partition. Never have been able to figure out how to get that to work, guess I could symlink the /site directory like I do on my dev boxes.
-
I like the idea that google likes processwire, I can't think of any reason why they shouldn't
-
I use sendgrid for a production site that has a mass mail module, works great and doesn't cost a dime.
-
Module FrontendUser: login, logout and register users / members
MuchDev replied to pwFoo's topic in Modules/Plugins
Sorry, I wasn't intending to sound critical . I just didn't want to start modifying anything before I fully understood the intended behaviour of the module. I now have it implemented and the css is now in place. I have one issue though. When registering you first input your username and your email. When you click to send the code the form posts back as it should, but then the error gets tripped before the whole form has been submitted "Email validation code NOT match!". I think I could locate a fix in the code but I was wondering if this is something that you were planning on dealing with in your own code before I go hacking at the module. -
Module FrontendUser: login, logout and register users / members
MuchDev replied to pwFoo's topic in Modules/Plugins
Apologies for not being more specific. I set the option for email validation and have noticed that the email contains a validation token. Is there any way to implement a flow that allows for a user to follow the link using the token instead of first having to enter the code that was emailed. I would like to just have the user follow the link to the password reset page where they would then enter their own password. Then on reset the user would be automatically logged in. -
Module FrontendUser: login, logout and register users / members
MuchDev replied to pwFoo's topic in Modules/Plugins
Hey there pwFoo this is great! Great module you wrote here. I am working on implementing it into my site and was wondering if I am misunderstanding how to set up registration with email validation. The flow that I am used to on the net is : register with information - > submit see splash screen that reminds the user to check their email to confirm follow email link -> enable account (sometimes this is the step where the user sets a permanent password if none is entered on the sign up form) redirect to profile page for more information on the user How would you recommend that I go about implementing this module in order to accomplish this? -
{all} is exactly what I was looking for. I must have hacked something in based on an example a while back and forgot about it. The paths are only ever one segment but they sometimes come in as /oldPath/subPath/oldFile.php or just /oldPath/subPath/ and I want both of those to just redirect to /newPath/. Thanks for this great module and the help with this .
-
Hey there, I'm new to this module but I was having some issues with * s for redirecting with the old redirect module and am having the same issue with this module as well. Has something changed in pw that is making this functionality no longer work? Not quite sure what to test. Redirect path New path path/subpath/* /newPath this was working great a couple processwire versions ago, but now I just get 404s when I try to go to something like path/subpath/random_file.php
-
Using a honeypot I am able to filter out almost all spambots surprisingly, that may just be me, but using this method I have been pretty successful.
-
Released: PadLoper (commercial eCommerce platform for ProcessWire)
MuchDev replied to apeisa's topic in Modules/Plugins
Ready to integrate this on to a site! Wish me luck all -
http://owlgraphic.com/owlcarousel/ Almost used this one on a project. Really slick and has seemingly pretty good documentation.
-
I utilized the method demonstrated by MR FAN. Add a page field to your template, or in my case an autocomplete field with the part of the tree that houses categories or for the tags part of the tree for the tags. Then you just search for pages that have that page title within them. //look for get strings if($searchString = $sanitizer->selectorValue($input->get->tag)){ $tagTitle = $pages->get("template=tag,sort=-created,name=$searchString")->title; $query = $defaultQuery.",tags.name=".$searchString; $headerText = 'Posts tagged with "'.$tagTitle.'"'; }elseif($searchString = $sanitizer->selectorValue($input->get->cat)){ $catTitle = $pages->get("template=category,sort=-created,name=$searchString")->title; $query = $defaultQuery.",categories.name=".$searchString; $headerText = 'Posts relating to "'.$catTitle.'"'; }else{ $query = $defaultQuery; $headerText = "Current posts"; } //find posts based on query $posts = $pages->find($query);
-
field visibility | any chance or selectors are on the way?
MuchDev posted a topic in API & Templates
I am working on some pretty complex forms that allow users to select content types and also add new content via repeaters. I have a need to hide some fields in certain instances. The only way that I can think to solve this is by using duplicate fields. I have been eyeballing the line in the visibility documentation where it is stated that OR operators are planned. Anyone happen to know if this is still the case, or if there is some way that I could implement it on my own? Thank you for your time -
I am just wrapping up a fairly simple blog/news system and I unfortunately don't have the time to do a tutorial, but I would be happy to share my code if you were wanting to see how to execute anything. I took some ques from Ryan's profile as well as his blog module. I think it would be a really good place to start. here is my public(ish) dev version: http://www.muchdevelopment.com/spa/
-
good question. For all file backups I rely on a combination of my daily\weekly\monthly backups through whm, I don't allow users to empty the trash and use the trashman module to allow users to restore any accidentally trashed files instead. I find that really clamping down on user permissions cuts down on these worries.