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
gresham
Joomla! Apprentice
Joomla! Apprentice
Posts: 35
Joined: Thu Sep 14, 2006 9:33 am
Contact:

Re: Jumi - an universal multipurpose module

Post by gresham » Thu May 17, 2007 1:13 pm

Thanks for a wonderful piece of code ! ;D

I have successfully installed and tested the jumi mambot, however i am having trouble displaying the flash files that are supposed to be viewed by the HTML file that i use.

I tested this html file by directly typing the address in the browser and it works fine but when i include it in the jumi mambot all i end up with is a white block the same size as the movie but nothing plays or even shows up?

Am i doing something wrong? ???

How can i correct this? is it perhaps the links to the swf file as i have the HTML and SWF file in the same folder.

Thanks in advance


[EDIT] Not sure if this is the only method to solve this but it works...
I opened up the html file and saw the link to the swf file was simply

Code: Select all

<embed src="top.swf"
So i changed the above to an absolute link like below and it worked fine!

Code: Select all

<embed src="http://www.mywebsite.com/images/stories/test/top.swf"
Last edited by gresham on Thu May 17, 2007 1:22 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 » Thu May 17, 2007 2:17 pm

Hi Gresham,
the solution - including swf into your pages follows:

Create a script file, e.g. my_swf.php which should be included by Jumi.

Providing your swf file is top.swf and is uploaded to the images/stories/swf directory and provided the movie width is 170 and high 100 then the content of the script is

Code: Select all

<?php defined( '_VALID_MOS' ) or die( 'Restricted access' );?>

<div align=center style="clear:both">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id=top width=170 height=100 codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,65,0">
 <param name="movie" value="<?php echo $GLOBALS[mosConfig_live_site]; ?>/images/stories/swf/top.swf" />
 <param name="quality" value="high" />
 <param name="play" value="true" />
 <param name="loop" value="true" />
 <param name="wmode" value="transparent" />
 <param name="bgcolor" value="#ffffff" />
<embed src="<?php echo $GLOBALS[mosConfig_live_site]; ?>/images/stories/swf/top.swf" width=170 height=100 bgcolor="#ffffff" wmode="transparent" quality="high" loop="true"  type="application/x-shockwave-flash" pluginspace="http://www.macromedia.com/go/getflashplayer" />
</object>
</div> 
It is probably similar to your html file except using variable $GLOBALS[mosConfig_live_site]. And that is the most probable reason why you see emptz box.
You can easily customise tags to your needs.
I have tested it many times - it works.

Have a nice day full of success with your effort!!!
MarHaj

User avatar
gresham
Joomla! Apprentice
Joomla! Apprentice
Posts: 35
Joined: Thu Sep 14, 2006 9:33 am
Contact:

Re: Jumi - an universal multipurpose module

Post by gresham » Fri May 18, 2007 6:17 am

Thank u, ;D
If i have any problems will report back  ;)

vibez
Joomla! Apprentice
Joomla! Apprentice
Posts: 39
Joined: Tue Jan 24, 2006 3:10 pm

Re: Jumi - an universal multipurpose module

Post by vibez » Fri May 18, 2007 3:46 pm

Can I ask how we get access to the joomla database. For example at the top of my script I would like to echo my user id. So in my inlcude.php file I have

Code: Select all

global $database;
echo '$my->id';

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 May 21, 2007 10:02 pm

You will obtain user ID from global variable when user is logged but you will not be accessing database in fact.

How to call Joomla databases, tables etc.? It is rather long story. You should a) study PHP & MySQL (basic knowledge about SQL satements) and b) example codes from Joomla core and extensions. My favourite approach is studying modules they are, as a rule, simple enough to be understood. Visit also developers section at http://dev.joomla.org/ and developers forums here.
MarHaj

vibez
Joomla! Apprentice
Joomla! Apprentice
Posts: 39
Joined: Tue Jan 24, 2006 3:10 pm

Re: Jumi - an universal multipurpose module

Post by vibez » Tue May 22, 2007 7:59 am

Thanks for the reply MarHaj

