Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/01/2012 in all areas

  1. Or just use page reference field (instead of select module) and unleash the demon!
    3 points
  2. Here's a little preview of the 'Save Page' settings screen where you can configure forms to publish to pages.
    3 points
  3. This is what I was referring to. But anyhow, I decided to go the more adventurous route and learn how to build an Inputfield-type - I haven't attempted to use my icon-selector with a Field on a Template yet, but my hope is that the icon-selector and preset color-picker would be useful for more than just the TemplateDecorator itself. To me, this is one of the most important values in ProcessWire: the idea of building small, reusable features - as opposed to large, self-contained concepts... I believe this is the core reason why platforms such as Drupal or WordPress need hundreds of similar modules for the same things, to satisfy everyone - when you build out an entire concept, it's set in stone, and it doesn't fit everyone's needs, so every shop-module (for example) addresses a slightly different set of needs. When we provide the building-block features instead of self-contained concepts, this enables the developer to rapidly apply those features to solution-specific concepts. The module-concept in most other CMS suffer (by design) from what I've been calling "conceptual lock-in" for some years now - PW doesn't suffer from this, and as such will hopefully see smaller numbers of more lightweight and generic modules, from which developers can design the concepts. (sorry for side-tracking, but I had to put that in writing!)
    2 points
  4. Some 2.3 updates now present on the ProcessWire dev branch at GitHub: New session handling features ProcessWire now supports alternate session handlers and includes a new module that provides for managing them in the database, rather than the file system. To enable, you just install the SessionHandlerDB module, and that takes over as the session handler. The advantage of a database session handler is that it can potentially be more secure in some shared hosting situations. It also enables ProcessWire to report on active sessions in the admin, so the new handler also adds a "Sessions" option to your "Setup" menu that gives you a table showing everyone browsing your site and where they are. I plan to expand upon this a bit more though. The new session handling interface also makes it possible for you to add modules that would move session handling to something like memcache, Amazon Dynamo DB, or really anywhere. New password security updates ProcessWire now uses Blowfish hashing for passwords when you are on PHP 5.3 or newer. If your database were to ever be compromised, this provides better protection from someone attempting to reverse engineer passwords from the hashes. Beyond blowfish hashing, we still use double salting as before (with one salt on the file system, and other unique to each user in the database). For existing accounts, the blowfish hash doesn't actually take effect until you change your password, so it'll be a gradual transition for many of us. Though the admin does give you a reminder every now and then. However, once you go blowfish, you can't go back, so don't develop a site in PHP 5.3 and then launch it to a PHP 5.2 server, unless you don't mind changing your password(s). And more… Addition of the WireHttp class, which provides ability to perform POST requests from the API. ImageSizer now uses better image type detection rather than image extension detection (via @teppo) WireArray now supports ability to sort by multiple fields at once as well as implements 'limit' and 'start' in selectors (via @nik) Updated to latest jQuery and jQuery UI (via @mindplay-dk) Removal of some big bottlenecks from FieldtypeRepeater (via @nik) Transparent GIFs are now supported during resizes (via @mrx) Support for 'min' and 'max' with integer and float fields Support for HTML5 'number' type with integer and float fields Support for HTML5 'required' attribute with many fields The datepicker in the datetime fieldtype now supports ability to specify selectable year range Several other updates in the commit log.
    2 points
  5. Given a Google Calendar XML feed URL, this module will pull it, cache it, and let you foreach() it or render it. Download at: https://github.com/r.../MarkupLoadGCal USAGE The MarkupLoadRSS module is used from your template files. To use it, you get a copy of the module, tell it what URL to load from (with the load method), and then execute a find() query with a selector string. It works basically the same as a $pages->find("selector string"). <?php $cal = $modules->get("MarkupLoadGCal"); $cal->load('http://calendar XML feed'); $items = $cal->find('from=2011-12-1, to=2011-12-31'); foreach($items as $item) echo "<p>{$item->title}</p>"; To get a Google calendar URL, you would go into your (or another) calendar on Google and click to the calendar's settings. At the bottom of the screen, you will see a section called "Calendar Address" with XML, ICAL, and HTML. Copy the XML address, and use that with this module. If you just want one to test with, use the one from my examples below: http://www.google.co...com/public/full Note: you must use the 'full' not 'basic' calendar from Google Calendar. You can identify if you've got the right one because it will end with 'full' rather than 'basic', as in the URL above. Selector Properties The selector properties you may provide to find() are: from: Starting date in any common date/time format (or unix timestamp). to: Ending date in any common date/time format (or unix timestamp). keywords: Keyword(s) to search for in the Google calendar events. limit: Max number of items to load (default = 100). sort: May be 'date', '-date', 'modified' or '-modified'. html: Set to '0' if you don't want the event description in HTML. The find() method will return the found items. You can then foreach() these items to generate your output. A render() method is also included with the items which provides some default output, if you want it. Calendar Item (Event) Properties Each calendar item has the following properties: title: The title of the event description: Detailed description of the event (in HTML, unless disabled) location: Where the event will take place author: Author of this item from: Timestamp of when the event begins to: Timestamp of when the event ends dateFrom: Formatted date string of when the event begins dateTo: Formatted date string of when the event ends See the module file for additional configuration options. EXAMPLES Example #1: Simplest example <?php // get the calendar module $cal = $modules->get("MarkupLoadGCal"); // set the feed URL: may be any google calendar XML feed URL $cal->load('http://www.google.com/calendar/feeds/3icgo6ucgvsf6bi5orld9moqqc%40group.calendar.google.com/public/full'); // find all items for December, 2011 $items = $cal->find('from=2011-12-1, to=2011-12-31'); // render items using built-in rendering echo $items->render(); Example #2: Rendering your own items <?php $cal = $modules->get("MarkupLoadGCal"); $cal->load('http://www.google.com/calendar/feeds/3icgo6ucgvsf6bi5orld9moqqc%40group.calendar.google.com/public/full'); $items = $cal->find('from=2011-12-1, to=2011-12-31'); foreach($items as $item) { echo " <h2>{$item->title}</h2> <p> <b>Date From:</b> {$item->dateFrom} (Timestamp: {$item->from}) <br /> <b>Date To:</b> {$item->dateTo} (Timestamp: {$item->to}) <br /> <b>Location:</b> {$item->location} <br /> <b>Author:</b> {$item->author} </p> {$item->description} "; } Example #3: Finding Keywords <?php $cal = $modules->get("MarkupLoadGCal"); $cal->load('http://www.google.com/calendar/feeds/3icgo6ucgvsf6bi5orld9moqqc%40group.calendar.google.com/public/full'); $items = $cal->find("from=Aug 1 2011, to=Dec 1 2011, keywords=Eddie Owen"); echo $items->render(); ADDITIONAL INFO Options See the module's class file (MarkupLoadGCal) for a description of all options in the comments of the $options and $markup arrays at the top of the class file. Handling Errors If an error occurred when loading the feed, the $cal will have an 'error' property populated with a message of what error occurred: <?php $items = $cal->find("..."); if(empty($items) && $cal->error) { // an error occurred echo "Error! " . $cal->error; } $items will be blank if an error occurs, but it will always be of the same type, so it's up to you whether you want to detect errors. If you don't, then your calendar output will just indicate that nothing was found. Cache By default your calendar queries are cached for an hour. You can change the cache time by setting the $cal->cache property to the number of seconds you want it to cache. --- Edit: Added note that you must use the 'full' google calendar feed rather than the 'basic' one.
    1 point
  6. Packt Publishing is offering a free eBook for those that register or sign in during today http://www.packtpub.com/
    1 point
  7. Is it possible to make double password check?
    1 point
  8. OK - right, this is in fact the select module by Hani, (got so used to installing that,forgot it was a separate module..); But i can confirm that the option/value feature of this module doesn't work for me, or if it does, the code might need to be updated to allow for changes to the list after the initial setup; It works fine if you don't have the option/value pair; I guess i'm going to start using apeisa's suggestion, since it will enable the end users to add options without having to go in and edit a field; I usually have a hidden 'settings' page with the global site settings, so i have seen it suggested elsewhere in the forum to setup a child page within that settings page, and below that define dropdown options; so in my case i would have a child page of settings called 'language choices' and then each of those could contain the option/value pair... -marc
    1 point
  9. Form Builder markup is going to look verbose relative to a singular-purpose form you'd create yourself. But verbose is not the same as messy -- it's actually very clean and optimized relative to the context. I've spent a good deal of time making sure that is so. That context includes everything from simple contact forms to giant application forms, while supporting nearly any kind of input type (known and unknown), in any possible layout, with any level of nesting. That's a whole lot of flexibility. Think of a singular-purpose form as a propeller and a Form Builder form as a jet engine. Both are well optimized for their context. One is more complex than the other, but will take you much further and faster.
    1 point
  10. When switching to language en, the search form is not changing it's action url. <form id='search_form' action='/pesquisa/' method='get'> <input type='text' name='q' id='search_query' value='' /> <button type='submit' id='search_submit'>Search</button> </form> When I manually enter http://maran.pt/en/search/?q=locker it seems to work.
    1 point
  11. There's no select where you can define option in PW. I think you're referring to the select module by Hani: Please post reports and issues there. Thanks.
    1 point
  12. Here all all the parameters https://developers.google.com/youtube/player_parameters#Parameters
    1 point
  13. Hey, I once saw a post about some extreme tests with processwire like more than 100,000 pages etc. But I can't find it anymore so my questions are: - how fast is processwire with like 1,000,000 pages - is it possible to split it on two servers (when the traffic should be to huge for one) - ... I'm working on a network about music videos (@renobird knows what I'm talking about ) and it might get really huge... / Nico
    1 point
  14. This is the embed code from youtube: <iframe width="560" height="315" src="https://www.youtube.com/embed/YsCpDaSooWA?rel=0" frameborder="0" allowfullscreen></iframe> So it does go into url in iFrame tag. I think only other relevant option might be privacy mode. This is the embed code for privacy mode and no for related videos combined: <iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/YsCpDaSooWA?rel=0" frameborder="0" allowfullscreen></iframe>
    1 point
  15. Wooot? Hehe, this module was one of my first helpers. Couldn't without it and I think it saved me hours already.
    1 point
×
×
  • Create New...