292471
john47
Re: Autologin for Xoops 2.0.x
  • 2003/7/15 20:48

  • john47

  • Just popping in

  • Posts: 24

  • Since: 2003/4/24


i cant find Control Panel->Administration->Template Editor->Sytem->system_block_login.html can somone help?



292472
WismeriL
Re: SOLVED - Making Xoops CONTENT Multilingual
  • 2003/7/15 20:23

  • WismeriL

  • Just popping in

  • Posts: 4

  • Since: 2003/7/7 1


I don't know if it's Chado website but this site :
http://peekaboo.s8.xrea.com:8080/
is using it, you can switch between english and japanese by clicking on the flags.

WismeriL



292473
patagon
Re: SOLVED - Making Xoops CONTENT Multilingual
  • 2003/7/15 20:10

  • patagon

  • Quite a regular

  • Posts: 235

  • Since: 2002/1/8 0


Chado,

that looks really interesting, thanks for sharing it. Do you have a site where we can see this? i would like to see it working...

Thanks



292474
Herko
Re: SOLVED - Making Xoops CONTENT Multilingual
  • 2003/7/15 19:57

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


Excellent hack! Great work!

Herko



292475
Chado
SOLVED - Making Xoops CONTENT Multilingual
  • 2003/7/15 14:24

  • Chado

  • Not too shy to talk

  • Posts: 113

  • Since: 2003/6/6 7


This hack will work with news, forum, wf-sections, tinycontent or any module that uses the textsanitizer.
After searching the boards and posting a couple questions that never were answered, I had a go at this myself and well…necessity is the mother of invention….I discovered the module.textsanitizer.php file and messed with it till I got it to work. I am not a coder, so I am sure that someone can improve on this. (More on that later)
First things first:
This hack assumes that you are using the multi-lingual hack that can be downloaded here from ModsCentral.
To install it on Xoops2.x, follow the instructions I posted here.
That will get your XOOPS to be multilingual.

Now to make your content multilingual:
1. Open the module.textsanitizer.php file in the class folder. Around line 145 is the function “&xoopsCodeDecode” After the line
Quote:
$replacements = array();

and before the line
Quote:
$patterns[] = "/\[ code](.*)\\[\/ code\]/esU";

Place this code:
Quote:
//multi-lingual hack by chad--if japanese show japanese else show nothing
global $xoopsConfig;
$patterns[] = "/\[japanese](.*)\[\/japanese\]/sU";
if ($xoopsConfig['language'] == "japanese") {
$replacements[] = '\\1';
} else {
$replacements[] ="" ;
}
//if english show english else show nothing
$patterns[] = "/\[english](.*)\[\/english\]/sU";
if ($xoopsConfig['language'] == "english") {
$replacements[] = '\\1';
} else {
$replacements[] = "";
}
//end multi-lingual hack

Of course you will change the language ('english','japanese') to reflect the languages that you are targeting. The name in the brackets has to match the name of your language pack that you downloaded (or created). You could add more if you are targeting more than 2 languages.

To use this:
When you add your article just enclose the section you want shown in a particular language in brackets with that language name. This is very similar to adding a url or code to an article. For example: Quote:
[english]This is my English text.[/english][japanese]kore ha nihongo desu.[/japanese] This text (not enclosed in brackets) will show up in both (all) languages.


If you are just targeting European languages, you may not have to worry about this, but if you are targeting multi-byte languages like Japanese you may have to manually change the character encoding of your English global.php file to match your japanese one.

That’s it! Basically very simple – If you are having problems with the layout, you probably are putting spaces between the codes.
I hope this helps!
Chad



292476
usual
Re: Banner Ads in a Block - How
  • 2003/7/14 16:25

  • usual

  • Just popping in

  • Posts: 14

  • Since: 2003/4/6 8


you choose it from a drop down box in the custom block creation section.



292477
scotter
Re: Banner Ads in a Block - How
  • 2003/7/14 16:15

  • scotter

  • Just popping in

  • Posts: 1

  • Since: 2003/7/8 3


This is of interest to me too.

How do you have the block processed as PHP rather than HTML?



292478
destrux
Re: Banner Ads in a Block - How
  • 2003/7/14 14:22

  • destrux

  • Moderator

  • Posts: 57

  • Since: 2002/6/3 1


Be sure when you created the block to have it processed as PHP Script rather than HTML.



292479
DrBohner
Re: Banner Ads in a Block - How
  • 2003/7/14 13:38

  • DrBohner

  • Just popping in

  • Posts: 16

  • Since: 2003/4/4 1


I thought that would work, too. I tried it - it did not work. It only displayed the text "<{$xoops_banner}>".

Any other thoughts?



292480
ROT
Re: Banner Ads in a Block - How
  • 2003/7/14 13:27

  • ROT

  • Just popping in

  • Posts: 10

  • Since: 2003/2/13


put

Quote:
<{$xoops_banner}>


that code into the block







Login

Who's Online

97 user(s) are online (72 user(s) are browsing Support Forums)


Members: 0


Guests: 97


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits