21
mCity
Re: Multilingo
  • 2003/10/14 14:52

  • mCity

  • Just popping in

  • Posts: 52

  • Since: 2003/3/31


Congraturation! But I found a new way (correct way) to solve the tuncation. Read THIS

mCity



22
mCity
Re: SOLVED - Making Xoops CONTENT Multilingual *Fixed Code Quote problem*
  • 2003/10/14 14:47

  • mCity

  • Just popping in

  • Posts: 52

  • Since: 2003/3/31


My last two ways may not be good or correct. IMHO, I suggest to modify /modules/news/blocks/news_top.php line 39 for logic Quote:
$title = $myts->makeTboxData4Show(substr($myrow['title'],0,($options[2] -1)))."...";

to be Quote:
$title = substr($myts->makeTboxData4Show($myrow['title']),0,($options[2] -1))."...";

If devs agree with it, please modify it in next release. It'd solve trucation.

mCity.



23
mCity
Re: Multilingo
  • 2003/10/14 6:31

  • mCity

  • Just popping in

  • Posts: 52

  • Since: 2003/3/31


The problem is that the title is longer than 25 defined in Block Administration. I added a solved way HERE

Hope it helps you.

mCity



24
mCity
Re: SOLVED - Making Xoops CONTENT Multilingual *Fixed Code Quote problem*
  • 2003/10/14 6:26

  • mCity

  • Just popping in

  • Posts: 52

  • Since: 2003/3/31


Quote:

