Jump to content

jacmaes

Members
  • Posts

    295
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by jacmaes

  1. Thanks pwFoo. You're right, it's easy to extend and there are plenty of snippets in the forum to get anyone started quickly.
  2. Thanks. I realize that FormHelperExtra was not needed, so I went ahead and successfully installed everything else. The login and registration process work fine in my test environment, and it's pretty easy and quick to implement. Great job. Now I'd like to go one step further, and allow users to edit their profiles (after adding fields to the user template like "first name", "last name" and "birthdate" for example). I believe that FormHelper should help out with this, but how should I proceed? Could you add a simple example to the module docs?
  3. Hi pwFoo. I've tried to install first FormHelper on a clean local installation with Mamp Pro (PW 2.5.29, PHP 5.6.2). FormHelper.module was installed properly, but the FormHelperExtra.module gives me the following error: "Unable to install module 'FormHelperExtra': Can't save page 0: /fhstorage/: It has no parent assigned".
  4. @rot, thanks a lot for this module! I've tested both the FTP and Google Drive options for a site of mine hosted on a Digital Ocean VPS, and it worked flawlessly. It took less than a minute to create the backup files and upload the 650 MBs ZIP to Google Drive, which is quite impressive. I must say that setting up the Google Drive option was hard due to the lack of documentation, but since it's a pre-release, that's expected.
  5. ESRCH, you're such a great teacher. I've understood it perfectly. Very smart solution. I love this forum, I always learn something new. Now I have to up my PHP game to be able to return the favor and contribute more.
  6. Thanks ESRCH for your explanation. I understand now why $a->unique() isn't working. However, I don't understand your code, especially the $lastEditorial variable. And I don't know how to echo it either... But you guessed what I wanted to achieve: I have a list of books where various editors typed in publishers manually in a text field, instead of pulling them from a predefined list. Hence my issue with the duplicates: I want a "clean" array with unique publishers.
  7. Can someone explain to me how to use $a->unique();? <?php foreach($pages->find("template=item, editorial!='', sort=editorial") as $item) { echo $item->editorial; } ?> Retrieves a list of publishers ("editorial" field) from a template called "item", but with duplicates: Abada Abada Abada Academy of Mathematics and Systems Science Chinese Academy of Sciences Actar Actar etc... How can I remove the duplicates from this simple loop?
  8. Thanks for this. It's going to be very useful.
  9. Lightbox is an add-on, which means that you need to include the JS and CSS files separately. It's not part of the UIKit core files.
  10. Take a look at lazysizes from Alexander Farkas who's on the modernizr team: https://github.com/aFarkas/lazysizes Very complete and constantly updated, it even includes its own responsive images polyfill and a set of additional plugins to lazyload iframes, modules, background images, etc.
  11. I'm not sure what you mean here. Are you talking about a dropdown menu on the front or back end? In any case, you can just keep expanding your current tree, which in your screenshot above is limited to provinces, and add all the respective cities below each province. To avoid doing this manually, you can use Adrian's Batch Child Editor module. This is automatically generated. Go to your template, Select the "Advanced" tab, then add the fields you'd like to see under "List of fields to display in the admin Page List".
  12. Not sure about the most flexible way to achieve what you want to do in point 1. I would also be interested to have some input from other forum members. But for point 2, the events module is an option (or the table pro field), but I would encourage you to create a page for each event, which in my opinion would give you more flexibility – you're not restricted to a few fields in a table, but you could keep adding more fields like an interactive map to locate your event (see Ryan's great Map Marker module) – and is probably a lot more scalable in the long term. This would also be a great opportunity to learn how to retrieve and manipulate information from pages. Here's an example of how you'd retrieve a list of all events taking place today, taking into account that they can either be ongoing (e.g. they started a few days and are still going on) or new (they've started today): $events = $pages->find("template=event, start_date<tomorrow, end_date>=today, sort=-start_date"); Quite simple, isn't it? Bonus 1: find all event current and upcoming events in the next 2 weeks and limit the results to 18: $events = $pages->find("template=event, end_date>=today, start_date<today +2 weeks, sort=-start_date, limit=18"); Bonus 2: find all past events: $events = $pages->find("template=event, end_date<today, sort=-start_date"); Good luck.
  13. Hey Christophe, I built this (cultural) event site with PW, and it might be of interest to you: http://www.spainculture.us/ Think carefully about the initial structure that makes most sense for your project. In my case, since we're talking about events organized in different cities around the U.S., I chose to build the tree this way: This "geographical structure" is very intuitive for editors as they're able to quickly add or edit events by looking for the city where the event takes place. Much faster than having all events under one place, e.g. a page named "Events". When editing or creating an event, editors can choose categories (architecture, culinary arts, etc) from a simple pull-down menu: This menu is a page field, like Diogo recommended above, which references the categories that are organized as such in the tree: I hope this helps you understand the power and simplicity of page system in Processwire.
  14. This article summarizes the current concensus: http://blog.adrianroselli.com/2013/12/the-truth-about-truth-about-multiple-h1.html?m=1 In a word, don't use multiple H1.
  15. Celfred, I noticed the same thing yesterday when testing the module. It looks to me that it's a bug. Ryan?
  16. Christian, thanks a lot for this very useful template! The JSON output seems to skip my image field though. My field is named "imagenes", maximum files allowed is set to "0" (not limit), formatted value to "automatic", and the Inputield Type to "Image". Is there something that I need to change? Edit: I see that the function "getImageFieldInfo" only takes into account a single image. Edit 2: I've managed to get it to show various images by changing lines 175 to 178 to: foreach ($images as $key => $image) { $data['data'][$trim_field_name]['path'][$key] = $host . $url . $id . "/" . $image['data']; } (Note: I've removed the description field as I don't need it).
  17. I'm trying to access subfields like Brent here, but I don't understand how you're supposed to do it. For example, something like parent.title=MyTitle does not seem to work. Nor can I access page references like number_of_stars.title=1 (one star, two stars, etc. : options stored as pages somewhere else in the tree). Can anyone help me out?
  18. Fixed on November 23, 2014. Thanks Ryan!
  19. Google Calendar API v2 was depreciated on November 17, 2014. I can't seem get the "full" xml feed anymore, which is required for the module to work as Ryan indicates in the first post, and I'm guessing it's because an API Key is now required.
  20. Thanks, Soma and Interrobang. I ended up using Soma's hook in the _init.php file, and it works great.
  21. Any idea how to get the field label in a multi-language environment? "$player->fields->get("playername")->label" seems to retrieve only the label for the default language...
  22. After upgrading to 2.5.8, I can't see the option anymore to edit an unpublished page, then save and keep it unpublished. The only option is simply "Publish." Is there something new I need to configure?
×
×
  • Create New...