-
Posts
273 -
Joined
-
Last visited
-
Days Won
2
Everything posted by virtualgadjo
-
hi, honestly, i think you shouldn't have moved anything... nor shouldn't ask pw to do eveything ? the simpler way to do this would have been in you cpanel to change the domain path and having it aim at the folder in which you had your pw installed only thing to do, important one actually, in your config.php file, search the line that looks like $config->httpHosts = array('www.domain-name.com/processwire-master'); and change it to $config->httpHosts = array('www.domain-name.com'); if your don't, things will work on the front side but you'll have bad surprises if you try a previex from the admin same thing when you have a domain and a preprod subdomain, you don't have to move anything to set the preprod to be the live domain, instead you just change the domain path and this line in the config have a nice day
-
Hi, a little more compréhensive answer sent by mail, you'll, it's pw, nothing will be broken ? have a nice day
-
Hi, before we tackle with your 10 000 questions ?, in the situation you descibe i would the simplest way to do what you say would be to give all languages a name (the slug) that's to say fr for french, en for english and so on and have the domain aim at yourdomain.com/fr by default coming to the admin, nothing simplest than using the french language pask for the frenc language (no kidding :D) and then go in your user parameters and choose french as its language, the admin will be in french when logging with this user even if not the default one i personally don't use the multilanguage profile, always use the blank one but i'm sure it's well set as every thing in pw ? and yes, what a foot as you say ? and most of all, same as for the clients who love it when coming from shrink customer suppliers like drupal, joomla or even wordpress and discovering how simple it can be to manage a website, even a complex one... have a nice day
-
Hi @Webjack sorry, not here yesterday... i think you're not taking advantage of pw multilanguage abilities, processwire is language agnostic and let you do whatever you want i assume you are making a website with several languages and want the back-end tio be in french, the best way to do this is to consiider french as your default language and add the other ones, included english as other languages, this way your site will be youdomain.com for french and youdomain.com/en/ youdomain.com /de/ youdomain.com/fi/ for the other languages just for fun, let's imagine a simple situation, you want to make a website with only french as the front end and back end language, you will not add french as a new language but just, put your content in french and translate the admin in french for the one and only language you're using, french it's exactly the same thing here except that once this is done, you can add other languages (i've made websites in 7 an 9 languages with pw and the client didn't believe how simple they were to manage when they suddenly wanted to add another language ? ) coming to the back-end, just add the french translation files to your french default language, it will be the default language of the admin and of the users for whom the language is defined as default now, let's imagine you'll have different users for the admin, you can set their language chosing among those you've created and for each of those languages just use the language pack to have their interface translated, no need of course for english as without a language pack it will use pw native "wording" and now, about these front-end translations, of course, pw doesn't translate anything for you but, if you have fully installed all the multi language things pw proposes when installing the language support module, you can, for nearly every field chose a mono or a multi language version, in that last case, the fields will come with tabs that let you enter the content for each language cherry, i know, now people say icing but i'm an old guy..., ?, on top of the cake, pw lets you choose if you want or not to use the default one content for the other ones when not filled well, i stop this 1km long post here but if you want some help in french don't hesitate to write me an email using my pseudo @gmail.com and we will discuss all this in french and even, why not, use a share screen thing to show you some tricks that may help you save some time and liters of sweat ? hope it will help have a nice day
-
Hi; i think what you're speaking about is the _main.php file in which we usually put what's common i nearly all the pages, html head, in the head yes you'll find the metas, the og, analytics or matomo for me ? the css links, sometimes a few js vars you want to have everywhere then comes the header (can be different from the homepage and the others using either s simple php if $page->id == 1 or taking advantage of pw markup regions (this is true for other parts you may need in some pages and not for all of them, markup regions are really a killing the game stuff ? ) the nav, search engine, etc to the bottom of course, the footer, the script href and so on and in the middle, the div with an id which will be filled by pages (home page included) content working like this allows you for any new website to have a ready to go working environment changing very few things, name of the css, js files, add or remove those you do or don't use i usually also use the _init.php to store things i always need and sometimes my ready.php file for some hooks but this is maybe a little outside your question ? have a nice day
-
? $pages is a very useful var but it may be sometimes tricky particularly when dealing with multilingual websites (4 out of five websites in my case being a froggy... ? ) i always use this module https://processwire.com/modules/page-list-show-page-id/ as dealing with page ids allows us to make really short an efficient requests with $pages->get, pw taking care of the language of the object you retreive have a nice day
-
hi @Smirftsch my pleasure ? have a nice day
-
hi, have you tried $pages->get(1) instead of get->('/')? 1 being the id of the homepage, if the problem stays the same it more a case of where that nav is placed in your templates structure have a nice day
-
Hi, you'll probably find this a little funny but now i'm trying to reproduce your fieldtype abilities but saving data to the database to make it "indexxable" by teppo great search engine as it will allow me to get datas from any database i need even an external one and save it as a field content with or without formatting thanks again for this great module i porbably play a bit too much with ? have a nice day
-
Hi, having just ran into a funny issue trying to upload a zip in a files field (after my customer couldn't do it several tries later) i think, as there is an extract zip option, a do not validate zip content or, but a bit more complicated and not really necessary, what kind of content to validate, option would avoid this kind of issue as i explain in the forum post, it was just images with not really great name (diacritics, uppercase extensions), and i'm sure our customers are not all very aware of this kind of problem on a linux server and it's not really an issue as long as the zip is not unzipped server side but just offered to be downloaded as it is (typical case, a press kit) just in case ? have a nice day
-
hi again, i comfirm, i've opened all the images in photoshop, saved them again with a lowercase extension and a good filetype, the zip is a little heavier than it was when i recieved it (42 instead of 32Mo) and it worked within a second or two, pw does read the zip content and doesn't like weird files inside even if just images thanks again for your time and i hope this could help other ones running into the same kind of question have a nice day
-
hi, well, a few tests later, the problem realy comes from the file itself or more, its content i've tried with some as heavy other zip files and it works fine, i have to stay with my curious idea, pw reads the zip and if a file inside is a problem, probably too long name or unknown mime type, it, i should say he coming to pw ? stops working on a linux server, funny but maybe a good security thing even if in this case, its just pdf and images but maybe some of the images are not that well created and/or named anyway, @elabx thanks a lot for having took time to help me ? have a nice day
-
before i can find this parse error, something funny is this knowing the there are two othr files in this same field, a rar and a pdf, this 404 error sounds really funny i'll test the same thing once on the domain instead of the subdomain (which is in the config.php file of course) but i hardly understand this error exclusively for this zip file... i've tried with another one and it worked filename of the guilty dossier-de-presse.zip - press-kit in french so no filename issue and dossier-de-presse.rar (same content) took a second to be uploaded) i'm wondering if it's a problem with the file content, images with very long names that pw tries to read when it can't in a rar, well, i should stop or i'm going to wonder if the earth is really rounded ??? have a nice end of day
-
just forgot to say no error in the errors.txt log...
-
Hi @elabx and thank you for your answer funny enough it works locally but not online and the console returns a little less tolerant tha my local wamp ? have nice day anyway: ?
-
Hi, i just ran into a problem i've never ran into before (pw 3.0.229) in a files field i've allowed mp4 and zip as extensions, i was able to upload a 134Mo mp4 file; fast and easy when i tried to uplaod a simple 33Mo zip file, it took the file but once the loading bar complete the little turning loader to the left never stop turning and the file has never been uploaded, i had to give up of course i didn't check the unzip zip file checkbox and maybe this is the problem, is pw waiting for unzipping the file, what i don't want, instead of simply uploading it? (number of files allowed on 0 just in case but not useful in this case) this funny idea comes from the fact that if i do exactly the same thing with a rar file (same weight, same content, extension allowed), one second later, everything is ok any enlighting advice would be very welcome ? have a nice day
-
Hi, as pastefiler event only occurs when you... paste some content, this time it's not the guikty guy and you can keep it alive if you want ? to allow, or force tinymce not to change your i tag into an em one, something that is in its default init config, just play with the field settings in the Custiom settings JSON option like aboven just add { "extended_valid_elements": "i[id|class|style],em" } (keep the em in the list just in case...) or, il like me you have some other options, just add the line with a comma if not the last one and now, your <p>toto is happy <i class="fa-solid fa-circle-caret-right"></i></p> piece of code will be safe ? hope it helps have a nice day
-
Hi, first of all, thanks a lot for this module i really enjoy playing with ? just a word to say, in your module file i've added 'render_args' => [ 'theme' => 'default', 'themes_directory' => null, 'minified_resources' => true, 'form_method' => 'get', 'form_action' => './', and then 'templates' => [ 'form' => '<form id="{form_id}" class="{classes.form}" action="{form_action}" method="{form_method}" role... this way in my pw config.php, i can chosse to render the form with a method post when needed like if i had coded the form by myself (what works great with your module too...) thanks again and have a nice day
-
Hi all, for those who, like i do, follow Ryan's advice to upgrade, here is the full translation of the 3.0.229 master release admin https://github.com/virtualgadjo/pw-30229-lang-fr very few changes but, nevermind it may be worth it for the frenchies who have problems with english ? have a nice day
-
Hi all, for those who are like me upgrading each trime a master release is on air, i've checked and there are no changes needed in the language pack from the 3.0.226 to the 3.0.227 have a nice day
-
How to insert a <div> in tinyMCE? [SOLVED no!] [now really SOLVED]
virtualgadjo replied to zota's topic in General Support
@zota Hi, our little conversation hit a zone in my old brain and i ended creating a little plugin that may be useful for your need https://github.com/virtualgadjo/pw-tinymce-div-plugin just in case ? have a nice day -
New post – Implementing and using TinyMCE 6 in ProcessWire
virtualgadjo replied to ryan's topic in News & Announcements
Hi, @BrendonKoz thanks a lot for your answer ? you know, using templates as i describe in this thread it works and insert divs or tags of all sorts without wrapping them with empty p's before and after hence my wondering ? actually i can do all i want with this template thing but imagine, you write a long post and suddenly realize somme p's would be nice highlited in a box with a background and some nice styles, hop, with this little plugin you can just select them, click and job done i know, i know, just a lazy option ? as you could insert a template and then cut and paste the content you want into it but i like to make my customers' life as easy and obvious as possible, something the createDiv in CKeditor allowed and i tried to reproduce ? not really important but i'm wondering and won't stop searching (probably studying other plugins code, templates for example...) until i find out the right way to do this ? even if, like i said, with the remove empty p option, not really a problem + it's easy to delete those p's even before saving have a nice day Edited to say: funny enough, if i use insertContent instead of setContent it only adds one empty p after the div, curiouser and curiouser ? Edited again to say: i think i understand why the empty p after the inserted div as in tinymce if it's the last thing you insert and want to add a p after it, hitting enter, it will insert a new div, a bit more confusing for people not used to notice it and convert it into a p, just don't know why it doesn't happen with the template plugin but well, mine is ready, i'll probably post it on github ? Edited once more but for good this time ? it's on github in case anyone may need it https://github.com/virtualgadjo/pw-tinymce-div-plugin -
New post – Implementing and using TinyMCE 6 in ProcessWire
virtualgadjo replied to ryan's topic in News & Announcements
Hi, i've coded a little plugin that wraps some selected content, several p's, h and so on inside div but i run into a funny behaviour of the editor onAction: function () { let cnt = editor.selection.getContent({format: 'html'}); editor.selection.setContent('<div class="box">' + cnt + '</div>', { format: 'html' }); } It works fine but tiny adds an an empty p before and after the div, not really a problem as i always use the remove empty p option but just wondering why ? have a nice day -
How to insert a <div> in tinyMCE? [SOLVED no!] [now really SOLVED]
virtualgadjo replied to zota's topic in General Support
Hi, glad to hear this, ? it took me some time to find out the righ way to do this,, this method allows you to insert many kind of templates, you can just choose the one you need on click on the template button have a nice day -
How to insert a <div> in tinyMCE? [SOLVED no!] [now really SOLVED]
virtualgadjo replied to zota's topic in General Support
Hi, i think that using this method you'll probably run into the same problem i did, you insert a div but can't wrap several p inside it and, if ever you hit enter, it will just cerate another div same thing if you select two or three p and try the div option, it will simply transform each p into a div fortunately Ryan's article helped me find the right solution, here https://processwire.com/blog/posts/using-tinymce-6-in-processwire/#example-of-configuring-the-template-plugin a few tries later i ended with this kind of thing { "add_toolbar": "template", "add_plugins": "template", "templates": [ { "title": "Wrapping div", "description": "add a div with content", "content": "<div class='foo_wrapper'><h3>zi fabulous title</h3><p>a paragraphe.</p><p>an other one just for fun</p></div>" } ] } now you have a div with rich content you can modify, add other p or whatever you need, just click where you need it in the field and hit the template button, job done you may have noticed that the class is wrapped with single quotes for json reasons ? but when you insert it in your field tintmce changes them into double quotes by itself in case it helps have a nice day