Jump to content

chrizz

Members
  • Content Count

    111
  • Joined

  • Last visited

Community Reputation

57 Excellent

About chrizz

  • Rank
    Sr. Member

Profile Information

  • Gender
    Male
  • Location
    Berlin, Germany

Recent Profile Visitors

3,746 profile views
  1. as discussed yesterday this wasn't the last Wireabend-Bier (perfect wording @marcus!) in Berlin. I am looking forward to meet more of you in the future with another beer πŸ™‚
  2. what about the others Berliners here: @blickwerker, @Bron, @ceberlin, @Dave Damage, @dlen, @fermion, @Jan Fromm, @masslevel, @Mitko, @neophron, @Neue Rituale, @Nico Knoll, @operat, @ottogal, @owzim, @Philipp Nowinski, @RSA, @sisterlarao, @skovar, @skries πŸ™‚
  3. @marcus, is Monday still the plan for the meetup? Looks as if we are the only ones for now though, or do you know from others planning to join us?
  4. @marcus, yep. that works and I'd available for beers πŸ™‚
  5. haha. obviously.... the wrong question... yes πŸ€¦β€β™‚οΈ Thanks a lot for pointing me into the right direction
  6. @bernhard, thats what I did as well - but then I ran into trouble because I needed to access the same class from a different module (autoloaded as well). And then it became tricky because I don't know any way to control the order of autoloading πŸ˜‰
  7. I have a module (autoload: true) which uses a custom class. If it would be only relevant for templates, _init.php would be the way to go but due to autoload functionality I need the class also to be availabel in the backend - this is where _init.php stops working. If the class is declared in config.php it works fine - but is this the recommended way or is there a better solution for this?
  8. I am running into the same issue. Unfortunately I wasn't able to reproduce it isolated, but it happens constantly in my current setup during debugging. Has this issue been solved for you @FrancisChung or is it still happening for you as well?
  9. thanks for bringing this up. To me this means: a cronjob will always use the first defined host, as there's no $_SERVER variable available, aye? Unless for sure the cronjob is called via http (e.g. "curl https:host.../") Thanks for your feedback - helps a lot πŸ™‚
  10. I was wondering which logic is behind the httpUrl method when multiple hosts are availble? My config says $config->httpHosts = array('api.local', 'www.api.local', '10.0.1.10'); $page->httpUrl returns always api.local. In the current setup 10.0.1.10 would be appreciated. Is there any logic behind this or is just the first host taken for the httpUrl() call? Checking the code brings up this comment But: How is this runtime valued defined when I use this method in a hook?
  11. whoop. Perfect! Thanks for that link πŸ™‚
  12. I already checked the CaptainHook cheatsheet - only the httpUrl method for PageFiles is hookable. It looks as if hooking the counterpart for pages is not possible πŸ˜• I currently use httpUrl at many places in the code but the URLs need to be rewritten. When hooks are not appropriate: Is there a way to add a custom method for all pages (e.g. $page->myCustomPath()) which actually returns the URL I need?
  13. nahhh.... I found the issue. If I would have followed @LostKobrakai advice: serialize can cause unforseen issues. The above example works fine, but actually (and I didn't test this yesterday) I (un-)serialize the array before replacing one item. When I use the example and serialize WireArray before getting and replacing the element it simply does nothing but it shows the old item I guess I have to go with the "use pages for every item" solution which is much less error prone. thanks @kongondo for testing this
  14. I have a WireArray which holds objects of type WireData. I use WireArray because I would like to utilize the capabilities of using selectors to find items. My current use case is to find one specific item, modify one value and put it back to the WireArray. The code (simplified) looks like this: // fill the array $arr = new WireArray(); $item1 = new WireData(); $item1->text = "lorem ipsum"; $item1->identifier = "123"; $arr->add($item1); $item2 = new WireData(); $item2->text = "lorem ipsum"; $item2->identifier = "456"; $arr->add($item2); $item3 = new WireData(); $item3->text = "lorem ipsum"; $item3->identifier = "789"; $arr->add($item3); // use the array $myItem = $arr->get("identifier=456"); $myItem->text = "some other text"; // update the item in the array ? Is there any trick to store the modified item in the array again? Removing the old item does not work because I don't know how to retrieve the key of $myItem Adding the item just duplicates it Replace the old item does not work - it keeps the old item Any help is appreciated! I hope that there is a solution - otherwise I have to replace the whole construct with single pages (which would be overkill) Thanks a lot!
  15. thanks for your input. I think serializing is the way to go for now. The closest pw-way would be probably to create new templates holding all the data, but for now this would be overkill πŸ˜‰
Γ—
Γ—
  • Create New...