Jump to content

Pete

Administrators
  • Posts

    4,054
  • Joined

  • Last visited

  • Days Won

    67

Everything posted by Pete

  1. Sounds like a band Luis
  2. I'm not sure how to troubleshoot that but I do believe ProcessWire will require PHP 5.3 minimum at some point in the not-too-distant future so I'm hoping someone can help you with the 5.3 issue you encountered. You should be fine for now though but thought that that was worth mentioning.
  3. That's cool to know, but you would almost think the function would be called clearold() I guess though makenew() is there to set up new fields for a new page usually before they're populated so I was just trying to be funny above
  4. That should be fine Mark as you can set the PHP ones in your PHP.ini, but -indexes is there for security really so it doesn't list files in folders ny default if you type in a directory name so I'd question the security of a host that doesn't let you do that to be honest... assuming I got all that right The main thing is you're up and running and the fun starts NOW!
  5. Welcome to coding sanity, fun and faster development work
  6. I always just do this usually Copyright <?php echo date('Y'); ?> Great site by the way
  7. Welcome to the forums ProcessWire, like most CMS', can only edit pages in its own database so I don't think you'll find many systems that allow you to edit your own static pages that haven't been created with a CMS well as add new ones that have been created with a CMS - that's just not the way they usually work. That said, if you can share a link to your site it really is much easier to import a currently existing site into ProcessWire than with other systems so we can certainly help you there. Depending on the complexity and size of the current site it really can be a quick process.
  8. Hmm, that all sounds okay... when you access your site you're accessing it at www.yoursite.com/fyp then according to your first sentence? If not and you're accessing it at www.yoursite.com then change the .htaccess rewritebase to just / Other than that, I would suggest double-checking your index.php file is readable - setting permissions to 0755 should be fine.
  9. There is also the issue that .htaccess won't work on IIS unless I'm mistaken? This should help get around rewrite issues though: http://processwire.com/talk/topic/268-processwire-on-windows72008-server-with-iis-webserver/
  10. Your copyright notice at the bottom is a bit far into the future
  11. I like doing it all in one go Joss and having "umms" and "errrs" in there - pads it out a bit Love the app Luis and thanks for pointing me to that PDF class. I have been using a different one that I got to work and had even checked out this one before a few years back but when I looked at it recently it mangled my HTML - turns out they all have their quirks and now I've spent today getting my templates nice in this one it means my ~450kb PDF files that take 5 seconds to generate are now ~45kb and generate almost instantly
  12. What did you use for PDFs? That was very quick to generate and open
  13. The match against CD is insane, but I suspect what it thinks you are trying to do is change directory and that with the slash is probably enough to trigger it. mod_security is such a pain. Glad I don't have to worry about it with ServInt
  14. I think it was legibility of code and re-usability of fields that prompted me to get into that habit in the first place on a larger project, so it's nice to know it's a good habit I guess the only time you would be bothered about reducing the scan of the MySQL data set is with tens/hundreds of thousands of pages as so much is indexed in PW that it should be fast anyway?
  15. @soma I was going to go the PageArray route for one suggestion but then thought it might not even be needed and ended up with my last example. Hard to tell without seeing the structure as I'm sure you'll agree
  16. Welcome! I think ASMSelect would be a good fit instead of autocomplete in module config - I know that works.
  17. Well PW user group meetings aren't going to spread the word though, but UK and European meet-ups have been discussed before but haven't actually got as far as happening yet. I believe a directory is on ryan's list somewhere (I might have imagined it, but I remember talking to someone about it months ago... maybe myself ).
  18. In fact, this may streamline it further: <?php echo '<ul class="blocklist">'; // Start the list here as I don't want to loop through things twice foreach($pages->find("template=report") as $location) { foreach($location->mountains->sort('-stats_maxElev') as $peak){ // we prefix the field name with a minus sign to sort descending rather than ascending if ($peak->stats_mtnName){ // pages create 4 blank repeater "value sets" by default, this is a test to grab only populated ones $maxElevft = number_format(round($peak->stats_maxElev * 3.28084)); // to convert a field value in metres to feet; using number_format() to add thousands separators (ie. 3200 -> 3,200) echo '<li><p class="tabular"><a href="'.$peak->url.'">'.$peak->stats_mtnName.' '.number_format($peak->stats_maxElev).'m / '.$maxElevft.' ft.</a></p></li>'; } } } echo '</ul>'; ?> But without a copy of the structure and data I suspect it might fall foul of repeater issues
  19. Just shortening your earlier code: <?php $dest = array(); foreach($pages->find("template=report") as $location) { foreach($location->mountains as $peak){ if ($peak->stats_mtnName){ // pages create 4 blank repeater "value sets" by default, this is a test to grab only populated ones $maxElevft = number_format(round($peak->stats_maxElev * 3.28084)); // to convert a field value in metres to feet; using number_format() to add thousands separators (ie. 3200 -> 3,200) ++$i; $dest[$i]->url = $mountain->url; // field from page $dest[$i]->name = $peak->stats_mtnName; // field from repeater $dest[$i]->maxElevM = $peak->stats_maxElev; // field from repeater $dest[$i]->maxElevF = $maxElevft; } } } usort($dest, function($a, $b) { return $b->maxElevM - $a->maxElevM; // sorts in descending order, reverse A & B for ascending order }); echo '<ul class="blocklist">'; foreach($dest as $item) { echo '<li><p class="tabular"><a href="'.$item->url.'">'.$item->name.' '.number_format($item->maxElevM).'m / '.$item->maxElevF.' ft.</a></p></li>'; } echo '</ul>'; ?> I think there are some other savings to be made, but if you use something like WinMerge to compare your code against the above it will show you some useful tips
  20. I think you may have already read this, but just in case: http://processwire.com/talk/topic/1621-sudden-death
  21. Hehe, it's easily overlooked. If you would like a fancy search then Soma is your man: http://processwire.com/talk/topic/1302-ajaxsearch/ He seems to have created more modules than you can shake a stick at... although if you're into shaking sticks at code you may need to take a break
  22. If it helps reassure you more there is at least one project I have in the works that will be scaling to many thousands of pages, but ProcessWire has already been stress-tested beyond what I'll probably achieve any time soon It is a reasonable question you've asked though as I remember asking it a year or two ago and, aside from code improvements in the core since then, I remember ryan saying hosting is the key with larger sites. Hopefully you're more excited now knowing you can build it in a system that you can easily tailor to your needs rather than bending other platforms to your will, which is never quite as fun for me! Elegant coding over forcing things to fit any day.
  23. Basically do what these chaps are saying - add a checkbox field like Soma says, then as Apeisa says have a module look for the checkbox before the page is saved and if it's checked then change the parent and continue saving as normal. If I had more time this morning there actually is very little code to this but I've got to go to work - I'm 100% certain someone will be here with some code soon though The actual code that does the page "moving" in amongst the other module code is actually as simple as this: // ...Module code above to intercept page save, check for correct template and a ticked checkbox $page->parent = $pages->get('/path/to/archive/page/'); // ...Rest of module code. No need to $page->save(); since we're going to hook before page save so the save routine will continue as normal after this
  24. You can definitely do this in ProcessWire. 10,000 isn't actually that big a number really, but one of the main things to consider with larger sites is web hosting as presumably you could end up with lots of images on the site, thousands of visits per day and bandwidth could get quite high. You'll be fine with a smaller hosting package to begin with, but just bear in mind you probably want to select one that can scale as the site grows rather than move sites around from provider to provider. I've read elsewhere on the forums that ProcessWire is happy up to hundreds of thousands of pages and beyond, but low server specs would limit you before ProcessWire does Also, if you are thinking there will be a lot of pages that don't change much then look into caching options, and if you will have many pages like galleries that don't change at all then definitely consider ryan's excellent ProCache module.
  25. Nope, I always forget to think big enough with my folder structures Plus I still have yet to do anything like a client dashboard in PW so those links are useful.
×
×
  • Create New...