Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/18/2012 in all areas

  1. Today one of our (http://update.ch) latest PW project went online. Concept and desgin by partner company (http://p-inc.ch). Relaunch of the website for the design hotel The Omnia in Zermatt Switzerland. http://www.the-omnia.com - CMS: ProcessWire 2.2 - Multilanguage (separate tree) - Responsive Layout - Adaptive Images - Lots of images - Passwort protected Media Image download
    2 points
  2. If I had to put it shortly: PW gives you (that are missing from many more traditional frameworks): Admin, users and access management UI for building your data schema (clicking on admin instead of coding) Url mapping to pages (no need to define routes) Something pretty similar to most (with a twist of course): PW API == GOOD ORM Controllers == template files can be easily used as a controllers What is missing (what some frameworks have): Crazy amount of helpers (as others have noted, using zend classes or flourish can be good help in that kind of situation) Routing (I hate doing routes... mostly repetition) Custom template languages Strict rules how to construct your code What pw "requires" that you might not like in your app: Unique database schema: you don't have single "posts" table, instead you end up with field_title, field_body, field_author, field_date etc.. tables MySQL, MyISAM
    2 points
  3. I share here few other sites we have released lately, running on pw: http://www.wg-2015.com/ (using multilang) http://www.martanpuoti.fi/ (using shop module and multisite module) http://www.marttaperinne.fi/ (using multisite, runs same install than martanpuoti.fi) http://www.uimaliitto.fi/
    2 points
  4. Ajax Search 1.1.0 There was a request for a ajax live search. So I went and created a simple module. Added in 1.1.0 * added key support for browsing results with arrow down and up. * added escape key to close results. * added close results on click outside http://modules.proce...es/ajax-search/ From the readme: This module progressively enhances the search form to an ajax live search. It will perform a search like you would use the form normally, and returns the output of the search page. So the search will still work without js enabled. There's some basic styling attached to this module in the "styling-example". You can use it to get started. See readme in there. Setup the search.php So it works almost out of the box with the basic install profile of ProcessWire, you only need make a minor change to the search.php template file to only return the content part (results) on a ajax request. To get the ajax search only return the content, open search.php and change the output on the bottom to this: ... if(!$config->ajax) include("./head.inc"); echo $out; if(!$config->ajax) include("./foot.inc"); Module Settings It comes with some module options to define various settings regarding the search form. Following a list with the defaults. Minium length = 3 min length for starting ajax request Close button text = 'close' close button text ID of searchform = #search_form if you have a different search form id,class ID of input = #search_query if you have a different search input id,class Query name = 'q' this is the default param name as_query_url = '' if left blank the script will take the action of the form Any help testing this module is appreciated. If you have any questions or problems setting this up feel free to ask here. Also feel free to use this as a starting point for your own, or take out the script to implement it differently. It's quite simple and can be adapted really quickly.
    1 point
  5. A simple module that'll automatically obfuscate all emails found on the page. Emailobfuscator.zip
    1 point
  6. @onjegolders, as a rough answer I'd say that ProcessWire provides very good foundation for an app by making content management, access control etc. trivial. Frameworks, on the other hand, offer flexibility and powerful tools if you're building something that doesn't really need / use typical CMS/CMF features and for some reason requires very highly customized access control, URL manipulation / routing, data structures etc. MVC approach has clear benefits, but don't sweat it too much; separation of concerns is what's important -- when implemented properly, you don't need to make changes to multiple places every time your UI or DB (or business logic for that matter) changes slightly. I'd recommend reading this (old but still good) post about Rails development, which (imho) summarizes benefits of MVC / separation of concerns pretty well: http://weblog.jamisb...oller-fat-model. For the record, I've never tried Codeigniter myself and don't really know much about it. I've used Zend Framework for various projects -- and will definitely keep using it whenever it's the best tool for getting the job done -- but I've heard it has somewhat steep learning curve compared to some other frameworks. I'd still recommend checking it out though: http://framework.zen...n/learning.html.
    1 point
  7. Cheers - I'd be nowhere without your wrapper though To be honest I can't envisage many scenarios where I wouldn't use PW, unless it was for something very specific like forum software (and even then apeisa has made a forums module). I personally never got into MVC as I found it too rigid for my liking, though that does potentially lend itself to a cleaner workflow when you're part of a team (it still depends on how well documented and presented each team members' code is though ). I suppose I don't mind mixing my code up a bit as it's only generally going to be me working on a site and I know my way around PHP, HTML and JavaScript so it doesn't bother me that they sometimes get mingled in a bit. I would say that the answer to your question depends greatly upon what sort of application you are looking to build. Can you give us any examples? Using some real world apps as examples: If I was building something like Freshbooks I'd use custom tables for the invoice data, but I'd be tempted to use PW for user accounts, and store additional user data with that account data. The bulk emails could easily be handled by Flourish. If I were doing something more specific like creating a project management system like ActiveCollab I reckon I could do it in PW despite the complexities of what you can do in AC, but why reinvent the wheel? If I was building a portal for estate agents like RightMove (and the thought has crossed my mind) then that would be ideal for PW (and a bit of Flourish) and I'd just need to create a front-end interface for the estate agents to log into and manage their own property's which, again, is relatively easy with PW. The front-end of the site would then be pretty similar to something like this site ryan created: http://www.villarental.com/
    1 point
  8. I was working over this code from apeisa http://processwire.c...t__20#entry1364 and wanted to share the result with you all. Basically, this allows you to mirror the admin form from a given page to the frontend. To give some flexibility, you can fill an array with the fields to exclude —or else, the fields to include— on the output. EDIT: I forgot to tell... this works well with regular fields (text, textareas, checkboxes, radios, multiple choice, etc), but didn't manage to make it work well with images, for instance. So, here is the code: <?php // Get the page you need to edit $mypage = $pages->get('/some/page/'); // Populate with the names of the fields you want to exclude OR include (see instructions below) // Leave empty to output all the fields $myfields = array('body', 'email'); $form = $modules->get('InputfieldForm'); $fields = $mypage->getInputfields(); // If array is not empty use it to filter the fields if ($myfields){ foreach($fields as $f){ // Output all the fields minus the ones listed in the $myfields array // Instead, to output only the fields that are in the array, remove the (!) from the condition if (!in_array($f->name, $myfields)){ $form->append($f); } } } // Else, include all the fields else { $form->append($fields); } // Add save button $field = $this->modules->get('InputfieldSubmit'); $field->attr('id+name', 'submit_save'); $field->attr('value', 'Save'); $field->label = "submit herei"; $form->append($field); // Process the form // (code replaced by a new one provided by Ryan) if($input->post->submit_save) { $form->processInput($input->post); if(!$form->getErrors()) { $mypage->of(false); // turn off output formatting before setting values foreach($mypage->fields as $f) { $mypage->set($f->name, $form->get($f->name)->value); } } } include("./head.inc"); // Render the form echo $form->render(); include("./foot.inc");
    1 point
  9. Hi! I when searching my site (using the default search page) I can't search using words shorter than 4 characters. This is not a big issue when searching for one word (I think it's completely fine that words like "the", "and", "or" and "it" don't generate search results), but I do want to provide results for searches like "by car" and "by train". I know a Full Text Search setting in MySQL (ft_min_word_len=2) resolves the issue, as it will provide results for two and three letter words as well. But this isn't really what I want. Is there another, better way to make the search work with queries containing short words? Like ignoring the short words and just search for the other words instead? All suggestions are appreciated. /Jasper
    1 point
  10. @12345j and @Ryan and the superDuper @Soma! Thanks SO much. I just searched "obfuscation" in the forum and < 5 mins later here I am with auto-obfuscation happening. Brilliant!
    1 point
  11. We released our new site yesterday: www.avoine.fi Development started over a year ago with 2.0 and we nearly finished it then. After that we let it be for 12 months and now got back to it with good content and development sprint. We are quite a happy how it turned out. Now running latest 2.2. Initial design was made by Niko Kauranen (www.propello.fi) and development by me. There are few changes in design also in this almost 1½ year cycle, but not that much. Niko has done great job, since it still looks fresh in my eyes, I really like the design.
    1 point
  12. @Soma; THANK you for your nav module, just used it again — brilliant.
    1 point
  13. Hey 12345j, are you still here? I just tried this out and fixed a bug with "$config" should be $this->config in modules. Mind if I put this on my github account? Edit: I just added a configuration setting, for defining the html tag the js script will get prepended to. Right now it will be prepended to the </head>, which might not where one wants to have it. So I added a text field where you can for example use "</body>" instead. Edit: Ok I just went and created a git repo with the updated version of this module. I also renamed the module to EmailObfuscator: https://github.com/s...EmailObfuscator
    1 point
  14. PW already removes stopwords from the query (and I think that "by" is one of them). Take a look at the %= operator as that works the same as *= but has no stopword or length limitations (at the expense of being slower). But using Adam's example (which is a good one), you could recode that array_walk part like this: foreach($queryArray as $key => $value) { if(strlen($value < 4)) unset($queryArray[$key]); } I've never used array_walk before, and dont know what the error you got is, but I think the above would do the same thing.
    1 point
  15. You can just delete shorter words from query, check whether rebuilt query (without short words) has any length and then search for this: <?php //i assume $query containing search string $query = 'this is one word longg wordd'; $queryArray = explode(' ', $query); array_walk($queryArray, create_function( '$v,$i,&$queryArray', 'if(mb_strlen($v)<=3){unset($queryArray[$i]);}' ), &$queryArray); $query = implode(' ',$queryArray); //now you have shortened search string in your $query, so you can find() with it $result = $pages->find('title|body|search_field~='.$query);
    1 point
×
×
  • Create New...