MemHT Portal is a Free PHP CMS and Blog
It permit the creation and the management online of websites with few and easy steps.
It's completely customizable, expandable and suitable for all needs.
A2Hosting
Moderators: Moderators
Forum RSS feedReply
Renaming-Translating Addon Pages
AuthorText
bellogenio


Posts: 10
Contributes: 10

Gender: _NEUTRAL_
Online: No
Date: 20/12/2008 09:23
Renaming-Translating Addon Pages
#post16356
My site is working fine, I translated it into Spanish and most of it is already translated but I want to make sure that even the URL output is translate/renamed so that I get this kind of result:

example.com/noticias_TITLE_IN_SPANISH.html
not
example.com/news_TITLE_IN_SPANISH.html

or

example.com/buscar.html
but not
example.com/search.html

I tried renaming specific /pages/addon folder, but it's not as simple as I originally thought, I've been trying to figure it out for a few hours now and I realized that there are many instances in various php files that would need to be altered to accomplish this.

I don't really care how long it takes to accomplish this, but I just want to make sure I do it the right way and completely.
Delete Edit Quote
 
mem
MemHT's Dad
Admin & Developer

mem

Posts: 7243
Contributes: 4800

Gender: _MALE_
Online: No

Languages: English, Italiano, Македонски, Српски
Date: 20/12/2008 09:28
Re: Renaming-Translating Addon Pages
#post16357
0) Restore original files and folder names

You need to work on 2 files:

1) inc/inc_modrewrite.php
Change names of the static pages (in the urlout array).

Example
code
$siteConfig['site_url']."/news_pg_\2.html\3",
into
code
$siteConfig['site_url']."/noticias_pg_\2.html\3",


2) .htaccess
code
RewriteRule ^news_pg_([0-9]+).html$ index.php?page=news&pg=$1 [L]
into
code
RewriteRule ^noticias_pg_([0-9]+).html$ index.php?page=news&pg=$1 [L]


Obviously names MUST match
Follow me on twitter if you want to be updated on the MemHT 5 development.
Delete Edit Quote
 
bellogenio


Posts: 10
Contributes: 10

Gender: _NEUTRAL_
Online: No
Date: 21/12/2008 15:03
Re: Renaming-Translating Addon Pages
#post16410
yup that worked, so simple too, damn, wasted my time
Delete Edit Quote
 
bellogenio


Posts: 10
Contributes: 10

Gender: _NEUTRAL_
Online: No
Date: 30/01/2009 13:44
Re: Renaming-Translating Addon Pages
#post17829
on a related note...
correct me if wrong but i think i found a bug

note: this bug is found without doing any of the above changes while maintaining all original files intact

i noticed that in previewing a newsletter, the link for the guides section was being misdirected to the index.php?page=guides when it should just be index.php?page=guide without the extra "s" thus directing the click to an invalid page

from /admin/pages/newsletter/index.php:
code
                        $other .= "- <a href="".$siteConfig['site_url']."/index.php?page=guides&op=readGuide&id=$gid&title=".mem_urlencode($gnome)."" title="$gnome" target="_blank">$gnome</a><br>";


when it should be displaying like this:
code
                        $other .= "- <a href="".$siteConfig['site_url']."/index.php?page=guide&op=readGuide&id=$gid&title=".mem_urlencode($gnome)."" title="$gnome" target="_blank">$gnome</a><br>";


Delete Edit Quote
 
mem
MemHT's Dad
Admin & Developer

mem

Posts: 7243
Contributes: 4800

Gender: _MALE_
Online: No

Languages: English, Italiano, Македонски, Српски
Date: 30/01/2009 18:57
Re: Renaming-Translating Addon Pages
#post17836
Uhm, thank you Smile
Follow me on twitter if you want to be updated on the MemHT 5 development.
Delete Edit Quote
 
Reply
Tags Cloud
Twitter updates...
Help MemHT Portal
Navigator
Users Block
Hi Guest
IP: 38.107.179.233

Username
Password
MemHT Wiki
Language
MemHT Portal is a free software released under the GNU/GPL License by Miltenovik Manojlo