-
Posts
687 -
Joined
-
Last visited
Everything posted by Christophe
-
Float field type: a way to convert commas into dots?
Christophe replied to Christophe's topic in Multi-Language Support
Internet connection problems yesterday night... and again now. From time to time it happens, more and more... even with the "stability" option. Some reasons surely being that households now have several hardwares connected to (the) Internet (YouTube, etc.), Internet TV, illegal music and files downloads... (I'll remove the 2 lines above later.) http://php.net/manual/en/class.numberformatter.php ""12 345,67" in France and "12.345,67" in Germany." Reading this I thought, "But in France, we use both...". I'll read the page more carefully. In usage, sometimes I usually (a bit of contradiction) write 1000 for example (but I wouldn't put (or less often) 1.000 or 1 000 - or perhaps with a smaller space). But for 1000,64 I would rather write 1.000,64 (or 1 000,64 with a smaller space). For 1000000, for sure I would write it 1.000.000 or 1 000 000 (with a smaller space if possible). For 1000000,64, same... I guess it depends also (on) if you write it with a pen, a keyboard... and on other conditions/reasons (readability, etc.). Perhaps, I often can't stick to one way of doing things, or I am too "international" for some things... At the same time, I always wrote cursive letters with a pen (nice if not too quick), then one day for a job, in order to be more readable to another person I started writing sometimes the other way. From then on, it happens (quite often) that I (still) mix both... But in French I can also write it in Roman characters (small, big, or tiny)... I have to find (out) how to create a smaller space (again ?) with a keyboard. Perhaps if I select the numbers, there is a Ctrl + Alt + something for that. A bit like telephone numbers (sometimes with or without spaces, or with dots). I'm going to eat a bit... Where is the preferred place(s) to put your piece of code @kixe please? -
Page Table data on a multilingual website (frontend)?
Christophe replied to Christophe's topic in Multi-Language Support
Thanks again Adrian for your modules. Indeed. I was expecting to see this option in BCE's edit mode, but as the superuser's language was French (default) at that moment it wasn't displayed (which seems normal) and I didn't think of checking it with English. As for Admin Actions, I didn't think of going there after to see if there was an action that could do the job, even though (I think) I felt (a bit) it could be the case. Perhaps it seemed too good to be true, or after not finding it (logically) via BCE I just thought of doing it manually as quickly as possible. -
Hello, I have everything ok now here: But I'm wondering if there is a way to convert commas into dots automatically? For exemple for the field prixAuMetreCarre (float), 166,66 (French) into 166.66 (English). Is it possible via a setting in the backend or via a hook? Not especially for now, but I also have the field tarif (integer) for exemple, 115000. This format is ok as it is I think. But if, in the future, I ever need to use (something like) 115.000 (French) instead -> 115,000 (English). Is it possible via a hook or in any other way?
-
Page Table data on a multilingual website (frontend)?
Christophe replied to Christophe's topic in Multi-Language Support
Thank you so much @kixe! The solution was "right in front of me" but I wasn't seeing it. I imported the data from a csv file (before a LibreOffice Writer table that I copied/pasted in a Calc Spreadsheet) with the help of Import Pages from CSV files (first time using it also). And later used Batch Child Editor (perhaps first time also) to hide them all at once and do another operation. But the children pages are only hidden, not unpublished. If not hidden, by default with the site profile used, I have them all displayed as links, so I just hide them. And hidding them also rapidly makes them less "emphasized" in the backend. I've just had to activate the English language now manually for the 27 pages, one by one... I wonder if I still need the language-checking pieces of code already in place, but as it works I won't try it now and remove them for this project. -
Page Table data on a multilingual website (frontend)?
Christophe replied to Christophe's topic in Multi-Language Support
Thank you @kixe for your help. Which settings tab are you referring to please? Edit: if it's the one in the Tarifs page, it is already checked. I have already tried with <?php foreach($page->grilleTarifaire as $l): ?> and have just retried but when doing so there is no data for the French version/page also on the frontend. I probably have to find a way to check for the language like I "succeeded" in doing so (but after some hours and variations testing). But here it is different, I almost know nothing about the different methods to retrieve data from a Page Table (with also multilingual data), and there seems to be even less information about it than for repeaters in the forums (even less with the multilingual aspect). I had to put include=hidden in order for the data to be displayed in French as the children pages are hidden... And I've put template=grille-tarifaire in case other (children) pages, not used for the Table Page field, are added later. Edit 2: for the labels I "just" had to use $label = "label{$user->language}"; and some other pieces of code, as a possible solution. But for the fields' language-specific values I don't currently know how to "call" them. -
Page Table data on a multilingual website (frontend)?
Christophe replied to Christophe's topic in Multi-Language Support
I'm trying to find out if something in the backend is preventing it. For the Page Table field, in grilleTarifaire -> Access, View is not checked by default for guest (everyone), but checking it doesn't seem to change anything. I'm not sure what difference it makes. Also, I've just changed the superuser's language to English for testing purposes, and now in the page Tarifs, for the Page Table field, I see the label and data translated when it is text. Is it "normal", for this type of field, that there aren't tabs to switch languages in the Tarifs page? It's not really necessary but I am wondering if there's a (small) relation between this fact and the one that the English page version doesn't display the data on the frontend. I'm seeing that for the superuser role I don't have lang-edit checked. Checking it doesn't seem to change anything, so I'm unchecking it. As I'm using a Page Table field, ProcessWire 3.0.54, and @ryan's new "regular" profile for the first time (so, for the first time also, all together with multilingual functionality, otherwise I've already created multilingual websites), there could be many reasons why it's not working. There's probably a way to make it work in the frontend but I'm not good enough for the moment to find the solution right now. -
Hello, I'm using a Page Table field for the first time. With ProcessWire 3.0.54 and the new "regular" profile (first time with both also). The default language is French (title: fr) and the second language is English (name: en, title: en). English pages have /en/ added after the domain name, French pages nothing... I've eventually managed to have this added piece of code (almost) working in tarifs.php (at first a copy of basic-page.php): <div class="uk-overflow-auto" pw-append='content-body'> <table class="uk-table uk-table-hover uk-table-striped uk-table-small uk-table-middle"> <?php echo "<caption>"; $label = 'label'; if ($user->language->name != 'default') { $label = "label{$user->language}"; } // Output label in correct language echo $page->fields->grilleTarifaire->$label; echo "</caption>"; echo "<thead><tr> <th>{$fields->lot->$label}</th> <th>{$fields->superficie->$label}</th> <th>{$fields->faces->$label}</th> <th>{$fields->tarif->$label}</th> <th>{$fields->prixAuMetreCarre->$label}</th> <th>{$fields->etat->$label}</th> </tr></thead>"; ?> <tbody> <?php foreach($page->children("template=grille-tarifaire, include=hidden") as $l): ?> <tr> <td><?=$l->lot?></td> <td><?=$l->superficie?></td> <td><?=$l->faces?></td> <td><?=$l->tarif?></td> <td><?=$l->prixAuMetreCarre?></td> <td><?=$l->etat?></td> </tr> <?php endforeach; ?> </tbody> </table> </div> What is working (now) when changing the language to English: the caption changes to the English translation of the Page Table field's label, the English translations appear in the header cells (th) of the table (if there is a translation, otherwise nothing appears...) What is not working when changing to English: in French, all the data entered in the backend via the Page Table field is displayed in <td>s, but in English nothing is generated between <tbody> and </tbody>. The fields' types: 1 TextLanguage, 4 integers (2 are required, 1 has the option "Number (HTML5)"), and 1 float. I'm stuck now. So any help is welcome... Thanks in advance! NB: I have Tracy Debugger installed in case... Edit: the website is developed online for this project.
-
Shouldn't it be with quotes around pages? Be it in blog/ or talk/, it seems to always be wire("pages") or wire('pages'), wire("page") or wire('page').
-
PW 3.0.52: Optimizing 404s in ProcessWire
Christophe replied to ryan's topic in News & Announcements
Out of curiosity, are you using Apache or Nginx? And which version of PHP? Are you using MySQL or MariaDB? And which version? Edit: From which version did you update/upgrade (and how: upgrade module, directory and file replacements via FTP...)? Or is it a direct installation? Are you using it on Linux, Windows, Mac? Is it on a "localhost" or an online server? Is it via virtualization? How did you install it: direct download, git, hosting (c)panel...? Have you imported the database from another installation in a different environment? -
Another solution At http://modules.processwire.com/modules/process-page-delete/, Ryan commented: I remember this fact now. Edit: Kongondo, are we talking about the same thing?
-
Hello, If you go to "Edit", you should have a tab where the user can delete the page.
-
Page reference fields.
-
This is incorrect. You can access files/images from other pages, be it any page, sibling pages, parent pages, children pages, a "media" page (for example), "media" (sub-)categories (and/or their children) pages, etc. It's quite flexible. Edit: I would just like a way to get to some page assets quicker sometimes, when, because of the structure I set up, I have to click many times in order to access them and to do it several times to get several images not far from each other, for instance, in the page tree. It would be nice to be able to bookmark "places" to get there in fewer clicks. Edit 2: I'm just thinking (again) that being able to select several files/images at once would be a big progress. Several from the same page and/or several from several pages before validating the insertion(s). I don't know if/how it could be done with the different options available for each file and/or image: cropping, title, etc.).
-
Seems like a futuristic surveillance/monitoring repression drone. No protections around the propellers. For the moment, I'd rather try something like the Vusion 250 Extreme FPV Race Pack, for example. Or a flying car like the AeroMobil, for instance.
-
I guess I can change them if I'm not using utf8mb4 and InnoDB, or just remove both lines to stay with the default options. I guess these lines are here to show the new options.
-
Yes, why? I didn't read the readme (this time). I didn't look closely enough at the requirements written on the profile homepage (demo or localhost). And/or I didn't want to install the DEV version (I've never done it). I hope I can come back to the MASTER version with the upgrades module once the new master is out. Perhaps my mind filtered the information.
-
I'm not sure this is the right place to talk about the following (feel free to move it): I've just installed this new profile with the latest PW 3 stable version (3.0.42 MASTER). It's the first time I install PW 3. I've installed it on localhost (Linux Mint 18 - PHP7 - MariaDB). 1) I can access the frontend and the backend. But the profile/theme doesn't load well (see the uploaded image please). I have some ideas as to why but I'm not finding the solution yet. Could it have something to do with compilation? I've replaced the templates folder, cleared the cache... Do I have to suppress files/folders from assets, for example? 2) In phpMyAdmin, I see MyISAM utf8_general_ci for each table (I created the database there. By default it was utf8mb4_general_ci, so, not sure, I suppressed it and recreated it). But I also see 27 tables Total InnoDB utf8_general_ci. At installation, I only clicked on advanded settings to see information related to utf8mb4 and InnoDB. I didn't change anything, as far as I remember. In config.php I see : $config->dbCharset = 'utf8mb4'; $config->dbEngine = 'InnoDB'; Is it normal or should I change it to?: $config->dbCharset = 'utf8'; $config->dbEngine = 'MyISAM'; Thank you in advance.
-
Please try with a fresh .htaccess file (in the sub-directory(?)). Disable the (lines you have added in the) .htaccess file you have in the root(?). # 11. RewriteBase /audino.us/ # 13. RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] If you want to redirect to the "www." version of the site (and not the opposite). Don't put anything in ready.php related to this problem. With some web hostings you can just point the website to a sub-directory from within their administrations. You don't need to touch RewriteBase.
-
Normally you just have to customize RewriteBase. http://processwire.com/docs/tutorials/troubleshooting-guide/page3 (Or) doesn't your hosting provider ("panel") allow you to point your website to a sub-directory? NB: http://domainname.tld/index.php should redirect to http://domainname.tld/, shouldn't it? And, for SEO at least, the non-www version should redirect to the www version (or the contrary). Perhaps you have planned to do it later. PS: for security reasons, perhaps you should "hide" the domain name of your website if it's still in development mode.
-
Where are the ProcessWire case studies? https://snipcart.com/case-studies
-
How change any thing on body text?
Christophe replied to franciccio-ITALIANO's topic in Getting Started
I often (have to) customize the Style drop-down list in CKEditor. The styles applied can add classes to elements, like p for example. So these classes already exist if you are using a framework and/or you can add your own css rules, and you can add colors, align to the right, justify, etc. You can see some summarized information here: -
https://preciousplastic.com/
-
I've just noticed that the top logo and menu disappear completely when clicking on a top menu link or sub-link with the third/central mouse button, as I often open several pages in other tabs that way. They don't reappear like it is the case when clicking with the left mouse button. This happens with Chromium. I've tried with Firefox, this doesn't happen. With Opera, it's the same as with Chromium. [ On Linux Mint ] Edit: I'll remove this edit later. 2 little details: "Simple,high performing home technology systems" -> a space is missing after the comma + no dot (difference) "Saving time and money with smarter technology." -> dot (difference)
-
@Klenkes, Could it be because of Opera Turbo mode?
-
On my list to try one day: http://lostgrid.org/ PostCSS and Lost video tutorials: https://goo.gl/7Nxkhw