PEAK XOOPS - Re: Testing /modules/ changer in englishin japanese

Re: Testing /modules/ changer

  • As this forum is only for commentation, you cannot open a new topic
  • Guests cannot post into this forum
Target News
Subject /modules/ changerのテスト中
Summary Simplified URL をいろいろ試しましたが、どうしても副作用を消しきれない、というのが正直なところです。というわけで、もっとずっとお手軽な「modules を好きな文字列に変更する」てなHackを試してます。パスの深さという、非常に面倒な問題は変わらないので、副作用も...
Previous post - Next post | Parent - Children.1 | Posted on 2005/6/6 1:07
mowaffak  二等兵   Posts: 9
Hi,

webmailfx module can't work with this hack .. blank page problem !
Votes:2 Average:5.00
Previous post - Next post | Parent - Children.1 | Posted on 2005/6/6 6:53
GIJOE  先任軍曹   Posts: 4110
I don't know webmailfx at all.

Anyway, you should turn "PHP debug" on if you want to solve the problem.

Perhaps, some troubles of REFERER occurred.
Votes:1 Average:10.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/2/16 18:21
stelian  二等兵   Posts: 7
Hello. Great jod guys.

I am using this hack and from www.mysite.ro/modules/ i change it to www.mysite.ro/buzau/.

But my question is: how can i change from "newbb" to "forum"? Or from "catads" to "anunturi"? I am going to rename all modules to my languge but i need only an example. Can you help me whith this example? Please? Thank you verry much.
Votes:1 Average:10.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/2/17 4:04
GIJOE  先任軍曹   Posts: 4110
This is just an issue of mod_rewrite (Apache).
If you understand rewrite rules, just write conversion rules and corresponding .htaccess.
Votes:1 Average:10.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/2/17 10:16
stelian  二等兵   Posts: 7
Hi there. I allready wrote my code, but it is not working and i can't figure it out why.

mainfile.php looks like this
$GLOBALS['_rewriteRulesFrom'] = array(
'/buzau/',
'buzau/anunturi/',
'buzau/forum/',
'buzau/matrimoniale/',
);

$GLOBALS['_rewriteRulesTo'] = array(
'modules/modules/',
'modules/catads/',
'modules/newbb/',
'modules/friendfinder/',
);

function modules_changer( $s ) 
{
return str_replace( XOOPS_URL.'/modules/' , XOOPS_URL.'/buzau/' , $s) ;
return str_replace( XOOPS_URL.'/modules/catads/' , XOOPS_URL.'/buzau/anunturi/' , $s ) ;
return str_replace( XOOPS_URL.'/modules/newbb/' , XOOPS_URL.'/buzau/forum/' , $s ) ;
return str_replace( XOOPS_URL.'/mosules/friendfinder/' ,  XOOPS_URL.'/buzau/matrimoniale/' , $s ) ;
}
ob_start( 'modules_changer' ) ;

.htaccess:
RewriteEngine on
RewriteRule ^buzau/(.*)$ modules/$1 [L]
RewriteRule ^buzau/forum/(.*)$ modules/newbb/$1 [L]
RewriteRule ^buzau/anunturi/(.*)$ modu;es/catads/$1 [L]
RewriteRule ^buzau/matrimoniale/(.*)$ modules/friendfinder/$1 [L]

About one week ago i found something related to this http://www.xoops.org/modules/newbb/viewtopic.php?topic_id=42036&start=0

And everything is wright. But nothing change except from /modules/ to /buzau/ . Today, for almoust 10 hours i tested and still no result. At least can you tell me if the code it is OK? Please?
Votes:1 Average:10.00
Previous post - Next post | Parent - No child | Posted on 2006/2/17 14:29
GIJOE  先任軍曹   Posts: 4110
At just a glance...

function modules_changer( $s ) 
{
$s = return str_replace( XOOPS_URL.'/modules/' , XOOPS_URL.'/buzau/' , $s) ;
$s = return str_replace( XOOPS_URL.'/modules/catads/' , XOOPS_URL.'/buzau/anunturi/' , $s ) ;
$s = return str_replace( XOOPS_URL.'/modules/newbb/' , XOOPS_URL.'/buzau/forum/' , $s ) ;
return str_replace( XOOPS_URL.'/mosules/friendfinder/' ,  XOOPS_URL.'/buzau/matrimoniale/' , $s ) ;
}
ob_start( 'modules_changer' ) ;
Votes:5 Average:6.00

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!