mvandam wrote:
Ah, yes good point dawilby... In many places, the title is truncated, just in case someone puts in a really long title (i.e. so they don't mess up your page layout). This trucation happens to the original full string... it is not until afterwards that the language hack occurs. Thus for the english one, the truncated title is "[spanish]...[/spanish][engl"... and then after the language hack, the 'spanish' part is stripped out, leaving only [engl...

Maybe this indicates a bug... need to look into it

We may have two ways to solved those long title showed in the Recent News block displayed in front page.

1. in the Blocks Administration, edit Recent News, in Option, increase the Length of the title from 25 to your full length (50 or 255). But we need to control our length when we input it for each language.
P.S. Needless if we defined XOOPS_USE_MULTIBYTES 1 in global.php in our /language/english.

2. use shorter code, e.g. [eng] for english. OR [e] for english. I use [ee], [cc]



25
mCity
Re: Multilingo
  • 2003/10/13 15:09

  • mCity

  • Just popping in

  • Posts: 52

  • Since: 2003/3/31





26
mCity
when will be the time to say good Day to newbb2
  • 2003/10/13 13:58

  • mCity

  • Just popping in

  • Posts: 52

  • Since: 2003/3/31


Quote:

by Catzwolf on 2003/7/8 wrote:

I was halfway through enhancing newbb for XOOPS version 1 and I was thinging about continuing this for XOOPS version 2.

Most of the work is there and could be easily hacked into newbb for xoops2 but it would take me a while. I may try and get a few people to help me on this one.

Catz, I would like to let you know that we waited for you to release your newbb2(Xoops 2.1.0) for three months. Would you tell us how many percent in your remainder and when will you release it in your estimation. If you finished it and now code for upgrade part, would you release it first and release the upgrade later?

Also, if possible, would you stop browsing forum and making answer for anything else before you complete it.

mCity



27
mCity
Re: SOLVED - Making Xoops CONTENT Multilingual *Fixed Code Quote problem*
  • 2003/10/9 12:16

  • mCity

  • Just popping in

  • Posts: 52

  • Since: 2003/3/31


One of my previous post was incorrect. Please remove additional hack in /class/xoopsform/formcheckbox.php inside function addOptionArray. It would cause GROUP ADMIN to show up hyperlink for BLOCKS. Why no people told me the problem? May be no one used the hack. It was my first hack. So, please forgive me. Hope my others would be correct for you all. Well, this is the way to solve BLOCKS in multilingual in GROUP ADMIN.

edit /class/xoopsblock.php, just inside function &getAllBlocks, add this to line 344 Quote:
$myts =& MyTextSanitizer::getInstance();
and modify the line 377 to be Quote:
$ret[$block->getVar("bid")] = $myts->makeTboxData4Show($name);

If it caused problem, please post here. Thanks a lot.

Still happy in sharing.



28
mCity
Re: SOLVED - Making Xoops CONTENT Multilingual
  • 2003/10/9 3:50

  • mCity

  • Just popping in

  • Posts: 52

  • Since: 2003/3/31


Quote:

Daigoro wrote:

Now imagine supporting 20 languages or more, perhaps having 10 or 15 people going thru all the lines to insert/translate their part. It's a hell.

I agree, but practically, we usually to make our site for two, or up to three languages. Your mother-language, local(where you are living), and English(as general or International). So, at this moment as XOOPS is not designed/developed as true multilingual, square brackets is quite flexible way for us. But there are some more problems still in this way, let's say, if we search an english word and we'd got some posts. Then, if we are using Japanese, we may not see the word in the post. However, we'd still lucky got the related post.

Today, I solved the name of block when we edit.
edit /modules/system/admin/blocksadmin/blocksadmin.php again line around 183 (184 if you edit for listbox) within function edit_block, add
Quote:
$myts =& MyTextSanitizer::getInstance();

around line 196, echo(...
Quote:
'name' => $myts->makeTboxData4Show($myblock->getVar('name'))



29
mCity
Re: SOLVED - Making Xoops CONTENT Multilingual
  • 2003/10/8 6:50

  • mCity

  • Just popping in

  • Posts: 52

  • Since: 2003/3/31


Daigoro wrote:
Quote:
I also noticed the drop-down box isn't fixed yet.

Daigoro,

I finally found the way to fix the list-box. As it seems the foundation to get the modules name, I guess it'd also solve many place to show module name. So that, we don't need to edit many files for the output. Although we did many already.

Let's edit /kernel/module.php near line 501
Quote:

function &getList($criteria = null, $dirname_as_key = false)
{
$myts =& MyTextSanitizer::getInstance();
$ret = array();
$modules =& $this->getObjects($criteria, true);
foreach (array_keys($modules) as $i) {
if (!$dirname_as_key) {
$ret[$i] =& $modules[$i]->getVar('name');
$ret[$i] = $myts->makeTboxData4Show($ret[$i]);
} else {
$ret[$modules[$i]->getVar('dirname')] =& $modules[$i]->getVar('name');
$ret[$modules[$i]->getVar('dirname')] = $myts->makeTboxData4Show($ret[$modules[$i]->getVar('dirname')]); // Not sure if this is necessary!
}
}
return $ret;
}

It was my fault that my current copy(defined $myts same as you) is not same as my master copy(with global variable) which is not work when I generate a new site. So, I define it also in the function.

mCity...Share with happy



30
mCity
Re: SOLVED - Making Xoops CONTENT Multilingual
  • 2003/10/7 15:17

  • mCity

  • Just popping in

  • Posts: 52

  • Since: 2003/3/31


Well, I hope XOOPS would add this square backet method to core even if they implement XOOPS multilingual by adding an extra column for language to related tables. We don't need to have extra column for blocks titles. We need news, comment, and forum content, etc for members to use. For admin, I prefer to use this way still: "Select [tch]English[/tch][eng]Chinese[/eng]" for assign title to select language block and most place.

Today, I solved the way to show in blocks administration table.

edit /modules/system/admin/blocksadmin/blocksadmin.php
in function list_blocks(line 41)
Quote:
global $xoopsUser, $xoopsConfig, $myts, $HTTP_GET_VARS; //failed, check next post from Daigoro

(line 98)
Quote:
$title = $myts->makeTboxData4Show($block_arr[$i]->getVar("title"));


if you add multilingual for module name in /modules/news/language/tchinese/modinfo.php for each modules before install modules, you may need to edit line 100
Quote:
$name = $myts->makeTboxData4Show($block_arr[$i]->getVar("name"));


and within the line 101 echo
Quote:
$myts->makeTboxData4Show($module_list2[$block_arr[$i]->getVar('mid')])


You jump, I jump. I do, you do.
Happy to share again.




TopTop
« 1 2 (3) 4 »



Login

Who's Online

73 user(s) are online (33 user(s) are browsing Support Forums)


Members: 0


Guests: 73


more...

Donat-O-Meter

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

Latest GitHub Commits