Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

35 Excellent

About creativejay

  • Rank
    Distinguished Member

Contact Methods

  • Website URL

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

3,386 profile views
  1. Thank you, Pixrael! That got me to the solution! $loadLogo = $getKV->exhibitor_logo; $logoresize = $loadLogo->pim2Load('ig')->canvas(1600,895,array(0, 0, 0, 0),'c',0)->setOutputFormat("png")->pimSave()->httpUrl; $exlogo = $logoresize; $filename = $getKV->name . "_instagram.png"; $background = "https://domain.com/site/templates/images/Exhibitor-Graphic-BG-Platinum.jpg"; $logo = file_get_contents("$exlogo"); $bg = file_get_contents("$background"); $im = new \Imagick(); $im->readImageBlob($bg); $im2 = new \Imagick(); $im2->readImageBlob($logo); $im->compositeImage($im2, \Imagick::COMPOSITE_ATOP, 100, 350); $im->setImageFormat("png24"); $im->scaleImage(1024, 1024, true); $im->writeImage("../downloads/$filename"); $im->clear(); $im->destroy(); $file = "https://domain.com/site/downloads/$filename"; echo "<img src='$file' alt='$getKV->name' />"; Now I just need to bring in the code to start with a different background graphic based on the order history in Padloper. In THEORY, I'm almost there! 😅 Thanks so much for your help!
  2. header("Content-Type: image/jpg"); $im = new \Imagick(); $im->readImageBlob("https://www.ketocon.org/site/assets/files/1130/ketovangelist-lockup-w-tag_glc-lg.1500x0.png"); Still getting a blank square. (doesn't work if I put 'png' for the header, either, or try the other half of the image I'm trying to composite, which is a jpg) Here's my imagick install (from phpinfo):
  3. Thanks. This displays an empty image object (which renders as a small empty square). 😩 I also tried changing the source images in $ex_logo and $background from path to url but that didn't have a positive effect.
  4. Ah, thank you, that corrects the path. Both image variable paths now output starting from the server root. if($getKV->exhibitor_logo->width >= $getKV->exhibitor_logo->height) { $logoresize = $getKV->exhibitor_logo->width(1500); } else { $logoresize = $getKV->exhibitor_logo->height(500); } $ex_logo = $logoresize->path . $logoresize->filename; $background = $config->path('templates') . "images/Exhibitor-Graphic-BG-Silver.jpg"; $imagick = new \Imagick($background); $imagick2 = new \Imagick($ex_logo); $imagick->compositeImage($imagick2, \Imagick::COMPOSITE_ATOP, 0, 0); $imagick->setImageFormat('jpg'); header("Content-Type: image/jpg"); echo $imagick->getImageBlob(); The above seems as though it should work, but the page silently fails (no logs, no content). Is this the bug I've seen people discuss where it times out before the allotted time when there's more than one Imagick thread? Or could something else be causing it?
  5. I thought this would be simple. I want to make a composite image from a background I provide and a logo (jpg or png) provided by a user, where the logo is resized and placed (retaining its transparency) on top of the background. Being completely unfamiliar with the API of Imagick, I can't even get it off the ground. But it seems as though this should be fairly straightforward: $exhibitors = $users->find("roles=exhibitor, limit=1"); foreach($exhibitors as $getKV) { $ex_logo = $getKV->exhibitor_logo->path . $getKV->exhibitor_logo->filename; $background = $config->urls->templates . "images/Exhibitor-Graphic-BG-Silver.jpg"; $imagick = new \Imagick($background); $imagick2 = new \Imagick($ex_logo); $imagick1->compositeImage($imagick2, $type, 0, 0); $imagick1->setImageFormat('jpg'); $image->setImageFormat("jpg"); header("Content-Type: image/jpg"); echo $imagick->getImageBlob(); } However it results in: I realize not everything I want to do (including the resize) is covered in the script above, but first we need the script to even find the images, and that is failing. The examples I find for Imagick often place their source images in the same directory, which doesn't help me figure out what's wrong with the formatting of my path. I have already tried using static strings for $imagick and $imagick2, starting from the server's user directory and starting from the public_html directory, with the same result. Has anyone used Imagick for composite images, who can see what I'm doing wrong here? Is there a better way to go about this? Thanks!
  6. Yes that’s a very good argument for switching to that method!
  7. Thank you all for helping me with this! the culprit has been found. An “<a>” that should have been an “</a>” further up the page (which must have been there for months uncaught). Strange that today revealed symptoms of it for the first time! I feel silly, but I’m glad that’s over! thanks again!
  8. Thanks for this! I've tried it now, and still the same problem. I've also viewed the page in both Safari and Chrome with the same effect.
  9. Yes, of course! As I said, when I view the Page Source in my browser, it looks as it should. It's only in the Inspect Element that I see the unwanted <a> tags. if($user->isSuperuser()) { $speakblock = ''; $speakers = $users->find("roles=speaker, sort=created, speaker_portrait!=null, speaker_topics.event_picker=$page, limit=4"); $s = 0; foreach($speakers as $speaker){ $s++; $portrait = null; $portrait = $speaker->speaker_portrait->first(); $simg = $portrait->size(267,358)->url; $simgsrc = "<img src='" . $simg . "' alt='{$speaker->pad_firstname} {$speaker->pad_lastname}' width=\"267\" height=\"358\"/>"; $topicfield = $speaker->speaker_topics->find("event_picker=$page"); // There is now a template for schedules within each event that draws from time slots defined under the main site structure. // Figure out where the speaker is scheduled to speak and add that to the entry-meta area. $speakblock .= " <div class=\"col-md-6 col-sm-6 col-xs-12\"> <article class=\"type-post\"> <div class=\"col-md-6 col-sm-6 col-xs-6\"> <div class=\"entry-cover\"> <a href=\"schedule/speakers/\">{$simgsrc}</a> </div> </div> <div class=\"col-md-6 col-sm-6 col-xs-6\"> <div class=\"entry-meta\"> <div class=\"post-date\"> <a href=\"#\" title=\"\"><i class=\"fa fa-calendar\" aria-hidden=\"true\"></i><span>10 Dec, 2015 </span></a> </div> <div class=\"post-admin\"> <i class=\"fa fa-user\" aria-hidden=\"true\"></i><span>by</span><a href=\"#\" title=\"Admin\">Admin</a> </div> <div class=\"post-like\"> <a href=\"#\" title=\"Likes\"><i class=\"fa fa-heart-o\" aria-hidden=\"true\"></i></a><span>03 Likes</span> </div> </div> <div class=\"entry-title\"> <a href=\"schedule/speakers/\" title=\"Topic\">"; foreach ($topicfield as $topic){ $speakblock .= "<h3>" . $topic->presentation_topic_1 . "</h3>"; } $speakblock .= "</a> </div> <div class=\"entry-content\"> <p>{$speaker->speaker_bio}</p> </div> <a href=\"schedule/speakers/\" class=\"learn-more\" title=\"See All Speakers\">See All Speakers</a> </div> </article> </div>"; if ($s%2 == 0) { $speakblock .= "</div> <div class=\"row\"> "; } } if($s > 0){ echo "<!-- Latest Speakers --> <div class=\"container-fluid latest-blog latest-blog-section no-padding\"> <div class=\"section-padding\"></div> <div class=\"container\"> <div class=\"section-header\"> <h3>New Speakers Announced!</h3> <span>Experts and Enthusiasts of a Keto Lifestyle</span> </div> <div class=\"row\">"; echo $speakblock; echo "</div></div> <div class=\"section-padding\"></div> </div> <!-- Latest Speakers /- -->"; } }
  10. I don't even know where to begin with this plea for help. Is this a PWire issue? Or just CSS/js? I have no idea. I guess I'm looking for help pinpointing suspects for this strange behavior. I have a block of markup with some API mixed in, but nothing that should result in this. My "View Source" when viewing the page is correct, but when I inspect element, I found these empty "<a> </a>" tags that are being inserted into just the first instance of a foreach loop. If I repeat the same code in the same loop (double-output per $item), only the first is affected. See all those <a> tags? The output should be: I checked the css files that Inspect Element says are interacting with this output, but I've found nothing. I turned off my css calls in the header one by one, and my javascript calls, but I can't pinpoint the problem. My first suspect was the EmailObfuscation module but deactivating it/debug-moding it/putting it on manual/etc. had no effect. So if this were you, how would you go about locating the source of the problem? I'm hoping one of you has seen this before and knows what my problem is right away. 😉
  11. Just that the site will need to go live before PadLoper2 is ready. We sell tickets to an annual event, so if 2021's event sales (which launch immediately after the event in 2020) could be on the new system, I could set it up within the same site. Sounds like there'll be a lot of fiddling to changeover, so since there's a conflict I'll probably clone the site and work on it then switchover for 2021. Thanks! Really looking forward to the new version!
  12. @kongondo So excited to see you actively working on this (I had only been watching the private access forum, whoops!). I'm developing a shop with the current full release of PadLoper and will need to launch it without waiting for your new release. We run an annual event and backup/purge the previous years' data so I know I'll at least be able to work with PadLoper 2 eventually! When it does come out, will I be able to run the PadLoper 2 module alongside the current module or will that cause conflicts?
  13. Ah well that's embarrassing. I didn't read down that far because I thought the pipe was the solution I had to use.
  14. That did it, thank you OLSA! I haven't seen that style of selector before!
  15. Apologies if this has been covered. I tried a search but didn't hit the usecase I'm after. I currently have category pages listing their children products. Someone asked me to put a product in multiple categories, so I created a Page Reference field called prod_othercategories which lets a user pick multiple product category pages. When I try to output a list of products for a category page, I came around to the following selector: $pages->find("prod_othercategories|parent=$page, template=prod_series, sort=title, prod_status_pages!=1554|1559|1560|4242"); Only the first selector item is giving me trouble, but I'm including the entire string in case something is conflicting and I'm not realizing it. The output is currently only outputting matches for "parent" and ignoring prod_othercategories. I tried listing parent first in the selector but it had no effect. Appreciate if someone could help me with this! Thanks!
  • Create New...