picarica
Members-
Posts
71 -
Joined
-
Last visited
Everything posted by picarica
-
so i am trying to fetch dimensions of image using getimagesize() but it returns nothing, at least i think so, i want to feed it to data attribute, bit its emtpy, i tried feeding it the image directly or just image->url here is my source code foreach($page->repeat_body as $r_body) { /* other code here*/ if ($r_body->gallery_check == 1) { echo "<div class='my-gallery' id='grid-gallery' itemscope itemtype='http://schema.org/ImageGallery'>"; foreach($r_body->image as $image) { $options = array('quality' => 80, 'upscaling' => true, 'cropping' => 'north', 'sharpening'=>'medium'); $thumb = $image->size(400, 400, $options); $large = $image->size(1280, 0, $options); list($width, $height) = getimagesize($image->url); echo " <figure itemprop='associatedMedia' itemscope itemtype='http://schema.org/ImageObject'> <a href='$large->url' itemprop='contentUrl' data-size='$widthx$height' data-index='0'> <img src='$thumb->url' height='$height' width='$width' itemprop='thumbnail' alt='Beach'> </a> </figure>"; } echo "</div>"; } /* other code here*/ } now, the images are outputted correctly, i can open then and browse them
-
so i am trying to fetch repeat field from page and output it, but only first one !, i thought first() would work and i googled something and came up with this if ($pages->get('/ponuka/')->title) { $ponuka = $pages->get('/ponuka/'); } else { $ponuka = $pages->get(1239); } //echo $ponuka; foreach($ponuka->children as $child) { $first = $child->repeat_body->find("limit=1"); $image = $child->pod_thumb; $options = array('quality' => 70, 'upscaling' => true, 'cropping' => 'north', 'sharpening'=>'medium'); $thumb = $image->size(400, 300, $options); echo " <li> <h3>$child->title</h3> <div class='split reversed'> <div class='content'>"; foreach($ponuka->repeat_body->find("limit=1") as $rep) { echo $rep->body; } echo "<ul class='actions'> <li><a href='{$child->repeat_body->first()->url}' class='button'>Pokračovať</a></li> </ul> </div> <div class='image'><img src='$thumb->url' alt='' /></div> </div> </li>"; } first check is just, if client somehow renames the site or changes url of that site, that it would fall back to fetching it from ID, and if they delete that site and create new one but with same name it will still work, so i hope that wont be a problem, then i output some stuff from that site, but i have trouble outputting the repeat field, as you can i see i tried it with find but didnt worked, what is the correct way to approach this ?
-
so am trying to make a simple navigation, just few dropdowns no custom classes nothing its so simple everything is dome but somehow that plugin markupmenubuilder? look how stupid it looks,i dont know why there is such a gap, and when i open submenu all the way to the right the dropdown is clipping into previous dropdown its all broken, deefault navigation has no problem what the hell is going on, i tried looking into code, and it seems that that plugin is applying left: internal css, not sure why? but how do i get rid of it? and its weird that the whole navigation is copied below footer, why is that ? why not use the HTML that already exists
-
Hello si have this gallery, pretty good website, but yesterday client uploaded over 3000 images oto the site, and it cannot handle filtering them out and showing them at the same time , i wanted some simple pagination maybe infinite scrool or onclikc load whatever, but i cannot seem to implement infinite ajax scrool and any other JS methods, nut sure why i still got stuck at the next method, like there is not next page. so i wanted to implement PW method of paginating i wanted to use MarkupPagerNav so far i have this code for outputting images $pa = $pages->find("template=basic-page|art_gallery, images.tags!=''"); /* $pa = $pages->find("has_parent!=2,id!=2|7,status<".Page::statusTrash.",include=all"); */ echo "<div class='js-filter' id='gal' >"; /* row gtr-50 gtr-uniform */ $frame = $pages->get('/settings/')->watermark; foreach ($pa as $p) { foreach($p->images as $image) { if(!$image->hasTag("act")) { $options = array('quality' => 80, 'upscaling' => true, 'cropping' => 'north', 'sharpening'=>'medium'); $large = $image->size(1200, 0, $options); $wmImage = $large->pim2Load('wm1', ['quality'=>80, 'upscaling' => true, 'sharpening'=>'medium', 'defaultGamma'=>-1])->watermarkLogo($frame, $position='se',$padding=1.5)->pimSave(); /* zmazanie variacii, treba odpoznakovat ked sa menia nastavenie vyssie */ /* $image->pim2Load('wm1')->removePimVariations(); */ $thumb = $image->size(400, 300, $options); echo "<div class='$image->tags grid-item' style=''>"; echo "<span style='overflow:hidden;'class='image fit'>"; echo "<a class='hvr-reveal' href='$wmImage->url'>"; echo "<img uk-scrollspy='cls: uk-animation-fade; repeat: false' src='$thumb->url' alt='$image->tags'>"; echo "</a>"; echo "</span>"; echo "</div>"; } else { $options = array('quality' => 80, 'upscaling' => true, 'cropping' => 'north', 'sharpening'=>'medium'); $large = $image->size(1200, 0, $options); $wmImage = $large->pim2Load('wm2', ['quality'=>80, 'upscaling' => true, 'sharpening'=>'medium', 'defaultGamma'=>-1])->pixelate(25)->smooth(255)->watermarkLogo($frame, $position='se',$padding=1.5)->pimSave(); /* zmazanie variacii, treba odpoznakovat ked sa menia nastavenie vyssie */ /* $image->pim2Load('wm2')->removePimVariations(); */ $thumb = $image->size(400, 300, $options); echo "<div class='$image->tags blur grid-item' style=''>"; echo "<span style='overflow:hidden;'class='image fit'>"; echo "<a class='hvr-reveal' href='$wmImage->url'>"; echo "<img uk-scrollspy='cls: uk-animation-fade; repeat: false' src='$thumb->url' alt='$image->tags'><span>18+</span>"; /* <span>BY OPENING THIS IMAGE YOU CONSET THAT YOU'RE 18 YEARS OR OLDER</span> text copyraightova,y dat vedla obrazky potom */ echo "</a>"; echo "</span>"; echo "</div>"; } } }; to put it simply, it first searches for sites, and then outputs all images from those sites, pretty simple, it also uses watermarking and uikit filtering i have filtering done like this $num = 1; echo "<ul class='uk-subnav uk-subnav-pill'>"; foreach(array_unique($alltags) as $key => $tag) { echo"<li uk-filter-control='filter: .$tag;group: $num' class='butt$num' uk-toggle='target: .butt$num ; animation: uk-animation-fade; queued: true'><a href='#'>$tag</a></li>"; echo"<li uk-filter-control='group: $num' class='butt$num active' aria-hidden='true' hidden='' uk-toggle='target: .butt$num; animation: uk-animation-fade'><a href='#'>remove - $tag</a></li>"; $num++; } echo "</ul>"; simple, but i have NO idea how to implement pagination, just because it seems to work that it like find all images, and stores with limit, and then just paginates them, but i cannot apply this method in my code. any idea how to make any JS inifite scroll work ? or just how to make this work ? with my setup, or with some modifications, it just have to work as is now
-
- paging
- pagination
-
(and 2 more)
Tagged with:
-
QUESTION how does cache of this module work ? i wonder beacuse i will be using alot of RSS, and i would like to save them localy so that they would load and fetch and receck (for deleted articles) only once per day every night, i wonder how does the cache work ? does it deletes all the RSS everytime it times out ? or it rechecks existing and new RSS and only updates deleted ones and adds new ones, whats the logic behind it ?
-
yes this works really good, but how do i input pultiple urls? and make them sort by date published? i already did some simple markup to make it look good, only problem is that $item->pubDate returns default date (01/01/1970 01:00:00 ) not sure why ? https://www.realwire.com/rss/?id=175&row=&view=Synopsis pub date is correct there yet on my site it is outputed wrongly
-
ok ok nevermind it works i just noticed i had wrong pluign, i had MarkupRSS instead of MarkupLoadRSS
-
yes this looks promising i tired it but cannot seem to run it ? with your url it didnt worked, so i tried mine and so i got internal server error i tried urls https://www.realwire.com/rss/feeds.asp and https://www.realwire.com/rss/?id=345&row=&view=Synopsis
-
hello, so i am trying to make a website that collects some urls collect rss feeds from them a output them in my website, and preferably somehow output the stuff inside my website too, i am not sure how do do it i never worked with RSS but i found this RSS feed loader module, but not sure how to input any feed into it. i am tryin to import for example this feed https://www.realwire.com/rss/?id=345&row=&view=Synopsis so far i am not sure how to feed it into the module and somehow input title from that feed and some more options? in module setinggs examples are only like fixed titles descriptions etc. how does this exacly work ?
-
i came across the same problem i need to upload ~1000 images and i got same error, every image has tag, how can this be resolved? does this count as necro bumping if it wasnt been resolved ?
-
yes i tried anything, also there is not center in the github link u sent me, not sure what's wrong this is the syntax $wmImage = $image->pim2Load('wm', ['quality'=>70, 'sharpening'=>'none', 'defaultGamma'=>-1])->watermarkLogo($frame, $position='w', $padding=1.5)->brightness(50)->pimSave(); maybe the image is weird? but is 1000×100 image. by the image i mean the watermark i used, its just text mildly edited ill post the resulting picture just tried $position='center' and $position='C', it doesnt seem like updating ? but why no errors or logs
-
avbimage seems fine but i have problems implementing it into my code beacuse $insert = $page->images()->first()->image()->insert($pages->get('/settings/')->watermark, 'bottom-right', 10, 10); echo "<img src='{$insert->encode('data-url')}' />"; cannot work so i edited it with $insert = $image->images()->first()->image()->insert($pages->get('/settings/')->watermark, 'bottom-right', 10, 10); yet i still get error Breaking news… Error: Exception: Method Pageimage::images does not exist or is not callable in this context (in wire/core/Wire.php line 544) not sure what i am doing wrong, i dont get it why there is images function the first function then AGAIN image function? is that all neccessary when i have it in foreach so in my logic it should be like $insert = $image->image()->insert($pages->get('/settings/')->watermark, 'bottom-right', 10, 10); yet still error Arrgh… Error: Exception: Image source not readable (in site-artgallerytaube_eu/modules/AvbImage/vendor/intervention/image/src/Intervention/Image/AbstractDecoder.php line 302) not sure what to do with it. thanks but no thanks i need to processwire handle it, there will be over 1000 images and continuing to grow every day, and i want to make it work now and not bother with it never again. but yeah with unix scripts is easy as pie with imagemagick but i want it plainly php or somewhint to do with PW i really like your plugin actually wanted to try it out but only found docs for pim1 and not pim2, arent there many syntax differences? i might try it out just because avbImage is doing me naughty
-
so hello i am trying to combine my whole ass gallery with custom created watermark, i wanted to combine my images with simple text little opaque but that seemed harder and i couldnt make it work, well i cant make this work either, how are you handling watermarks? i would prefer if it would be plain PHP no imagemagick or some custom plugins scripts, but if neccesary i wont deny. so here's my code $pa = $pages->find("template=basic-page|art_gallery, images.tags!=''"); /* $pa = $pages->find("has_parent!=2,id!=2|7,status<".Page::statusTrash.",include=all"); */ echo "<div BRUUH class='row gtr-50 gtr-uniform js-filter' id='gal' >"; foreach ($pa as $p) { foreach($p->images as $image) { $obrazok = $image->url; $image = imagecreatefromjpeg($obrazok); $frame = imagecreatefromjpeg($pages->get('/settings/')->watermark->url); /* echo $image; echo $frame; */ # If you know your originals are of type PNG. imagecopymerge($image, $frame, 0, 0, 0, 0, 50, 50, 100); # Output straight to the browser. $img = imagepng($image); $options = array('quality' => 70, 'upscaling' => true, 'cropping' => 'center', 'sharpening'=>'medium'); $thumb = $img->size(400, 300, $options); $large = $img->size(1200, 0, $options); echo "<div class='$image->tags' class='col-4'>"; echo "<span style='overflow:hidden;'class='image fit'>"; echo "<a href='$large->url'>"; echo "<img class='uk-transform-origin-top-right' uk-scrollspy='cls: uk-animation-fade; repeat: false' src='$thumb->url' alt='$image->tags'>"; echo "</a>"; echo "</span>"; echo "</div>"; } };
-
Released: PadLoper (commercial eCommerce platform for ProcessWire)
picarica replied to apeisa's topic in Modules/Plugins
Hello there comrades 1. so after working with padloper, i am not sure if its even proper eshop module, like i still dont know how to add normal creadit card payment with bank gate, and by bank transfer, either plugin is undevelopted or their wiki lacks information, i also didnt found any option to add more shpping methods, in wiki they used shippingFixed Module which just lets me set a one fixed price for shipping, but i need to have more options as personal pick up from eshop, delivery by courier, or delivery by postal service, i dont know how to make any of these options, is this even professional eshop module ? or snipcart is way to go ? 2. i am also fighting with this error Fatal Error: Uncaught Error: Call to a member function getCart() on null in site/templates/_head.php:34 with this code $padloper = $modules->get("Padloper"); $cart = $padloper->getCart(); echo $cart; i am trying to somehow get page's cart price, and echo it next to cart button, i dont understand why there isnt more avalaible API in the web, how do i do this -
so after working with padloper, i am not sure if its even proper eshop module, like i still dont know how to add normal creadit card payment with bank gate, and by bank transfer, either plugin is undevelopted or their wiki lacks information, i also didnt found any option to add more shpping methods, in wiki they used shippingFixed Module which just lets me set a one fixed price for shipping, but i need to have more options as personal pick up from eshop, delivery by courier, or delivery by postal service, i dont know how to make any of these options, is this even professional eshop module ? or snipcart is way to go ?
-
So what i am looking for is when you order a product you can type in how many quanitys you want to add to your basket so far i have it like this if ($page->variations->count) { $content .= "<form method='post' class='padloper-cart-add-product' action='" . $config->urls->root . "padloper/add/'>"; foreach ($page->variations as $p) { $content .= "<input type='radio' name='product_id' value='{$p->id}'>" . $p->color->title . " " . $p->size->title . "</input><br />"; } $content .= "<input type='submit' name='pad_submit' value='" . __("Add to cart") . "' /></form>"; } else { $content .= $modules->get("PadRender")->addToCart(); } echo $content; but i am not sure how do i tell padloper's API to usee that inputed number to add correlating quanities simply adding <input type='number' name='quantity' min='1'> didnt worked EDIT: nevermind i just had to edit name="quantity" as name='qty'
-
so i have problem mentioned in the title i have one product its a page using product template, all variations are using variations template, i have few variation but on site when i click add to cart i go from /products/table to products/table/red which results in 404 error page not found, because variations dont have template files, sooo what's going on? how do i redirect it somewhere else, like cart maybe? or just refresh page with some text like product has been added
-
Hello so am trying to make a hook so that all checkbox field is defaul;ty checked when making new page, soo i made hook in init.php and the contents are <?php $wire->addHookAfter("Pages::added", function($event) { $page = $event->arguments(0); // check for page template if necessary here $page->checkboxfield('check', 1); }); ?> and what i get which is weird because "table" is a repeat field where checkboxfield is nowhere present, but table repeat field and checkboxfield are in the same template, so why does it outputs error like that? any ideas ?
-
Hello so i am unable to get to cart/checkout menu , not sure how you even set it up, in the guide it just happend with no setup so what i got it is that i press submit after selecting product, and then it said that item is out of stock even tho i have 50 quantiny in the page, so i enabled negative stock so i could test this out and its weird after submit with negative stock i enabled i get this in the url localhost/vsetky-produkty/black2/?productId=1065&variationId=0&qty=1&totalQty=8&numberOfTitles=4&totalAmount=0 but nothing in the page changes ? where is the next step, next step in the official website is payment modules