Jump to content

DaveP

Members
  • Posts

    868
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by DaveP

  1. It seems to me that whoever created that database in the first place is trying to be too atomic (http://en.wikipedia.org/wiki/Atomicity_(database_systems)). You could replace all the fields containing eg. with something like Ryan's Google Map Marker fieldtype (http://modules.processwire.com/modules/fieldtype-map-marker/), such that room description (Master Bedroom) and the 2 dimensions are contained in one fieldtype, being reused for the different rooms. I think this might reduce the number of different fields required.
  2. First thing - while you might not need curly brackets, you can add them and it won't hurt. if($section->knots) { echo "<tr>"; echo "<td><p>{$pages->get('/FixedData/')->knotsLang}:</p></td>"; echo "<td><p>{$section->knots}</p></td>"; echo "</tr>"; } Note the brackets added in the third line - should work (untested). if($section->knots) { echo "<tr>"; echo "<td><p>{$pages->get('/FixedData/')->knotsLang}:</p></td>"; echo "<td><p>$section->knots</p></td>"; echo "</tr>"; } Also should work - without the curly brackets in line 4. If in doubt (and this is probably not good practice, but I often do it) - if($section->knots) { $knotsLang = $pages->get('/FixedData/')->knotsLang; echo "<tr>"; echo "<td><p>$knotsLang:</p></td>"; echo "<td><p>$section->knots</p></td>"; echo "</tr>"; } Which (to me, at least) looks a bit cleaner and easier to read.
  3. If that were to be a problem apeisa's redirect module http://modules.processwire.com/modules/process-redirects/ should help.
  4. My bad - I was only thinking front end. On the one PW site I maintain that has thousands of pages, the backend search comes into play - knowing the structure well, I can hop to any page quickly that way.
  5. Would you want pagination to stretch that far? Doesn't sound great for usability to have a user click <Next> hundreds of times... Or am I missing something?
  6. A bit bizarre - http://iteration99.com/2013/php-json-removed-from-php-5-5/
  7. It's already been done - http://modules.processwire.com/modules/fredi/
  8. I do something very similar to OrganizedFellow - <title> <?php echo $page->get("headline|title"); if($page->url !== $config->urls->root) echo " | Site Title"; ?> </title> Just change 'Site Title' as appropriate.
  9. Trello's great - we used it a lot last year when we moved offices.
  10. Hi, Thomas and welcome to the forums! From some of the details in your question, it looks like you have some experience in these matters, so I won't go through the obvious suggestions. The problem does indeed look like an .htaccess problem. There is some info about getting PW working on 1&1 starting here http://processwire.com/talk/topic/264-editing-htaccess-%E2%80%93-ok-or-not/#entry1788 I can't vouch for it's accuracy but it looks like it addresses similar problems to those you are having. Take a look, and if it doesn't help, come back here and I'm sure we can get you working.
  11. I think kyle is right - as long as there is some structure to the way Jekyll stores its data (and there must be), it should just be a matter of identifying what is what, and writing a script to read that structure and create PW pages from it. Take a look at http://processwire.com/talk/topic/3987-cmscritic-development-case-study/, where Ryan describes converting a site to PW.
  12. DaveP

    Vacation

    It's interesting to read other people's perspectives on this. Although I am in Europe (UK), we are not part of mainland Europe, so I think that makes a big difference, not only to the practicalities of seeing the rest of Europe, but of attitudes towards the rest of the continent. While someone living in Spain could easily drive to Portugal or France, we have that annoying and expensive 22 miles of water to cross (the English Channel/La Manche). It doesn't make any difference to aeroplanes, but to everything else it does. As far as duration and timing of holidays goes, I come from a part of England (the North West - Liverpool, Manchester, the Beatles, the Mersey sound, Factory Records, the seat of the Industrial Revolution, the world's first passenger railway etc are all within 30 miles of my home town), where traditional Wakes Weeks still play a significant part in people's holiday schedules. That said, the ubiquity of cheap air travel has made the rest of Europe much more accessible. I know, for example, many people who have held their stag party (bachelor party) in Amsterdam in Holland, Bruges in Belgium and even Prague in the Czech Republic. If I were to make suggestions to anyone from outside Europe of where to go in Europe, some of my favourite places would, of course, be 'my' bit of England, but also London, Scotland, Normandy in France, some of the less developed parts of Spain, and just outside Europe, but not until things there settle down (if they ever do), Egypt is extraordinary.
  13. I am absolutely confident that if anyone actually had > 32,000 (ext3) or > 64,000 (ext4) pages with images or other files and came to the forum asking for help, Ryan or someone else here would have a solution available in a couple of days at most. At the moment however, that hasn't yet happened, so the problem is moot.
  14. Problem with deleting all a user's posts & replies is that can break up the conversation flow. Better to leave posts & replies and to mark them as by 'Deleted User'? (Or maybe change username to user id - i.e. anonymise posts, but leave them in place.)
  15. I am by no means an expert, but searching around a bit suggests a segfault. Fixes include: restart Apache reseat memory (if you have access)
  16. Welcome to PW, John! Glad you found the solution to your problem. Personally never heard of Kirby or Stacey (other than an area of Liverpool (spelt differently) and a mate's ex-girlfriend), but from a quick search, PW templates look somewhat similar to Kirby templates. Anyhow, enjoy experimenting with PW and come back to the forum with any questions.
  17. Marty, I'm sure Antti will confirm, but the basic tenet is that if the user has the correct permission(s) to edit in the backend then they can edit in the frontend with Fredi. I use Fredi on one site with several user types and all permissions apply across backend and Fredi.
  18. Very impressive - http://sarasoueidan.com/blog/s-gallery-responsive-jquery-gallery-plugin-with-css3-animations/
  19. Looks like you guys are inventing PosterRank.
  20. Ryan often points people to the Skyscrapers profile http://processwire.com/demo/ for some good ideas about implementing quite complex searches. You can see the source for search.php from that profile on GitHub https://github.com/ryancramerdesign/SkyscrapersProfile/blob/master/site/templates/search.php.
  21. Unless you have many thousands of text-heavy pages, the %= selector isn't noticeably slower than any of the others. Just to expand on Soma's answer above, it's easy to achieve 'AND' or 'OR' functionality in selectors. Nik's Selector Test module (mods.pw/2r) is great for quickly testing selectors, BTW. 'OR' first... $pages->find("body%=process|examp"); will find pages including either of the part words either side of the pipe symbol '|'. 'AND' isn't really much trickier... $pages->find("body%=process,body%=examp"); Pages found must match all selectors, so that's an 'and'. I usually build my selector string without search terms, then explode() the search terms on space characters and foreach() them on to the end of the selector string. It's all about thinking the PW way.
  22. Very clever, but close to 'too damn clever for its own good'.
  23. I've changed the tutorial, adding that line. Joss was creating that wiki page, but he's been a bit scarce lately. @NoDice try making that change and report back if it works or not, please. It will be very helpful to get some feedback on that tutorial.
  24. While it's a great idea to have a 'settings' type page to provide content for other pages, you can also use config.php. Just add a line or lines there. $config->this_value = "Foo"; $config->that_value = "Bar"; And these variables are available to any template. <?php echo $config->this_value; ?>
  25. From your code, you don't seem to be using that $post variable anywhere other than in the if(), but I'm assuming that you use it to set $country. (Correct me if I'm wrong.) Suggestions- Use $input->post["mysearchlocation"] rather than accessing $post directly (not essential) Run the result through $sanitizer (essential) Save the result in $session and access it from there on subsequent page loads.
×
×
  • Create New...