Jumi - an universal multipurpose module

Discuss the development and implementation of Joomla! modules here.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
User avatar
MarHaj
Joomla! Ace
Joomla! Ace
Posts: 1168
Joined: Fri Jun 30, 2006 5:24 pm
Location: CZ
Contact:

Re: Jumi - an universal multipurpose module

Post by MarHaj » Thu Dec 14, 2006 11:01 am

The general approach to the solution can be found in the fact, that your included custom made php script has full access access to any defined Joomla! variables, constants, functions, classes, objects, methods and php variables, function, arrays as well like $_REQUEST, $_POST, $_GET.

So I think you should try this way.
MarHaj

chrisg
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Fri Dec 08, 2006 10:12 pm

Re: Jumi - an universal multipurpose module

Post by chrisg » Fri Dec 15, 2006 6:41 am

Ah, yes...that makes sense  :-[

Thanks for the quick reply!

MarKel
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sun Aug 21, 2005 2:18 pm

Re: Jumi - an universal multipurpose module

Post by MarKel » Sun Dec 24, 2006 3:21 pm

I like this module.
i had succes with using fusioncharts http://www.infosoftglobal.com/FusionCharts/ and jumi

but i would like to use: jpgraph. i noticed this http://extensions.joomla.org/component/ ... Itemid,35/ but that doesn't work for me. so i would like to use jumi

the problem is, is far as i can see, that jumi has some problems with including some other php-files inside your own script.
look at this example

Code: Select all

<?php

include ("../jpgraph.php");
include ("../jpgraph_line.php");
// Some data
$ydata = array(11,3,8,12,5,1,9,13,5,7);

// Create the graph. These two calls are always required
$graph = new Graph(350,250,"auto");    
$graph->SetScale("textlin");

// Create the linear plot
$lineplot=new LinePlot($ydata);
$lineplot->SetColor("blue");

// Add the plot to the graph
$graph->Add($lineplot);

// Display the graph
$graph->Stroke();
?>

does anybody have a solution ?

regards,

Marcel

User avatar
MarHaj
Joomla! Ace
Joomla! Ace
Posts: 1168
Joined: Fri Jun 30, 2006 5:24 pm
Location: CZ
Contact:

Re: Jumi - an universal multipurpose module

Post by MarHaj » Mon Dec 25, 2006 11:54 am

Marcel, that's fine application of Jumi.

Have you tested that problem with including another file in your script had not been caused by pathway to an included file?

You know, sometimes a relative path as "../jpgraph.php" is not sufficinet $mosConfig_absolute_path . '/'."somefoleder/jpgraph.php" should be used.
MarHaj

MarKel
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sun Aug 21, 2005 2:18 pm

Re: Jumi - an universal multipurpose module

Post by MarKel » Tue Dec 26, 2006 9:02 am

MarHaj,

Just a quick update. I foundout what possibly the problem is.
The script DOES create the image I want, but doesn’t display it correct (garbage instead of nice graph)
I found out, because jpgrpaph can also save the image instead of stream it back to the browser. Like this:

This line in the script jpjoom.php

Code: Select all

// Display the graph
$graph->Stroke ");    
 

This displays the generated graph in your browser

Code: Select all

// Display the graph
$graph->Stroke("dataprof/include/auto.jpg");
This setting, saves the graph in a directory with the filename auto.jpg

NOW the question is: why the stream goes wrong but the save to disk doesn’t.

User avatar
MarHaj
Joomla! Ace
Joomla! Ace
Posts: 1168
Joined: Fri Jun 30, 2006 5:24 pm
Location: CZ
Contact:

Re: Jumi - an universal multipurpose module

Post by MarHaj » Wed Dec 27, 2006 2:53 pm

I tested jpgraph ver. 2.1.4 on my local Joomla configuration
1. At the first I verified that it works as a standalone application (e.g. without Joomla interface): it works (at the least with a tested original file accbarex1.php).
2. As Jumi inclusion. The pathname to the file in Jumi is: includes/dataprof/examples/accbarex111.php, the jspgraph application itself is in includes/dataprof.

It does not work until I have change the pathway in a test file accbarex1.php to:

global $mosConfig_absolute_path;
$incl1 = $mosConfig_absolute_path . "/includes/dataprof/jpgraph.php";
$incl2 = $mosConfig_absolute_path . "/includes/dataprof/jpgraph_bar.php";

I has to admit I didn't see neither garbage as you did, nor graph as I expected.
At the module position I only saw the announcement: JpGraph Error General PHP error : Use of undefined constant cur_template - assumed 'cur_template'

Well. That means that for some reasons there is a problem with $GLOBALS[cur_template] what is Joomla global variable - directory name of the current Joomla template. (I am using this varibale in my template.)

I'm affraid I really do not know a) reasons, b) how to overcome it.

Sorry to say I have stuck here.

Any idea?
MarHaj

User avatar
MarHaj
Joomla! Ace
Joomla! Ace
Posts: 1168
Joined: Fri Jun 30, 2006 5:24 pm
Location: CZ
Contact:

Re: Jumi - an universal multipurpose module

Post by MarHaj » Thu Dec 28, 2006 2:21 pm

Jpgraph solution found

Objective: to show graphs via free jpgraphs application (http://www.aditus.nu) in a module position.
Observation: Joomla interacts somewhow with built in functions of Jpgraph.
Solution: Present jpgraph output with iframe tag in a module position.

Example:
1. File jumitest that will be included into Jumi contains nothing but

where accbarex111.php is native Jpgraph definition of a graph.
E.g. it contains:
----------------------
SetScale("textlin");

// Create the linear plot
$lineplot=new LinePlot($ydata);
$lineplot->SetColor("blue");

// Add the plot to the graph
$graph->Add($lineplot);

// Display the graph
$graph->Stroke();
?>
----------------------
Rem: I placed the jumitest.html (which can be php as well) in a directory containing accbarex111.php, i.e. in includes/dataprof/examples.
The Jpgraph functions I had in includes/dataprof.

2. Take Jumi (module or plugin) and insert path to the inclluded file.
In my case it was
includes/dataprof/examples/jumitest.html

3. Publicate and see the graphs like a charm!

MArcel - many thanks for showing me the very nice application!
MarHaj

User avatar
MarHaj
Joomla! Ace
Joomla! Ace
Posts: 1168
Joined: Fri Jun 30, 2006 5:24 pm
Location: CZ
Contact:

Jumi forms: forms in a module position and/or content

Post by MarHaj » Tue Jan 02, 2007 10:51 am

You may need to create a custom form on your website, publish it in a module position and/or in a content item, and pass the required information by e-mail.

HiQ Formmail is a php form mail handler. Features: Multiple attachments, Limit types of attachments allowed, Block attachments by extension, Multiple recipients and Bcc(s), Auto responder, Custom header/footers for output, redirect and more. It works with safe mode on and register_globals off. HiQ Frommail is a not a Joomla! component; it's standalone application.

HiQ formmail can be made with Jumi the integral part of your Joomla! website: custom HiQ forms can be published in a module position and/or in an content item.

You can find Jumi forms, the tutorial, the working code snippet for download and demo on the developers page: http://www.vedeme.cz/index.php?option=c ... Itemid=123
MarHaj

gortzen
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Mon Oct 16, 2006 10:02 pm

Re: Jumi - an universal multipurpose module

Post by gortzen » Thu Feb 08, 2007 10:53 am

Hello,

I guess you answered earlier in this post but I don't undetstand the reply  :(

Is it possible to communicate variables between two included scripts?- using url's??

for example a link in the script show1.php calling show2.php?hello=gortzen
for now it leads me outside joomla...

Thanks for your help.


Gortzen

User avatar
MarHaj
Joomla! Ace
Joomla! Ace
Posts: 1168
Joined: Fri Jun 30, 2006 5:24 pm
Location: CZ
Contact:

Re: Jumi - an universal multipurpose module

Post by MarHaj » Thu Feb 08, 2007 4:31 pm

It's not Jumi specific feature it's the featur of scripting language used. Here it is php.
Shortly: you have full access to Jomla and php global specific varaibles. Global variables are those that are defined outside functions. Variables that are defined inside functions are seen only in the function itself.

So if you define in your script1.php varaible $a (outside any function) and include there another scripts, e.g. script11.php, script12.php, etc. you will see $a in ALL your included scripts.

Furthermore you can use php global variables for your purpose: $_GET (form method GET), $_POST (from method POST) and $_REQUEST (method GET, POST, cookie).

So there are several ways there how to do that.
Study php with these keywords:  scope of the variables, $_GET, $_POST, $_REQUEST.

I hope this helps.
MarHaj

gortzen
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Mon Oct 16, 2006 10:02 pm

Re: Jumi - an universal multipurpose module

Post by gortzen » Fri Feb 09, 2007 5:14 pm

I very much appreciate the way you explain it. Many thanks.

I understand what you mean by including, and passing vars to included scripts.

What I dont understand is the way to pass vars to another page inside joomla BUT I'll try untill it work, and get back here to explain it for newbies like me ...

Thanks again

ghazal
Joomla! Explorer
Joomla! Explorer
Posts: 276
Joined: Fri Aug 19, 2005 12:12 pm
Location: Out of my mind ...sometimes

Re: Jumi - an universal multipurpose module

Post by ghazal » Sat Feb 17, 2007 11:50 am

Hi Mr MarHaj,
I find Jumi very useful, and I did some testing successfully (local). But as I am not a programmer, I have not fully grasped yet all the potentialities.
My question is quite simple :
I want to show the implementation of many JS libraries in Joomla. It is of course very easy to insert


in the tag "head"  of my template index.php
I know also j(X)CORE from open4g.com - insertion of jQuery, Prototype, Mootools, etc. But it doesn't fill my needs.

As I have many small libraries to insert, I dont want to overload the index.php.
Do you you think it'd be possible with Jumi to insert ONLY the specific library I want (and possible dependancies) in the tag "head" for a specific page.
And not all Joomla pages.
And HOW ?
I hope I have made myself clear enough.
Thanks for your reply and congrats for this useful plugin.

PS : and do you think this kind of solution would work with Joomla ?
http://www.hunlock.com/blogs/Supercharged_Javascript
Last edited by ghazal on Sat Feb 17, 2007 12:01 pm, edited 1 time in total.

User avatar
MarHaj
Joomla! Ace
Joomla! Ace
Posts: 1168
Joined: Fri Jun 30, 2006 5:24 pm
Location: CZ
Contact:

Re: Jumi - an universal multipurpose module

Post by MarHaj » Sat Feb 17, 2007 1:38 pm

Hi,
Jumi is a module and/or plugin, that does nothing but includes some file. So you can include directly somefile.js or you can include anotherfile.php that again includes somefile.js.

Javascript can be included into anotherfile.php via your approach. Just write into anotherfile.php

Because Jumi can use parameters very efficiently, you can even tell included file via parameters, what js files should be included.
For example Jumi like plugin:
{jumi [anotherfile.php] [first.js] [second.js] ........}

I hope it helped.
I know it is very general answer. Should you need another you can access me directly on admin@vedeme.cz
MarHaj

ghazal
Joomla! Explorer
Joomla! Explorer
Posts: 276
Joined: Fri Aug 19, 2005 12:12 pm
Location: Out of my mind ...sometimes

Re: Jumi - an universal multipurpose module

Post by ghazal » Sat Feb 17, 2007 2:29 pm

Thank you very much for you quick reply.
I think I understood your explanation.
Logical.
Now, I have to build my own simple "anotherfile.php". I guess I can manage this.
I'll try your second solution, via parameters and with js files  included and get back to you if I have pb.

Have a good day.
Ghazal

Imperialdata
Joomla! Intern
Joomla! Intern
Posts: 71
Joined: Mon Apr 03, 2006 3:35 pm

Re: Jumi - an universal multipurpose module

Post by Imperialdata » Sun Feb 18, 2007 3:18 pm

Nice looking module, congratulations. If I understand right, you can have two jumi modules running php talking to each other.  Can you give a simple example of this or point in the right direction please? I did read your post where you said:
So if you define in your script1.php varaible $a (outside any function) and include there another scripts, e.g. script11.php, script12.php, etc. you will see $a in ALL your included scripts.
but I'm not sure how to implement that. I have a form which passes one variable to a script that I would like to display its results in the content pane. Is this possible?

User avatar
MarHaj
Joomla! Ace
Joomla! Ace
Posts: 1168
Joined: Fri Jun 30, 2006 5:24 pm
Location: CZ
Contact:

Re: Jumi - an universal multipurpose module

Post by MarHaj » Sun Feb 18, 2007 4:25 pm

The reply was not about modules talking together. I was just explaining that more scripts can be included into one module and how to pass them Jumi variables and how to share variables inside. As you know, Jumi can pass into the file practically unlimited number of variables. Nothing miraculous, just utilisation of standard PHP feature.

But your idea is another cake. Very fresh and inspiring one I must say. So I have never tested it for its feasibility. In principle YES: one shared included file, two modules with some user input which in turns changes the view of the second module.

I am rather busy this week but I will think your idea over. I will let you know next weekend. Is it sufficient? Do not you mind?
MarHaj

Imperialdata
Joomla! Intern
Joomla! Intern
Posts: 71
Joined: Mon Apr 03, 2006 3:35 pm

Re: Jumi - an universal multipurpose module

Post by Imperialdata » Mon Feb 19, 2007 2:04 pm

Sure, there's no problem waiting! If it has not been done before then it could really open up some huge possibilities for your module.

I'll PM you details of what I want to use it for as it is a practical use of module to module communication.

User avatar
MarHaj
Joomla! Ace
Joomla! Ace
Posts: 1168
Joined: Fri Jun 30, 2006 5:24 pm
Location: CZ
Contact:

Two communicating modules

Post by MarHaj » Sat Feb 24, 2007 6:00 pm

So I have done it.

The solution I have found is really very simple:
The modules are communication without any database od file system.
One modele is the form that sends the output to via POST method data into itself and stores variables into $_SESSION global variables.
The output just reads $_SESSION and shows them. $_SESSION global variables are fixed within the session.

It is very easy to rewrite the logic code to your actual needs.

The demo and files to donwload can be seen here: http://www.vedeme.cz/index.php?option=c ... Itemid=123

Hope you will like it:
MarHaj

User avatar
eagleshout
Joomla! Apprentice
Joomla! Apprentice
Posts: 44
Joined: Thu Nov 16, 2006 8:08 pm
Contact:

Re: Jumi - an universal multipurpose module

Post by eagleshout » Sun Feb 25, 2007 10:04 pm

ghazal wrote: PS : and do you think this kind of solution would work with Joomla ?
http://www.hunlock.com/blogs/Supercharged_Javascript
@ghazal: Were you successful at implementing the .js & .php includes to your site? If so do you have link to examples and code?

I am not very skilled at PHP or Javascript and have a few sites to develop with multiple Javascript libraries. Any assistance  or guidance would be greatly appreciated . . . my deadlines are fast approaching.

User avatar
MarHaj
Joomla! Ace
Joomla! Ace
Posts: 1168
Joined: Fri Jun 30, 2006 5:24 pm
Location: CZ
Contact:

Re: Jumi - an universal multipurpose module

Post by MarHaj » Mon Feb 26, 2007 7:49 am

Were you successful at implementing the .js & .php includes to your site?
Yes. I am using it. Mainly for ads and some visitors questionnaries.
If so do you have link to examples and code?
There are several manuals, demos and code snippets for downloading here at Vedeme.cz.

As to your question if supecharged Javascript will work with Joomla I think there is no reason why not. But i have not make any tests. If you do it let us the Joomla user community a note, will you?
MarHaj

ghazal
Joomla! Explorer
Joomla! Explorer
Posts: 276
Joined: Fri Aug 19, 2005 12:12 pm
Location: Out of my mind ...sometimes

Re: Jumi - an universal multipurpose module

Post by ghazal » Mon Feb 26, 2007 8:18 am

@eagleshout
I am still working on it. Let you know the results as soon as possible. I have deadlines too.  :D

twincascos
Joomla! Intern
Joomla! Intern
Posts: 83
Joined: Fri Mar 17, 2006 12:20 am
Location: Barcelona

Re: Jumi - an universal multipurpose module

Post by twincascos » Tue Feb 27, 2007 12:41 pm

Hello MarHaj,
Great module, congratulations!

I have used it to include the following in for the admin users benifit.

Code: Select all

<?php

##  This script outputs the time taken to generate a page or do a function (I.e. the load time of your web page).
##  You can include the last, fastest and slowest load speeds (updated on each page load).
##  As well as the size in bytes of the page being loaded.
##  Also, when the file was last modified, and last accessed.
##  For this script to work you must have a txt file in the same directory as your script
##  Chmod the txt file to 777
##  Created by Dux0r - http://www.wasterized.net

// no direct access
defined( '_VALID_MOS' ) or die( 'Restricted access' );



// Insert this code at the start of your script

// Gets the current time (unix timestamp)
$mtime=microtime();
$mtime=explode(" ",$mtime);
$mtime=$mtime[1] + $mtime[0];
$tstart=$mtime;

// ===========USER CONFIGURATION============

// Enter path to and name of your web-page file (ie "documents/outputfile.php")
$filename="index.php";

// 0 = off, 1 = in kb, 2 = in bytes
$display_filesize = 1;

// below 0 = off, 1 = on
$display_modify = 1; // display time when file was last modified?
$display_filename = 0; // display name of file being loaded?


// =========END USER CONFIGURATION==========

// Opens speed.txt and puts values into $something array, change to the path of the txt file if you need to.

$fp=fopen("includes/jumi/speed.txt","r");
$something['fastest']=trim(fgets($fp,99));
$something['slowest']=trim(fgets($fp,99));
$something['last']=trim(fgets($fp,99));
fclose($fp);
?>

<?php

// Insert this code at the bottom of your script

// Get the current time, find the difference in times.
$mtime=microtime();
$mtime=explode(" ",$mtime);
$mtime=$mtime[1] + $mtime[0];
$tend=$mtime;
$totaltime=($tend-$tstart);

// Optional line which changes the format to 4 decimal places (change "3" at will)
$totaltime=number_format($totaltime,4);


if($totaltime<=$something['fastest']){
$something['fastest']=$totaltime;
}
if($totaltime>=$something['slowest']){
$something['slowest']=$totaltime;
}


// ===========OUTPUT VALUES============

echo "<table cellpadding=4 cellspacing=0 border=1 bordercolor=#6699FF bgcolor=#000000><tr><td><font size=-2 face=Verdana color=#6699FF>";

if($display_filename==1){
echo "<B>".$filename."</B><BR />";
}
if($display_modify==1){
echo "Last updated: ".date("F d Y H:i:s.",filemtime($filename))."<BR />";
}
if($display_filesize==2){
echo "<B>".filesize($filename)." bytes ";
}
elseif($display_filesize==1){
echo "<B>".((int)filesize($filename)/1000)." KB ";
}
echo "Generated in ".$totaltime." seconds</B>";
echo "<BR />Fastest load: ".$something['fastest']." seconds";
echo "<BR />Slowest: ".$something['slowest']." seconds";
echo "<BR />Last load: ".$something['last']." seconds";

echo "</font></td></tr></table>";

// =========END OUTPUT VALUES==========

$something['last']=$totaltime;

// Rewrite speed.txt with new values
$fp=fopen("includes/jumi/speed.txt","w");
fwrite($fp,$something['fastest']."\n");
fwrite($fp,$something['slowest']."\n");
fwrite($fp,$something['last']."\n");
fclose($fp);
?>
Not my code, note the credits in the code.

This works well for what I wanted, how ever as I am not a script / code master I went looking on the web to find this.
Not an easy task, there are thousands of php code sites with endless lists of scripts, many may be questionable as to their quality.
So, I wanted to suggest the possibility of starting a small script list for Jumi. Perhaps right here in this thread, or elsewhere.

I for one am now trying to find a script, (php or js) which can print out the following information:
  • server stats, ie: mysql stats, services stats
  • site stats, ie: errors
  • code stats, ie: number of queries
  • page stats, ie: total file size, with dependencies
I think this would be great for a superadmin to be able to trouble shoot performance issues.
I know it's not within the scope of Jumi, exactly, but any recommendations to do this are welcome.
If I am able to piece something together I will post it here.
Thanx for any guidance, help

User avatar
MarHaj
Joomla! Ace
Joomla! Ace
Posts: 1168
Joined: Fri Jun 30, 2006 5:24 pm
Location: CZ
Contact:

Re: Jumi - an universal multipurpose module

Post by MarHaj » Tue Feb 27, 2007 5:37 pm

Thanks Twincascos.
I think there are many superadmins who would like to measure Joomla! performance better then by theit eyes. And the snippet can really help them.
MarHaj

twincascos
Joomla! Intern
Joomla! Intern
Posts: 83
Joined: Fri Mar 17, 2006 12:20 am
Location: Barcelona

Re: Jumi - an universal multipurpose module

Post by twincascos » Wed Feb 28, 2007 1:36 pm

Well, I don't think that the above posted script really works for what I wanted,

Code: Select all

// Insert this code at the start of your script

// Gets the current time (unix timestamp)
$mtime=microtime();
$mtime=explode(" ",$mtime);
$mtime=$mtime[1] + $mtime[0];
$tstart=$mtime;
Since it states,
Insert this code at the start of your script ...Insert this code at the end of your script
Which I guess means that , as it is, it's measuring the time it takes to execute itself ( not the actual total time to generate the page).
My results are similar to:
load: 0.0008 seconds
That seams very fast,

Imperialdata
Joomla! Intern
Joomla! Intern
Posts: 71
Joined: Mon Apr 03, 2006 3:35 pm

Re: Jumi - an universal multipurpose module

Post by Imperialdata » Mon Mar 05, 2007 7:47 pm

I'd just like to thank MarHaj for taking the time to develop this module. He has really done a great job and has implemented a communication between modules that I think will be heavily used in the future. This is what Joomla needs, features that make it stand out from the crowd and developers that care about what their users think and require.  :D

KatGirl
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Mon Mar 26, 2007 6:03 pm

Re: Jumi - an universal multipurpose module

Post by KatGirl » Mon Mar 26, 2007 6:33 pm

Hi,

I have a php script that is taking the contents from one page and displaying them on another...sort of a complicated wrapper.  This is necessary so that I do not have to rewrite something that has already been written.  This is not a script that I wrote.  This script displays list of homes along with their prices.  All of the prices are being displayed oddly for example:

First row of homes price is displayed-
jumi,650,000 (it should be $1,650,000)
Second row of homes down to the last home in the list price is displayed -
9,900 (it should be a$799,900)

After reading on this forum and stuff on the Jumi homepage I have not come up with an answer.

You can view this page at: http://realty.pagosaspringsrealestate.com and then roll over Property Search and click Virtual Tours

:(

Any idea how I can fix this?

Thank you!

KatGirl

User avatar
MarHaj
Joomla! Ace
Joomla! Ace
Posts: 1168
Joined: Fri Jun 30, 2006 5:24 pm
Location: CZ
Contact:

Re: Jumi - an universal multipurpose module

Post by MarHaj » Mon Mar 26, 2007 8:10 pm

I've got two questions:
a) how's your problem connected to the Jumi plugin? I understand you see "jumi,650,000" but you are not using jumi plugin, are you?
b) you wrote you are using php script you have not written personally. Maybe you could try to find an error there ...
MarHaj

KatGirl
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Mon Mar 26, 2007 6:03 pm

Re: Jumi - an universal multipurpose module

Post by KatGirl » Tue Mar 27, 2007 5:34 pm

a) Yes I am using the Jumi Plugin along with Joomla 1.0.12 Stable

