Jump to content

virtualgadjo

Members
  • Posts

    339
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by virtualgadjo

  1. 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
      • 1
      • Like
  2. 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
  3. 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
  4. 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
  5. just forgot to say no error in the errors.txt log...
  6. 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: ?
  7. 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
  8. 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
  9. 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
  10. 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
  11. 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
  12. @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
  13. 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
  14. 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
  15. 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
  16. 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
  17. Hi All Hi @vincent as pw master release has just increased its number, so have i done with my french translation repo https://github.com/virtualgadjo/pw-30226-lang-fr the language files haven't changed but i've exported it from the 3.0.226 release admin after my usual check up hence it sounds better to have the same "name" as pw, pw is the master, not me ? have a nice day
  18. Hi all, Hi @vincent here we are, there should be a national holiday to celebrate each new processwire master release but well, meanwhile, here comes a french translation for the admin https://github.com/virtualgadjo/pw-30225-lang-fr as always @vincent feel free to use it the way you want, merge or whatever you do far better than i do ? have a nice and happy pw day
  19. Hi all, Hi @vincent you know, i download and translate every dev release the very day they appear on the website, i'm completely up to date up to the 3.0.224, i think that as soon as the next master release is on air, i won't be long to complete the translation and upload it to github,, of course i'll let you know with a little post here to be honest, i'm even already building a website for a french music school with the last dev release, it will be easy to upgrade with the coming master release ? have a nice day
  20. hi @szabesz thanks a lot don't know why each time i tried to erase empty lines it erased the code parts too, i probably should have wrritten the whole stuff as raw text and then only apply the code parts where needed thanks again have a nice day
  21. sorry for the weird display, couldn't correct it...
  22. Hi, don't know if it could solve your problem (even if already solved ? ) but i once ran into the same kind of issue with external dynamic css file and soled it this way in my config.php file $config->contentTypes = array_merge($config->contentTypes, array( 'css' => 'text/css' ) ); this adds the css file type in your template "files" tab / content-type select then, on top of my bibicss.php file <?php namespace ProcessWire; header("Content-type: text/css; charset: UTF-8"); header("Charset:utf-8"); and i linked to my bibicss page the usual way in the head of the pages that need it and it worked fine i think that would be the same for js files with a simple 'js' => 'text/javascript' and the correct headers Content-type in the template in case it helps have a nice day
  23. Hi, like @flydev says, you need a template for the pages you want to display on the front side... i just wanted to add two little things inspired by your template name "partner_3.php" - if ever there are partner_1, partner_2 and so on pages, it may sound obvious but well... you can of course have a partner.php template and use it for all your partner pages... it's not a page/a template but a kind of page needing which fields then no matter how many partner pages you are going to create they can of course use the same template - coming to those no file templates they are very useful in many case, for exemple imagine a page aggregating children pages that are not going to be displayed by themselves (when the chilodren are going to be a bit heavy or numerous and would slow the admin in a repeater, thos children pages could use a template without php file lots of other cases, one i like a lot a default fields template for a... default fields template ? to centralize the default value for fields you're going to use on a lot of pages/templates (hero img for example) have a nice day
  24. @Sava Hi my pleasure and very glad to know you manage to do what you needed ? have a nice day
  25. Hi good to know it works for you, as pw always do actually ? coming to your image issue, in order to make this kind of input work with preview, deletion and so on, you'll have to use ajax, the choice is quite simple, jquery or not jquery ? with jquery you'll find a lot o working plugins, the famous oldie one blueimp but many others too without jquery, you'll mainly find code examples you can extend to implement the functionalities you need, deletion for example if your form is a user profile settings form, you may also have a look at pw login register pro module that comes with an very interesting file/image input in any case, i'm sure you know that when you allow uploading files from the front side, security is the main thing to keep hardly focused on... have a nice day
×
×
  • Create New...