• Content count

  • Joined

  • Last visited

Community Reputation

56 Excellent

About oma

  • Rank
    Hero Member

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

4,027 profile views
  1. Is there a way, without editing the module itself, to change the font sizes set in the CKEditor for h1, h2, h3 etc. They're just too big in proportion to the rest of the text. I'd like to be able to do it without amending the module in case of any updates. Any thoughts?
  2. It may have to do with having AJAX set on the repeater.
  3. Hmm it's okay actually because I can just use the first row as the thead and then the rest can follow and I can style the first row accordingly. However upon adding the table to a repeater, when I try to add a row... it doesn't work. It's hashed in the URL when clicking so I'm guessing some JS isn't firing/is missing because it's in a repeater?
  4. I'm looking at using ProFields Table for a specific layout. An attached image as an example. The client should be able to add as many tables as they want, and as many table rows with the option to change the thead titles. My thought was to put a table in a repeater field and then use ProFields Table. This is generally okay but the only issue is that the table headers (theads) aren't fixed and need to be changed also. Any thoughts on changing the text for these? Thanks!
  5. Is there any documentation on turning an array into a WireArray? ->makeNew() doesn’t accept arrays.
  6. Thanks for this. I didn't know you convert it into a WireArray tbh. This is what I currently have, which seems okay, but when I come to thinking about pagination... not sure how that'll work (so maybe WireArray is best if I can work it out). I haven't included my Instagram API fetch stuff here... just the variable. $news = $pages->find('parent=/news/, sort=-created, limit=16')->explode(['id', 'created', 'title', 'url', 'images', 'summary_text']); $instagrams = $instagram->getInstagramRecent(); $items = array_merge($news, $instagrams['data']); bd($items); foreach ($items as $key => $item) { if (isset($item['user']['id']) && $item['user']['id'] == '1907645821') { // Instagram post $sort[$key] = $item['caption']['created_time']; } else { // News article $sort[$key] = $item['created']; } } array_multisort($sort, SORT_DESC, $items); bd($items); if (isset($item['user']['id']) && $item['user']['id'] == '1907645821') { // Instagram post $type = 'Instagram'; $title = NULL; $image = $item['images']['standard_resolution']['url']; $text = '<p class="instagram">' . $item['caption']['text'] . '</p>'; $link = $item['link']; } else { // News article $type = 'News'; $title = $item['title']; foreach($item['images'] as $img) { $itemImage = $img->url; break; } $image = $itemImage; $text = $item['summary_text']; $link = $item['url']; }
  7. Very nice! I guess this is the best way, right? PW API offers nothing related? Thank you!
  8. Is it possible to combine a pageArray with a regular PHP array? I'm returning a list of news items from PW, which is fine, but I'm also returning Instagram and Twitter posts, from API endpoint URLs (which is JSON but I have converted to PHP arrays) and I'd like to then ultimately import them all into one big array then sort by a custom date field (that I'll build and store per loop) so you get a list of news items, Instagram posts and tweets all sorted by date. Any thoughts on importing a pageArray and a regular PHP array? Should I be using $a->getArray(); then combining them? Thanks!
  9. I guess I could use $image->removeVariations() or even
  10. This is all super helpful, Robin. I think that imageSizerOption setup is working now. Hero. Thank you. As I'd need to re-upload all these images again to get the new options... is there a good way to do this via the API?
  11. Another example. The blacks are very pixelated and fuzzy... even after setting sharpening to none, quality to 100 and default gamma to -1
  12. If you click on these images you'll see the difference. I'm also using this within my template: $image = $images->size(1600,800, ['upscaling' => true, 'cropping' => 'center', 'quality' => 100, 'sharpening' => 'none', 'defaultGamma' => -1]); // 2:1 I have now added the below to my config.php file instead of the above and reuploaded the image but it still shows the same quality/colour loss on the resized image. $config->imageSizerOptions['sharpening'] = 'none'; $config->imageSizerOptions['quality'] = 100; $config->imageSizerOptions['defaultGamma'] = -1;
  13. Sorry to bring this back up but I'm still fairly confused at how to resolve this. See attached two images. One is the original uploaded and one is the resized version. I've checked the colour profile and it seems to be sRGB. I'm basically hoping that resized images are resized only (cropped) and no colour changes happen. Any further thoughts?
  14. @Robin S This is a GREAT explanation and is super appreciated. I totally get it... and now understand that some things don't work with in-memory selectors (modifying a PageFinder, in theory) – again I really appreciate your explanation.
  15. Thanks again, Robin. I thought, based on this page,, that I was just using the OR groups inside a find() Page/WireArray? Or am I getting confused? Why would it work when doing one find() and not find()->find() for example?