How pass variables to script in a module mod_jumi
First unread post • 6 posts
• Page 1 of 1
How pass variables to script in a module mod_jumi
Hello!
First, congratulations for this fantastic component! ^.^
I have one question that googling I can't resolve. I've created a module, a mod_jumi module. This module includes a script: "topOffers.php". I don't know how pass specific parameters to this script. Because I've seen that this kind of sentence {jumi [plugins/content/jumi/jumi_demo.php][first][second]} only works to include the script inside articles, but in a mod_jumi module?
Thank you!
Oriol.
First, congratulations for this fantastic component! ^.^
I have one question that googling I can't resolve. I've created a module, a mod_jumi module. This module includes a script: "topOffers.php". I don't know how pass specific parameters to this script. Because I've seen that this kind of sentence {jumi [plugins/content/jumi/jumi_demo.php][first][second]} only works to include the script inside articles, but in a mod_jumi module?
Thank you!
Oriol.
- ofranquesa
- Posts: 3
- Joined: Mon Dec 20, 2010 2:50 pm
Re: How pass variables to script in a module mod_jumi
You can use JRequest joomla class to access the GET, POST variables. You can also use $_GET, $_POST.
Regards,
Edvard Ananyan - 2GLux Team
Please post a review at the Joomla Extensions Directory. It is very important for us!
Edvard Ananyan - 2GLux Team
Please post a review at the Joomla Extensions Directory. It is very important for us!
- Edvard
- Site Admin
- Posts: 1836
- Joined: Mon Jun 28, 2010 1:54 pm
- Location: Yerevan, Armenia
Re: How pass variables to script in a module mod_jumi
Thanks for your response, but the problem is this:
I have various modules mod_jumi, that all can use the same script, but I want to pass a param depending of module mod_jumi. This script print some offers readed in XML, so the script is topOfFers.php, but when I'm christmas section, for example, I want to pass to topOffers.php an indicator that I only want show christmas offers... The same as Weekend, etc ...
Thank you!
I have various modules mod_jumi, that all can use the same script, but I want to pass a param depending of module mod_jumi. This script print some offers readed in XML, so the script is topOfFers.php, but when I'm christmas section, for example, I want to pass to topOffers.php an indicator that I only want show christmas offers... The same as Weekend, etc ...
Thank you!

- ofranquesa
- Posts: 3
- Joined: Mon Dec 20, 2010 2:50 pm
Re: How pass variables to script in a module mod_jumi
Solved!
I thought to use both "Code Written" and "Source Code" inputs and works.
On Code written I've defined the params and "Source Code" i've included the script...
Expect that this can help someone.
I thought to use both "Code Written" and "Source Code" inputs and works.
On Code written I've defined the params and "Source Code" i've included the script...
Expect that this can help someone.
- ofranquesa
- Posts: 3
- Joined: Mon Dec 20, 2010 2:50 pm
Re: How pass variables to script in a module mod_jumi
ofranquesa wrote:I thought to use both "Code Written" and "Source Code" inputs and works.
On Code written I've defined the params and "Source Code" i've included the script...
Hello Oriol,
Can you be more specific, please? I tried this, but the value I put
in the "Code Written" field (a short string) simply appears at the beginning
of the content of the module, and the php script cannot find it in $jumi[0],
so I can't use it in my script.
Or, Edvard, could you please provide a little more detail about passing
arguments to a jumi module? Maybe a short tutorial? Thanks!
Thanks!
Dan
- [email protected]
- Posts: 2
- Joined: Sat Dec 25, 2010 10:18 am
Re: How pass variables to script in a module mod_jumi
It's OK. I figured it out too.
I want to pass a product code "CX1" to my script. All I had to do was to put the following in the "Code Written" field:
Then, I added
to my script, and it echoes "CX1".
I'm happy.
Merry Christmas!
Dan

I want to pass a product code "CX1" to my script. All I had to do was to put the following in the "Code Written" field:
- Code: Select all
<?php
$myproductcode = "CX1";
?>
Then, I added
- Code: Select all
echo $myproductcode;
to my script, and it echoes "CX1".
I'm happy.

Merry Christmas!
Dan
- [email protected]
- Posts: 2
- Joined: Sat Dec 25, 2010 10:18 am
6 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 3 guests