All files from this thread
File Name | File Size | Posted by | Date | ||
---|---|---|---|---|---|
breadcrumbs_home_to_external_site-1.0.0.tar.gz | 1.5 KB | open | download | Maurice Makaay | 01/15/2011 | Read message |
breadcrumbs_home_to_external_site-1.0.0.zip | 3 KB | open | download | Maurice Makaay | 01/15/2011 | Read message |
breadcrumbs_home_to_external_site.php | 704 bytes | open | download | billthefish | 08/09/2011 | Read message |
settings.php | 1.8 KB | open | download | billthefish | 08/09/2011 | Read message |
Module: Breadcrumbs 'Home' to External Site January 15, 2011 05:53AM |
Admin Registered: 20 years ago Posts: 8,532 |
This module can be used to modify the breadcrumbs of Phorum in such way
that the original 'Home' breadcrumb is renamed to 'Forums' and that
a new 'Home' link is prepended. The new 'Home' link can be configured
to point to an arbitrary URL.
This is useful for sites that run forums on a deeper level or even another
URL. The new 'Home' breadcrumb can then be used to point back to the
main site.
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
that the original 'Home' breadcrumb is renamed to 'Forums' and that
a new 'Home' link is prepended. The new 'Home' link can be configured
to point to an arbitrary URL.
This is useful for sites that run forums on a deeper level or even another
URL. The new 'Home' breadcrumb can then be used to point back to the
main site.
Changelog: ---------- 2011-01-15 v1.0.0 - Initial revision.
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Breadcrumbs 'Home' to External Site August 09, 2011 07:30AM |
Registered: 13 years ago Posts: 26 |
Re: Module: Breadcrumbs 'Home' to External Site August 09, 2011 10:50AM |
Admin Registered: 20 years ago Posts: 8,532 |
You kind of ignore the whole language file here. Therefore, this won't work for multi-lingual sites that use different values for "Home". You also hard-coded the string "Home" as a default.
The proper way to handle renaming "Home" would be to override "$PHORUM['DATA']['LANG']['Home']". Updating the language file or using the module to tweak language strings directly from an admin interface would do.
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
The proper way to handle renaming "Home" would be to override "$PHORUM['DATA']['LANG']['Home']". Updating the language file or using the module to tweak language strings directly from an admin interface would do.
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Breadcrumbs 'Home' to External Site August 10, 2011 11:29AM |
Registered: 13 years ago Posts: 26 |
Hmm, Ok. Changing the language file is fine but what if I actually want the word "Home" to be "Home" some other place and not the name of my website. Basically what I'm saying is that I can customize the meaning of the word "Home" but at the expense of breaking the intuitive definition of it. Rather that do that, I think it makes more sense to allow the admin to change this in the module. Since I'm trying to learn the correct way of doing things, how would I go about having the module tweak this string without changing the intuitive definition of the word?
Re: Module: Breadcrumbs 'Home' to External Site August 11, 2011 08:37PM |
Admin Registered: 20 years ago Posts: 8,532 |
You could introduce language support in the module and use module-specific language files to set the string to display. This way, you don't limit the mod for one language only. In the module, you can refer to this module language data.
In the most basic setup, you'd only need an English language file, which simply assigns $PHORUM["DATA"]["LANG"]["Home"] to the custom language key. That makes this backward compatible with directly using the "Home" translation. But when the admin wants something different, this provides all te required flexibility.
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
In the most basic setup, you'd only need an English language file, which simply assigns $PHORUM["DATA"]["LANG"]["Home"] to the custom language key. That makes this backward compatible with directly using the "Home" translation. But when the admin wants something different, this provides all te required flexibility.
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Breadcrumbs 'Home' to External Site August 20, 2011 11:11AM |
Registered: 16 years ago Posts: 49 |
Re: Module: Breadcrumbs 'Home' to External Site December 27, 2011 10:23PM |
Registered: 12 years ago Posts: 5 |
Sorry, only registered users may post in this forum.