Jump to content

virtualgadjo

Members
  • Posts

    310
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by virtualgadjo

  1. +1 with @adrian and If chmod is disabled for so-called security reasons, huge doubts arise about the rest of the servers' security...
  2. 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
  3. 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
  4. 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
  5. 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
  6. 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
  7. 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
  8. 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
  9. 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
  10. 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
  11. 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
  12. Hi @abmcr glad to "hear" this :) have a nice day
  13. 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
  14. very glad to hear this, processwire saves mine so often πŸ˜€ heva a nice day
  15. 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
  16. Hi, if you're using markup region and thus append the _main.php file to tour template, just go to your sitemap model config and check this checkbox (files tab) to prevent appending the full html thing around your xml πŸ™‚ have a nice day
  17. Hi, just a few words 'd add to @bernhard great answer the first thing i do when dealing with a pw website i've not done or done so long ago ican't remenber everything... old damaged brain of mine... πŸ˜„ try and find in the tree the pages where thie form appears, when you find it/them, edit one, heve a look at the parameters tab, and find the template, then go to the emplate in the config menu and try and find the field used to build this element and then... go to this field in the config menu, if it's built using a pw field you'll probably find the solution in the details or input tabs if the field is not in the pw template in the admin, it's built "manually" in the template php file, in this case, that's where you'll have to find where and how in any case i can't plus enough @bernhard's advice, work and play locally, all the more if you're dealing with php files but well, i guess pw user not being wp ones, it may go without saying πŸ˜„ have a nice day
  18. Hi, my pleasure of course πŸ™‚ and you know this travel between object and arrays is somehow natural when using pw api everything is an object, pages, images, files, ... but, when using ->find, ->findMamy, it returns an array... of objects πŸ˜„ that's why when looping through the result arrays function/method are the good ones but, inside the loop, each element you get is... an object, thus the -> syntax, same thing actually as a repeater afterwards, the nature of what you're feeding is up to you, array, object, string, open bar... have a nice pw day πŸ™‚
  19. Hi again, actually it's sooner in the code that i would have siwtched to array functions like foreach, map and so so on, more something like $allEvents = $pages->findMany("has_parent=$player->id,template=event,date>=$dateStart, date<=$dateEnd"); foreach($allEvent as $ae){ if(...) { // here come your conditions like $e->template == '... ' $ae-date>= and so on $player->negAttitude = ... // and here trhe details/pages... you store } } the case you descibe is normal, allEvent (result of a pages find is an array of pages and as much as i love working with objects, php is reallt fast and strong with arrays and in your code you switch from object ($pages) to array ->find() result) and then again to object methods ($player->negAttitude = $allEvents->find...), i can try and guess why foreach may become a little reluctant to eat what you give πŸ™‚ honestly, what i do in this kind of situation is to dump/print_r the result step by step to see exactly what i get and then which will be the best method to use and parse it and of course, once i've switched from object to array i try to stay with it to avoid surprises πŸ™‚ have a nice day
  20. Hi, not sure i'm right but my first thought is that your first $pages->findMany returns an array and if you want to sort the result afterwards you should use an foreach on $allEvents and not the ->find method just an idea πŸ™‚ have a nice day
  21. Hi, i'm working on a website with pages using a lot of page reference fields as tags/categories adding those fields to the search index works very well but i wonder if it's possible to get only the references title in the serach_index field currently i get two arrays one with the reference field title and the ids of the referenced pages [field: xxxx, field2: xxxx...] and another one with the names of the pages [field1: page-name, field2; page-name...] and i wonder if there is a config option to get only the pages title (array or not) without the field name i.e refpage1 title refpage2 title have a nice day
  22. HI @protro honestly, i think that your search form being... a form πŸ™‚ you can simply add an evenlistener to it preventing the default submit event or if your prefer the keydown event if the keycode is 13 (enter) in case it helps have a nice day
  23. @imandreas really funny this short delay but sure there must be something else allowing it to start again from every movement in the admin or you would be unlogged all the time and get crazy πŸ˜‚ i'll have a try at this module to try and understand a little more how it works but it still doesn't tell us where the problem was... maybe it simply needed an update due to the php version and re-installing it did that update by itself!? have a nice day πŸ™‚
  24. Hi @imandreas really glad you solved it! πŸ™‚ and wow, 50 secosds for a session lock, you have to be typing faster than ussein bolt πŸ˜„ have you checked if re-installing the module has changed this curious delay? have a nice day
  25. hi, hard to really answer not knowing the exact situation, local, online... but the first thing that comes to mind would be if online,, has your hoster suddenly changed the php version (a simple phpinfo in your website root will tell you) if yes, can you choose your php version and go bak to the one used when everything went well before updating your pw install and then, why not, upgrading again the php version up to one with which eveything is ok of course, all this if there was a time when averything went well, usually the case with pw πŸ™‚ if not, let us know with some more details about the full situation, config, online or not, pw release, php version and so on have a nice day
Γ—
Γ—
  • Create New...