Jump to content

Crowdland Technology

Members
  • Content Count

    10
  • Joined

  • Last visited

Community Reputation

3 Neutral

About Crowdland Technology

  • Rank
    Jr. Member

Recent Profile Visitors

230 profile views
  1. @nbcommunication Great module congrats! Thank you for your efforts! 🙏 Some feedback. We managed to install and set-up the module with minimal hustle, great README! We set up the cache policy to one day, So the question is, when the user uploads a new media, will it take up to 24 hours to show on the site? We are still uncertain of that so any input greatly appreciated. Also what stroke a bit odd from the naming convention of the functions is that this // Get 8 images from a specified user $images = $instagram->getImages('username', 8); retrieves not only images information but also videos and albums. Nothing extreme here, just surprised for a moment when we didn't get ONLY images as with $videos = $instagram->getVideos('username', 3); So we switched to $instagram->getMedia('username', 12) And did a switch before outputting the image, which seems to work just fine, as the user has already videos and images online in a public account. <?php foreach ($insta_media as $media): switch($media->type) { case 'VIDEO': $media_src = $media->poster; break; default: $media_src = $media->src; break; } ?> Our tester user does not have albums so the question here is how we do set the image src case 'CAROUSEL_ALBUM'? is there an image assigned to the album? we need to get the image of the first child if not? (we are outputting in a custom Carousel if your wondering and we need an image per record) Thank you so much, Cheers, Elissavet from CrowdLand
  2. Hi all, greetings! OK another solution, adding here so I don't make the original post too long. So it turns out our client needs, except default language as Greek, also true Greek URLs not only "Greeklish" (as Greek in ascii chars was "baptized" before the UTF-8 wide adoption, from Greek+English). The great thing is that @ryan took care of that as shown here https://processwire.com/blog/posts/page-name-charset-utf8/ It requires ProcessWire 3.0.12+ as explained in the article, so if you're stuck with older versions for any reason, you can use the solution on the original post. We implemented already and it seems to work as expected on the testing server, still testing though. The Greek char mapping is absent from the Core still so adding here the steps we followed (retracing steps from above blog post, adding the Greek chars) 1. Add the following to your /site/config.php file. $config->pageNameCharset = 'UTF8'; $config->pageNameWhitelist = '-_.abcdefghijklmnopqrstuvwxyz0123456789æåäßöüđжхцчшщюяàáâèéëêěìíïîõòóôøùúûůñçčćďĺľńňŕřšťýžабвгдеёзийклмнопрстуфыэęąśłżźαάβγδεέζηήθιίϊκλμνξοόπρσςτυύφχψώω'; 2. In your .htaccess Locate directive 16a (near the bottom of the file) and comment it out by placing a # at the beginning of the line. What we are doing here is disabling the .htaccess limit on only allowing ASCII URLs to pass through to ProcessWire. Below the above directive (16a), you'll see directive 16b, which contains the alternative to the one you just commented out. Un-comment that directive by removing the # from the beginning of the line that it is on. This is what it looks like (minus the line wrapping): (ADDING HERE THE GREEK CHARS) RewriteCond %{REQUEST_URI} "^/~?[-_./a-zA-Z0-9æåäßöüđжхцчшщюяàáâèéëêěìíïîõòóôøùúûůñçčćďĺľńňŕřšťýžабвгдеёзийклмнопрстуфыэęąśłżźαάβγδεέζηήθιίϊκλμνξοόπρσςτυύφχψώω]*$" This is what the names and URLs look now: Cheers, Elissavet from Crowdland
  3. Hello everyone. I'm having some issues with Greek as default language, because the page name is not created automatically when enter the title of a new page. Any chance to add support for it? I found this char mapping that might help on line 188 https://github.com/elpak/Greeklish-permalink-wordpress/blob/master/greeklish-permalink/greeklish-permalinks.php Thank you! [EDIT]: A solution This was easier than we thought, we managed to find a solution by looking at how the sanitizer of page names works. This is how the URL looks with this solution: For ProcessWire 3+ (what we tested) find Modules > Core > InputfieldPageName and under the “Character Replacements” Field you can add the mapping you would like. The replacement is not in the Core yet, so adding it for reference. The mapping is adjusted and simplified, and it follows the official Transliteration found here: https://en.wikipedia.org/wiki/Romanization_of_Greek α=a ά=a β=b γ=g δ=d ε=e έ=e ζ=z η=i ή=i θ=th ι=i ί=i κ=k λ=l μ=m ν=n ξ=x ο=o ό=o π=p ρ=r σ=s ς=s τ=t υ=y ύ=y ϋ=y φ=f χ=ch ψ=ps ω=o ώ=o Cheers to @PWaddict for also supplying an unofficial mapping and pointing us to the right direction @ryan It would be great if this would be added to the Core sometime in the future and we can assist with further official mappings that are not present in this simplified version. Thank you! Cheers, Elissavet from CrowdLand
  4. Hello @horst me again with problems. Tried to enable webp support and get this error: "Error when trying to save the MemoryImage: we have no Targetfilename!In /site/assets/cache/FileCompiler/site/modules/PageImageManipulator/ImageManipulator02.class.php line 674" I'm using your implementation with the Strategy 1 from this post: https://processwire.com/blog/posts/webp-images-and-more/#strategy-1-automatically-delivering-webp-for-jpg-png-images Everything works until I need to create the image with the watermark. The code for the watermark is: $image_url = $prop->images->eq(0)->pim2Load("wtm",true)->height(480)->watermarkLogo($watermark, $position='center', $padding=2) ->pimSave()->url; Thank you!
  5. Hi! I just found a problem adding a watermar when 2 different images have the same name but the extensions are jpg and jpeg the result is only one image. I fixed it commenting lines 554 to 556 on ImageManipulator02.class.php file. Eg: "photo1.jpg" and "photo1.jpeg" foreach ($images as $img){ $img->pim2Load("wtmd", true)->height(480)->watermarkLogo($watermark, $position = 'center', $padding = 2)->pimSave()->httpUrl; } // The result is photo1.jpg
  6. Hi! I was trying RF3 with PW 3.0.159 and I got the error that it is not compatible. I fixed it changing the <> on the RockFinder3.module.php Lines 658 and 664 Also, the I tried a join with a single page reference field and only get the id field instead of "title", I used the fragment as base for the query: Thank you! $owners = $rockfinder ->find("template=person") ->addColumns(['title', 'age']) ->setName('owner'); // set name of target column $rockfinder ->find("template=cat") ->addColumns(['title', 'owner']) ->join($owners) ->dump();
  7. Hi! The is no problem in version 1.0.9. This is my code. if (isset($_POST['galeria'])) { // process form input $formGaleria->processInput($input->post); if (!count($formGaleria->getErrors())) { // if no error occured // create new page and save values $uploadpage = $pages->findOne("template=db-propiedad,id=$idPropiedad"); $uploadpage->of(false); $files = explode("|", $formGaleria->get("imagenes")->value); $targetWidth = 1024; $targetHeight = 768; foreach ($files as $file) { if ($file && file_exists($upload_path . $file)) { $filenameOrig = $file; $options = array('upscaling' => false, 'quality' => 100, 'sharpening' => 'soft'); $imageSizer = new ImageSizer($upload_path.$filenameOrig, $options); $success = $imageSizer->resize($targetWidth, $targetHeight); if($success) { $uploadpage->imagenes->add($upload_path . $filenameOrig); } unlink($upload_path . $file); } } $uploadpage->save(); $session->redirect($pages->get("/crm/propiedades/imagenes")->url . $idPropiedad); } else { // form incomplete or errors happened // we remove uploaded files $files = explode("|", $formGaleria->get("imagenes")->value); foreach ($files as $file) { if ($file && file_exists($upload_path . $file)) { unlink($upload_path . $file); } } $formGaleria->get("imagenes")->value = ''; // reset field value } }
  8. It worked. Thank you! Only this warning remaings but not sure why. PHP Warning: filemtime(): stat failed for D:/var/www/realhomecrm/site/assets/files/1319/andorra-729795_1280.jpg in D:\var\www\realhomecrm\wire\core\Pagefile.php:524
  9. Thank you Adrian, I tryed it and now the error is: Parse error: syntax error, unexpected 'if' (T_IF) in D:\var\www\realhomecrm\site\assets\cache\FileCompiler\site\modules\ProcessCustomUploadNames\ProcessCustomUploadNames.module.php on line 177
  10. Hi! There is a problem trying to upload a file from a custom frontend. PHP Warning: count(): Parameter must be an array or an object that implements Countable in ...\ProcessCustomUploadNames.module.php:176 I have this problem since v. 1.1.0. So I had to rollback to 1.0.9. The file is saved on the disc but not on the database. My setup is: Apache 2.4 Php 7.2.6 PW 3.0.120
×
×
  • Create New...