Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


cb2004 last won the day on August 27 2018

cb2004 had the most liked content!

Community Reputation

173 Excellent

About cb2004

  • Rank
    Sr. Member
  • Birthday 04/20/1982

Profile Information

  • Gender
  • Location

Recent Profile Visitors

3,417 profile views
  1. Never commented on how this makes every default install I have, love it.
  2. Exactly, I am always on the latest dev version whenever I need to work on a site as it is so easy to update, and it is always stable in my eyes.
  3. Same here. Any chance of a fix @Wanze. I use this module a lot.
  4. My bad this time, <property> contains more data so I wouldn't be able to just use children()
  5. Here is some example XML <?xml version="1.0" encoding="utf-8"?> <branches> <branch> <properties> <property> <bullet1></bullet1> <bullet2></bullet2> <bullet3></bullet3> <bullet4></bullet4> <bullet5></bullet5> <bullet6></bullet6> <bullet7></bullet7> <bullet8></bullet8> <bullet9></bullet9> <bullet10></bullet10> <bullet11></bullet11> <bullet12></bullet12> <bullet13></bullet13> <bullet14></bullet14> <bullet15></bullet15> <bullet16></bullet16> <bullet17></bullet17> <bullet18></bullet18> <bullet19></bullet19> <bullet20></bullet20> </property> </properties> </branch> </branches> Without testing your code would just increment the counter in every property, and not every bullet. I am doing each one per line for now, but still wondering how to get this down to a few lines.
  6. Hi all, I think I have been looking at this too long and I am sure it is so simple. I am reading an XML file and it contains bullet points 1 to 20. Here is example code: foreach($xml->branches->branch->properties->property as $property) { if($property->bullet1 != '') $bullets .= "{$property->bullet1}\n"; } That would read the first bullet point, and then we have $property->bullet2 etc etc. Obviously I could list all 20 like that and just go with $p->myField = $bullets but how would I make this into less code. I was thinking of a foreach within the above foreach foreach(range(1, 20) as $bullet) { $li = '$property->bullet' . $bullet; $bullets .= $li; } And lots of variations of but thats drawing a blank. Cheers as always people.
  7. I have a scenario where I would like to lock down a PDF download, but still display an image of the PDF. I can display entries with check_access=0 but is there a way to use this on an image field?
  8. I am terribly bad at Ajax, I don't mind admitting it. Where would I start with picking a select in the form and then loading the children in another select on the form until there are no more children. @kongondo is this something https://processwireshop.pw/plugins/dynamic-selects/ can do? If yes sign me up.
  9. I wouldn't explore multi-site anymore. You could spit out a feed from site A and read it on site B. You could even import them into site B. I am on mobile right now, but we do this quite regularly so could post an example when I am in the office. RSS, XML, lots of options.
  10. Could this be related? This is an image field set to have just 1 file. Will try getUnformatted when I get a mo.
  11. So I have this working using: $session->redirect($page->file->url); However I tried using $http->sendfile and $files->send as I thought they would be better but they didn't work. Any thoughts?
  12. Hey @Macrura, so glad you are taking this on. Agree it is stable, just needs a little love. In the fork made by @gebeer this supports the regions US and EU, would be great if you could get this into your fork.
  13. I am coming up against a bug where I cant make use of the functionality 'Name format for children', and it doesn't seem like a hook is possible to save the name: $wire->addHookBefore('Pages::setupNew', function(HookEvent $e) { $page = $e->arguments(0); if($this->input->parent_id === '1') { $page->name = 'some-name'; } }); I have tried many solutions from the forums, nothing is achieving what I would like, even for example if I am trying it on the home page like the code above. Any help would be much appreciated.
  • Create New...