Page 1 of 1

Call to undefined function Error

Posted: Mon May 21, 2007 7:05 pm
by abozeed
Dears,
well I have two languages joomla website, am using Joomla Fish,

I used the way which uses 3 template files, Index.php, indexrtl.php and indexltr.php

Indexs are in the attachement

well the website is working fine with Indexrtl.php which is called in this way :

Code: Select all

http://www.xxxxxx.com/index.php?lang=ar
but with Indexltr.php which is called in this way

Code: Select all

http://www.xxxxxx.com/index.php?lang=en
it said:
Fatal error: Call to undefined function: getcurrentmenuindex() in /mnt/hdc3/www/virtual/xxxxxxxxx.com/htdocs/test/templates/CIETSN/index_ltr.php on line 61
which is:

Code: Select all

$ja_headerimg = $ja_header_images [getCurrentMenuIndex() % count($ja_header_images)];

Please I need a fast solution


Regards,

Ahmed

Re: Call to undefined function Error

Posted: Sun May 27, 2007 6:02 pm
by emakki
I proposed another solution of having two files. The solution was in a forum post here. It solves the problem by having one page and adding a code to where you want the dir=rtl thing.

I will look it up for you. You can also search for it. It was in English responding to Massimo.

I downloaded the files and work on them when I have time. Others here can help you too.

Re: Call to undefined function Error

Posted: Mon May 28, 2007 8:43 am
by abozeed
I searched for it and didnt find anything, about files you downloaded the error regards to include syntax !!

Re: Call to undefined function Error

Posted: Mon May 28, 2007 9:18 am
by emakki
Regarding the error, if the first page is working then there may be a mistake you made while doing the other one.

Try copying the working one rtl and rename it to ltr and see if it is working as if it is the one you want. If it worked, open the file and make your changes.

Please check the following post:
http://forum.joomla.org/index.php/topic ... #msg760359

it has the proposed solution but you need to do it for the HTML tag and the proper CSS file for each language as I explained.

Let me know.. Good luck

Re: Call to undefined function Error

Posted: Mon May 28, 2007 6:20 pm
by abozeed
well emakki, thanks when I replaced indexltr with indexrtl, its worked fine, but there's a proplem now !

its working with arabic image files not with English ones !!

Re: Call to undefined function Error

Posted: Tue May 29, 2007 2:46 am
by emakki
ًWell, you can use the same method in css and making pictures that ends with _en and _ar. Then use the code to parse the language.

Please note that you should make pictures without language in case if it is not known.

Try and let me know

Re: Call to undefined function Error

Posted: Tue May 29, 2007 9:49 am
by abozeed
well dear, did you download index files !!

the proplem is not in the CSS files !
its in header files which is in this code in the index_ltr.php
$ja_headerimg = "";
if ($ja_header_type == 1) {
$ja_headerimg = $ja_header_images [getCurrentMenuIndex() % count($ja_header_images)];
if (!is_file("$ja_template_absolute_path/imagesen/headers/$ja_headerimg-bg1.jpg")) $ja_headerimg = $ja_header_images [0];
}
if ($ja_header_type == 2) {
$ja_headerimg = $ja_header_images[rand (0, count($ja_header_images)-1)];
if (!is_file("$ja_template_absolute_path/imagesen/headers/$ja_headerimg-bg1.jpg")) $ja_headerimg = $ja_header_images [0];
}
as you see, i changed the images folder to imagesen/ instead of imagesar/ in index_rtl.php file!!

and its not working in index_ltr.php !!

Call to undefined function Error [Solved]

Posted: Tue May 29, 2007 10:41 am
by abozeed
its worked fine, thanks alot emakki

Re: Call to undefined function Error

Posted: Tue May 29, 2007 11:30 am
by Jenny
Bump posts were removed from this thread.  Please see the forum rules http://forum.joomla.org/index.php/topic,65.0.html regarding thread bumping, specifically:
No useless posts. This includes: Thread bumping, useless one liners, Flamewars, Trolling and Spamming. What is spamming? Read this.

Re: Call to undefined function Error

Posted: Tue Sep 20, 2011 10:16 am
by Melindatrensy
Thanks for the link!!It's nice to get advice from such skilled people))