Jump to content

Pete

Administrators
  • Posts

    4,043
  • Joined

  • Last visited

  • Days Won

    67

Everything posted by Pete

  1. (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
  2. 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.
  3. 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.
  4. 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.
  5. I don't know about anyone else but I'll definitely be using some of this code to improve my own sites.
  6. 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?
  7. Downloading now - very excited about this!
  8. 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.
  9. 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
  10. @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.
  11. 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
  12. 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.
  13. Ah right, so presumably there was no space for PHP to create the session file - that would explain it.
  14. I saw that but didn't comment I've no idea why the software allows you to like yourself but it does...
  15. 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
  16. He perfected his clone() function in PW and it now clones humans too
  17. Chris - your English is far better than my German and reads well so don't worry about that - I always feel bad when people whose first language isn't English come to forums and apologise for their English when I can't speak much of their language "Wilkommen bei ProcessWire" is about my limit this morning I agree with diogo's points above. I'm sure someone made a module that allows for good blog-like tagging of pages (a specific tag fieldtype that was a bit like Wordpress) but can't seem to find the link - does anyone else know where this is? I have a feeling it might have been one of Nico's modules. As a long-time MODx user ProcessWire is now my main choice (and only choice) of CMS. It's the most flexible CMS I've ever worked with and every other system you use will feel too restrictive in comparison. There's nothing I could do in MODx that I couldn't do in ProcessWire - often it was a LOT easier in ProcessWire too! As an example, see this site: http://www.strategycore.co.uk/ - that all used to be MODx and now it's ProcssWire using a lot less lines of code than I had before. It does require that you learn a little bit of programming, but with a few examples you should get along just fine. I'd recomment the walktrhough tutorial here: followed by other tutorials in this forum: http://processwire.com/talk/forum/13-tutorials/ but often it's simple enough just to start building something and ask questions - we're happy to help. The Skyscrapers demo site is based on an older version so I don't think ryan has that available to download because a few things have changed, but the tutorials above will probably give you a better (gentler) place to start from anyway. Hope that helps
  18. What he said
  19. Soma - nik posted the answer at the same moment you hit reply, so check his post before yours EDIT: Oh, actually you already saw it as you already "Like" it.
  20. I'm sure you'll be fine as a presenter - that video on the homepage is all one take right? Right? I know it isn't, and I feel your pain. My problem is I type far more more words than necessary to get the point across sometimes
  21. I'd like to be there, cost-permitting. There'll be an addition to my family to consider (about 7 months old) but I'd like to be there if there's a lot of interest from others
  22. Fair enough I just noticed the Newsletter Tool link in your menu too - what's that?
  23. I don't like this... I LOVE IT I understand that this is a work in progress, but I think it would make sense if this were eventually merged with the actual modules page in the PW admin once it's tested.
  24. Didn't know whether we could grab images in an img tag via the BBCode library you'd used, but it males sense that you would be able to now I think about it since that ability has been around since the invention of BBCode, so that's handy. You certainly managed a lot in one day! If I had days where I could pull off that amount of work then I'd I'd have less personal projects in the planning stages I agree with you on all the other points, and I like the idea of a module installer inside ProcessWire I foresee two download URLs being commonly used (I've used them both) - one is the direct link to the GitHub download and the other one is the direct link to an attachment on the forums. I guess it would be a case of somehow checking if a given URL is trying to pass the module installer a zip file and if so then grab it, else link to the download page. I'm also guessing this is why you ask people for the class name, since inside a non-Github zip file the structure could be a bit odd, so being able to search for a file called ClassName.module within a zip file's folders would allow you to correctly install the module in the right place (for example in the event anyone zips up an unnecessarily long folder structure along the lines of /my/first/modules/doodah/MarkupSitemapXML/ which contains MarkupSitemapXML.module, not that I'd make it that hard for you ).
×
×
  • Create New...