I'm a little confused. I do actually write my own basic joomla modules and have always used

Code: Select all

global $database;
echo '$my->id';
to call the joomla database. Are you suggestion that in jumi this method is not supported?

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 May 22, 2007 8:17 am

I do apologize for confusing you. Clearly I state: you are doing everything well and your code will work in Jumi.
But I thought you have asked me too
Can I ask how we get access to the joomla database.
What I meant by my confusing reply: referrencing $database is not accessing Joomla database. What you do is extracting values from global variables not from database. And it makes difference.
MarHaj

vibez
Joomla! Apprentice
Joomla! Apprentice
Posts: 39
Joined: Tue Jan 24, 2006 3:10 pm

Re: Jumi - an universal multipurpose module

Post by vibez » Tue May 22, 2007 8:51 am

Thank you for clearing that up MarHaj :) I guess my choice of words also confused you too. You are correct in that I am accessing the global variables and not the actual joomla database.

In any case here is my sample code.

id";
?>

Now this code does work for me in my modules, but it does not seem to work at all in jumi. Do you have any ideas why?

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 May 22, 2007 9:17 am

I have just tested your code (copy paste) in Jumi. It works well I have to say.
What exactly do you see in a module position?
You can verify that something happens by

Code: Select all

echo "xxx" . $my->id . "xxx";
You should see
xxx0xxx
at the least.
MarHaj

vibez
Joomla! Apprentice
Joomla! Apprentice
Posts: 39
Joined: Tue Jan 24, 2006 3:10 pm

Re: Jumi - an universal multipurpose module

Post by vibez » Tue May 22, 2007 9:39 am

Ok I seem to have it working now by using global $my instead of global $database

Code: Select all

<?php
global $my;
echo "$my->id";
?>
Thanks again for your help. Jumi is an awesome tool

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 May 22, 2007 9:46 am

You are welcome.
MarHaj

JasonShoulet
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Sat Apr 14, 2007 10:32 pm

Re: Jumi - an universal multipurpose module

Post by JasonShoulet » Wed May 23, 2007 5:57 am

Love the plugin and module...great work.

trying to pass the $database variable to my include file which is a simple var_dump($jumi[0]) but it keeps outputting the string $database instead of the variable information.  i want to be able to change up the variable dumping using the argument function of the module.  am i missing something?

Jason

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 May 23, 2007 8:27 am

You are right: jumi[0] contains the string and not the variable.

Jumi  reads the whole line of arguments as one string and then splits the string into pieces defined by [ ] brackets.
The pieces / individual arguments represent values at jumi[] array.

You have no chance to pass varibles through Jumi arguments. Just values.

I am very sorry I could not give you positive answer.
MarHaj

JasonShoulet
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Sat Apr 14, 2007 10:32 pm

Re: Jumi - an universal multipurpose module

Post by JasonShoulet » Wed May 23, 2007 3:20 pm

Thank you for the quick response.  I just wanted to make sure I understood the function of arguments and that was the conclusion I had come to when I posted the question.

The plugin functionality and module functionality are brilliant, so once agaion THANKS!!!  I will be using this extensively.

Jason

registoni
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Mon Dec 19, 2005 10:17 am

Jumi - as a MULTILANGUAL WEATHER module

Post by registoni » Sun May 27, 2007 8:19 pm

Another trick I used with combination of http://extensions.joomla.org/component/ ... Itemid,35/ JUMI module.
I needed weather conditons shown for 2 towns my home town, Samarkand and town where I am now, London. The data where I get the weather conditions in form of a picture is from the russian site: www.gismeteo.ru (it will produce weather in russian and english though but for more than 4300 towns around the globe).
Here are the html codes from the russian website:
FOR ENGLISH:

Code: Select all

<a href='http://www.gismeteo.ru/etowns/38696.htm'><img src='http://einformer.gismeteo.ru/38696-30E.GIF' border=0></a><br /><hr width="98%" size="1" /><a href='http://www.gismeteo.ru/etowns/03372.htm'><img src='http://einformer.gismeteo.ru/03372-30E.GIF' border=0></a>
FOR RUSSIAN:

