41
draj
Re: Different Theme for Each Language, Script
  • 2006/12/14 6:25

  • draj

  • Quite a regular

  • Posts: 271

  • Since: 2005/6/23


Hi BCdudes!

Thanks for your ideas. I will definately try to implement once I get the block problems solved.

Let me make it clear once again:

I AM LOOKING FOR A SOLUTION FOR BLOCKS that disappear selecting a language!

I have two left blocks from content modules.

One has english content and the second has german content. Havng the same title with [en][de] tags DOES NOT WORK!

We want to show the german block in german ONLY. Here the english block should disappear.

The problem is, that the blocks do not have any extra parameter from the core coming out. Hence the only solution I can imagine is to have a field in the database table and capture it, bringinginto the templates.

I would also be pleased to live with a simple, dirty quick solution, instead of waiting for light years, a speed with which XOOPS is developing.



42
draj
Re: Different Theme for Each Language, Script
  • 2006/12/13 21:01

  • draj

  • Quite a regular

  • Posts: 271

  • Since: 2005/6/23


Hallo irmtfan!

Thanks for your suggestion.

There is a misunderstanding.

I MUST change the theme because for different languages there are different graphics written in different languages. This can however be changed with the [] tags of the xLanguages but I need different layouts for different languages.

I do not use all the modules in both the languages and want to have a totally different combination.

Further, the above suggestion DOES trigger on addressing shootong different blocks with different languages.

I hope you understand.

Thanks.



43
draj
Re: xlanguage 2.0.4 and XOOPS 2.0.16
  • 2006/12/13 19:19

  • draj

  • Quite a regular

  • Posts: 271

  • Since: 2005/6/23


Hi!

You can find the version 3.0 here:

Click here for version



44
draj
Re: Different Theme for Each Language, Script
  • 2006/12/13 17:59

  • draj

  • Quite a regular

  • Posts: 271

  • Since: 2005/6/23


Hallo BCdudes!

As you suggested, the tags [en] works perfect. However the blocks show up in different languages where they are there.

Now phppp can help us here, if he sees and has the time and interest!

I have looked into all the areas and found the following:

1.
One needs to add one field in xoops_block_instance

When creating the field, give the default to the existing language, for e.g. en. Hence all the existing blocks will be assigned to en blocks.

2.
Add line 237 in kernel/block.php
> ??
'lang' => $block_arr[$i]->getVar('lang'),

3.
include/common.php

define ("XOOPS_BLOCK_LANGUAGE", 2);

4.
Do what phppp says to do further!

Here the idea is to insert lang variable in the table field and get it through the SQL query, work for the render of that block.



45
draj
Re: Different Theme for Each Language, Script
  • 2006/12/13 15:56

  • draj

  • Quite a regular

  • Posts: 271

  • Since: 2005/6/23


Hi!

I tried both the solutions you suggested. Also deleted the cache and template_c but no change. It does not work.

If I can get the templates change working, then one may try to have the blocks with {if}..{else} tags make them dissappear or change.

However with 2.2.5RC2, it does not work.



46
draj
Re: Different Theme for Each Language, Script
  • 2006/12/13 15:47

  • draj

  • Quite a regular

  • Posts: 271

  • Since: 2005/6/23


Hi!

Well, to shift left to right may not be a problem, so long as the block remains and changes the content within.

My problem is to get the block totally disappear.

What about the following solution without having to add in the header.php?


<{if {$xoops_langcode} == en}>
<{include file="$xoops_theme/navigation/block_left_en.html"}>
<{else}>
<{include file="$xoops_theme/navigation/block_left_de.html"}>
<{/if}>



47
draj
Re: Different Theme for Each Language, Script
  • 2006/12/13 15:11

  • draj

  • Quite a regular

  • Posts: 271

  • Since: 2005/6/23


Hi!

Thanks for the promt reply.

I am using the latest 2.2.5RC2 and the header.php looks quite different with the latest development.

I would be thankful, if you could help me in this. Pl. inform us where exactly the code you suggested must be inserted.

The reason why I ask:

I can get the blocks empty with the other language content on adding the language specific tags.

However this is impossible. There is more that one year work in the content and cannot make all the tags add [de][/de]!

Hence the content and the BLOCK needs to disappear with the language. Otherwise it is practically unusable, you know!

There are many reasons why I did tell phppp to add language field in the database.

If one starts a new website with a new language at a later date and wants to have the same database, then one can create new fields with a default and everything gets automatically assigned to the old language.

Thanks,

The following is the code in header.php
if (!defined("XOOPS_ROOT_PATH")) {
    die(
"XOOPS root path not defined");
}

// Ensure charset setting
if (!headers_sent()) {
    
header('Content-Type:text/html; charset='._CHARSET);
}

$GLOBALS['xoopsLogger']->context "core";

// Get blocks
$block_handler =& xoops_gethandler('block');
$block_handler->assignBlocks();

$GLOBALS['xTheme']->checkCache();
/////////////////// Add the new code here ?/////////////////// 
if ($xoopsConfig['language'] == 'lang1') { 
   
$xoopsConfig['theme_set']='theme1'
  } 
if (
$xoopsConfig['language'] == 'lang2') { 
   
$xoopsConfig['theme_set']='theme2'
  }
/////////////////// 
if (!isset($GLOBALS['xoopsOption']['template_main'])) {
    include 
XOOPS_ROOT_PATH.'/include/old_theme_functions.php';
    
$xoopsTheme['thename'] = $GLOBALS['xoopsConfig']['theme_set'];
}
$GLOBALS['xoopsLogger']->context "module";
?>



48
draj
Re: Different Theme for Each Language, Script
  • 2006/12/13 12:17

  • draj

  • Quite a regular

  • Posts: 271

  • Since: 2005/6/23


Hallo BCdudes!

Well, I was just looking for a solution in this direction.

Pl. help me to understand before I begin messing around.

The theme will change due to the Language selection.

Will the blocks also change completely due to the language?

I also want some of the blocks to disappear in different language.

Thanks for your help in advance.



49
draj
Re: MultiSite Hack for Xoops 2.0.13.2
  • 2006/11/23 8:15

  • draj

  • Quite a regular

  • Posts: 271

  • Since: 2005/6/23


Hallo Mr Gustavo Pilla!

I have heard that this hack of MultiX would also work for 2.2.4 / 2.2.5?!

My Question:

Why is the $multix_site[$siteUrl[1]]["id"] file based and not mysql?

In this regards I did place a feature request @ sourgeforge (U=xoops_gold)!

My vision of multisite is as follows:

The best is to have $sitegroups, $lang, $siteID and $catID as fields in some of the most important tables.

Further the sidetrack you did by hacks of the mailfile placing into a folder could be further developed to a MySQL solution.

What do you think?



50
draj
Re: MultiSite Hack for Xoops 2.0.13.2
  • 2006/11/9 15:13

  • draj

  • Quite a regular

  • Posts: 271

  • Since: 2005/6/23


Hallo!

By any chance did someone try it out with the newer version of XOOPS i.e.2.2.4? Does it work?




TopTop
« 1 2 3 4 (5) 6 7 8 ... 20 »



Login

Who's Online

100 user(s) are online (71 user(s) are browsing Support Forums)


Members: 0


Guests: 100


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