Jump to content

Pete

Administrators
  • Posts

    4,035
  • Joined

  • Last visited

  • Days Won

    66

Everything posted by Pete

  1. You'll want to bootstrap PW in that file - see this page for instructions to do this and it should work fine: http://processwire.com/api/include/
  2. Is it just that module or others as well that have a GitHub addres?
  3. Yep, exactly so I'd have to manually create a new forum for each new module
  4. Just tested on XAMPP for windows - fresh download via the modules manager and worked fine. Can you try again as I've no idea why GitHub would feel the need to redirect you. If that doesn't work, uninstall your copy, delete and try it as a fresh download through the modules manager.
  5. Most forums would have one topic though so what's the point in that? I get that a few have more discussion but it seems like overkill to me.
  6. Remove the single quotes around the 500 maybe? It's expecting an integer and in quotes you're passing it as a string. Oh, then I read the next bit where you did it without quotes and it was no better...
  7. The problem with that is that we will end up with thousands of subforums over time
  8. Hi totoff Is this XAMPP for Windows? If so then you can open that folder, right-click on the file, click on "Properties" and change the permissions to read only in the dialogue box that pops up, then click save. Otherwise you would need to set it to 0644 usually (so that the the program can read from and write to it, but nobody outside the server can). In fact, since it doesn't get changed except manually after that, you could perhaps set it to 0600. As for the chmodDir setting - is that enabled by default? I seem to remember it was commented out by default at one stage, however if it's enabled, you can change it to 0755 and that should be fine I would think. It's also worth noting that this setting for folders only applies to folders that PW creates to store files for file or image fields for pages you create, not the whole system.
  9. No problem, happy to help. Was just passing Manchester shortly after I typed that
  10. 3,819 folders reduced to 1,128 - muuuuch better I'm sure some will re-surface as my files section template allows either an external URL or a file as well as an optional screenshot, but I guess they're not updated often past the initial page creation. As you say in the other thread ryan, this could well be run every so often to tidy things up. I guess a nice addition could be to tie it in with the LazyCron module to make that automated on a weekly/monthly basis.
  11. Pete

    Minify

    Yeah, good point
  12. Pete

    Minify

    I could well make it so that you can set the path as an option and tick a box to check all subfolders, but you would have to click Save before the ASM select lists were updated unless anyone knows of a way to have those fields refresh via AJAX? I guess I could just make the page save automatically somehow once either of the configurable path and checkbox fields lose focus and that would achieve the same, but it should probably at least pop up some sort of confirmation dialogue box so the user has some clue what's happening.
  13. For different sized images the way I think you want to use them, check out the Thumbnails module in the modules directory. It's easy to set up and you can set per-template thumbnail sizes, as well as crop the larger image based off those sizes via the page editor. You're right in your interpretation of how the files are stored for each page in their own folder per page. This isn't a limitation though the more you learn ProcessWire. You can include images from other pages by inserting them through TinyMCE from other pages, and of you really want to you can easily create a page called "Media" for example and subpages for each category and store your images in those in the fashion you would with folders in other CMS' - it's much more flexible this way. For examples, let's say you create a hidden page called 'media,' and subpages called News, Blog and General, all using a template called 'mediagallery'. The template could just have a title and images field. You can then store images under those pages and include them via TinyMCE and you've got that familiar structure already. The beauty though is that you can do other things. Pretend you weren't trying to use it as a file manager but an actual image gallery and in your template for the paret media page you could list all categories by doing something like: foreach ($pages->get('/media/')->children() as $gallery) { echo "<p><a href='{$gallery->url}'>{$gallery->title}</a></p>"; } And then for your gallery page you could list the images using something similar like foreach ($page->images as $image) { and so on. I'm willing to wager though that as soon as you start using ProcessWire that you probably won't want an old-fashioned media manager. How many times are images really re-used across websites? I've built a 500 page site where they haven't been re-used at all, and several smaller sites where the same is true. I'm not saying that a media manager wouldn't be useful to you, just that there is almost always a different, often more useful way of doing things in ProcessWire, so if you could list some examples of where you would need to re-use images we could offer some suggestions. I didn't mean any of that to sound big-headed by the way, just trying to offer helpful suggestions as I know first-hand it can take time to wrap your head around this different way of doing things and un-learn other systems. (Apologies if there are any humorous errors in my post above as I'm typing this all on an iPhone that almost left me typing "wrap your wad" in that last sentence).
  14. 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.
  15. 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.
  16. If I could like your post multiple times I would
  17. 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
  18. 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 ).
  19. 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
  20. 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
  21. 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.
  22. (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
  23. 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.
  24. 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.
  25. 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.
×
×
  • Create New...