- Posts: 217
- Thank you received: 3
Custom Yahoo Calendar URL for localization
- hide10
- Topic Author
- Offline
- Elite Member
Less
More
3 years 10 months ago #141153
by hide10
Custom Yahoo Calendar URL for localization was created by hide10
Hello,
When I click on the "Save to ... Yahoo Calendar" button, it redirects me to "calendar.yahoo.com".
However, I need it to be "calendar.yahoo.co.jp".
I guess I need to edit /components/com_eventbooking/helper/html.php
But the modification will be lost when the component is updated.
Is it possible to create override file?
Thanks.
When I click on the "Save to ... Yahoo Calendar" button, it redirects me to "calendar.yahoo.com".
However, I need it to be "calendar.yahoo.co.jp".
I guess I need to edit /components/com_eventbooking/helper/html.php
But the modification will be lost when the component is updated.
Is it possible to create override file?
Thanks.
Please Log in or Create an account to join the conversation.
- hide10
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 217
- Thank you received: 3
3 years 10 months ago #141155
by hide10
Replied by hide10 on topic Custom Yahoo Calendar URL for localization
Hello again,
Actually, it would be nicer if it becomes language string.
That way, I can edit language string like
"calendar.yahoo.com" for English
"calendar.yahoo.xx" for other language
Just a thought.
Thanks.
Actually, it would be nicer if it becomes language string.
That way, I can edit language string like
"calendar.yahoo.com" for English
"calendar.yahoo.xx" for other language
Just a thought.
Thanks.
Please Log in or Create an account to join the conversation.
- hide10
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 217
- Thank you received: 3
3 years 10 months ago #141224
by hide10
Replied by hide10 on topic Custom Yahoo Calendar URL for localization
Hello,
There is no way other than editing the following file?
/components/com_eventbooking/helper/html.php
Just want to make sure.
Thanks.
There is no way other than editing the following file?
/components/com_eventbooking/helper/html.php
Just want to make sure.
Thanks.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
3 years 10 months ago #141239
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Custom Yahoo Calendar URL for localization
Hello
Better edit code in the file components/com_eventbooking/themes/default/common/save_calendar.php and move that modified file to PATH_TO_TEMPLATE/html/com_eventbooking/common folder so that the change won't be lost when you update to future releases of the extension
Tuan
Better edit code in the file components/com_eventbooking/themes/default/common/save_calendar.php and move that modified file to PATH_TO_TEMPLATE/html/com_eventbooking/common folder so that the change won't be lost when you update to future releases of the extension
Tuan
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
3 years 10 months ago #141240
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Custom Yahoo Calendar URL for localization
To avoid changing the whole code, I would suggest you to use str_replace function to replace URL instead of re-write the whole code:
For example, change:
To
Hope this helps
Tuan
For example, change:
Code:
echo EventbookingHelperHtml::getAddToGoogleCalendarUrl($item);
To
Code:
echo str_replace('calendar.yahoo.com', 'calendar.yahoo.co.jp', EventbookingHelperHtml::getAddToGoogleCalendarUrl($item));
Hope this helps
Tuan
Please Log in or Create an account to join the conversation.
- hide10
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 217
- Thank you received: 3
3 years 10 months ago #141284
by hide10
Replied by hide10 on topic Custom Yahoo Calendar URL for localization
Hello Tuan,
Thank you! It was a great help.
I created a new language string EB_YAHOO_URL.
Then edited the override file of save_calendar.php as below:
It works according to the selected language.
Thanks.
Thank you! It was a great help.
I created a new language string EB_YAHOO_URL.
Then edited the override file of save_calendar.php as below:
Code:
echo str_replace('calendar.yahoo.com', JText::_('EB_YAHOO_URL'), EventbookingHelperHtml::getAddToYahooCalendarUrl($item));
It works according to the selected language.
Thanks.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
3 years 10 months ago #141285
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Custom Yahoo Calendar URL for localization
Ah, OK. That's a good solution
Tuan
Tuan
Please Log in or Create an account to join the conversation.
Support
Documentation
Information
Copyright © 2024 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.