Code: Select all

<a href='http://www.gismeteo.ru/towns/38696.htm'><img src='http://informer.gismeteo.ru/38696-30.GIF' border=0></a><br /><hr width="98%" size="1" /><a href='http://www.gismeteo.ru/towns/03372.htm'><img src='http://informer.gismeteo.ru/03372-30.GIF' border=0></a>
I used the JUMI module to output the html code for the weather conditions in the left position and directed it to open a small weather.php file in which I used tactic shown in some of posts here (multilangual modules http://forum.joomla.org/index.php/topic ... #msg329684):

Code: Select all

<?php
if ($mosConfig_lang== english )
echo "<a href='http://www.gismeteo.ru/etowns/38696.htm'><img src='http://einformer.gismeteo.ru/38696-30E.GIF' border=0></a><br /><hr width=\"98%\" size=\"1\" /><a href='http://www.gismeteo.ru/etowns/03372.htm'><img src='http://einformer.gismeteo.ru/03372-30E.GIF' border=0></a>";
?>

<?php
if ($mosConfig_lang== russian )
echo "<a href='http://www.gismeteo.ru/towns/38696.htm'><img src='http://informer.gismeteo.ru/38696-30.GIF' border=0></a><br /><hr width=\"98%\" size=\"1\" /><a href='http://www.gismeteo.ru/towns/03372.htm'><img src='http://informer.gismeteo.ru/03372-30.GIF' border=0></a>";
?>
AND it worked. you can see in action here http://www.gigabit-samarkand.com/faridun/ - change languages to see it.
Last edited by registoni on Sun May 27, 2007 8:22 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 » Sun May 27, 2007 8:51 pm

Thank for posting the trick: simple, efficient, nice, working!
Well done indeed.
MarHaj

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

Re: Jumi - an universal multipurpose module

Post by ghazal » Mon May 28, 2007 9:44 am

JasonShoulet wrote:
The plugin functionality and module functionality are brilliant, so once agaion THANKS!!!  I will be using this extensively.

Jason
I'll just add my BIG thanks too for this wonderful plugin.
And your dedication, MISTER JUMI (lol) to answering carefully and precisely to our questions.
Hope you'll develop it for Joomla 1.5 as well.

dannykilla
Joomla! Intern
Joomla! Intern
Posts: 51
Joined: Wed Apr 04, 2007 10:47 pm
Location: Manchester, UK

Re: Jumi - an universal multipurpose module

Post by dannykilla » Wed May 30, 2007 5:19 pm

Hi,

I am having some trouble i cant this to work and was wondering if anyone can help?

basically i want to be able to add some small HTML so i get a Live server status from my clans counter strike source servers.

the code looks like this:

Code: Select all

<iframe frameborder="0" src="http://manchesters-armed-defenders.hlstatsx.com/status.php?width=210&server_id=1&game=css&show_map_wins=1" scrolling="no" width="212px" height="320px"></iframe>
I have inserted this code in a .htm and a .txt files and pointed the module to the correct place includes/jumies/stats.htm and includes/jumies/stats.txt and all i get is this line of text once i have publish the module and refreshed my clans site

The file  /var/www/vhosts/MyDomain/subdomains/test/httpdocs/includes/jumies/hlstatsx.htm doesn't exist!
Set correct pathname in the admin section of Jumi module, please.

Can anyone help me as i have seen something similar working on another site but there CMS is something called Subdreamer

thanks

Danny

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

Re: Jumi - an universal multipurpose module

Post by ghazal » Wed May 30, 2007 5:56 pm

dannykilla wrote: Hi,

I am having some trouble i cant this to work and was wondering if anyone can help?

basically i want to be able to add some small HTML so i get a Live server status from my clans counter strike source servers.

I have inserted this code in a .htm and a .txt files and pointed the module to the correct place includes/jumies/stats.htm and includes/jumies/stats.txt and all i get is this line of text once i have publish the module and refreshed my clans site

The file  /var/www/vhosts/MyDomain/subdomains/test/httpdocs/includes/jumies/hlstatsx.htm doesn't exist!
Set correct pathname in the admin section of Jumi module, please.
Can anyone help me as i have seen something similar working on another site but there CMS is something called Subdreamer
thanks
Danny
I am not the best to answer your question (my PHP level is that of a beginner) but I have noticed that
1) Jumi works better with .php files, try this :

