Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by virtualgadjo

  1. Hi, i think you should have a closer look at how pw works as i would strlongly advise you not to use aliases (slugs) in the nav as they may change nor to use templates of course have a look at a simple, very simple nav <!-- link to the home page if your website is not multilingual you can simply use <a href="/"> --> <a href="<?php echo $pages->get(1)->url; ?>"><?php echo $pages->get(1)->title; ?></a> <!-- and then a simple list of the other pages of course, you can exclude some pages ids and put the wole stuff inside an ul or whatever you want going a little further, i let you guess how to deal with sub menu, easy as soon as you've understood how it works --> <?php $pgs = $pages->get(1)->children; foreach ( $pgs as $p ): $activ = $page->id == $p->id ? ' class="active"' : ''; ?> <a href="<?php echo $p->url; ?>"<?php echo $activ; ?>><?php echo $p->title; ?></a> <?php endforeach; ?> you could also have a look at the menu modules and either use one or understand how they work to make your own https://processwire.com/modules/process-menu-builder/ or https://processwire.com/modules/markup-menu/ they offer different way of building menu and can be a good starting point for your own hope it helps have a nice day
  2. sorry too big fingers... let's resume πŸ™‚ there you assign a value to $teamPlayers when afterwards you apply a method to this var, well, you apply a method but don't store the result of this method in a var which is exactly what you eventually do with your $teamMates = $teamPlayers->find("bestTime>0")->sort("bestTime"); return $teamMates; there you apply a method on $teamPlayers and store the result in $teamMates πŸ™‚ hope it helps have a nice day
  3. Hi, actually, this is not a pw filter problem but a php one, well, not a problem, just a syntax rule when in your first line you write $teamPlayers = $pages->find("parent.name=players, team=$team");
  4. Hi, i may be wrong but the image you show doesn't look at all like PW CKeditor even when i add a lot of plugins and/or functionnalities... (not the case here but adding font-size, colors, background-colors, and so on doesn't change the display except for some more buttons πŸ™‚ ) and, by default, the text is wrapped inside the source view, at least when using the pw default sourcedialog extension checked, what i alwasy do are you sure you're using the default pw ckeditor? have a nice day
  5. πŸ˜‚ there are so many coming with PW... i nearly always use this one ablility to add default attributes to external links as clients tend to forget those good SEO practices and, thanks to this module, they always act as pros πŸ˜„ Coming to this attributes thing, this night i had an idea when having to deal with modale videos using a library needing attributes instead of a simple class The solution may be to create a repeater field, each element containing an image (screenshot for example), the video url and... a field using your FiledtypeRuntimeMarkup module displaying the HannaCode to be used in ckeditor i have done this kind of trick for images carrousels that a client may use wherever she wanted in a content and she appeared to like it and used it a lot πŸ˜„ Thanks a lot for coming and brainstroming with me + for this module i like to couple with HannaCode as for many people, writing a simple snippet of code is a bit freaky when copying/pasting sounds like a daily usage πŸ™‚ have a nice day
  6. Hi @kongondo, and thank you for taking time to read my post πŸ™‚ i'm speaking about the native ProcessPageEditLink module where we can store a few classes, rels and target for the end user to use when adding a link in ckeditor (and even add them, or not, by default, to external links, a very clever and useful feature...) i'm just wondering if it would be a good idea to modify it to deal with dynamic data-attributes or if it is again one of my savage ideas :D have a nice day chris
  7. Hi all, i'm wondering what would be the best way to add custom data attributes in pw link edition in order to get something like <a href="https://foo.com" data-src="https://foo.com" data-width="800" data-type="iframe">xxx</a> and so on would you advise to use a hook? a custom text formatter? extend pw native module? i would like to be the less savage i can be (and usually am πŸ˜„) hence the question πŸ™‚ (i know there are two different things here, using the href as a data-src would be quite easy with js but adding whatever other data-attibute, depending on the link is something else) of course, i'm thinking making that easy for final users as personally i would write this directly in the source code but this is a migraine source for non coders... πŸ™‚ any advice would be very welcome have a nice day
  8. Hi, i don't know if it's what you are looking for but in pw, you have a setting tab for each page where you can set whatever name you want, even completely different from the page title a little trick that may help, when creating a page pw auto fill the name field based on the title you choose, what i do when i want them different, i first fill the name and the title afterwards πŸ™‚ have a nice day
  9. Hi all, new post instead of updating again and again the previous one... here we are, the translation is now complete, yes, i know i said yesterday "in a few days" but i forgot the kind of crazy guy i am πŸ˜„ no more abandoned/unused string/phase no more empty string/phrase no more files in the "no translation file exists" list which means some never translated files are now... translated πŸ™‚ and those that were translated but didn't exist anymore for completely revamped modules/filetypes are now translated again https://github.com/virtualgadjo/pw30184-lang-fr hope it will help, promise, i won't flood this post again before the next PW master release πŸ™‚
  10. Hi, depending on why and/or where those pieces of code are displayed or not, it could be easy to do this with php for example, if one of these piece of code is displayed when/if the page is a child of some page or template, easy to have a php if based on the parent template or id another way to do this, safe if it is your website, meaning some education if it is a client's one... would be to use toggles for the template "display this... yes/no", once more a simple check on the toggle value with php, job done (i've used this solution for a client who wanted some pages to be published, not hidden => in the sitemap but not always in the menu pw and php are great friends πŸ˜„ have a nice day
  11. Hi, i have some bad news that i personally consider as good news πŸ™‚ the short answer is... no well, i could quote one on sell at codecanyon, the seavuel hotel but, honestly i would strongly advise you not to use it even if you could want to buy it, install it and have a look at how things are done PW gives you exactly the opposite way of working than wordpress, you just install sort of a frameworks with a fantastic CRUD admin even this admin, you'll have to build the one you need with the fields you need and only those, the templates you create and pages to which you'll attibute those template, and so on this makes you think the right way, you website is unique and so will be its back-end i have made two restaurants websites with PW (https://www.restaurantilgrano.com/, https://www.restaurantlafamiglia.com/ ) for the same company/owner but starting each time with a blank site helped me not to try adapting the website to the CMS and a theme but adapting the CMS to what i needed and that is all PW is about i understand that, at first, it may sound like more work to do but, soon, you'll find out it's far less heartburns to come πŸ™‚ do have a try at it, you won't regret it πŸ™‚ have a nice day
  12. Hi, sorry to be so late to see your question... but, just in case it can still help this is something you could solve with htaccess rules but get params are nearby devs security nightmares because visible and a black hat temptation instead of params, you may use pw url segments, allowing them for the relevant templates, they act like get params but in a far more discreet and configurable way πŸ™‚ have a nice day
  13. Hi all, i'm currently working on a full translation of pw admin in French, slowly but surely, to be used in pw 3.0.184 two and a half main steps - first, as advised in pw translation tool, deleting all unused phrases, checked πŸ™‚ - and now, progressively, translate the phrases that are empty, well, most of them... - in the meantime, i add the files in the "no translation files exist" list, beginning with, to my mind, the most useful ones, the fields that have changed so much they are not translated anymore, files, images, datetime... both those last two steps in slow progress but in progress anyway in case it could be useful for anyone other than my non english speaking clients πŸ™‚ i update the zip file frequently here https://github.com/virtualgadjo/pw30184-lang-fr have a nice day ----- a little update no more unused strings/sentences: done no more empty strings/sentences: done a few lost translations (gone to the no translation file exists list, not in the middle of the ocean) back, images, files, datetime, toggle: done i will continue creating those missing translation files to end with a fully translated admin, it will probably take a few days but even now the admin is really close to being frenchies friendly as always, in case it may help have a nice day (and sorry if i do not sound serious enough but i can't πŸ˜„ )
  14. Hi, very nice cheatsheet, i use markup regions for all my websites πŸ™‚ i hope @franciccio-ITALIANO will have a look at your post and fall in love with them too πŸ™‚ have a nice day
  15. Hi, as shown by jacmaes, there are great docs about those markup regions but in case they looked a bit hard to dive in at first sight, do not hesitate to tell me, i would write some simple examples for you to see how great and simple they actually are and what you can easily do with them, as usual with pw, from the simple replacement of header and footer by one single file to more "funny" things πŸ™‚ have a nice day
  16. hi, i'm probably a bit late... but i would have suggested to use markup regions which is imho the king of easy ways to do what you are looking for πŸ™‚ have a nice day
  17. hi, good news πŸ™‚ have a great pw trip πŸ™‚
  18. hi, honestly, i doubt anything in the index.php file will change anything as in the case you describe you don't get the right one... instead i would try something in the htaccess file, something like <IfModule mod_headers.c> Header set Cache-Control "no-cache, no-store, must-revalidate" Header set Pragma "no-cache" Header set Expires 0 </IfModule> but even this, i'm not sure it will work for a client browser cached file as it will even not have a look at what happens server side before serving the page... have a nice day
  19. Hi, huh, this is really weird, first thing that i can say for sure, the htaccess line you quote has nothing to do with this, i have many pw websites and the 404 page works fine without touching anything in the htaccess file, even changing its slug (http404) for something a little less geeky and a little more frenchy πŸ™‚ (and quite often with a custom template file too) the only case i can imagine in the htaccess file would be a multilingual website with multilingual slugs for this page, some containing non ascii characters, if using point 14 in the htaccess file after having changed the default slug, you may need to change it in this section too except for this really particular case, i can't see where the problem could be without having a close look at your own code, if i were you i would start with - _init.php, init.php, ready.php files if you use any of those, do you use any regex, hook, custom redirection or else that could cause an issue for pages that don't need any - header or _main.php (i'm a great fan of markup regions :)), same reasons etc, actually, any kind of code you've written, php or js, that is supposed to work on every page. if you have any, exclude the 404 page from its execution and see if it changes something hope you'll find something out... have a nice day
  20. Hi, maybe you could try the htaccess directive on top of your root htaccess file php_value date.timezone 'America/Chicago' some servers may sometimes be php resistant πŸ™‚ in case it helps have a nice day
  21. hi, id 27 is the default id of http 404 error page thus you don't need to "tell" this to your config file samething for the index.php thing in the htaccess file in that same htacces file, you can see an intersting link to a blog post about optimising your 404 error https://processwire.com/blog/posts/optimizing-404s-in-processwire/ but in your case, the first thing i would check is - is the 404 page not found page still in the page list - if yes, do you still use the basic-page template for the 404 page and - if so, have you used the basic page template for something else and then modified the php code in a way that may generate redirection or anything that the 404 page may not be using (fields or else) you could try creating an empty template, set it as the 404 page template and try to see if the problem persists (remove the config 404 id line that is not useful if you use the default pw page :)) hope it helps have a nice day
  22. Hi, you're right, if you want a page to be displayed on the front end it needs a .php template (be this template used by one or several pages) the reason is very simple, this template is used to "echo" the content you want to see, surrounded by your html markup you'll see that pw allows several ways in the coding field and as you said, doesn't get in your way, actually, it behaves a lot like a framework offering multiple template systems have a nice day
  23. hi, just my two cents πŸ™‚ whatever system you're on, have a look at your source code, if ever any image or content is in the source linked from an http:// (not https://) src, your browser with display an not protected error near the url an outgoing link will not cause problem have a nice day
  24. hi, answering to myself, yes, - a little late i know but in the meantime i've made many people happy with their new website in pw - and i know it may sound a little strange but in case in may help someone else looking for the same thing, i've found a funny way to do what i was looking for apparently the easiest way to do this would be to install pw last release, install language support of course ans then go to the language settings, default language, select all the wire files to translate, submit, save and then... copy paste all the labels in the text inputs, this generates a full and filled default language json files pack now, wriggling on my chair waiting for the next prod release, in the starting block to make a full french translation πŸ™‚ i know this may sound funny but there may be some other silly old guys like me that still love working in text files, so, i this can help them πŸ™‚ have a nice day
  25. Hi, don't worry, answering myself again and again is not going to be an habit πŸ˜„ just here to say actually the problem is not being in debug mode or not, the error message is in fact a notice, probably due to the fact that created is everywhere else a datetime (a true one) and is somewhere considered as one on insert (still couldn't find where... no mention of datetime in the module file nor in the form file...) even if for comments it's an int... so far, on the production server, notices are not displayed so i'll leave it as it is until i find some time to insert comments in my own way but continuing to use pw fieldset as everything else works like a charm, moderation, displaying and so on just hope there won't be millions of comments else the errors.txt file in the logs folder will take a lot of room πŸ˜„ have a nice day
  • Create New...