Jump to content

virtualgadjo

Members
  • Posts

    339
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by virtualgadjo

  1. @joe_g actually, the page souldn't be linked from anywhere on the website as, using pw native link module, language by language it should not appear in the page select, this active thing is useful for the menus as well as the language sitch, too bad my video is in French i explain and demonstrate all this (being french most the websites i make use at least two languages when not, like yours, more and i've had to dig a lot in this languages things πŸ™‚) have a nice day
  2. Hi @joe_g what i think could be more interesting to you is in the settings tab of a page, when you unckeck active for a language, then in the language swsitch the page is not viewable for this language, hence the "trick" in my little snippet and, this way, you haven't got to change pw default behaviour πŸ™‚ hope it may help have a nice day
  3. Hi, as i assume the 404 issue is only for the front side of your web site, i think the problem is only when on a page you change the language.... what you can easyly solve when building your lang switcher foreach($languages as $language) { if( ! $page->viewable($language) ) continue; // here is the trick $url = $page->localUrl($language); $iso = $language->name == 'default' ? 'fr' : $language->name; // fr here but of course chang it for your default language iso $local_title = $language->getLanguageValue($language->name, 'title'); // here comes your output with flags/iso code or whatever you want :) } with this a page that doesn't exist in a language will not have the language button in the switcher and shouldn't appear in the menu for this language when you are on another page i've made a video and have a github repo with language menu tricks and exmples but, too bad, in french as there are very few reesources for the french guys using or discovering pw πŸ™‚ sorry if i've understood your question in a wrong way have a nice day
  4. Hi, apprently, you have to use one more cdn link if you want to use the rrule plugin https://fullcalendar.io/docs/rrule-plugin maybe it will work πŸ™‚ have a nice day
  5. hi @elabx i've tried it and it works fine... as long as you use cdn links, too bad, not that well with the file imported with npm i like having my file locally as i can work even offline, but i've not completely given up having it work getting all the cdn linked files locally with curl πŸ™‚ have a nice day
  6. Hi @AndZyk being probably even a little more old school, even kind of an old timer πŸ˜„ that why i end using a single fullcal bundle file (thanks to curl output...) and hop, on horseback with only one script src πŸ™‚ have a nice day
  7. Hi, "funny" enough i think the error comes from the way npm import the files (or the way dependencies are written in the files) as, if you have a close look at where the error is it's in the daygrid index.js file line 1 when using a importmap like in this example but with the map aiming at the files imported with npm (it works fine with the distant files) https://fullcalendar.io/docs/initialize-browser-esm i've also tried a more "old" and "brutal" way of woking using curl to get locally https://cdn.jsdelivr.net/npm/fullcalendar@6.1.15/index.global.min.js using it as a simple js file once in my assets/js/ folder and the main script in a simple js file (not a module one) and everything went well too, my usual a little tricky usages as well as your own script except thet the instance is slightly different document.addEventListener('DOMContentLoaded', function () { const calendarEl = document.getElementById('calendar') const calendar = new FullCalendar.Calendar(calendarEl, { initialView: 'dayGridMonth' }) calendar.render() }) thank you actually as you convinced me to keep working this old way with fullcalendar πŸ˜€ have a nice day
  8. maybe, in my various search result i've found one where a guys says that when using webpack, as it works with node, borwsers do not understand the import links the way a machine does don't know if it's the real answer... but well what you suggest is what i would do in order to try a differential diagnosis to speak like a doctor πŸ™‚ at least you would have an answerfor that question is webpack where the problem come from and an idea of what to look for as the solution to have it work with it have a nice day
  9. Hi @froot, so are daygrid, timegrid and the other compoenents and this trailing slash is the only difference with what fullcalendar shows except for... what webpack does maybe that's where you may have a look as, like you i use fullcalendar with vanilla js, in pw as well as with codeigniter (but without webpack) and never run into that kind of issue..., feeling that "funny" i searched a little and found this here https://fullcalendar.io/docs/upgrading-from-v5 of course it depends of the version you're using, apparently this is for v6+ (using links without webpack and not as a module i haven't had to see this...) incase it may be useful πŸ™‚ have a nice day
  10. Hi, the only problem i can see in your code is your trailing slash at the end of of your first import that should be import { Calendar } from '@fullcalendar/core'; // instead of // import { Calendar } from '@fullcalendar/core/'; // which makes core a folder have a nice day
  11. Hi, i on't know if you have solved the issue but, running into the same problem with a toggle set to on/off as 0/1 and with default set to off, mytoggle=0 didn't return anything with the $pages->find reading the little notice below the toggle settings i'v tried mytoggle="" in the find() and it worked in case it still could help πŸ™‚ have a nice day
  12. Hi, the simplest way i can think about would be to create a role (named editor for example) to which you only give a few peremissions, you'll end with this kind of admin menu adding only those permissions juste an example of what can be done in the adminknowing onluy super user, say... you πŸ˜‚ have the setup/module/access menus in case it helps have a nice day
  13. hi, looking at your dump, it sounds more like a htmlspecialchars encoding, you may either remove it from the field setting or use htmlspecialchars_decode on the output before json_decode πŸ™‚ have a nice day
  14. Hi; honestly, i would do this kind of thing in the template file wrapping the display of the link with a simple if user is logged... better SEO and UX than a 404 πŸ™‚ have a nice day
  15. Hi again @adrian i had a little respite this morning and couldn't help having a closer look at your module eventually, i ended up with this https://waitandcie.com/down/ProcessCustomUploadNames.zip that fits my needs, one more input to fill with comma separated strings if needes, if the filename doesn't contain one of them, i do not rename, if it does, i rename according to the rule in the filenameFormat input this will avoid those screenshot_date..., captrure_decran_date... and the names straight out from the camera that make my eyes bleed πŸ™‚ Edited to say, i forgot to add this... screenshot πŸ˜„ of course it works on adding a new rule too thanks a lot again for your time and for this great module i will probably use even more to persecute friends and customers πŸ˜„ have a nice day
  16. Hi @adrian thanks a lot for your answer i think that in the case i'm on iwill go for the simple solution but as soon as i've got a little more time to dive into the code and add a field, sort of a "replace incase the name contains" array field, if ever i do it clean, i'll of course get back to you with what i will have done πŸ™‚ have a nice day
  17. hi again, i've seen that i could easily add some conditions to this function customRenameUploads(HookEvent $event) but maybe there is a cleaner way to do this πŸ™‚ have a nice day
  18. @TomPich my pleasure πŸ™‚
  19. Hi @TomPich i've often to do this kind of thing, typical example is a password reset link, in this case i usually create a personal db table with, worse than the case you describe, this page is limited to be viewed only one time... - auto increment id of course - user email - uid - creation date - used default 0 - used date (not necessary but i like to keep track of what happens) the page contains obviously a field to get the user email as soon as it is displayed - i check if the uid is in the db,, if not > die() and if the used field still contains 0 - the used field is set to one and it will not usable again (you may not need this limitation) the uid if of course a long (64char min) string easy to handle with pw url segments and a regex to define what you accept i've done this a lot, be it in pw but also in the old modx evo i used a long time ago as in all my framework based tools, pw just, as usual, makes it even easier to set up πŸ™‚ of course, this is fully adaptable for any other need than password reset adding a user id field if you want to check the user email and password as well as what follows if the user is successfully logged in case it could be useful have a nice day
  20. Hi, i'm wondering, it may seem a curious question.. but is it possible with this module to condition the renaming of an image to its original name? for exemple, rename only if the name contains seom strings like screenshot (or capture_decran for frenchies :)) or dcsc and so on, you know those image not renamed from the cameras sd cards or screenshot tools this only to help some lazy customers or friends not to ruin their SEO forgetting the good practices they have been told because even if it is in my nature i feel a bit harsh renaming images even if they have made some namig effort, some of them do πŸ˜„ just a funny idea πŸ™‚ have a nice day
  21. Hi @FireWire, before @Teppo gives you the right answer and trick ? i can already answer, yes it is possible i have a website that uses a lot data coming from a totally different db for some pages and i wanted those contents and pages to be indexed as well, here is the trick - i've created a field (textarea) named extcont (for external content but of course, name it as you want ? ) and added this field to the indexable fields for the template that have it - and then, i used a hook in the ready.php file to fill the module index field this way $this->addHookAfter('Pages::saveReady', function(HookEvent $event) { $page = $event->arguments(0); $template = $page->get('template'); require_once('templates/_dbc.php'); // my connectionh to the external db needed by the class method i use below require_once('templates/_func.php'); // same thing for some functions i need in that same method if ( $template == 'an_edition' ) { require_once('classes/myVictimPage.php'); $id_ed = $page->id_ed; // a "normal" field in the page to get the... edition id :) $ext = $page->get_ext($id_ed); // a method in the template class that returns all the content i need to index in raw form $page->extcont = $ext[0]; // for the default language $page->extcont->setLanguageValue('en', $ext[1]); // guess, it's a multilingual website :) and here i add data to the field } //... and some more for the other templates that need it } and it works like a charm for many different templates, a program, history, etc;, in your case i think you may just have to add RockPageBuilder returned content but here is the kind of hook you can use to add some extra content to the the field indexed by the module little piece of advcie is add only raw text content without any html hope it may help have a nice day
  22. Hi @Christophe you know, there must be far more sentences that are not translated, if you go to the language translations tab in french and search for "vide", you'll see, there is no remaining empty sentence, vide/empty meaning not yet translated, in the core translations part but, huge but, if now you click on this button you'll sse a lot of files to translate, some concerning your templates maybe, some the modules and some others a few parts of pw that are not in the core translation files now coming to your "Show this field only if" looking for it using the serach field, funny enough, it's in the file you see in the image, it is translated but... wow ? ? ? thank you, as i say on my github repos, i started from en existing pack and just updated the new missing sentences from 3.0.184 but, honestly, apart from some typos here and there, i never thought there were such mistakes, thanks to you this one will be corrected on the next master release french pack (Afficher ce champ... of course) ? Have a nice day
  23. Hi, just my two cents ? to do all of this i simply use the tinytmce module config abilities and then in this css file i simply import my fonts.css or, depending of their number define my fontfaces as in the font side afterwards, il can, exactly like on the front end, set all the rules i want to be applied in tinymce for the h, the classes and so on have a nice day
  24. Hi, not sure i understand completely the whole story but, i may be wrong, it seems to me that you are using this page reference field to organize your backend structure when it's designed more to be sort a predefined $pages->find you'll retreive on the font end which as @daΒ² says, is more the role of the family tab of the templates where you can define which template can have as children pages and what parent template can be the parent of a defined page/template more, when defining those relations between template the add new button to the top right of the admin let you add a new page chosing its template and it will automatically added to its correct parent the new button of each page will also automatically be added with the correct template sorry if i've completely misunderstood your problem... have a nice day
  25. Hi, there is something i do not understand... when using the page reference field, once you've defined a parent page, the dropdown will show all its children but, the data returned to your template/frontend will only be the one(s) you've chosen, how will you choose those ones without seeing them in the dropdown backend wise? if you choose the pageArray option and the texttags type of field, the reference field will act as a selectize like field, allowing you to chose, order and delete your chosen items frontend wise, only an array of this choice will be returned and not all the children of the parent page published or not... hope it helps have a nice day
Γ—
Γ—
  • Create New...