-
Posts
4,035 -
Joined
-
Last visited
-
Days Won
66
Everything posted by Pete
-
Preview, locking, versions, and multiple trees
Pete replied to tsdtsdtsd's topic in Wishlist & Roadmap
up - useful if you have a section for documents, or a section for downloads etc so it's easily identifiable as to what the section's content is (although it should be obvious anyway it's always nice to have additional visual indicators). -
Indeed - I just assumed everyone knew already
-
I just used the CheatSheet for the first time last night - I'd gone from an HTML template to an almost-completed website in 2 hours! This is a testament to how well this cheatsheet is laid out as much as it is to ProcessWire's ease-of-use, but the CheatSheet saved me having to look around for things and every minute saved soon adds up
-
Preview, locking, versions, and multiple trees
Pete replied to tsdtsdtsd's topic in Wishlist & Roadmap
Nodes was the one that just popped into my head, but every time I think about it it would just make it more confusing to name them something other than pages, especially to an average user such as a business owner who just wants to be able to update their pages. --- I did have a slightly-related thought - why not change the "Pages" link in the admin to "Content", and allow the wording for a "page" to be changed on a per-template basis? That way you could have a template called "Products" and tell that template to call each child page a "product" instead? It's not a necessity by any means, but might make the workflow feel more... "right" -
Very nice! Some very neat javascript but not too over-the-top, and overall a nice layout and navigation. Good work!
-
Not that it's much help, but wouldn't a better way be to leave the tree in-tact and instead just remove the Edit link for any page they can't edit? Perhaps somehow highlighting the pages they can edit? The only reason I mention that is because if you forget to give them access to the parent page of the one you want them to be able to edit then they won't be able to get to that page. I'm very interested in this by the way if you're creating a module from it?
-
Very useful indeed - thanks!
-
I can't speak for everyone, but I think most of us started with just the basic install. There are a few important things to read if you haven't already - the major one is the templates section on this page which will tell you how to actually output the content you're adding to the admin area into your template files when a page is loaded in the browser: http://processwire.com/api/templates/'>http://processwire.com/api/templates/ Assuming you haven't read it already, this entire section is worth reading: http://processwire.com/api/
-
I think there would need to be more documentation actually written before that could be done - beyond the API docs I mean.
-
If it's an option for any of you, this is quite good (aside from occasional crashes): http://www.my-debugbar.com/wiki/IETester/HomePage
-
Not sure whether it will help you, but the database connection is kicked off in wire/core/ProcessWire.php around line 90 with this code: if($config->dbSocket) { $db = new Database($config->dbHost, $config->dbUser, $config->dbPass, $config->dbName, $config->dbPort, $config->dbSocket); } else { $db = new Database($config->dbHost, $config->dbUser, $config->dbPass, $config->dbName, $config->dbPort); } Wire::setFuel('db', $db); I'm not sure how you would set up another connection inside a module or template, as I doubt you would have access to the Database object, but something like this might work at the beginning of the template (untested): $mydb = new Database('localhost', 'username', 'password', 'db_name', 3306); or maybe (again, untested): $mydb = new Wire::Database('localhost', 'username', 'password', 'db_name', 3306); If either works let me know. The idea would then be to use $mydb instead of $this->fuel('db') for the queries.
-
And the fact that your username has to be lowercase (gets me every time that one ). On that note, could you change the error message or give some more indication that it has to be lowercase ryan? That or change it so if you put in a mixture of uppercase and lowercase it doesn't error and instead just changes it all to lowercase behind the scenes and carries on. Back to the topic, I get what diogo is saying - sometimes it's handy for beginners to see just how easy something is so I was thinking about a very quick write-up with the relevant screenshots to help illustrate just how quick and easy it is. Some systems I've used are surprisingly less straightforward.
-
This is on my list of things to do and makes sense to start with this.
-
Another one for me to add to the docs
-
I noticed that, looked into it and several people are pointing out these flaws to the admins over there, but apparently it's just a case of how their scanner works. You'd think it would be easy enough to train it to ignore jQuery and popular editors such as TinyMCE though as surely that skews all of the stats for most web-based projects. Still, it's yet more coverage which is good.
-
Yet another awesome code snippet in that link ryan. I'm noting all these links down
-
Marking the whole path back up the tree as active is something I looked at before but it hurt my head too much so I didn't do it in the end. I think what you need to do is start with the current page and grab all the page id's going back up the tree into an array, then use that to highlight the relevant pages in the menu as it's outputted. It sounds easy when you say it
-
Can I just ask - did you create te news story itself UNDER the news index page? Looking the navigation on your page it looks like they're at the same level as a child story shouldn't be displaying there. If its not under the index page, go to the Pw admin and click on your news index page to open up the options, then click on your story, click Move and drag it so it's under the index page (it'll become indented).
-
If they don't mind using something a bit external, you can display a Google calendar in a web page pretty easily from what I remember. There are advantages and disadvantages to doing so (we're going back a few years here so it might just be advantages by now) but you certainly get the benefit of a calendar you can sync with a smartphone or your favourite email software rather than one that has to be updated manually on the website. Beyond that, there seem to be a variety of calendar packages out there but none of the ones I've looked at were that straightforward.
-
It does take a littel while to wrap your head around it (or at least it did with me) but on a larger site I'm working on I have a "Tools" section that's hidden (I think that was possibly ryan's suggestion) and then just had different sets of pages under there that form the basis of various selects. It doesn't feel "right" the first few times you do it, but when you think that all it actually stores in the database is a title and page ID, it's not like it's wasting space or anything (that was my initial concern) and also adds the flexibility for clients to potentially be able to reorder their own select lists or add to them etc. It's really flexible, it just takes a little while to get your brain around the idea of thinking it's wrong
-
You'll need to use the $sanitizer, and in your case I think it would be: $url = $sanitizer->pageName($title, true); Obviously $title is whatever your title is. I'm not sure how it works with some characters, so let me know if that works for you. Full documentation on $sanitizer is here: http://processwire.com/api/variables/sanitizer/
-
I was going to say that some sort of insulation would be good as you said Martin. Not everyone will understand Git, but I think they might be far more likely to be able to get to grips with Pw so some simple way of installing modules would be the way to get around this. In fact, thinking out loud (and I'm sure some of this has already been discussed elsewhere on the forums), could the first version of the modules directory simply contain module info, author info, screenshot (if neccessary) and the link to the direct download link on GitHub (if their terms allow this) else a link to the download page for the package on GitHub. A later stage would be a fancy module installer I guess, but something like the above would suffice for now I think. I'm also assuming something slightly more complex could be done assuming you can pull the number of downloads from GitHub using their API?
-
In which case it would make sense to be able to set that on a per-template basis I think. Label fields for single and plural versions would make sense in case the template name isn't properly formatted to be a tab title (sometimes mine aren't at least).
-
That's a good idea I think. My first thought was that it might make things less intuitive, but then that all depends on whether someone chooses a silly name for the child template. I would suggest that it maybe be configurable somehow rather than automatically done else it might take some users by surprise.
-
This is a great idea! I used to use a CMS system when I worked in a local government department and they weren't in fasct allowed to use any CMS system that didn't contain this functionality, otherwise important content might never get updated. Would be good to even be able to set this in page settings and have child pages inherit, so for a news section it doesn't need a reminder of any type, but for informational sections you could pick 6/9/12/24 months. I think this would be good to have as a module definitely. Another thing the local government CMS did was actually have the ability to email the author, so perhaps a once-a-week round-up of pages that need to be updated soon or are out of date. The big problem I can already see with it though is how to you mark it as "okay" if there are no changes other than saving the page with no changes? That solution would be undesirable as people might expect the content to have changed in that case. Maybe a table that tracks "last checked" dates?