b) I have seen this script echo out perfectly on a different site that does not use Joomla and that does not require a plugin such as jumi to display php in the content.  So I know the script is working fine.

Jumi seems to be replacing the first 2 to 3 characters of any line that starts with a $.  Hence the problem with $1,650,000 is being displayed as jumi,650,00 and $799,900 is displayed 9,900.

Hopefully that makes my problem clearer. 

Thank you!

User avatar
MarHaj
Joomla! Ace
Joomla! Ace
Posts: 1168
Joined: Fri Jun 30, 2006 5:24 pm
Location: CZ
Contact:

Re: Jumi - an universal multipurpose module

Post by MarHaj » Tue Mar 27, 2007 9:08 pm

Thanks!

That's clear now and it's REALLY interesting: in PHP  "$" denotes a variable and that is the most probable reason of the error.
On the other hand Jumi includes the external php file into Joomla content via standard php directive include().

Give me two days please I will try to find a solution.
MarHaj

User avatar
MarHaj
Joomla! Ace
Joomla! Ace
Posts: 1168
Joined: Fri Jun 30, 2006 5:24 pm
Location: CZ
Contact:

Re: Jumi - an universal multipurpose module

Post by MarHaj » Thu Mar 29, 2007 6:45 pm

Hi, I think I have  some news.
Jumi seems to be replacing the first 2 to 3 characters of any line that starts with a $.  Hence the problem with $1,650,000 is being displayed as jumi,650,00 and $799,900 is displayed 9,900.
I have found that it occurres when $ is followed by digits. It is due to the bufferring of the output.
The code
ob_start();
echo "$1234,44";
ob_end_clean();

will give 23,44. I really do not know why.

Quick and dirty solutions: leave between $ and a digit a space. E.g.: instead of $1,650,000 write $ 1,650,000.

The research continues ...
Last edited by MarHaj on Fri Mar 30, 2007 10:38 am, edited 1 time in total.
MarHaj


Locked

Return to “Modules”