Jump to content

jacmaes

Members
  • Posts

    293
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by jacmaes

  1. 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".
  2. @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.
  3. 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.
  4. 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.
  5. 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?
  6. Thanks for this. It's going to be very useful.
  7. 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.
  8. 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.
  9. 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".
  10. 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.
  11. 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.
  12. 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.
  13. Celfred, I noticed the same thing yesterday when testing the module. It looks to me that it's a bug. Ryan?
  14. 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).
  15. 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?
  16. Fixed on November 23, 2014. Thanks Ryan!
  17. 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.
  18. Thanks, Soma and Interrobang. I ended up using Soma's hook in the _init.php file, and it works great.
  19. 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...
  20. 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?
  21. Yes, I know you can put a module together to achieve something similar, but (1) it's much faster and easier to do it with Lister Pro, (2) it's more flexible, and (3) I do want to support the development of Processwire, which has become an indispensable tool for me, and a pleasure to use. I don't really need other pro modules such as Form Builder (it's not too hard to build forms from the API) o the Pro Fields (regular fields are sufficient most of the time), but they do add simplicity, convenience and enhance productivity -- which is one reason why I bought these other two modules. Another important reason is because I'd like Ryan to keep dedicating as much time as possible to PW development, and these are just small tokens of my gratitude to his dedication, amazing work and constant willingness to help others. And finally, I'll take this opportunity to thank the other forum moderators and contributors who keep this community so alive and friendly, and keep beefing up PW funcionality with new modules. In any case, LostKobrakai, I know you meant to highlight PW's flexibility (you can build your own modules to add funcionality), and not discourage people from buying the Pro modules.
  22. Until I bought Lister Pro, I did not fully realize how much it could increase your productivity. Working with the tree (or using the built-in search engine for quicker access) is intuitive, and I'd say fast enough in most cases, but it's a one-size-fits-all solution. With the tree, there's no easy way to group pages under different parents, or search for pages that fit one or more criteria and view and edit them quickly. Since Lister Pro is a customizable search engine, you can target with precision which criteria you'd like to use to return the pages you'd like to view and/or edit. In a few clicks, I can set up my own results in a easy-to-scan table view. You can save these results, and they show up under the "Pages" dropdown menu for quick access, which for me wasn't clear from Ryan's description of the plugin. This is incredibly powerful. Let's take an example. Let's say I run an Website showing cultural events across the US, organized by cities (New York, Washington, DC, etc.) and categories (Music, Performing arts, etc.). I have various editors. One of them would like to view only the events he's been assigned to, e.g. all music events created this year in Washington, DC. I can easily create a customizable admin view for him: The results look like this (the columns can be adjusted to your needs of course, and the editor can also filter the results even further): The editor has super quick access to his own "admin view" from here (I've called this page "Recent events" in this example): I can go ahead and create various views for each of my editors. If I work alone, I can do the same to gain quick create, view and/or edit access to whatever views I choose. I hope you can see the power of this module, and I'm not even talking about the included actions that let you manipulate the results, such as email users, exporting to CVS (very useful to export results for offline data analysis in Excel), etc.
×
×
  • Create New...