-
Posts
310 -
Joined
-
Last visited
-
Days Won
4
Everything posted by virtualgadjo
-
hi @adrian and thanks a lot for your answer, i'll try tu use AdminActionh for this too, didn't think of this although i often use AdminActions for many other purposes ? i've solved my current problem using batch child for the fields i need in the default language adding the page id to the field list and using Ryan recent ProcessLanguageFieldExportImpor to export the multi language ones then i just had to agregate both csv based on the page ids you're right, my first thought was to write my own code but pw does so many things "by itself it must have made me a little lazy ? have a nice day
-
ProcessLanguageFieldExportImport module support
virtualgadjo replied to ryan's topic in Modules/Plugins
Hi, fantastic module that saved me a lot of time... thanks a lot jusrt wondering, i know, a bit paradoxcical ? if it is possible to include some monolingual fields to the export, for example, speakers whose first and last name of course are monolingual but functions are in several languages or, is the best solution changing the monolingual fields into multi ones, taking advantage of pw ability to fiil other languages with the default one is empty thanks a lot anyway, love it ? have a nice day -
Hi, sorry if the question ha&s already been asked... couldn't find out is it possible to export multi language fields at once, i.e a web site in fr and en, can i export both values for each field when they are multilingual thanks for any tip ? have a nice day
-
Setup of a site with two separate parts / pages
virtualgadjo replied to kaz's topic in General Support
Hi, if your urls will look like yourdomain/company1 yourdomain/company2 you can simply reproduce your sketch with pw page structure but if each company must have its own domain name i think the multisite solution, even if a little "too much" ? will be the best solution to avoid those 301 you're speaking about (savage and headaches to come ? ) and for a better SEO have a nice day -
Using Custom Find to get a simbling repeater values
virtualgadjo replied to rooofl's topic in General Support
@Robin S wow, same result as my template selection thing but this makes me understand how pw does it, thanks a lot ? @rooofl of course, Robin S example also works with a select made with a page reference field have a nice day -
Using Custom Find to get a simbling repeater values
virtualgadjo replied to rooofl's topic in General Support
Hi @Gideon So i can see this working with a foreach on the front side but as the question was to populate the field in the admin interface i deadly have to try this, pw would be even simple than i thought ? have a nice day -
Using Custom Find to get a simbling repeater values
virtualgadjo replied to rooofl's topic in General Support
hi again ? actually i'm referring to the field you use in the repeater, whether or not it's the one you use as the item title in the page as it is natively the one pw will use in a page reference field coming to this page reference it's just the type of field easy to populate with a list of "pages" of your choice, here the repeater elements, thanks to the fact pw create a template for the the repeater elements and a page for each element (bot the most poetic sentence... guilty as charged ? and, in this field parameters (input tab) you just have to choose your repeater template pw has created on the fly here, just for the example, my repeater was named... my_repeater ? have a nice day -
Using Custom Find to get a simbling repeater values
virtualgadjo replied to rooofl's topic in General Support
Hi, there is an easier way to do this ? to make it eve easier i use the title* field in the repeater elements as pw uses it to make the list then, for your page reference field just choose repeater_yourrepeatername in the template choice, done ? have a nice day -
or not, affirmative ? actually, using markup regions, you have multiple choices to echo contents but markup regions or not, just remember that when you do things within the php tags before echoing any output, this happens even before the html tag (the _main.php file is included to the end of your template) usually, with markup region, this top php block is used to find pages, prepare some foreach and so on but don't worry, what happens inside the html tags below is only executed once, be it inside the main container you have in all your templates or in those "optional" blocks you can define with the pw attributes ? have a nice day
-
Hi, even without seing the whole code, the first thing that comes in mind is you echo is not inside any html tag the php block with the namespace is not really made for receiving any output except for testing reasons, have you tried erasing the echo here and putting it inside an html part below (inside your .card for example)? have a nice day
-
Hi, life without processwire would be so sad, so, here comes the translation (into french, no kidding... ?) for the last master release https://github.com/virtualgadjo/pw30210-lang-fr @vincent sorry to be still so dumb with github... of course, as it will always be, you are very welcome if you'd like to use those files to update you repo (if i haven't missed anything, there is no empty line when checking the full list of files in pw admin, if ever i found one i would of course update the zip) have a nice day
-
ckeditor How to add font support in CKEditor?
virtualgadjo replied to sam13579's topic in General Support
hi, actually, you can @import your fonts in the css you use for CKeditor, use one for the body, another for the h/titles and wichever you need for specific contents using classes you set in your css and define in the style select with the custom js else, you could of course add ckeditor "font" addon but honestly it is rarely a good idea to let non designer users transform the content into a fonts and font-sizes festival (same thing for the colors...) ? https://ckeditor.com/cke4/addon/font Have a nice day -
Hi, two more litte cents ? if this hosts var is not well filled you may also run into another little problem as pw automatically build the preview links in the admin based on this var have a nice day
-
Hi @marie.mdna if i'm not wrong this depends on your config file $config->httpHosts var, if the first host in the array contains the www, the sitemap will use it too (at least, that's what happens for all the websites, a lot..., for which i've this module installed ? have a nice day
-
hi @elabx you're completely right, and following you on the elaboration path, my savage little script is just the php way of doing what @mel47 was trying to write with any kind of array and number of columns but, honestly, nowaday, if i had to do this, as much as i love php i would probably simply iterate the array in the template inside one div/container and use css to generate the columns... ? have a nice day
-
Hi, i think this is more a php question than a pw one, then i'll answer in my savage php way ? let's assume $intruments is an array and you don't know how many intruments there are, you don't need those first, second col and so on, just iterate $isntruments $total = count($instruments); $colmax = ceil($total / 3); $i = 1; $out = '<div class="column">' . "\n"; // or .= if $out is initialised above foreach ($instruments as $inst) { $out .= '<p>' . $inst . "</p>\n"; if ( $i == $total ) { $out .= "</div>\n"; } elseif ($i < $total && $i % $colmax == 0) { $out .= "</div>\n"; $out .= '<div class="column">' . "\n"; } $i++; } echo $out; // or return if in a function should do the trick, no matter $instruments contains 15, 17 or 200... instruments ? have a nice day
-
How to redirect the user back to desired URL after login page?
virtualgadjo replied to tires's topic in General Support
hi, the pw way on top of a page $input->urlSegment1 you can use various functions to check if there is one or no, for example if ( strlen($input->urlSegment1)) $foo = ... and of course validate if the segment is an authorized one, regex for example, beginning with the segment you accept in the model parameters (i nearly always use regex, i.e regex:^[0-9]{1,5}$ //or 6,7... depending on how many pages you'll have :) that will check the segment looks like a page id, if not, 404... now, coming to hooks, never did this, il let @Robin S answer this, he knows pw and hooks far better than i do ? have a nice day -
How to redirect the user back to desired URL after login page?
virtualgadjo replied to tires's topic in General Support
Hi, @Robin S is right, my url segment idea is not necessary but just a simple way to keep the page id alive ? now, honestly, when i have to do what you described, as much as i love coding, hooks and all what pw gives us i would probably use session vars the way @Robin S shows in the hook but simply in the login page code, maybe because i'm too used to doing this kind of thing without the help of pw... - if the user arrives unlogged on the page, i would set a session var with the id of the page and then redirect to the login page (instead of login/pageid that doesn't need this session var) - if the login is successful, simply use pw redirection abilitiy to the page the id is in the session destroying the var that isn't useful anymore but using the login/register plugin @Robin S's hook is more the pw way of working than my savage 'manage your life on your own' solution ? have a nice day -
@bernhard yeah, i love the page with all the needed snippets! exactly what i have done for a client who needed many carrousels they could use on several pages where they want a parent page with children, each one containing a carrousel and hannacode to use those any where in content fields @Robin S HannaCodeDialog could also help in this case that's what i love with pw, with a little imagination, it lets you do whatever you want in an incredible easy way for the customers to edit ? have a nice day
-
How to redirect the user back to desired URL after login page?
virtualgadjo replied to tires's topic in General Support
Hi @Robin S let's imagine this https://foo.com/userlogin/3025 isn't it easy to grab 3025 and, if the login is successful, redirect the user to $pages->get(3025)->url;? would be the same with a page name and easy to change each time the page you need to redirect to does just a simple question ? have a nice day -
How to redirect the user back to desired URL after login page?
virtualgadjo replied to tires's topic in General Support
Hi, just my two cents ? for a front-end login page, url segments could be your friends (the page to be redirected id, name or whatever you want) a little regex to keep them safe, it wouldn't change the login url and you could grab it like a var, same thing as what @bernhard has highlighted for the pw native login have a nice day -
hi, wow, thansk a lot @bernhard i didn't know this module and it looks fantastic i think that it's not exactly what @DansDomain was looking for because the full field is managed by the syntax higlighting you choose instead of being able to post a snippet inside a long piece of "normal" content but it gives me an idea, using ACE for a field, CKEditor for the text content and hannacode to insert the full code field into the CKEditor one, even two or three little snippets and hannacode with the name of the fields as a variable well, sure when you have a lot of little snippets it's probably easier to use the codesnippet plugin and apply classes to the code tags to have them stylized on the front end but i can imagine cases where this ACE/hannacode solution would be very useful thanks again and have a nice day ?
-
hi again, as i love these little kind of challenges ? found out something as i said, just add a config.js file inside the module folder (not the plugins one, just site/modules/InputfieldCKEditor/) with this CKEDITOR.editorConfig = function( config ) { config.tabSpaces = 4; }; and your tab key will add four in a row which you'll not be loosing on the front side have a nice day ?