Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/01/2013 in all areas

  1. Hi All, First of all a big "THANK YOU!" to the community of ProcessWire and its founding father! It has been a great adventure developing this site with ProcessWire, allowing me to focus on getting things done! http://www.goaroundeurope.com On thing that was great, for me and for the site owners is the widget system I created. I used Pagefields for including a multitude of widgets that the site-owners place on pages in the site. They can create their own widget too and reuse them throughout the site. ProcessWire not only helped me during development, but the backend is very user friendly for the site owners. This was one of the major factors I considered when choosing the platform to build this site on. I only have to develop it once (and maintain/extend it ofcourse), but they have to use it day in day out....
    11 points
  2. Hi! Here is my second work on PW: one page promo site for super mega cool strut mounts (some car stuff). www.ss20gold.com - ProcessWire 2.3.7 - multilingual; // pm me, if there are funny/wierd mistakes, please - scroll-scroll; - animated gif reincarnation; - about 50 times of Massive Attack - Heligoland in process. Thanks all of you, you guys are rock!
    4 points
  3. Hi totoff, I plan to update this theme in the near future for current and upcoming PW releases, I'm working on the new theme which is almost done, I'm tweaking the responsive part of the theme. I've been quite busy last couple of months and haven't had time to work on any of my themes and I was generally quiet around PW forum in general, my apologies for that (to everybody)... I don't think that I'm planning to support older themes besides Ergo and my new theme that's near release date of pure reason updating JqueryUI and other things is very time consuming. It's better to have 2 themes fully supported then 5 themes partly supported in the end. I'm willing to help anybody that will continue to use my older themes with any kind of advice regarding functionality.
    4 points
  4. This module serves as an example of creating an editable table of data as a Fieldtype and Inputfield in ProcessWire. In this case, we create a simple table of events each with date, location and notes. This pattern can be adapted to nearly any table of information. Note that this module is intended as a proof-of-concept. If you find it useful for the example scenario (events) then great, but keep in mind it is not intended as a comprehensive events solution, where using ProcessWire pages may be a better fit. This is a pattern I've used for creating tables of data in ProcessWire for many different Fieldtypes/Inputfields and thought it would be good to setup a proof-of-concept example like this to share. Module Page / GitHub Page Install Copy the files for this module to /site/modules/FieldtypeEvents/ In admin: Modules > Check for new modules. Install Fieldtype > Events. Create a new field of type Events, and name it whatever you would like. In our examples we named it simply "events". Add the field to a template and edit a page using that template. Output A typical output case for this module would work like this: foreach($page->events as $event) { echo " <p> Date: $event->date<br /> Location: $event->location<br /> Notes: $event->notes </p> "; } This module provides a default rendering capability as well, so that you can also do this (below) and get about the same result as above: echo $page->events; ...or this: foreach($page->events as $event) { echo $event; } Finding events This fieldtype includes an indexed date field so that you can locate events by date or within a date range. // find all pages that have expired events $results = $pages->find("events.date<" . time()); // find all pages with events in January, 2014 $results = $pages->find("events.date>=2014-01-01, events.date<2014-02-01");
    2 points
  5. Template Notes Adds a "Help" tab to pages for notes and instructions on the current template used. You can add content by simply putting a html or markdown file in /site/templates/notes/ the module will automatically load that file if it finds one and adds a "Help" tab to the page edit form. Name the files using the template name. You can use html or markdown to write the help text. - /site/templates/notes/[tplname].html - /site/templates/notes/[tplname].md To style the content you can specify a custom css file url you add to the module settings. http://modules.processwire.com/modules/template-notes/ https://github.com/somatonic/TemplateNotes This module was quickly written after seeing a wish-list request by Joss http://processwire.com/talk/topic/5016-help-tab-for-template/
    1 point
  6. Few days ago I've posted sneak preview of new admin template (it didn't have name then), so I've managed to squeeze some time to finish it and here it is... Ergo Admin Template DOWNLOAD https://github.com/nvidoni/ergo USAGE 1. Create folder named "templates-admin" under /site/ folder 2. Copy all files (including folders) into newly created folder 3. ProcessWire will load the new admin template automatically EXTRA If you would like to use custom TinyMCE theme created for this template, follow this steps: 1. Download TinyMCE Ergo theme from https://github.com/n...ni/ergo-tinymce 2. Copy "ergo" folder to /wire/modules/Inputfield/InputfieldTinyMCE/tinymce-3.4.7/themes/advanced/skins/ folder 3. Open /site/templates-admin/default.php and change in line 86 "default" to "ergo" If you find any errors please post them here so I can commit them accordingly. EDIT 1. Changes have been made according to diogo's and Soma's posts.
    1 point
  7. I've officially launched this site today: http://www.kidderminster-husum-twinning.co.uk/ For those not familiar with twinned towns/cities - many places (in Europe at least) are twinned with other places in the world and these are two such places which have built links between their cultures, clubs, associations etc. It was a relatively straightforward site. A design I had made many months ago actually lent itself to the Foundation site profile (which I upgraded to Foundation 5 without too much hassle) and most of the content benefits from the default styling in this case, which was a bit of a fluke as I'd not done anything with Foundation when I originally designed this I was in two minds whether to use Foundation as I'd not really touched responsive before, but it works nicely on mobile and I'm glad I did it. There's a bit more going on behind the scenes than meets the eye, and I think that because this looks like a simple site it might well be worth a full case study with a few tutorials of how I personally approach things. As for the tools I used, here's my list of modules: CKEditor Markup Yahoo Weather (a modified version) Page Link Abstractor (I always use this now so links in the body don't break when moving the site to the live server) Thumbnails (I couldn't imagine a site without this!) Languages - all of the core modules for languages, as there are English, German and Danish versions of each page (not all translated before anyone spots that but I shall leave that to the Twinning committee ) I also turned on caching for each of the templates. Due to the weather constantly updating on the sidebar I didn't use ProCache on this occasion - I toyed with making the weather a JS/AJAX/PHP combo but it then loses it's synchronisation with the two images in the slideshow on the homepage and that looked so nice that I can live with what is still a relatively quick site without making design sacrifices for the benefit of a bit more speed. What do you think?
    1 point
  8. And you have to change $page to the page you want. The example that I gave above would get the page by name, buy you can get it by ID also $pages->get(1654) besides other ways using the different selectors. The only info that I have from you about that page is the template. Assuming that that's the only page using that template, this should work for you: <?php foreach($pages->get("template=bands")->band_performance->find("limit=5") as $band_performances) { edit: get() returns the first page found that matches the selectors, while find() returns an array (pageArray) with all matches for the selectors.
    1 point
  9. You can use same find method that diogo posted: $featured = $page->band_performance->find("limit=5"); Or you can use slice method to get number of results you need: $featured = $page->band_performance->slice(0,5); http://cheatsheet.processwire.com/#pagearray-wirearray
    1 point
  10. Hi Jeff, welcome to PW! No need for ajax, you can do it like this on your home template: $featured = $pages->get("/repeaters/page/")->repeater->find("limit=5");
    1 point
  11. I think that it has something to do with (page name) language support. Now your search form points to http://creacc.espaceproduction.com/rechercher/ but because of lang support page actually lives in lang prefixed url http://creacc.espaceproduction.com/fr/rechercher/. Now PW does redirect and thus loses the search query. You could try something like this: <form id='search_form' action='<?php echo $pages->get("/rechercher/")->url; ?>' method='get'> <input type='text' name='q' id='search_query' value='<?php echo htmlentities($input->whitelist('q'), ENT_QUOTES, 'UTF-8'); ?>' /> <button type='submit' id='search_submit'>Rechercher</button> </form>
    1 point
  12. Good one! I hope I will be using this website soon I found a small mistake on the content, maybe you can tell them to correct. On the upcoming festivals in Portugal, on the 8th of June, it's written "Serralvas em Festa" where it should be "Serralves em Festa". It's a great arts festival by the way, in case someone is planning to choose a destination for around that time
    1 point
  13. Greetings, Gerhard: and now to blow your mind with potentials... 1. Open the cheatsheet (thanks, Soma): http://cheatsheet.processwire.com 2. Look under "$page" 3. Look under "PageArray/WireArray" 4. Consider that you can often chain 2->3 (replace $a variable with your choice in 2) Use the flexibility wisely! Thanks, Matthew
    1 point
  14. Greetings, Great concept, and great way to structure lots of information. Your site feels lively and fun, with nice writeups throughout on various subjects for travelers. One quick comment: the tabs on the home page get squashed: Viewing on mobile Safari. Thanks, Matthew
    1 point
  15. Hi circlet, welcome to ProcessWire! How is your current setup for the users? I Assume you created two different roles to distinguish them and assigned one of them to your users. You can log-in a user with the API: http://processwire.com/api/variables/session/ Short example: /* After the form with username/password was sent... */ // Log in the user $username = $sanitizer->pageName($input->post->username); //Sanitize username $u = $session->login($username, $input->post->password); // Check if a user was returned or null if (!is_null($u)) { // Redirect based on role if ($u->hasRole('role-A')) { $session->redirect($pages->get('/path/to/page/for/role-a/')->url); } } else { // Wrong username or password }
    1 point
  16. @lundy - 1. yes; 2. fields (as far as i can tell) are hard coded into the module - you would need to clone the module and mod it for your use. 3. i don't think so. 4. probably not much if you use caching
    1 point
  17. This is sort-of built in to ProcessWire already on a basic level. If you make a copy of your config.php file called config-dev.php, then that one will take priority over config.php. Just ignore the -dev version in DeployHQ settings, or add it to .gitignore so it doesn't even get committed - up to you. As long as config-dev.php on your local system has your local settings in, and your config.php is treated as your live version, it should be fine
    1 point
  18. 1 point
  19. Actually, you can do this on the dev branch. Lets assume that cities are children of countries and that is reflected in your page structure (i.e. /countries/france/paris/). Create your 2 page fields (country and city), and configure 'country' as a single page field with "parent" set to "/countries/". Next, for the "city" field configuration, use the "Custom selector to find selectable pages", present on the "input" tab. In that field, enter "parent=page.country". Save and try it out. This works with select, selectMultiple and asmSelect fields (and possibly others), though not yet with checkboxes, radios or PageListSelect.
    1 point
  20. @lundy: congratulations, you've nailed it. That's a very good way to describe it Of course it's not literally quite like that. Since you've mentioned that you're a beginner, it might be useful to know that there's a lot more happening behind the scenes: Each page is connected to a template, which is connected to a fieldgroup and each fieldgroup is connected to varying number of fields. Taking things even further, each page is represented as a row in pages table, each template as a row in templates table, each fieldgroup as a row in fieldgroups table, each field as a row in fields table and so on. Eventually each row of data you've filled on any of your pages inserts a row in that particular field's own database table, i.e. field_title, where column pages_id identifies the page this particular row is related to and column data contains actual title field content for that page. Field tables can have varying amount of different columns, but this is the basic setup anyway. Understanding how things are connected at database level IMHO makes them more obvious on the front end side, but for most use cases (and most users) knowing what you already know is quite enough. It's still good to realize that there's a lot more to a system like this than just simple database table with couple of columns and rows Each question as it's own page does seem the most obvious solution here. Of course this still depends a lot on your specific needs; are these questions just simple question-answer type of things, how much data is there going to be for each of them, do they have comments or votes etc. Ryan recently published an events field, which could also easily be modified to accommodate very simple question-answer-pairs.
    1 point
  21. You can also test for the pages parents $page->parents->has($child)
    1 point
  22. ProcessWire wants to have a local path to save files when you upload them. But using a solution like Teppo's, where you alternate the URL where they live, is certainly a possible way to redirect requests for any file to an alternate location. Another possibility is that I could make PagefilesManager::url() hookable, so that you could modify it with a hook. This would probably be the cleanest method, and I'll be happy to add the hook if anyone wants it. However, you would still need to be responsible for making sure that the files that live in /site/assets/files/* manage to find a way to their new URL location, whether it's literally having them copy to that location, or it's a directory mapped to another drive or server, etc.
    1 point
×
×
  • Create New...