-
Posts
310 -
Joined
-
Last visited
-
Days Won
4
virtualgadjo last won the day on February 17
virtualgadjo had the most liked content!
Recent Profile Visitors
virtualgadjo's Achievements

Sr. Member (5/6)
190
Reputation
-
+1 with @adrian and If chmod is disabled for so-called security reasons, huge doubts arise about the rest of the servers' security...
-
virtualgadjo started following Slider items appears as white space , Problems with Custom fields for files/images , Newbie Menu Questions and 3 others
-
Problems with Custom fields for files/images
virtualgadjo replied to perplexed's topic in Getting Started
Hi again π well, honestly, why not but actually it's up to you in the tem)plate file to fill the alt attribute with the page (or article or whatever it is) title if the image description is left empty and that is exaclty a good example of where the field descrription can be used to emphasise the "do not not forget to fill the image description" explaining while, well of course execpt if you do not trust at all your users... i do'nt know how nor by whom the website will be filled π have a nice day -
Problems with Custom fields for files/images
virtualgadjo replied to perplexed's topic in Getting Started
Hi @perplexed ah ok, i thought you were using special fields (tag/text and so on) for you rimage field, then i was thinking it would be easy just to put some strong and color in the description of the image field telling there are details you don't see but don't forget to edit those images and then fill those not visible fields for eaxmple i do this kind of thing when i use @horst croppableimage3 module to remind my victims that when adding an image to this field, you don't see it working but it generates a cropped variation and you can modify the framing to your taste thus don't be mad if you don't lke the result π have a nice day -
Problems with Custom fields for files/images
virtualgadjo replied to perplexed's topic in Getting Started
Hi @perplexed actually,in may cases thet' where the field description is very usefull and more, you could use a nice red strong to remind your user they have to fill something special thie module by @adrian will help you emphasise the part of the description you don't want your user to miss https://processwire.com/modules/dynamic-description-notes/ honestly, i don't know how far you are in your wensite dev but i would bet this is something you would regret as soon as you need one of the great image crop modules... (i can't think of one of the many xebsites i've made with pw that don't use at least one of them...) π have a nice day -
Hi @Dillon if this is the kind of thing you're looking for https://www.waitandcie.com/ sorry everything is in french but it doesn't change the way it works... first i get the pages like this <?php namespace ProcessWire; $zipages = $pages->find('parent=1, sort=sort'); ?><!DOCTYPE html> and then <nav aria-expanded="false" inert> <a href="#" role="button" class="close_nav" id="close_nav" aria-controls="nav" aria-expanded="true" title="fermer le menu"><img src="/site/assets/img/couverts.svg" alt="fermer le menu" aria-labelledby="fermer le menu" style="width: 40px;" /></a> <ul id="navul"> <li><a href="/"><span data-content="Accueil"><img src="/site/assets/img/back.svg" alt="retour Γ l'accueil" aria-labelledby="retour Γ l'accueil" style="width: 50px; margin-inline: auto;" /></span></a></li> <?php foreach($zipages as $zp): ?> <li><a href="<?= $zp->url; ?>" class="navlink<?= $page->id == $zp->id ? ' selected': ''; ?>"><span data-content="<?= $zp->title; ?>"><?= $zp->title; ?></span></a></li> <?php endforeach; ?> </ul> </nav> and of course, alittle lower <a href="#" role="button" class="open_nav" id="open_nav" aria-controls="nav" aria-expanded="false" title="ouvrir le menu"><img src="/site/assets/img/hamburger_wh.svg" alt="ouvrir le menu" aria-labelledby="ouvrir Γ l'accueil" style="width: 50px;" /></a> done... everything elese is about css and js (toggle the inert and aria expanded attributes, my little fun with the menu items and so on but, as you can see, there are svg files here and there, when they are used all over the website UI i often create an img folder in the assets one to store svg icons (hamburger/map markers and so on) in case it helps a little have a nice day
-
Hi @vincent having a closer look to the previous post i suddenly understaood what you were talking about, this hide/show confusion @Christophe pointed out you're right i had forgotten to the update the inputfield json, done and uploaded to github for the 3.0.244 and the 3.0.246 zips (i'll probably update one or two ealier verions too π ) thanks both and have a nice day
-
Hi @vincent sorry but clicking on your link leads me to a 404... and if i try and see the pull request tab, there's no pull request to see all i can see if following the link github just sent me https://github.com/v-maillard/pw-lang-fr/commit/0f5c58ab0133c466f57dd00d5035524089902a69 and i can't see other modification than the ones from my files, sorry to still be such a github dumb noob, not my thing... π Just a word to say that in general what I do is delete all the unused files (empty or containing only abandoned phrases) for the given version I don't keep all the translations history but only the files with the sentences to be translated for the latest version and only for core translations. on the other hand, I've left all the translations of the master versions on github since I started putting them there. i'm slowly working on some other files, some pw non "native" modules i use a lot and, if despite my age, I survive the heatwaves π , will probably create a repo for those files as separate json in folders named after the module name and version folder have a nice day
-
Module or field to display articles in categories
virtualgadjo replied to kaz's topic in Getting Started
Hi, there is another setting you may have look to, in the input tab of the field, the "parent" fieldset contains a lot of options letting you choose which pages you want in the list, selected either by their parent or their template digging a little you should easily end with only the pages you need in the list and, actually, most of the time, when i say digging, it will only be selecting a parent or a template but i occasionally have used the custom php code to exclude some pages or add some hard to select depending of the structure of the website (probably basically my fault... π ) have a nice day -
HI i have a little idea of the reason why you're using $language->title, ths language neme being default for your default language π here comes an simple example of what i do for a language switcher (apparently what you're working on) <?php $lg = 0; foreach($languages as $language) { if( ! $page->viewable($language) ) continue; $url = $page->localUrl($language); $iso = $language->name == 'default' ? 'fr' : $language->name; // here, fr because i'm french but just use your website default language iso code if($language->id != $user->language->id) { echo '<a hreflang="' . $iso . '" href="' . $url . '" title="' . $language->title . '">' . $iso . '</a>' . "\n"; // echo '<a hreflang="' . $iso . '" href="' . $url . '" title="' . $language->title . '">' . $language->title . '</a>' . "\n"; } else // not very useful to add a link to the language you're on π { echo '<span>' . $iso . '</span>' . "\n"; // echo '<span>' . $language->title . '</span>' . "\n"; } $lg++; } ?> have a nice day
-
Module or field to display articles in categories
virtualgadjo replied to kaz's topic in Getting Started
Hi, yes, for an item to be able to have several categories, choose and in the input tab i personnally usually choose as type of field, easire to order, delete and... see for the client π have a nice day -
Module or field to display articles in categories
virtualgadjo replied to kaz's topic in Getting Started
hi, here is the way i do what i think you're describing, easy for me and easy for the client too maybe it could be useful and sort of adaptable for your structure i put all this in a code block, easier to comment π /* as it is a multilingual website, i need an easy way to display the tags in various languages it would work for a one language wensite and it make easy for the client to add a new category without going anywhere else than in the pages tree - a page with a template blog_cats without file - chhildren of this page with a blog_cat template (no file needed either) - for the blog article pages a page reference field - pages multiple array, every article can belong to several categories on top of the blog page (with url segments allowed) */ // first i retreive the categories in the user language // 1122, i'm sure you guessed, being the blog_cats page $cats = $pages->find('parent=1122, template=blog_cat'); $cats_name = array(); foreach ($cats as $c) { $cats_name[] = $c->name; } // then i check if there is an url segment $zcat = isset($input->urlSegment1) ? $input->urlSegment1 : ''; // if not if ( $zcat == '') { $arts = $pages->find('template=blog_article, sort=-date_date, limit=6'); $total = $pages->count('template=blog_article, sort=-date_date, limit=6'); } // if yes else { // yes, being paranoid i first check the url segment is in the cats array above, else... 404 // well, if it were my website o would go for a die() but clients usually need to be a bit more diplomatic :) if ( ! in_array($zcat, $cats_name) ) throw new Wire404Exception(); $arts = $pages->find('template=blog_article, artcats%='.$zcat.', sort=-date_date, limit=6'); $total = $pages->count('template=blog_article, artcats%='.$zcat.', sort=-date_date, limit=6'); } of course, easy peasy to set a raw of butttons/links to select a category on top of the blog page using the $cats array retreived above (i like when things are easy :D) <div class="top_cat_wrapper"> <a href="<?= $page->url; ?>" class="blog_cat_butt<?php if($zcat == '') echo ' selected'; ?>">*</a> <?php foreach($cats as $bc): ?> <a href="<?= $page->url.$bc->name; ?>" class="blog_cat_butt<?php if($zcat != '' && $zcat == $bc->name) echo ' selected'; ?>"><?= $bc->title; ?></a> <?php endforeach; ?> </div> in case it could be useful have a nice day -
Order repeater in admin by value of a child field
virtualgadjo replied to abmcr's topic in General Support
Hi @abmcr glad to "hear" this :) have a nice day -
Order repeater in admin by value of a child field
virtualgadjo replied to abmcr's topic in General Support
Hi, i use thie on musicians and bands websites and it works quite well (in the ready.php file) $this->addHookAfter('FieldtypeRepeater::wakeupValue', function($event) { $field = $event->arguments('field'); if($field->name !== 'date_events') return; $pa = $event->return; $pa->sort("date_event"); $event->return = $pa; }); you could of course easily choose to order by reverse chronological order using $pa->sort("-date_event"); hope it will be a little useful π have a nice day -
very glad to hear this, processwire saves mine so often π heva a nice day
-
hi, having a look at the console, you'll see a missing image https://silcar.ro/site/assets/files/3713/sediu_silcar.1846x0-is-pid1143.jpg maybe the blank one...? the name of the image may let think it's a variation generated by a module or an image resized on the front side using php or js, can you see the original image in the page admin? apart from this (and all the things blocked by ublkock), i can see a problem with a base64 request that doesn't seem to be well formatted, and thus having a CORS issue in case it helps have a nice day