Jump to content

Pete

Administrators
  • Posts

    4,054
  • Joined

  • Last visited

  • Days Won

    67

Everything posted by Pete

  1. Pete

    Minify

    Could do - I'd have to put in some recursive folder scanning and it would make the actual URL longer in the default cases (it would then have to add js/ and styles/ before each respective filename, not that that really adds any overhead of note.
  2. I think I agree that it would be better to do it the way Adam suggests, but I can see the problem in that anyone creating cusom modules that handle files/images will have to know to call a function to create the directory in the first place. The more I actually think about my sites though, every page with an images field has an image anyway. There are scenarios where you wouldn't though such as blogs (you could have thousands and thousands of pages there and maybe only half of them with an image) and other uses like that. For a CMS for general sites the field would usually have at least one file but it's important to note that some uses for PW could have need of the field whilst not using it on as high a percentage of them so that's where creating a file only when it's required makes more sense.
  3. If I could like your post multiple times I would
  4. Cheers for the update Soma - changing from curl to copy() fixed it so that it will now download files on a default installation of XAMPP. Before that it was erroring as I don't think CURL is turned on by default in XAMPP, so whilst it's easy to change the PHP.ini file it's also great that it now works out of the box
  5. Pete

    Github for Windows

    Thanks Sinnut - will hopefully update this soon. I did it as a PDF purely because most of my instruction manuals start as a Word document and then get PDF'd, so it's just my workflow. I did originally try to write it on the forums, but there's too little control over what you can do with images without linking them from elsewhere so it ended up as a PDF. Plus folks can print it out if they like paper copies Version 1 was purely to get beginners as far as being able to create a repo and commit their code which is the main thing they'll need to do in order to get as many people who write modules/themes etc using it, but your extra steps are the next sensible evolution for the document. And yes, it should go on the wiki too (which I keep forgetting about ).
  6. Thanks for the other suggestions - I hadn't realised there were sites where people have done a lot of the hard work already, but I guess I should have worked out that the internet contains everything by now
  7. I've thought about this a bit myself since its the default behaviour in MODx and is very useful. It's all do-able but the biggest thing would be changing the homepage landing page to something else otherwise you has a tree on the left and one in the main content
  8. It's a very good point, so I think this is definitely a candidate for a module rather than core functionality since it's a) up to the individual developer if they want to add it and b ) has some configurable elements as well. The timer idea would be a nice touch.
  9. (Formerly "Two useful things I found today") When building forms, I've always liked having placeholder text in certain fields. I like my search boxes to say "Search" in them for example and have used jQuery in the past to make the text disappear when the field has focus and reappear if it loses focus but no text was entered. I was stunned a while back to find out that I'd been missing a trick in that you can simple add a placeholder attribute to your input field, but don't like that the placeholder attribute doesn't work in IE and can be flakey in other browsers. As an example for those that aren't aware, copy and paste this code into a HTML page than then in a browser other than IE, then click in the field and then back out of it: <input type="text" name="test123" placeholder="this is some placeholder text" /> Fortunately my prayers were answered today when I looked at using placeholders again instead of lots of custom jQuery code when I found this jQuery plugin: https://github.com/m...ery-placeholder It basically lets you just use the placeholder tag as above and in browsers that don't yet support it it adds workarounds to mimic that functionality Wow, I do ramble on a bit eh? Could have just posted a link there and saved burning off my fingerprints with all this typing The other thing I found today was a decent PHP class to show differences when comparing code: https://github.com/c...oulton/php-diff - it's worth a look and has basic highlighting all set up if you download it and check out the demo. Just thought those two things might be of interest to someone at some point
  10. That's a nice idea. I've just been getting used to this in LemonStand and I guess it wouldn't be massively difficult to implement, just not sure quite how you'd go about doing so in terms of which files to edit.
  11. Joshua's HTML Kickstart is excellent if you want some neat stuff out of the box and the files are split up nicely if you only need a few things as well. I've got some things I'd like to use that for. At the other end of the scale, I'd quite like to use Skeleton for a project I'm starting soon as it doesn't make too many assumptions and gives you a bit of a head start whilst doing some of the boring stuff for you (setting up base classes etc). I think though that like ryan has done on the ProcessWire blog profile that I'll tweak it to scale a bit wider than its default. As yellowled quite correctly points out though, it all depends what you're after.
  12. You need to remove te # from the start of that rewritebase line otherwise it won't run. If that doesn't help then try deleting everything in the site/cache folder too.
  13. I don't know about anyone else but I'll definitely be using some of this code to improve my own sites.
  14. I think you could just invalidate it by setting the expiry to zero: $cache->get('your-unique-name', 0); but I'm not sure whether that would remove any cache files if that's what you're looking for?
  15. Downloading now - very excited about this!
  16. Best cross-browser way I've found is a bit of jQuery and cookies. If you set your base stylesheet up, then all your colour variations as separate stylesheets, but tie them to a unique body id (so if you have an orange scheme, set all your styles in your orange stylesheet to be prefixed with #orange for example) then you just need to include ALL the various stylesheets in your <head> area and use some jQuery to change the body ID on a button click. Something like (untested): $('#orangebutton.click(function () { $('body').attr('id', 'orange'); }); Then your orange styles would kick in automatically. You'd also need some cookie code too in your JS to save that, but I'm typing quickly and don't have that code to hand - Google jQuery and cookies, but I think the code I used was just vanilla Javascript functions. EDIT: Forgot to mention that when they move to any other page from here, you could create a session variable based on that cookie too if you like - this way with Javascript means the page doesn't have to reload though. I've done both on one site once before, which could be a bit overkill.
  17. Hi folks I thought I'd post up a quick, basic tutorial of how to get started with Github and not have to learn any of the command line code. It's still recommended that you learn the basic commands, but this is aimed to help Git newbies like me get their modules on Github with the minimum effort possible. Check out the PDF below and have fun GitHub for Windows.pdf
  18. @ryan - I just updated a few modules and the date added date shows as today as well, whereas only the date updated should have changed.
  19. Since it's a tech-related event it would be great to be able to get some sort of video feed for some of the speaking parts of the event (death-by-Powerpoint ), even if it was just uploading them to Vimeo afterwards. Just a thought - I'm sure there are more hi-tech solutions, but since something goes wrong at presentations at the best of times it's sometimes better to aim low with technical elements
  20. I don't think the percentage of popularity by country is any different than WordPress, it's just that WordPress has the advantage of having been around so long that it's seen as the only option for blogging. It doesn't hurt that it's on most one-click installers distributed by hosting companies either. MODx is an interesting case because it's a lot less well known than WordPress but has been around longer than ProcessWire. As such, as more people have adopted it they found that they needed to roll out native-language forums for Russia and Japan where it hit off nicely by the look of it (they rolled out a lot of other language forums too, but I mention those two specifically just because both of those countries seem to have a huge number of native-language websites on the Internet in comparison to other languages). I think over time it will become more popular across the world but I'd hazard a guess that the real marketing push won't be until after the new website is up and running. It's already picking up quite a pace here in terms of new users and forum participation, but the advantage with WordPress is that they have time on their side as well as a few hundred million sites with "powered by WordPress" on the bottom,l. I would suggest something similar be added to the ProcessWire blog profile when it's ready, along with maybe trying to package it for web hosts as a one-click installation.
  21. Ah right, so presumably there was no space for PHP to create the session file - that would explain it.
  22. I saw that but didn't comment I've no idea why the software allows you to like yourself but it does...
  23. I was going to suggest something like this too - having it check for necessary functions and if it can't find either a suitable copy or unzip method then instead of the download option erroring, it simply pops up a modal informing the user why it can't install it automatically, steps to solve this (ask webhost to enable X, Y or Z) and the link to simply download the module as well as generic installation instructions (just covering all bases ). I'm finally going to download this now I have five minutes, but I already know how awesome it is from the comments and screenshot above
  24. He perfected his clone() function in PW and it now clones humans too
×
×
  • Create New...