Code: Select all

<?php
  
defined( '_VALID_MOS' ) or die( 'Restricted access' );
?>
then just insert your code (no )

Name your file  xxx.php

2)my experience is that just creating a folder with your files at the root of Joomla also works perfectly, then the path to the files is only relative to index2.php (folder/xxx.php)

Security-wise : upload a blank html file to this folder

I say again that this only a php beginner solution.
And MR JUMI, feel free to correct me if i am wrong.

dannykilla
Joomla! Intern
Joomla! Intern
Posts: 51
Joined: Wed Apr 04, 2007 10:47 pm
Location: Manchester, UK

Re: Jumi - an universal multipurpose module

Post by dannykilla » Wed May 30, 2007 5:59 pm

hi

thanks for the reply, but...

I have no knowledge at all about php and was wondering what do you mean when you wrote this:

Code: Select all

<?php
  
defined( '_VALID_MOS' ) or die( 'Restricted access' );
?>
thanks

Danny

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 May 30, 2007 7:36 pm

Danny,
I have tested your script in Jumi included into *.html and *.php file as is. I.e. without any modification.
It works well for me. Immediatelly.

So let's try to find why you did not succeed.

You say that you include the script into the txt file and the result was the same as it was with html:
The file  /var/www/vhosts/MyDomain/subdomains/test/httpdocs/includes/jumies/hlstatsx.htm doesn't exist!
Set correct pathname in the admin section of Jumi module, please.
From that I can conclude that there is 99.25% probabilty that your pathname includes/jumies/stats.htm to the file with your script is not correct.
The rules are as follows:
a) The pathname must be set relative to the Joomla root
b) verify that the file stats.htm (or what is its real name) is really where it should be

Notice, for example, that you are speaking about including stats.htm and Jumi reports no existence of hlstatsx.htm. Isn't it interesting?
MarHaj

dannykilla
Joomla! Intern
Joomla! Intern
Posts: 51
Joined: Wed Apr 04, 2007 10:47 pm
Location: Manchester, UK

Re: Jumi - an universal multipurpose module

Post by dannykilla » Wed May 30, 2007 8:01 pm

MarHaj of course u are correct lol

i am currently checking new components and scripts ect.. on a test subdomain and like a idiot i placed the jumies folder and my hlstatsx.php file in my main domain lol

thanks for correcting this

great module

Danny

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 May 30, 2007 8:07 pm

Danny,
I am very happy I could help you. In other words: thank you for your making me happy...
MarHaj

rjfernandez
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu May 31, 2007 1:20 am

Re: Jumi - how to link embedded PHP scripts

Post by rjfernandez » Thu May 31, 2007 1:29 am

Hi
I just installed Jumi and incorporated a small PHP system that I had made.
The first PHP script run perfectly within Jumi.
The trouble I have now is that there are links to other PHP scripts from that first script, and a couple of forms that POST to other PHP scripts, but everytime I click on those links I get a "Restricted access" message.

How can I get links and POSTS to work from within Jumi?

Thanks,

Rodrigo Fernandez

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 May 31, 2007 6:27 pm

everytime I click on those links I get a "Restricted access" message...
How can I get links and POSTS to work from within Jumi?
Rodrigo,
the reason why you get "Restricted access" is obvious: the link leads you outside of Jumla and, at the same time the script has restriction to be run inside Joomla.
I am affraid I do not know the general and readz made solution. Just two possible tips>
1. Although I do not no the details of your solution try using - if it is possible for you - tag. It enables running "foreign" scripts inside Joomla and Jumi module as well.
2. Another trick I used the other day was using sefRelToAbs. It calls as I remember itself so it prevents to lead you otside module. E.g. in forms: " method="post"> I do not remeber details but I think you can find them as I did: here at Joomla forum.
Rodrigo I do apologize for my ignorance and having no definite answer. I am really very sorry.
MarHaj

