-
Posts
338 -
Joined
-
Last visited
-
Days Won
5
Everything posted by virtualgadjo
-
two processwire installation, in other subdirectories
virtualgadjo replied to sirhc's topic in General Support
Hi, honestly, i wonder if your not over complicating your life here ? if your website is going to be example.com with a blog which url will be example.com/blog why don't simply have one install in the main directory and set a page name... blog the only reason i can imagine is that the blog editor may not have the same admin rights as the "main" site ones, well, it would be far simpler to do this with user profiles... one more reason for this will be all the work you're going to have when dealing with possible common content between the web site and the blog, i.e. three last post on the home page, in one install, it's just fingers ine the nose, with two, you'll have to deal with the connexion to another db, and so on hope it helps have a nice day -
Hi, i'm currently working on a blog for a friend, using comments, everything works fine except that, locally, in debug mode, in the admin after submitting a post, i've got this error FieldtypeComments: SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '1618466849' for column 'created' at row 1 pw 3.0.165 on php7.3.21 what's even funnier is that, in the db, the created column is an unsigned int (the value is correct), the timestamp is here and, of course, displaying the comments on the front end works fine too, the date being well formatted as set in my config call ('dateFormat' => 'd/m/Y H:i',) the only explanation i can imagine is something PDO doesn't like for the insert call from a fieldtype created in the mysqli area ? but i'm still wondering where and why as... it works ? as always, any insight, idea or advice would be very welcome ? have a nice day
-
Hi, that's where comes, once more, the beauty of pw... something you can easily do, just create a hidden page, let's say "sliders" (can use an template without file) this page will have children using a template without file too, template to which you'll just need to associate the repeater used to create your sliders elements and this is where the magic comes, Hannacode! create yours, something as easy as [[slider id=123]] or [[slider name="xxx"]] id being. the id od the page containing the slider, name... well guess ? and where you want your user to be abble to use them, just add TextformatterHannaCode to your ckeditor; job done, it works a little like wp shortcodes but; a little difference, it works, it lets you write and use the code you want without generating hundreds of html/js/css lines in the page, it won't be broken by some update and it's fast as hell i let you decide where and how to tell your user what code to use, personally, i use kogondo's https://processwire.com/modules/fieldtype-runtime-markup/ it makes easy to add an easily selectable piece of code inside a readonly input in the backend, live example for a customer who wanted to be able to create carrousels and use them anywhere in any page if french, sorry, but you get the idea and, below, there is... a title and a simple repeater, the user has just to add a p in ckeditor, paste the code and hannacode takes care of what's left to do ? hope it helps have a nice day
-
Hi, honestly, i've build a lot of sliders in websites with pw, depending of what you're using as js, there are a lot of plugins out there, vanilla, jquery or zepto (i love the vegas one that runs with jquery or zepto ? ) simple ones are even easy to build self made with vanilla js when it comes to a simple admin for it, depending of what you're going to do, image slider with just a simple legend/text, an image field will do the job using the description for the text part if you want to go a little further, just use a repeater... image field(s) in each item, text, richt text, you'll not run into any limit in both cases your user can order the slides dragging the items with their mouse, hard to find something easier ? have a nice day
-
Hi, sorry if it sounds like a silly answer ? but, of course, i guess you have allowed svg format for your image field if so, have you tried using the svg sanitizer module https://processwire.com/modules/file-validator-svg-sanitizer/ and of course have you checked your svg source code, i use svg a lot and, when using them for a web page, i often have to simplify the xml code, getting rid of a lot of non useful code... just in case ? have a nice day
-
done ? and i would have been surprised you'd missed something obvious ? have a nice day
-
hi, honestly, being a little bdd obsessive, in this case i would use a query to retreive from the "pages" table the pages where parent = 7 order by modified desc for example the funny thing is in this table, deleted pages new name is their id followed by their parent id, useful to restore them with the right parent... don't know if it is a very pw way to do things ? maybe a hook to have template 2 sorting its children by modified desc when page id is 7... have a nice day
-
CKEditor Source Dialog behind background overlay
virtualgadjo replied to Bike's topic in General Support
hi, having ran into the same kind of problem in a repeater, i've found out that the solution, when in a repeater, is to set CKE as an inline editor (field tab in the field config) and everything went back ok hope it helps have a nice day -
Different results page based on form choices
virtualgadjo replied to alexm's topic in General Support
@alexmercenary my pleasure ? have a nice pw day -
Results of a selector different after switching web host - why?
virtualgadjo replied to Violet's topic in Getting Started
Hi, it sounds like you are correct ? the docs say "Matches whole words only" and these different results between your hosts could come from a "little" less accurate use of full text in the older versions of php and mysql ? have a nice day- 1 reply
-
- 1
-
-
Different results page based on form choices
virtualgadjo replied to alexm's topic in General Support
hi again ? ok, now, i understand a little more the problem which is to have a single page displaying different contents depending on the form submission and, i can see two or three different easy ways to deal with this 1 - if the content if complex, not a simple content of a few fileds, you may have a cached page the chidren of which are the different contents you will display on the result page and, of course the way you choose what page content to display depends on what you prefer, it could be having an array/object storing something like result/page id or a field in each of those pages to store what result it matches 2 - if the content is not that big or complex, you could also have a repeater in the result page and code which one is to display depending on the form result the third one is one of my bad habits ? storing the results in a personal db table with a custom admin module/page to edit them and retrieving the result, once again, depending on the form result but, honestly, the more i work with pw, the more i tend to use its abilities to deal with different contents and data structure, i am in a slow personal table rehab process ? Have a nice day -
Different results page based on form choices
virtualgadjo replied to alexm's topic in General Support
Hi, honestly, as long as you already have set the yes/no questions in the forms, i think it would be simpler (and a bit less confusing for the user) to calculate that match thing when dealing with the form post vars before displaying the result page, it would avoid you having to do twice the job ? have a nice day -
Hi, not sure i understand the question that well... but i'll try ? if what you want is to display the content of, say job 1 applications contents, its quite simple, you can use the $page->chidren() method to retreive all the children of the page you're on if the page you use to display job application is not the job page itself, just start with a method to get the job page example... you have a single page that will show all the applications for a job depending on a link from the job page itself on the job page (let's say job 1) make a link with something like job-applications/1017 on the job-application template, allow url segments and now, sure you've guessed, you can retrieve the job page children using that segment (you could use the page name instead of its id, prettier even if a little - very little - more code to retreive the page id using name and template but this is just for the example) $jobpage = pages->get(1017) $applications = $jobpage->chidren(); job done ? hope it helps have a nice day
- 1 reply
-
- 2
-
-
Hi, i'm not sure i understand the question that well but let me try the problem seems to be, you would like to have the localisation for each language in the url, for example as you said, xxx.com/contact xxx.com/fr/contact and this for all you pages if so, the solution is really simple provide you have installed the FieldtypeURLLanguage like Robin an kogondo said by default, the home page is the "mother" of all the other pages and, by default, the home page has no name in pw but has the name field usable then - leave it blank in the default language - in the other language(s) use whatever you want to set it's url (quite often the iso code will be the simplest) this way the home page url wil be - xxx.com in the default language - xxx.com/fr/ in french and so on for all the languages you use and the pages urls will be - xxx.com/the-page/ in the default language - xxx.com/fr/la-page in french for example this works if you have the same name in both languages too, xxx.com/contact => xxx.com/fr/contact hope this is what you were looking for ? have a nice daay
-
Page only in non-default language
virtualgadjo replied to jonassalen's topic in Multi-Language Support
Hi, sorry to come to you so late... actually, i your case i would choose a very simple solution which would be to use pw ability to fill all the languages with the default one if they are empty having worked on a website in nine languages (including russian, chinese and japanese), you can imagine that the case you describe happened quite a lot... my solution in your case would be quite simple, if the editor only has the news in the non default language, well, let them fill the... default language, pw will take care of the rest of the job then, the question will be, do you want to display all the news in both (or more) languages, no matter the language they appear in - if so, job done - if not, just add a select on the news template to choose in which language(s) it will be displayed with both/language1/language2 (for more than two languages, a multi select or checkboxes would do the job) this being done, it's easy to exclude news on the allnews template depending on their language and not to display the language switch on those that are not translated or, if more than two languages, only display in the switch the languages you want in case it helps have a nice day -
multilingual tags for images and files
virtualgadjo replied to virtualgadjo's topic in Wishlist & Roadmap
Hi Robin, and thanks a lot for your answer you're right, Page References is a great way to implement tags/categories, that's what i use a lot for blogs/news for example actually, Page References are not really multilingual by themselves but, as you retreive a page... reference ? thanks to pw API, it's so easy to get their local title and name plus whatever field the pages may contain and funny enough, i've been hesitating between those custom fields for images and... your image repeater ? for quite a big gallery coming from the author himself i'll follow your piece of advice and use the custom field solution even it's just for two fields actually, a legend and a category/tag actually, the Page Reference field does part of the job for me, i have both the categories titles to display on the front side and the css value using the pages names without having to sanitize the title when multiword and/or containing diacritics what i have to do when dealing with native image tags in a monolingual website... (in french, you may have guessed with my english :)) have a nice day -
Module: Video embed for YouTube/Vimeo (TextformatterVideoEmbed)
virtualgadjo replied to ryan's topic in Modules/Plugins
Hi, @EricS Having the same kind of issue with a current website i'm working on, i've used this one https://github.com/jacmaes/TextformatterLiteYouTubeEmbed it works fine if you just need youtube videos to be displayed, incredibly fast and really easy to use less options than Ryan's one but videos are natively responsive and xith a few css tweaks (Paul Irish lite youtube embed css) it does all i needed in case it helps have a nice day -
Hi, well as processwire does nearly everything i need, even more... ? and allows me to play with my own db tables and custom admin pages, i had to think hard to find something i'd like by default, found out ? i would love to have native multilingual tags in image and file input fields (could be specific field like other inputs, images multilingual for example) it would greatly simplify isotope driven galleries i know this is somthing we can achieve with modules or tuto from Ryan but, honestly, for those who mainly work with multilingual web sites it would be one more step towards pw paradise ? have a nice day
-
hi, same kind of issue for the image field pw 3.0.170 too have a nice day edited to say on github it's about the image field, dumb me ?
-
Hi all, this maybe a rookie question ? but i wonder if anyone could tell me what are the files to choose and translate in the language support module for the new input tabs in pw 3.0.170 (image for example) (sorry if it is not the right forum to post that topic in but i haven't found a specific topic about translations in language packs one) thanks a lot for any advice
-
Hi, @MadeMyDay as a former modx evo user for quite a long time and now completely pwired i of course really like this "why i choose..." article of yours ? just one thing to add, maybe you may set your website config debug on false, it currently displays errors to the bottom of the article ? Have a nice day
-
Hi, same kind of question as xportde with a little explanation why ? i'm currently working on a website in three languages (fr, en, es) but, at first, only one will be fully functional and i'm wondering it's possible to exclude, say, en and es, and then only es from the sitemap, knowing that google won't see the pages from the website itself as there won't be any language switch, then, only fr/en and, when ready, fr/en/es this would allow the customer to fill the fields in the alternate languages peacefully and only send the languages to the master of the world only when everything is ready ? thanks a lot for any advice and, of course for the module itself that i use on all my websites ?
-
funny little multilingual page create issue
virtualgadjo replied to virtualgadjo's topic in General Support
me neither and me too ? with all the funny things PW allows me to do, i was sure there was something clever somewhere deep in the API, a few tests later, it worked! my clients love PW but probably less than i do... everytime i'm wondering "can i do this"... yes i can (i sound like an american election baseline ? ) have a nice day chris