-
Posts
688 -
Joined
-
Last visited
Everything posted by Christophe
-
In Firefox, I also have: The page isn’t redirecting properly Firefox has detected that the server is redirecting the request for this address in a way that will never complete. This problem can sometimes be caused by disabling or refusing to accept cookies. I test and clear the cache in at least 3 browsers: chromium, firefox, and opera. It's even when not logged in. I've cleared the cookies this time (there was at least wire_challenge). I haven't seen wire_challenges in the cookies' list for the moment. @Robin S Of course, I've already tried with One and Two, and many other things from the Internet. I've tested with RewriteBase / activated also. With One and Two enabled, I have: the error message, http://domainname.tld redirected to https://domainname.tld http://www.domainname.tld redirected to https://www.domainname.tld https://domainname.tld NOT redirected to https://www.domainname.tld Let's Encrypt is activated by the hoster.
-
Hello, I really can't manage to redirect: http://domainname.tld and http://www.domainname.tld to https://www.domainname.tld https://domainname.tld to https://www.domainname.tld I've searched on the Forums via Google, directly on Google... I can't find a working solution for the moment. There is always something not working. ERR_TOO_MANY_REDIRECTS, etc.
-
http://modules.processwire.com/search/?q=backup Edit 2: moderators, please remove my post. Thanks in advance
-
Hi, I made one with (The) Gimp once but it wasn't responsive. You can find solutions like this one, for example, via Google with the good keywords: http://mattstow.com/experiment/responsive-image-maps/rwd-image-maps.html. Then it should just be a matter of integrating it in a template file.
- 1 reply
-
- 2
-
I might take a closer look at https://www.myresponsee.com/ and https://groundworkcss.github.io/. Edit: there are so many of them, like http://ink.sapo.pt/ also. I'm going to concentrate a bit on Responsee 4.
-
I am curious to see ProcessWire websites using Pocketgrid. In order to study their source codes, to see what is used to create menus, what (other) librairies are used to create slideshows, lightboxes... and if they use Normalize.css, for example, and other things. NB: not sure this sub-forum is the best place to create this topic...
-
When having a multilingual website, and adding French as default with the fr title, and English as en with the en title, if the superuser user has its language set to English, everything is apparently alright. But if I set the superuser user's language to French, when going to Admin > Setup > Languages (translated in French of course), I see Administration > Configuration > Langues > fr instead of Administration > Configuration > Langues > en. Is it "normal"? Do you have this too? Is it because the default language is French? Just curious. I don't remember having this on a multilingual website with English as default, but I could be wrong. ProcessWire 3.0.60 (but also on older versions) NB: by the way, I had server locale warnings for the first time I think, and on my localhost/desktop, I was able to make them disappear by adding en_EN in the backend on the English page, after clicking on the links under the warnings. I then removed it, leaving everything not translated again.
-
No news from PM(s) so I'm posting here . There is at least a difference between the demo and the profile. The demo has class="uk-width-2-3@m" and the profile has class="uk-width-expand". You can see the visual difference when you deactivate Javascript (in Firefox for example). Without Javascript disabled, you can, sometimes, notice the (loading) difference when the content is not cached (first visit, and/or other reasons). It generates a little "bouncing" occasionally/in some cases.
-
reusable block across multiple pages of same template
Christophe replied to DarsVaeda's topic in API & Templates
Hi, You could, for example, have a page - child of the homepage - named Tools (hidden) that has a child named Custom blocks or General blocks (hidden?). Custom blocks or General blocks would have children. One of them would be your reusable block (hidden?). They will need a template (with the fields you want), but not a template file. Where you want to insert the text, you could have something like: <?=$pages->get('/tools/general-blocks/your-block/')->body?> or <?=$pages->get(idofyourblock)->body?> id that you can find in Your Block page if you have the following in /site/config.php: $config->debug = true; NB: answered too late... -
Setting the language of a page to be rendered
Christophe replied to Dani's topic in Multi-Language Support
Some information before more advanced users help you. For better researches, in Google you can use, for example : site:processwire.com/api "keyword(s)" You can do the same with /talk, /blog... instead of /api. With quotes of without them, with AND, OR, -... also of course. https://processwire.com/api/ref/page/url/ (there is a language option) https://processwire.com/api/ref/page/#pw-methods-languages If I understood correctly (also from forum(s) posts), wire must or should be used from inside a module: https://processwire.com/api/ref/wire/ You can normally use wire('page')->something, wire('languages')->something... There is an API helper for languages. -
Some more avanced users will certainly help you. I've never used it. I've just installed it once (perhaps?) to try/test it. Just for information: And you perhaps have to give the good permission(s) for guest in the Access tab of the relevant template used by posts (and perhaps also of the template of their parent page). And/or give a permission(s) related to the blog for the guest role (in the guest role page). Sorry I'm not able to help more. NB: in the new Regular profile (module) there is also an example of a blog instance.
-
Hello, What version of ProcessWire and what admin theme (Default, Reno, new UIkit 3 one...) are you using? Isn't there a View tab/link that enables you to (pre)view the post/page even when it's unpublished? You normally have options on how to open the "view".
-
Do you have $config->debug = true; in /site/config.php and/or TracyDebugger installed in order to help you? What about using data-fancybox='images-single' instead of data-fancybox="images-single"? galerie is a simple image field, isn't it? Isn't the img tag missing? Shouldn't it be something more or less like: <?php foreach($page->galerie as $image) { echo "<a href='{$image->url}' title='{$image->description}' data-fancybox='images-single'>"; echo "<img src='{$thumbnail->url}' alt='{$image->description}' title='{$image->description}' />"; echo "</a>"; } ?> But you could also use $thumbnail->description. I guess you have defined $thumbnail... (NB: not sure the {} are needed in this case as there is only one -> used.)
-
By default PHP's bundled GD 2 library is used. If you're using a recent ProcessWire 3 version, ImageMagick is also supported (if you can have it installed on your server of course). Perhaps you could have better results. https://processwire.com/blog/posts/processwire-3.0.10-expands-image-resize-options/ NB: in /wire/config.php you can also see some settings, copy them to /site/config.php and modify them...
-
Hello, A more advanced user will certainly help you. But this module by @tpr perhaps already allows it: Which version of ProcessWire are you using? (Have you tried with a css rule added if the admin user is not a superuser? Or do you prefer a non-css solution - because it is not enough?)
-
Access child pages / auto redirect to parent page
Christophe replied to Manalishi's topic in Getting Started
You could hide the children/child pages and use the include=hidden selector: children("include=hidden") You could use http://modules.processwire.com/modules/batch-child-editor/ (or http://modules.processwire.com/modules/process-batcher/) to hide them quickly. If needed, you could create a checkbox field named redirect_to_the_parent_page, redirectToTheParentPage, parent_redirect, parent_page_redirect or whatever, add it to the template of the children pages, and add something like this to the bottom of the children pages template file (I have never used it but have just converted it from the code in the NB:, so I haven't tested): <?php if($page->parent_redirect) $session->redirect($page->parent()->url); // Parent redirect if the checkbox is checked ?> If needed, you could perhaps also use something like (haven't tested): <?php if($page("template=children_template")) $session->redirect($page->parent()->url); ?> <Last edit>: I guess <?php $session->redirect($page->parent()->url); ?> // I can't find the code button... would be enough if you put it in the childen pages template file. </Last edit> NB: sometimes I use <?php if($page->first_child_redirect) $session->redirect($page->child()->url); // First child redirect if the checkbox is checked ?> in a parent template file. PS: you also have http://modules.processwire.com/modules/process-jumplinks/, in case. -
Try with TinyJPG... NB: posting the images on the Forums compresses them, doesn't it? PS: I use more TinyPNG than TinyJPG.
-
Hello, You can add the Italian language pack as the "default" one, then create another English language without having to install any language pack.
-
Hello, Just to be sure, did you read this?: https://processwire.com/api/modules/multi-site-support/ Can you give more details on your installation so that you can receive better help? But perhaps the Warning message will be enough for the experts...
-
Float field type: a way to convert commas into dots?
Christophe replied to Christophe's topic in Multi-Language Support
In fact prixAuMetreCarre doesn't have thousands, but it has floats, so I'll leave it in the code. It doesn't seem to work (changing decimals and thousands separators)... I'm trying with this in _init.php (and also in tarifs.php): $code = $pages->get(1)->localName($user->language); switch ($code) { case 'en': $number = number_format($page->superficie|$page->tarif|$page->prixAuMetreCarre, 2, '.', ','); // or $number = number_format($page->superficie|$page->tarif|$page->prixAuMetreCarre); as I want commas for thousands in English break; case 'fr': $number = number_format($page->superficie|$page->tarif|$page->prixAuMetreCarre, 2, ',', '<span style="font-size: 0.3em;"> </span>'); // I'm keeping this in case during tests but default should be enough break; default: $number = number_format($page->superficie|$page->tarif|$page->prixAuMetreCarre, 2, ',', '<span style="font-size: 0.3em;"> </span>'); } echo "$number"; In English, I see this at the top left of the page: 0.000.00 In French I see 0,000,00 I also tried, in case, adding ->children. Perhaps I should create a template file for the children (and copy or not the code there). I've tested with return, by curiosity, when the code is in _init.php, nothing, when it is in tarifs.php the table disappears. Perhaps it comes from settings in ProcessWire...(?), for these fields. I'm starting to think it's better to give up (for now). We are wasting too much time for this detail (even though it would be nicer)... I'd like to understand why setlocale didn't work for thousands. Edit: thanks anyway for your help @kixe! -
Float field type: a way to convert commas into dots?
Christophe replied to Christophe's topic in Multi-Language Support
Thank you @kixe I have to go now, I'll look at it when I come back. Yesterday I continued a little trying to figure it out. I tried, for example, if I remember well, with things like $number($l->prixAuMetreCarre)... in the foreach directly but it didn't work and I would perhaps have had to change the way if was structured (without <?php endforeach; ?> for instance) without any garanties. _init.php already exists so I'll put it there. I need it also for superficie and tarif, so I'll see if something like this works: $number = number_format($page->superficie|$page->tarif|$page->prixAuMetreCarre, 2, '.', ''); -
Float field type: a way to convert commas into dots?
Christophe replied to Christophe's topic in Multi-Language Support
I'm trying to replace the setlocale... parts with some number format code but all I'm having is "Server Error" messages. I'm not advanced enough in php. Edit: trying to find a solution starting from here: http://php.net/manual/fr/function.localeconv.php Edit 2: there's also http://php.net/manual/fr/function.nl-langinfo.php, and others... Edit 3: forget all this. I'll find it one day. A lot of the solutions (examples) I'm seeing assume that we assign a specific number to a variable. I have to find out how to assign any number (integer, float...) to a variable. -
Float field type: a way to convert commas into dots?
Christophe replied to Christophe's topic in Multi-Language Support
Trying to find how to merge in the best way possible, this and this (http://php.net/manual/en/function.number-format.php) <?php $number = 1234.56; // english notation (default) $english_format_number = number_format($number); // 1,235 // French notation $nombre_format_francais = number_format($number, 2, ',', ' '); // 1 234,56 $number = 1234.5678; // english notation without thousands separator $english_format_number = number_format($number, 2, '.', ''); // 1234.57 ?> -
Float field type: a way to convert commas into dots?
Christophe replied to Christophe's topic in Multi-Language Support
About this one @adrian: https://processwire.com/talk/profile/1601-martijn-geerts/ I was adding @Mart... when I saw both. -
Float field type: a way to convert commas into dots?
Christophe replied to Christophe's topic in Multi-Language Support
@kixe It's all good for the decimal part, and simple to add. I've just inserted it at the top of tarifs.php, under <?php namespace ProcessWire; ?>. How can I modify this piece of code in order to also have the formatting applied - for thousands - to French (little space) and English (dot) please? @Martijn Geerts You (still) have 2 accounts apparently? Isn't it possible to merge them? Edit: the other one doesn't seem to have data... Edit 2: looking at how to change the code with the information here: http://php.net/manual/en/class.numberformatter.php Have all a nice week! Edit 3: the "formatting applied - for thousands -" should normally work with setlocale, shouldn't it?