Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/27/2012 in all areas

  1. I have the Same "problem" with my host. Cant look right now but I think the solution was to look in your .htaccess for a commented line with the RewriteBase, just uncomment it so that it is like RewriteBase / Will look tomorrow at my installations.
    3 points
  2. I've been asked how to integrate Will Bond's Flourish library with ProcessWire so I thought I'd post the code I use. I downloaded the Flourish classes (not the whole flourish project) and put them into /site/.flourish. I then pasted the following into the top of my head.inc file. function flourish_loader( $class_name ) { // Customize this to your root Flourish directory $flourish_root = wire('config')->paths->root . 'site/.flourish/'; $file = $flourish_root . $class_name . '.php'; if (file_exists($file)) { include $file; } } spl_autoload_register( 'flourish_loader', true ); After that, you should be able to use flourish classes anywhere in your templates. NB, if you do download the whole flourish project into .flourish, then read Alan's post on how to adapt the above to your layout.
    1 point
  3. Soma, I've added this capability to Sanitizer. To use it, specify Sanitizer::translate as the second param to $sanitizer->pageName(), i.e. $name = $sanitizer->pageName($name, Sanitizer::translate); To make it work with the ImportPagesCSV module, edit the module file. Search for this: if($name == 'title') $page->name = $this->sanitizer->pageName($value); and replace it with this: if($name == 'title') $page->name = $this->sanitizer->pageName($value, Sanitizer::translate); I'm going to make the same change in the module itself here, but need to think a little more about how to avoid messing up anyone that's already using it. If someone is already using the module, then upgrades, it's feasible this could cause it to create new pages when it should be updating existing they had imported in a past version. I'll probably make it a config option or something.
    1 point
  4. if you set the image to be max width 300px (it will scale bigger picture uploaded to 300px), then in the template there's (form that code) $nextImage = $image->getNext(); $prevImage = $image->getPrev(); $sizedImage = $image->size(900); So it will get upscaled to 900px.
    1 point
  5. Hello tinacious, This is taken from the .htaccess file; Did you copy the .htaccess file up into the root of your live site? If not, upload it and try again. If that doesn't help, you will need to speak to your hosting provider and ask if mod_rewrite is installed and enabled or if it can be installed and enabled.
    1 point
  6. It's like PEAR in that it's a library of useful functions, but this one is all worked on by one guy (as far as I'm aware) so it's far more coherent than PEAR. I'm using it for things like this: http://processwire.c...ndpost__p__2407 - it just allows previewing the last 10 emails of a given inbox - in this case it's a press email account so staff can read emails and write any news or other articles based on them. I toyed with the idea of being able to grab the email text and make a page automatically from it, but as anyone who's worked with emails knows you can end up with all sorts of formatting issues. Even if you remove all the formatting it does seem like overkill anyway. I basically lost all my progress on that when my hard drive died last year, but it's actually not that hard to do things like that with Flourish and PW. There is another topic on the forums where various newsletter systems were mentioned and that got me thinking (on a basic level) of something like PHPMailer too - before I remembered Flourish can cover that need - so there are things that PW can't do where it's useful to know about other well-coded classes and libraries to help out. Oh, and before I forget - try this in your config instead of that $_SERVER['DOCUMENT_ROOT'] netcarver: $flourish_root = wire('config')->paths->root . 'site/.flourish/'; Either will work of course, but I've had weird experiences with servers and paths in the past so I just felt a bit safer knowing I was definitely using the same paths throughout my code.
    1 point
  7. Hello and welcome to the forums. I think both approaches are fine here: custom php app or using pw-templates. I would probably use PW templates here myself. If you have very data heavy application (you need to load hundreds or thousands of rows in memory, calculate/manipulate them all etc) then using "pure" mysql would be probably better option then. Not sure how much you have to scale here (like how many records you will have on your date ranges etc). But if you decide to use PW-templates, here how it goes: You would have template called something like "travel". There you have fields like datetime, distance, type of travel (walk, bicycle, run). Type of travel needs to be Page field, so somewhere you keep those values as pages (walk, bicycle, run). Then you need to create page, which requires login, and has one form (log travels). This is where you build custom form where users can log their travels. Each time they fill the form you create new page using travel template. Creating pages from API is super easy and you can easily make form that creates multiple pages with one submit (or ajax form or whatever you need). Then the most interesting thing would be to create admin view, where those logs can be searched and filtered. That would be perfect as ProcessModule. Process modules are admin pages, and they have nice and simple url routing. See my redirects module as an example: https://github.com/a...rocessRedirects That would be it. It involves quite a bit custom coding (like with any system), but probably something that is pretty nice and easy to build with ProcessWire.
    1 point
  8. Thanks all for your comments. @Ryan I've not touched on caching yet as I learn my way into PW and both the Cache and MarkupCache modules are currently uninstalled. I am doing a site-wide find but the only pages I was working on were, I think, both Published and visible; but some pages are hidden, /_Site_settings/ and /_Tools/ etc). This has not happened again. Re the Firefox ref in case relevant I now develop in Chrome. This was a time when I didn't distinguish what was happening as something I should try to record so I'm afraid I don't have backups of before this happened to allow me to try to reproduce. Of course if anything more comes to mind/happens, I'll post again.
    1 point
  9. Dear Ryan, Thank you very much for this CMS, it really make me wonder that it is difference from other CMS that easy to custom filed after i read and learn from you. Thanks for work hard, I love this CMS maybe my next project will move to processwire. Andy
    1 point
  10. I already tested it and it's great addition! Also got used to it fast. The options are perfect and makes sense. Thanks!
    1 point
  11. Thanks Didjee! I've updated the git repo with your fix.
    1 point
  12. I have just launched the new site for my music project (just in time for the new album release)! It's not a very big site, but it's all AJAX with a bit of unconventional CSS and JS to give it an unusual and distinctive layout. http://presteign.com
    1 point
×
×
  • Create New...