Jump to content

DaveP

Members
  • Posts

    868
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by DaveP

  1. Isn't it funny how tastes change - I used to love Dreamweaver too, but just got tired of buggy software and less than optimal code output, so I never use it these days. That said, I've always thought there was room for a really good open source alternative, for people who like a visual editor. Anyone know of one that works?
  2. The process as you describe it is exactly how I promote a site from local dev to live server, so that wouldn't be expected to be the problem. Can only think that it must|might be related to a difference in PHP version between the two environments and the problems discussed in the threads you link to above. Just for 'fun' it would be interesting to try the process in reverse - try to recreate a working remote site locally using file copy and db export method. If the same or similar problems arise, then the two environments must be sufficiently different to cause a problem. (Not suggesting for a moment that you should, but it might be interesting...)
  3. Forgive me if I misunderstand the problem, but are you aware of the $config->userAuthSalt setting in config.php? /** * Installer: User Authentication Salt * * Must be retained if you migrate your site from one server to another * */ $config->userAuthSalt = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; (Around lines 223-229 of config.php (near the bottom, anyway))
  4. aptana
  5. http://www.last.fm/user/dbplfc
  6. Sorry to disagree, but you can and it works fine. They offer 2 different server configurations and the PHP Flex one works with PW. (And PW plays very nicely with MariaDB, which they use, but I think we already knew that.) I think I might have had to chown a couple of PW folders, but that was all, if I remember correctly.
  7. I think simply using a fully qualified URL would do it - like //www.example.com/assets/myfile.txt
  8. I think $pages->find("template=invoice,created>".strtotime("1 ".date("M"))) should find invoices created this month. You'd need some extra logic for past months, but strtotime is the key.
  9. Can't recall where I saw it, but earlier this week someone suggested that finding a way to remove 1 jpeg from a site design is the quickest and easiest optimisation possible.
  10. Duh. My bad. Having come back to this after the weekend there was no problem after all. I was trying to save to a field that was not in the template. Sorry.
  11. I'm trying to save a date & time to a Datetime field from a front end template, but without success. Clearly, I'm formatting the date incorrectly, but can't find the required format anywhere. Any suggestions would be most welcome.
  12. DaveP

    learning php

    Note on w3schools.
  13. For what it's worth, I always put semicolons after even single lines, not so much in the case @pwired cites above, but in more general cases. Say I have this <?php $foo = "bar"; ?> and then I realise I need to add another line <?php $foo = "bar"; $baz = "qux"; ?> I don't need to remember to add a semicolon to the first line when editing to add the second line, because it's already there.
  14. http://wonder-tonic.com/geocitiesizer/content.php?theme=2&music=8&url=http://processwire.com/ or indeed http://wonder-tonic.com/geocitiesizer/content.php?theme=3&music=5&url=http://processwire.com/talk/topic/3267-simply-interesting-for-processwire/ (2nd one is a bit meta)
  15. Wise words.
  16. You'll need to close the foreach, so something like this will work <?php $drinks = $pages->find("template=drink"); ?> <h2><?php echo $page->title; ?></h2> <ul> <?php foreach($drinks as $drink): ?> <li><?php echo $drink->title; ?></li> <?php endforeach; ?> </ul> Note that I've used a colon ( : ) after the foreach and then closed with endforeach. You could use foreach(){ and then <?php } ?>, but endforeach makes it clearer where the loop finishes (and which loop it is). Bit more info here. Edited re @nik's comment below and to change the colon back to a colon from being a smiley.
  17. I think it should be $settings = $pages->get("/site-settings/"); ie get [one page] rather than find [any number of pages] (and you don't need the == 1 in the if because if $settings->mycheckboxfield is 1 then it will evaluate to true.)
  18. Using IETester, it gives loads of script errors, but most (all?) of them seem to relate to ThemeForest. The theme itself (http://pixel-industry.com/html/alexx/) seems to work tolerably well in IE7 and very well from 8 upwards.
  19. $contracts = $page->files->find('description*=Contract'); $catlist = $page->files->get('description*=Cat List'); Are a couple of lines from an actual intranet app we use at work.
  20. Hi, and welcome to PW. I think this module will do most, if not all, of what you need.
  21. You have a list of page ids in the right order direct from the db query, so this should work... $r=$db->query('SELECT pages_id, ('.$user_location->lng.'-lng)*('.$user_location->lng.'-lng) + ('.$user_location->lat.'-lat)*('.$user_location->lat.'-lat) AS "distance" FROM field_map_location ORDER BY distance'); while($row=$r->fetch_row()){ $loc = $pages->get(row[0]); echo $loc->id; } (Untested and written in browser) <edit>Soma beat me to it. Again.</edit>
  22. It's a complete guess, but all bar one (field_pass) of the tables I see in a local install are 'utf8_general_ci' collation. It looks from your post that the error relates to alternate language pages. Is a module creating the wrong collation on its tables?
  23. Session dies when user closes browser, so you'll have to use a persistent cookie.
  24. Seems to me, if I understand your question correctly, that logged-in users could have a date/time field in their user page (admin/access/users/username), so that would be relatively trivial, but you'd need to set a cookie or use browser fingerprinting for non-logged-in users, which are more work and easier to circumvent from a user point of view, and then store a unique id for each anonymous user spotted, along with a date/time. (Sorry that's all one sentence. )
  25. For encoded (obfuscated) emails - http://modules.processwire.com/modules/email-obfuscator/ For miscellaneous other stuff inside content - http://modules.processwire.com/modules/markup-shortcodes/
×
×
  • Create New...