Jump to content

Search the Community

Showing results for tags 'Filter'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

  1. hi, if i do $stuff = $page->all_list; $stuff->filter('parent.name!=thing') echo $stuff // subset of all_list, all good But, how do i get all_list again? (How do I reload all items) $stuff2 = $page->all_list; //returns filtered list = not good thanks =) J
  2. Hi, I have a number of pages with a template that has a repeater field (salida_fecha_repeater) which has 2 fields salida_fecha (type date) and salida_fecha_markup (float), when I show the pages, I have show the first available date, so I would not show dates before today. $salidas = $pages->get("/salida/")->children("limit=5,salida_fecha_repeater.salida_fecha>=".date("Y-m-d")); foreach($salidas AS $salida ) { $markup = $salida->salida_fecha_repeater->find("salida_fecha>=".date("Y-m-d"))->first(); # Test 1 #$markup = $salida->salida_fecha_repeater->first(); # Test 2 echo $salida->title." [".$salida->id."]"." | ".$markup->salida_fecha_markup."<br>"; } With # Test 1 returns nothing With # Test 2 returns the first record in the repeater does not always correspond. Thanks in advance Diego
  3. Hey Guys I got a very basic and hopefully simple question about Templates. I need to display all Pages with a special template (e.g. "location_category") in my Navigation. My solution now: $location_cat = $template->get("location_category"); foreach($location_cat as $lc) { echo"<li><a href="{$li->url}">{$lc->title}</a></li>"; } but this doesn't work. Anyone a solution?
  4. Hi, I want to process images being uploaded to PW by a client. Basically, making a sepia version of the images (with manual settings). I'm wondering: where's the best place/moment to implement this kind of process? Do you have any suggestions? FYI: I'm also using the cropping image tool by Antti Peisa. Here's my code. It loads the image, filters it and then overwrites it. $image = imagecreatefromjpeg('myimage.jpg'); // the original file imagefilter($image, IMG_FILTER_GRAYSCALE); imagefilter($image, IMG_FILTER_COLORIZE, 19, 18, 0); imagefilter($image, IMG_FILTER_BRIGHTNESS, -10); imagefilter($image, IMG_FILTER_CONTRAST, -2); imagejpeg($image, 'myimage.jpg'); // overwrites the original file. Thanks!
  5. While developing my dashboard module I came across a lot of difficulties when building a configurable filter for selecting pages for the last pages widget. Some things I discovered: "or" filter in native page fields didn't work. Fixed by Ryan in the last commit (Big thanks!): https://github.com/ryancramerdesign/ProcessWire/commit/70093241b2cbfe7cae79f28531c1a5df1a572169 It is was somehow difficult/impossible to use get('/')->find(...). This resulted in weird results where direct children were not in the results array. Should also be fixed (not tested). There is an undocumented selector "has_parent" which looks for a parent up to the root. Quite handy! So "has_parent!=2" removes all admin pages (except admin itself, add id!=2 for that) from a select (thanks @Soma!). The "user" which created the standard pages is not the superuser. This was the reason I doubted my results because I thought the superuser would have created everything. Me stupid. The inputFieldSubmitButton module generates a button which gets doubled in the admin head section. Couldn't find the place where this happens until I found out that this is generated with Javascript. Me stupid again. Important rule for selectors: First "has_parent" (if needed), second "include=all" (if needed), then the other filters. And in the end "sort" and then "limit". Not sure about this, but this works for me, so I have only one selector which seems to be correct. For example the latest pages for a specific user which are not admin pages (and no trash): has_parent!=2,id!=2|7,include=all,created_users_id|modified_users_id=41,sort=-modified,limit=10 Looks easy, but wasn't (at least for me)
×
×
  • Create New...