1
ibzan
Re: Multilingo for the bookstore?
  • 2004/4/1 13:09

  • ibzan

  • Just popping in

  • Posts: 48

  • Since: 2003/8/31


Did you re-initialize the module?

Chris



2
ibzan
Re: SOLVED - Making Xoops CONTENT Multilingual *Fixed Code Quote problem*
  • 2004/2/24 7:01

  • ibzan

  • Just popping in

  • Posts: 48

  • Since: 2003/8/31


Quote:
Okay, now I understand...
But this isn't realy related to the multilingual hack. It's a direct limitation of the XOOPS system, and should be handled in a non-hacked one language system.


I don't know if this is simply a limitation, as you put it, with XOOPS or if really the problem lies withing PHP itself. However you are correct, this is a workaround.

If, for example, the issue is with PHP, then (I think?!?) the XOOPS core could take that into consideration - but as if it isn't their fault, then this too would only be a work around. (When I say issue I mean when dates not formatting as they should for a particular local - neither the date() function nor set_local() deal with this correctly).

I've coded a blank page (that is 100% outside of Xoops) to display dates and the same problem arose - my dates in Russian were not properly declined. I don't know enough to be certain, however XOOPS doesn't appear to be the culprate...

blessings,

Chris



3
ibzan
Re: SOLVED - Making Xoops CONTENT Multilingual *Fixed Code Quote problem*
  • 2004/2/23 10:42

  • ibzan

  • Just popping in

  • Posts: 48

  • Since: 2003/8/31


I dumped my idea of using the set_Local function and simply stuck with the date() tag. This actually made things more simple as none of the global files had to be changed.

This still wouldn't solve the problem, though, with different languages and the way dates are displayed, as in the US we do month-day-year whereas I needed for russian to display day-month-year. Obviously making changes to the global file would address this however because of the languages of Russian, for example, the word for the month is changed to reflect how it is being declined (i.e. it's case).

So I wrote a simple hack and called it into the header.php file (include XOOPS_ROOT_PATH.'/your_path/your_file_name.php';)