dannykilla
Joomla! Intern
Joomla! Intern
Posts: 51
Joined: Wed Apr 04, 2007 10:47 pm
Location: Manchester, UK

Re: Jumi - an universal multipurpose module

Post by dannykilla » Tue Jun 05, 2007 7:36 pm

MarHaj

I have a slight problem :(

One of the modules works but it has a problem it isn't working perfectly.
The code i have placed is a iframe for my Game Server Stats and it works ok when there is none on my server but as soon as a few players join then it starts to go wrong, the iframe is supposed to show all players active on the server, but when players join i can only see half of the  1st players name and no one else?

Now i have spoken to the provider if the stats service for my Game server and he has told me that i need to remove some code and then it should work perfectly :)

The trouble is i am not sure when the code he is talking about:-

Code: Select all

<div id="accordian">

<h3 class="toggler atStart bg0">
<a href="http://test.manchesters-armed-defenders.co.uk/index.php?option=com_content&task=view&id=5&Itemid=6">Dust 2 24/7 | 100Tick | HLStatsX</a>
</h3>
<div class="element atStart bg0">

Dust 2 24/7 | 100Tick | HLStatsX 











 





Server Rules:



 



1. No Cheati... </div>
Now this code is not in the stats.php i have created in the jummies folder, is there anyway you can help me MarHaj

Thanks

Danny

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 Jun 06, 2007 5:00 pm

he has told me that i need to remove some code and then it should work perfectl.The trouble is i am not sure when the code he is talking about
Danny,
I would like to help you with the identification of bad code.
I am affraidt the code you have provided here is reather empty. There is nothing to solve.... Are you sure this is the right one?
MarHaj

dannykilla
Joomla! Intern
Joomla! Intern
Posts: 51
Joined: Wed Apr 04, 2007 10:47 pm
Location: Manchester, UK

Re: Jumi - an universal multipurpose module

Post by dannykilla » Wed Jun 06, 2007 5:47 pm

i think so ?

Because the code i have posted in the JUMI modile is not the code that he has told me to delete?

the code i have posted in the JUMI module is this

Code: Select all

<iframe frameborder="0" src="http://manchesters-armed-defenders.hlstatsx.com/status.php?width=210&server_id=1&game=css&show_map_wins=1" scrolling="no" width="212px" height="320px"></iframe>
and here is the reply to my support ticket
#1 Thomassun

01. Jun 2007 21:12:23 Dear Customer,


it seems that the iframe is overlapped by this module. It is probably fixed to a specific place instead of being able to float.

If you remove this part from your page everything should be fine:



Dust 2 24/7 | 100Tick | HLStatsX



Dust 2 24/7 | 100Tick | HLStatsX











 





Server Rules:



 



1. No Cheati...


Best regards
The HLstatsX - Team
so yes i think it is correct ??? lol

please help MarHaj

Thanks
Danny

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 Jun 07, 2007 7:07 pm

Danny, my apologies for the delay - I was away on business.
So, the admin told you
it seems that the iframe is overlapped by this module. It is probably fixed to a specific place instead of being able to float.
That means that something with fixed position is over iframe (Jumi module) so you cannot see all the Jumi content.

The admin identifies that something and he advices you to remove it:
If you remove this part from your page everything should be fine:
Danny, I am affraid I cannot tell you how to remove that. The something that should be removed is not part of Jumi. You have to look at another modules, content, template.

Hint: the great, really great tool for removing bugs like that is Firefox browser + Firebug extension. Both free.
MarHaj

designationlocutus
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Fri Jun 08, 2007 8:37 am

Re: Jumi - an universal multipurpose module

Post by designationlocutus » Fri Jun 08, 2007 9:50 am

Hi there,

What are the steps involved into copying the module?

Regards,
Rick


Locked

Return to “Modules”