Jump to content

Pete

Administrators
  • Posts

    4,046
  • Joined

  • Last visited

  • Days Won

    67

Everything posted by Pete

  1. I think there are several obstacles here, and none of this is intended to cause offense, so please don't take it as such: It sounds like you are a bit confused as to the page's body field and template files themselves. Are you trying to put your HTML inside the body field on a page? Your actual site template files are in the /site/templates folder - head.inc and foot.inc contain header and footer HTML for the dfefault template, and the other files in there are for the various page templates and relate to the templates in the ProcessWire admin area itself. You don't have to use the head or foot files (they're for code that's on every page) but this tutorial will definitely help you out: http://wiki.processwire.com/index.php/Small_Project_Walkthrough See above with regards to implementing elements of HTML Kickstarter into your templates - the tutorial will help you understand the layout of template files and how to output ProcessWire data in your templates. You should have some knowledge of HTML, related tags and how it works and preferably a little of PHP before continuing - PHP knowledge is less essential in theory as things like the tutorials can help you get started there. I think in short you need to step back from what you're trying to do and follow one of the tutorials to see how things work first. Once you know that, you'll see the endless possibilities, but I think you need to get a clearer picture of how it all fits together first. Sorry, didn't mean to mention tutorials so much there - they aren't always the easiest to find as the following page doesn't show up in search results (oddly), but here's another page with some useful links: http://processwire.com/tutorials/ Hope that helps
  2. Really all you need is a few template files and a module would simply serve to create the relevant fields and install the comments module for you. Technically that's pretty simple to achieve, but on a brand new site you could just start with the blog profile and add other pages. It's no different than a normal install except it has blog functionality out of the box - it's really easy to add other pages to it as there's nothing preventing anyone from doing that. I can't remember the layout of the blog profile off the top of my head, bit assuming the homepage template lists blog posts you would just set up a /blog page with it's own template, move the code from the homepage template into it and you have successfully moved the blog into its own section.
  3. Hey diogo, great minds think alike as I was looking at this earlier. In fact, I installed Antti's shopping cart module about an hour ago as well and was tinkering with that in some detail for the first time so I'm keen to see ho easy it is to whip up a payment module or two (this and gocardless.com are very interesting for me - gocardless especially for business clients looking to sell more expensive items online). PayMill's API makes it look very simple to use indeed. I was very impressed by the demo and the fact that it seems like you can run payments through your site, keeping customers in one place, whilst still being PCI compliant (even if your server isn't) as all you store is a token and the rest of the payment handling is done behind the scenes. They still recommend an SSL certificate though, which makes perfect sense when entering card details. I basically want to familiarise myself with Antti's module and various payment options enough that I'm better informed the next time an e-commerce site comes along. I'd much rather do everything in ProcessWire
  4. Ouch to the prices, but I wouldn't mind maintaining just ONE ProcessWire site a month for that money, 2 and I could retire earlier than 65 Not entirely sure why the self-hosted option is so much more expensive. Sure, it's easier to maintain sites in an environment you control (cloud for the Wordpress guys), but that's some impressive markup. Anyhow, I'm sure that further down the line there will be business offerings for ProcessWire users - there have been several topics around paid support with response times for example - but nothing like that just yet as far as I can tell. ryah is full of surprises though EDIT: Self hosted is PER YEAR. I think they did that differently to catch people like me out, which is a good marketing tactic as it looks like a higher number at a glance.
  5. Hi Teppo Awesome module and very useful for a few of my sites with many editors I know it's not really for version control, but I wonder if you'd considered somehow saving a text copy of the body field if that changes? Not sure how you would go about that (save to text file with page ID and timestamp maybe?), but it occurs to me that it's the one field where if someone changes you may need to quickly look at what was there before and change it back, so even a basic text dump would be of some use there I think. But yep, this ventures into the realms of version control then when I start thinking about things like this.
  6. I think for certain profiles like the blog profile there could be a template switcher, but its use would be limited because as soon as you change the template files themselves too much it would begin to fall apart. I think for certain profiles it does make some sense though as a way to get started quickly with a different design. There is also the opportunity if you're bundling the templates folder to have a different layout entirely for a certain profile too, which is nice and flexible. I think what needs to happen first is for there to be more than just one template for the blog profile for example and then we're talking.
  7. Version control is on the roadmap, but in the meantime a way you could theoretically go about it is to write a module that dies something like this: 1) If the user has permissions to edit without approval, page saves as normal 2) If they need approval due to user group, a module creates a child page (so hook before page save to stop saving the real page), mark child page as hidden & unpublished and email whoever you need 3) You would then need a button oj the child page where the authorising user can click to merge changes back to the parent - this would again trigger before page save, replace the parent page with the value of the child page and delete the child page Problem is you've not really created a useful version control system but rather just a simplified approval system plus there's no comparison in there (you would probably want a diff function in there that opens the content side by side in a modal window highlighting the changes). Soooo... it's a complicated prospect to say the least with many ways if approaching it
  8. But more importantly: YOU'RE BUILDING A MAILCHIMP NEWSLETTER INTEGRATION MODULE? WHERE DO I SIGN UP?!
  9. Pete

    Cart Keeper

    That's a new one to me. As long as the templates are well written, it sounds like it should be a standard affair involving editing template files or creating new ones for specific categories or products (if the client asks for it). Taken from their website (I'm sure you've seen this already): I had a look at the source HTML of the demo site and the whole thing seems to be tables, so if you're happy with that it should be fine.
  10. I like the fact that your pictured web deveopment tools are, whilst somewhat rustic, still far better than MS Frontpage
  11. Had a confusing one yesterday as I have a page field called areas and another called sectors (as in business sectors). Because I omitted the word business from the front of sectors and was doing something reasonably complex I created my own pagearray and them had to deal with foreach loops of areas, sectors and areasectors all on the same page. Oh, and services which looks similar to sectors when you're going cross-eyed. I guess the moral of the story for me was to take a break more often and give things more descriptive names for the sake of a few extra characters. Also, if you give a field a singular name as only one option will be selected in your initial plans, don't be afraid to change the name it plural if you then go on to allow multiple selections - you will probably only have to change a small section of code but it will preserve your sanity so you don't do silly things like foreach $page->area as $area as that's the sort of thing I then correct with an s on the end and it all falls apart and much head-scratching ensues
  12. Joss, what's in your leaflet just out of interest?
  13. Pete

    Pub Demo Site

    You're making me hungry with the food pics! Yep, I love how quick it is to go from design to finished site. I did similar yesterday, but had some fiddly-arse code to work out so it took slightly longer than that, and mine won't be public for a while yet as each section has a unique-ish layout.
  14. I had a chat with ryan about this a while back and I hope he won't mind me mentioning this, but some commercial profile ideas (real estate etc) would benefit hugely from the inclusion of FormBuilder. It's win-win in that case as ryan sells a FormBuilder license with every sale of that theme and the theme developer makes money as well. So if you've got any ideas where you think a complex theme is going to give you a headache in terms of forms then think about how you might do it packaging FormBuilder along with it to handle that aspect. Of course there are some logisitcal things to work out there, but it's something to bear in mind and certainly opens up some possibilities. For those that are curious, I originally arrived at that conversation with ryan when a few of us were discussing a real estate profile late last year (I still plan to do more work on that, but have been sidetracked with client work). Of course, when you see the Skyscrapers demo it's easy to see how it's possible to build these sites, but I thought that FormBuilder could take it one step further - allowing potential buyers to fill out details, show interest in certain property's etc and essentially create a sort of mini back-office for real estate staff (dammit, they're Estate Agents in the UK - feels wrong every time I type it the US way ). Just some more food for thought that might give you a few ideas EDIT: @casey - I'd be happy to help out on that side of things. It takes me far too long to be happy with any design I do myself so if there's room to collaborate with you doing some design work and me and a few others on the technical side of things then I'm all for that!
  15. I can see why you exploded the relatedPages as when you echo $page->relatedPages it outputs a string of page ID's with a | character separating them, so what you did seems logical if you're not familiar with the API, but as teppo says you don't need to do that. It is basically a PageArray of it's own and that | separated list of IDs is useful if you want to use that in a selector - something like $pages->find("id=$page->relatedPages, images.count>0"); <-- So you could do something like that to only return related pages with 1 or more images if you see what I mean. The other thing to note is that since it's a PageArray, you can loop through as teppo says, but don't think that it's adding extra overhead. The act of grabbing fields as you need them in the foreach loop is pretty efficient in terms of speed - it doesn't grab all the fields for each page, just the ones you need as you need them (so I understand). I think ryan said it best elsewhere that there might be a few extra queries this way, but overall you're making savings in terms of storing data in memory and since each field is a table and well-indexed it's arguable as to whether there is any speed difference at all from other systems where all of a specific template's fields are stored in a single table. Not sure why I felt the need to try and explain some of the mechanics, but there we go. I'm sure someone could explain it better than I did as well
  16. I think it should be an option for the core module. Not that we're trying to compete against other systems in particular, but I know this is how it works for WordPress and on some sites works quite successfully: http://www.rockpapershotgun.com/2013/01/25/bit-by-bit-evoland-lets-you-play-through-gaming-history/#comments Having it in there as an option and maybe enabled on your blog profile by default would be an idea ryan.
  17. There appear to be some ongoing issues since the upgrade and some of it seems to be down to some weird mish-mash of old and new code in the new template - evidently the update did not run as smoothly as it seemed! Since there's a minor upgrade required due to another recent release, what I'll likely do soon is start from scratch with a blank installation locally and copy the edits made for the current theme over the top of that and then re-import it. It's a bit of work, but not as much as it sounds to be honest. In the meantime, those experiencing issues on Chrome might like to try a different browser. @Nik: this means one with a GUI
  18. We could indeed put puppies on it. I think it should also run on Wordpress too
  19. I already secured .co.uk so we're set
  20. No problem - glad you're up and running! Let us know how you get on.
  21. I actually had trouble with strtotime the other day because I forgot the date format when just throwing it numbers would be month, day, year, not day, month, year as I had typed. See, it's confusing for us Brits sometimes too
  22. That's a very valid concern - if it is too long then you have quite a lot of content loading on the page. If I was going to list fifty or more I might list the titles and then use AJAX on click or something to pull in the answer on demand to display the answer - along with list.js to narrow the search first. Otherwise, depending on the answers, you could end up with a few hundred kilobytes of text on your page and slow loading times. Lots of ways to approach this, certainly.
  23. Cool, a link to the backup_restore.php script would be nice too
  24. Thanks for this - I know a lot of people have need of threaded comments so this is very welcome
  25. What browser/OS are people experiencing editor issues on?
×
×
  • Create New...