Jump to content

MuchDev

Members
  • Posts

    378
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MuchDev

  1. Alright, had some bugs there as I decided to change the name and didn't update some variables, but I just ran through everything and I'm happy enough with it. Feel free to try it out and let me know.
  2. Well here is an interesting tidbit if you are looking to try out DigitalOcean. I signed up for a new account and just didn't give them a credit card and 4 days later they sent me a code for $10 to set up a server.
  3. This is awesome, I've never seen an implementation that was so simple and versatile. Reminds me of a cms I know of.
  4. Well I tried to find a way around doing this but I couldn't think of anything else so I just built a little helper class that passes the variables out of InputfieldWrapper. What is the danger here, probably lots right? class DefaultsRouter extends InputfieldWrapper{ public static $defaultMarkup = array(); public static $defaultClasses = array(); public function __construct(array $defaults = array()){ $this->defaultMarkup = InputfieldWrapper::$defaultMarkup; $this->defaultClasses = InputfieldWrapper::$defaultClasses; } }
  5. Alrighty it's all wired up. Well mostly... I am pulling the names of all of the inputfield types like so, but I seem to be missing at least the InputfieldSubmit field. foreach(Wire::fuel('fieldtypes')->find() as $field){ //this is how I pull fieldnames $type = (string)$field->getInputfield($page,new NullField); //some code that doesn't really matter } So what I think is happening is that find is only going to return inputfields that fieldtypes are already using. How would I go about finding these? One other thing I'm working at is getting a way to pull the class and markup data out of the InputfieldWrapper class.
  6. Well the first thing that you will want to do is go into your /site/config.php and set $config->debug = true; Then you should get a bit more of a verbose error message. Internal server error could be for anything.
  7. Helllllo! I am working on a simple module / pet project for a module that inserts custom classes into specific templates for forms that are generated via the api. I use bootstrap a bunch and am always messing with the defaults in processwire, now it should be a simple manner to tweak my settings in the admin area. As this seems to be something that I keep needing I thought that others might as well. Right now the functionality is pretty simple: Select the templates that you want to override the default styling on. Set your new defaults .... Proffit. What I would like is maybe some suggestions for options or functionality that I should try for. I have never really deep dived into modules so this is a bit new to me, but as I am looking for a new development job I would push myself for something cool. https://github.com/MuchDevelopment/FormStyler/tree/master
  8. I would create a multiple select page field on the template that you are using to control your navigation. Either point the page field to the parent of your navigational elements or use a asm field and filter by template. Then instead of performing your find on the pages you will just load the field. <?php $navigation_elements = $pages->get('/setting-page/')->navigation; foreach($navigation_elements as $elem){ //nav code here } ?>
  9. Thanks man, I just thought there might be a naming convention issue. Thanks for the response, should do the trick!
  10. I know this module is a bit older but I figured I would bump it to see if anyone knew the answer. I was going to use this on a module and was having a hard time implementing it. It looks to function perfectly attached to templates, but when I try and use it in my module I get the error: Method FieldtypeTemplates::setParent does not exist or is not callable in this context. I have checked and there doesn't seem to be any issues with a standard asm field. Anyone happen to know what I am doing wrong? $inputfields = new InputfieldWrapper(); $modules = Wire::getFuel('modules');//I was using wire('modules') with the same result, I just wanted to try this method $f = $modules->get("FieldtypeTemplates"); $inputfields->add($f);
  11. Well it was my uneducated assumption that I might be able to make it work on the template level. Thank you for the quick response I guess I'll have to abandon that method then. I suppose that I could generate a cookie that had pages that would be viewed uncached and create a rewrite rule that checks against those values. It looks as if that is standard practice to use client side cookies for specific content (forgive me I don't work with cookies often).
  12. That is a good point, I can't think of any way that one could do that programmatically. Where I am at right now is pretty much a hack with some code to detect whether the page has a permission that the user has. If the user has the permission then they will see an un-cached page by a redirect to the page with a get variable. This feels like it should work and will of course take some tweaking so that it doesn't inadvertently affect other pages. I am thinking that this is going to get quite complicated. Do you happen to have any suggestions for page caching that wouldn't be too terribly hard to implement with apache? Something that would possibly work better for this use case.
  13. I am trying to brainstorm how I should handle this scenario. I use ProCache and currently have it set up to not show cached pages to all users with the wires_challenge cookie. This is working great but I have developed a front end user system which will be making all users possess the cookie. Now I have the need to selectively control what pages are cached and what pages are uncached at a group by group level. I thought I might post in procache, but this seems general enough that others may have some insight on how this could be implemented. Should I somehow save the pages that the user is able to view to the cookie and then check this against the page? As it stands now all new users will get uncached pages which is going to seriously slow down the site. One thing procache will do that may be helpful is that you will always see an uncached view if there is a get variable present. Maybe some way to check the user group and then redirect to the same page with a simple ?var=uncache Cached behavior: guests - view all cached frontend_user - view all cached except pages where they are permitted employees - view all uncached
  14. or the code should read $c->image->first()->url if you were wanting to allow for multiple in the field.
  15. Yeah first off I'd make sure that the javascript is being included. Have you tried hitting f12 in chrome or firefox and looked for not found issues? Also make sure that your dropdown classes are applied according to the documentation as the drop down actions are just a component of the javascript that the framework uses.
  16. Just read an interesting article about tungsten.js. Seems to be pretty angularesque with backbone baked in and mustache templating, but more of a focus on server side rendering. Thought I would share it with ya'll if you hadn't seen it yet. Are you interested, I'd like to know why. If you hate it I'd like to hear that too. Article http://www.infoworld.com/article/2993467/javascript/qa-why-tungstenjs-is-not-like-other-javascript-frameworks.html Project link https://github.com/wayfair/tungstenjs
  17. This looks great, I'd love to see a full forum system:) Well this is exciting, mind sharing some code or a github so that we can take a peek? The structure looks like it makes sense.
  18. I really enjoyed reading your answer @Tom, I've seen great sites built with it, but I've never really digged in the code. I think you may have talked me in to trying out a build with it.
  19. Yeah I wouldn't recommend it for large organizations necessarily but $5 bucks a person for 40gb isn't bad for smaller applications. There is also a 1tb option for accounts with less that 10 users. Out of curiosity what are you using for your email system?
  20. I can't recommend google apps for work enough if you are wanting to add email. One of the best business decisions I made for one smaller company that I support.
  21. I run 1 site on bluehost for a pretty simple blog and it runs great, and another on vpsdime (super cheap high ram vps). Vpsdime is a bit slow though, might just be my settings but I really feel like I am getting what I pay for even though I have 12gb of ram to play with. Up shot is I can cache about as lazily as I want as I never run out of ram I found the easiest way to get going was to use cpanel/whm for server administration, really takes the stress down a notch when you think about all of the ins and outs of linux server administration. Then look in to some tutorials on mysql settings tweaks and php settings:) I am just about to start learning how to go about deploying an nginx pw install with centos on a vps. I had to look up ajenti but that sure look sweet, how was the setup in comparison to cpanel? Also if you the one who set up processwire to run with nginx what sort of settings are you running on it. I know it's outside of the scope of the op, but your setup sounds pretty slick. Are you using varnish with nginx?
  22. Easiest way to deal with logging out is to just make a two line template at /logout/ <?php if($user->isLoggedin()) $session->logout(); $session->redirect($pages->get('/')->url); ?>
×
×
  • Create New...