Within this file I start by setting a variable for the date (from what's coded in the global file so to be language friendly) ... well it may be a little easier to just give an example. I'll just simplify this by only using the months of January and February to allow you to see how it works:

Quote:
<?php
$mydate = date (_MYDATEFORMAT);
$patterns[1] = "/January/";
$patterns[2] = "/February/";
$replacements[1] = "января";
$replacements[2] = "февраля";
ksort($patterns);
ksort($replacements);
$mynewdate = preg_replace($patterns, $replacements, $mydate);
$xoopsTpl->assign('rus_date' , $mynewdate);
$xoopsTpl->assign('eng_date' , $mydate);


Essentially begin with the date - from there set an array of patterns for the function "ksort" to look for. (I have not only months but also days of the week coded).

Second define an array of replacements that will take the place of the pattern which was defined. In this case I want the English word January to be replaced with the Russian -- note: set_local did this but as I mentinoed did not change the endings correctly.

Third when your arrays are set, have ksort basically sort your patterns with your replacements (i.e. replacement[1] replaces pattern[1] and so on) then create your new variable and use preg_replace do the work of replacing what you earlier defined.

This left me with two date variables, one unique for English readers and the other for Russian. When a person selects their preferred language the proper date is shown (via an if statement in the theme - if the language is English show this, if not then this...)

Does that make sence? I am sure that you can accomplish the very same thing in a tri-lingual environment. For each language you will have to repeat this process. Like if I were to add another language, then I'd have English as my control group (or Russian or any other for that matter - it is just easier in English as the date() function returns English...) The first array, etc., would changing English into Russian, the second from English in to the third, and so on...

I hope this helps.

Blessings,

Chris



4
ibzan
XoopsGallery multilingual?!?
  • 2003/12/5 12:50

  • ibzan

  • Just popping in

  • Posts: 48

  • Since: 2003/8/31


I sork of worked out a hack to XoopsGallery to allow it multilingual functions - still testing it out to see if there is more.

In the view_album.php file after:
function showChoice
global $gallery;

Add:

$myts =& MyTextSanitizer::getInstance();

Then down further down there is the line:
$caption['title'] = $gallery->album->getCaption($i);

Change that to this:
$caption['title'] = $myts->makeTboxData4Show($gallery->album->getCaption($i));

This will allow you to have different captions based on the languages you have installed and set up.

There may be more...

Blessings,

Chris



5
ibzan
Re: MyDownloads
  • 2003/11/26 14:27

  • ibzan

  • Just popping in

  • Posts: 48

  • Since: 2003/8/31


Actually it is in the index.php file. That is where the count for the category file is coded.
I've tried a few variations, but with no sucess at all - I can't seem to get the sql statement right.

Chris



6
ibzan
MyDownloads
  • 2003/11/26 7:47

  • ibzan

  • Just popping in

  • Posts: 48

  • Since: 2003/8/31


Is there a way to add some code that would show the total downloads available within a subcategory? It already does display on the main category level, but I cannot figure out what or how to show it on the subcategory level.

Thanks,

Chris



7
ibzan
Re: PiCal - Image's "alt" tag does not display correctly
  • 2003/11/21 10:38

  • ibzan

  • Just popping in

  • Posts: 48

  • Since: 2003/8/31


Quote:
Anyway, {MB_PREV_YEAR} in *.tmpl.html should be replaced the language constant '_PICAL_MB_PREV_YEAR' by patTemplate.


This I fully understand - which is why I am confused. The {MB_PREV_YEAR} is not being replaced wit the language constant.

This is what I have, which doesn't seem to be doing what it is supposed to:

Quote:
<a href='{PHP_SELF}?caldate={PREV_MONTH}'>
<img src='{SKINPATH}/miniarrowleft.gif' border='0' alt='{MB_PREV_MONTH}' /></a>


Now if I take the vale of {MB_PREV_MONTH} and place it outside like this (leaving the alt= empty):

Quote:
<a href='{PHP_SELF}?caldate={PREV_MONTH}'>
<img src='{SKINPATH}/miniarrowleft.gif' border='0' alt='' />{MB_PREV_MONTH}</a>


Voila, it works - except I don't want to display the text of the language constant, but insert it so when a person hovers the mouse over it then shows it.

ideas?!?

Chris



8
ibzan
Re: PiCal - Image's "alt" tag does not display correctly
  • 2003/11/21 10:31

  • ibzan

  • Just popping in

  • Posts: 48

  • Since: 2003/8/31


Here's a quick way to check - view the source on this page and look up "edit" or "reply" for the edit and reply icons on the page.

The code looks like this:

Quote:
<img src="https://xoops.org/images/icons/edit.gif" alt="Edit" />


Note the "alt". Now I am not suggesting that that tag is primarily used in the event that the graphic does not display, however--- (pause for breath ) if you hover your mouse over them it displays the content of the alt tag and not the name of the graphic.

My whole point in this thread was not really to discuss why or even how that whole process works but to point out that in PiCal hovering over the graphic does not display the text which it is supposed to.

blessings,

Chris



9
ibzan
Re: PiCal - Image's "alt" tag does not display correctly
  • 2003/11/21 6:58

  • ibzan

  • Just popping in

  • Posts: 48

  • Since: 2003/8/31


jlm69 - actually the alt tag IS used to display something other than just the raw link or name of the link. For example if you had an image of the statue of liberty and the file name was sta_lib.jpg but you don't want something like that displaying when a person's mouse hovers over the image you would add alt="Statue of Liberty" to the img tag, causing the browser to display that instead of the other.

blessings,

Chris



10
ibzan
Re: Pical vs. Agendax
  • 2003/11/20 18:55

  • ibzan

  • Just popping in

  • Posts: 48

  • Since: 2003/8/31


PostCalendar is definately the standard by which I judge all other calendars (though it itself isn't 'perfect' - just darn close)

I am currently using Agenda-X but am currently in the process of moving over to PiCal. The back-end is SO MUCH better, especially with respect to adding events which span dates (which has been mentioned) as well as adding events that repeat indefinately, such as holidays, birthdays, etc.;

What I am really impressed with is how the minical upcoming event block displays events which do span days. Instead of repeating the event for however many times the event occurs, in only lists it once (something even PostCalendar never addressed)

Granted it isn't much to look at at first; and if you are going for looks Agenda-X does look great. I figured though if it accomplishes more of what I like it's worth tweaking, which is where I am right now...

blessings,

Chris




TopTop
(1) 2 3 4 5 »



Login

Who's Online

229 user(s) are online (132 user(s) are browsing Support Forums)


Members: 0


Guests: 229


more...

Donat-O-Meter

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

Latest GitHub Commits