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 Testing /modules/ changer
Summary Do you know short urls or simplified urls?Although it works fine with almost case, there are some unavoidable side effets .This hack is quite simple.You can change /modules/ as you like.I think there are much few side effect with this hack.insert 8 lin...
depth:
0
Previous post - Next post | Parent - Children.1 | Posted on 2005/6/6 1:07
mowaffak  Private   Posts: 9
Hi,

webmailfx module can't work with this hack .. blank page problem !
Votes:2 Average:5.00
depth:
1
Previous post - Next post | Parent - Children.1 | Posted on 2005/6/6 6:53
GIJOE  Gunnery Sergeant   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
depth:
2
Previous post - Next post | Parent - Children.1 | Posted on 2006/2/16 18:21
stelian  Private   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
depth:
3
Previous post - Next post | Parent - Children.1 | Posted on 2006/2/17 4:04
GIJOE  Gunnery Sergeant   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
depth:
4
Previous post - Next post | Parent - Children.1 | Posted on 2006/2/17 10:16
stelian  Private   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
depth:
5
Previous post - Next post | Parent - No child | Posted on 2006/2/17 14:29
GIJOE  Gunnery Sergeant   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!