-
Posts
991 -
Joined
-
Last visited
-
Days Won
3
Everything posted by PWaddict
-
I think so! I will wait for the next dev release to test it.
-
How to remove the seconds from %X time format?
PWaddict replied to PWaddict's topic in Multi-Language Support
You can check all the time formats for strftime here. -
How to remove the seconds from %X time format?
PWaddict replied to PWaddict's topic in Multi-Language Support
That is very specific. It only displays the 12-hour format. My method displays the time based on each locale and without the seconds. For example some countries have 24-hour format and others the 12-hour etc. -
How to remove the seconds from %X time format?
PWaddict replied to PWaddict's topic in Multi-Language Support
Here is the solution: <?php $oldtime = strftime("%X", $page->getUnformatted("tour_date")); echo $newtime = substr($oldtime, 0, strpos($oldtime, ':', strpos($oldtime, ':')+1)) . " " . strftime("%p", $page->getUnformatted("tour_date")); ?> Now I'm getting the time formats based on each locale without the seconds: Locale en_US.utf8 = 12:00 AMLocale es_ES.utf8 = 00:00Locale el_GR.utf8 = 12:00 πμ If you know a better method please feel free to share it! -
I found the solution. I have to replace the slashes on each file value from the json files for each language. This is from localhost: "file": "wire\\modules\\LanguageSupport\\LanguageSupport.module", Must be changed to this in order to work on the server: "file": "wire\/modules\/LanguageSupport\/LanguageSupport.module", The funny thing is that I changed them on localhost too and they working fine. So the question is why on localhost have been used the 2 backslashes instead of the 1 backslash and 1 forward slash?
-
In order to uninstall LanguageSupport.module I have to first uninstall LanguageSupportFields.module, LanguageSupportPageNames.module and LanguageTabs.module and PW won't let me uninstall the LanguageSupportFields.module because there are fields with multi-language values.
-
But if I uninstall the Language Support module all the language related values will be gone from everywhere. A temporary solution is to delete all the translations files and find them again.
-
I'm using the following method to display the time based on each locale: <?= strftime("%X", $page->getUnformatted("tour_date")) ?> Here are the results: Locale en_US.utf8 = 12:00:00 AM Locale es_ES.utf8 = 00:00:00 Locale el_GR.utf8 = 12:00:00 πμ How can I remove the seconds (:00) ?
-
I transferred a site from localhost (XAMPP Windows) to a live server (Linux) and it's impossible to edit the translations files. When I try to edit for example the LanguageSupport.module I'm getting this error: Session: File does not exist: /wire\modules\LanguageSupport\LanguageSupport.module (translation file not needed? textdomain: wire--modules--languagesupport--languagesupport-module) I'm guessing the issue is caused because of the slashes: On localhost the paths for translation files are using backslashes: \wire\modules\LanguageSupport\LanguageSupport.module while on a live server the paths are using forward slashes: /wire/modules/LanguageSupport/LanguageSupport.module
-
I'm not familiar with hooks but if you want you can try the Setup Page Name module to do what you want.
-
Multiple methods for Multi-language datetime fields?
PWaddict replied to PWaddict's topic in Multi-Language Support
Here is an alternative method that actually solved my problem where I was getting a unix timestamp: <?= $order->getFormatted("pad_paid") ?> If you know more methods feel free to share them. -
Beside using the below method for displaying a datetime field with it's multi-language formats, are there more methods for doing the same thing? <?= utf8_encode(strftime($order->pad_paid)) ?> I'm not looking for methods with hardcoded multi-language values like this one: <?= utf8_encode(strftime("%b %d, %Y", $order->getUnformatted("pad_paid"))) ?>
-
1. Put the _init.php under site/templates directory. 2. Add the following code on the site/config.php file and you're ready: /** * Prepend template file * * PHP file in /site/templates/ that will be loaded before each page's template file. * Example: _init.php * * @var string * */ $config->prependTemplateFile = '_init.php';
- 15 replies
-
- 1
-
-
/** * Prepend template file * * PHP file in /site/templates/ that will be loaded before each page's template file. * Example: _init.php * * @var string * */ $config->prependTemplateFile = '_init.php';
- 15 replies
-
Try updating PW to the latest version: 3.0.66.
-
I'm using it on PW & Padloper templates and it's working fine. Although I haven't tested yet the email templates from Padloper. If you want post all the steps required in case I need to do your method.
- 15 replies
-
@Peter Knight Here is exactly what you need to do: Create a new file under templates: _translations.php. Inside add all your translatable words or phrases like this: $page->__product_drawing = __('Product Drawing'); $page->__buy_now = __('Buy Now'); $page->__read_more = __('Read more'); Then on your _init.php add this: include_once("./_translations.php"); Then on the templates you want to display for example the "Product Drawing" add this: $page->__product_drawing Now all you have to do is to go on your Languages under admin and then find the file _translations.php and start translating all the strings you have there.
- 15 replies
-
- 1
-
-
The latest update of the module was on 1 April 2014. My above simple request to add a missing icon hasn't fulfilled yet! Maybe @Wanze isn't available. I'm using the module on both PW2 & PW3 with https and it's working fine. You can install a module with 3 methods: 1. Add Module From Directory 2. Add Module From URL 3. Add Module From Upload Go to Admin > Modules and click on the tab "New" to check all the methods.
-
Hi @adrian and welcome back Thanks for the fix on the first problem. Now about the 2nd problem, I deleted that cause I wanted to do more testing. So here is the full problem... Problem (1st part): If I add a title on an additional language field eg. "Test" where that exact title "Test" is already on another page's additional language field from the same template when I save the page the title disappears and I'm getting the error: Session: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'test-1018' for key 'name1977_parent_id'. Problem (2nd part): If I add a title on the default language field eg. "Test" where that exact title "Test" is already on another page's default language field from the same template the page saved as /test-1 for all languages which is correct BUT if on that page (/test-1) add the same title "Test" on an additional language field the page name for that language will be saved as /test which is wrong cause now I have 2 pages with the same page names. Solution: Page name for additional language should be checked if already exists and name it properly just like it happens on the default language: Session: Changed page URL name to "test-1" because requested name was already taken.
-
As far I know the only fix is to disable mod_security. You should contact your hosting provider.
-
This might be caused by mod_security. Add the below code on top of your .htaccess file and try again to save the page. <IfModule mod_security.c> SecFilterEngine Off SecFilterScanPOST Off </IfModule>
-
Wow you fixed that issue. Now it's working properly. Thank you so much
- 100 replies
-
- 2
-
-
- template
- autogenerate
-
(and 2 more)
Tagged with:
-
It seems that the module isn't working anymore on websites without languages core modules installed. I've upgrade the module from 2.0.3 to 2.0.7 on a live website (without languages core modules installed) and when I tried to add a page that used by this module the page didn't even saved as unpublished and there was an error. I forgot to copy the error cause I was in hurry to switch back the module to the 2.0.3 version. I hope @kixe can fix it.
- 100 replies
-
- template
- autogenerate
-
(and 2 more)
Tagged with:
-
Module: Video embed for YouTube/Vimeo (TextformatterVideoEmbed)
PWaddict replied to ryan's topic in Modules/Plugins
Use the Global Options for Embedded YouTube/Vimeo Videos module to add player parameters. -
"Site in maintenance": how set it?
PWaddict replied to franciccio-ITALIANO's topic in Getting Started
If you want to set maintenance mode only in database follow this guide otherwise for the entire site install the Page Protector module.