Jumi - the set of custom code extensions

This forum is for general questions about extensions for Joomla! version 1.5.x.

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
unleash_it
Joomla! Ace
Joomla! Ace
Posts: 1311
Joined: Wed Nov 05, 2008 11:28 pm

Re: Jumi - the set of custom code extensions

Post by unleash_it » Tue Jul 14, 2009 8:32 am

hello dear MarHaij


many thanks - i will do it
MarHaj wrote:
so i f want to add this simple image [ just that simple - i onliy want to add a image to the right column ] it with the jumi-way. What do i have to fill in to the "window"
Joo-jesus, just write standard html code into the "Code written" area.
<img src="path_to_myimage.gif" alt="My image" />
You can write there any html, php, javascript code...
i come back and report

thanks so far
regards un-leash,
a big fan for ++ 11 years now: With Joomla you can easily create and extend your website: see the site, that offers you ideas & modules - extensions.joomla.org - it lists over 4000 extensions

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

Re: Jumi - the set of custom code extensions

Post by MarHaj » Tue Jul 14, 2009 9:01 am

i have an article with information in a page.
mean while in the front page, there are a module which content information that is retrieve from that article. how should i do that..?
Zodiok,
retrieving article into the module is quite easy. All you need is article id.

Example of echoing of title and introtext of the article:

Code: Select all

$id=123; //change it to your actual id
$zod_database = &JFactory::getDBO(); 
$zod_query = 'SELECT title, modified FROM #__content WHERE id = ' . (int) $id;
$zod_database->setQuery( $zod_query );
$zod_article = $zod_database->loadObject();
echo "$zod_article->title"."<br />";
echo "$zod_article->introtext";
etc., etc.

You can retrieve all properties of the object $zod_article by its names that can be found in jos_content database table fields names (e.g. intotext, title, ...). The properties values can be accessed by $zod_article->field_name.

It's simple, isn't it?

Rem: I have prepended all your variables names by "zod_" to prevent unwanted interaction of your variables with Joomla global variables.
MarHaj

unleash_it
Joomla! Ace
Joomla! Ace
Posts: 1311
Joined: Wed Nov 05, 2008 11:28 pm

Re: Jumi - the set of custom code extensions

Post by unleash_it » Wed Jul 15, 2009 12:24 pm

hi - i once asked if i can realize a twitter with the jumi

can u help me

[quote]And the last option. If twitter widget is a widget from widgetbox.com
it must look like some code. Get it. The
either
a) Open Jumi module and paste the code into Code written area.Save it, publish it. Done.
or
b) save it as a file and write the filepathname to it into an approptiate field of Jumi module. Save it, publish it. Done.


or should i do it like this [ i have some code - examples ] can i past this code into the jumi-widget:

Code: Select all

<div id="twitter_div">
<h2 class="sidebar-title">Twitter Updates</h2>
<ul id="twitter_update_list"></ul>
<a href="http://twitter.com/ranwilli" id="twitter-link" style="display:block;text-align:right;">follow me on Twitter</a>
</div>
<script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>
<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/ranwilli.json?callback=twitterCallback2&count= 5"></script>

Code: Select all

Hot tip! To ensure loading of your page even in the case of twitter.com non-loading, move the two lines that start with <script type="text/javascript"... to the bottom of your page (just above </body>). 
[code]

is this possible - to do this ... to put this code into the widget.. 


or can i do it with this here:  http://wiki.zum.de/Hilfe:Twitter_Widget


[code]
<widget type="twitter" uid="24522998" count="5" />
</widget>

well MarHaj - i have jumi up and running on my page: well i have allready running one jumi-window on my site - jobstarers.org - can i open/ create another - and do the twitter-job wiht the second!?


best regards
joo ;)

btw: @ marHaj look at http://www.jobstarters.org - i was lucky with the task - to insert an image :)
regards un-leash,
a big fan for ++ 11 years now: With Joomla you can easily create and extend your website: see the site, that offers you ideas & modules - extensions.joomla.org - it lists over 4000 extensions

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

Re: Jumi - the set of custom code extensions

Post by MarHaj » Wed Jul 15, 2009 4:54 pm

Joo-jesus
i was lucky with the task - to insert an image
I've seen it and is at the place where it should be. Congratulations"
move the two lines that start with <script type="text/javascript"... to the bottom of your page (just above </body>)
For this purpose }including javascript snippets before </body> tag) I have invented the solution:

go to your template and just before </body> tag place

Code: Select all

<jdoc:include type="modules" name="jesus_scripts" />
It creates "fake" module position into which you can inject javacript codes like mentioned, or google analytics tracking script, etc. via Jumi module. It's really simple and functional absolutely.

The rest of the twitter code include where you want to see it.
i have allready running one jumi-window on my site - jobstarers.org - can i open/ create another - and do the twitter-job wiht the second!?
No problem. You can use N>>1 Jumi modules, plugins, etc. on your site.
MarHaj

User avatar
FadyCoder
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Mon Aug 20, 2007 8:21 am

Re: Jumi - the set of custom code extensions

Post by FadyCoder » Sat Jul 18, 2009 3:50 am

I want to include four php files but I have error.
it seems that it's working only with 1 file
I am using this code :

{jumi [test1.php]}
{jumi [test2.php]}
{jumi [test3.php]}
{jumi [test4.php]}

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

Re: Jumi - the set of custom code extensions

Post by MarHaj » Sat Jul 18, 2009 7:53 am

I want to include four php files but I have error.
it seems that it's working only with 1 file
Could you be more specific please?
What error exactly did you notice?
MarHaj

User avatar
FadyCoder
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Mon Aug 20, 2007 8:21 am

Re: Jumi - the set of custom code extensions

Post by FadyCoder » Sat Jul 18, 2009 8:25 am

MarHaj wrote:
I want to include four php files but I have error.
it seems that it's working only with 1 file
Could you be more specific please?
What error exactly did you notice?
It seems that I have this error because I am using the same script for more than one time

Fatal error: Cannot redeclare count_days() (previously declared in /home/USERNAME/public_html/script2/index.php:71) in /home/USERNAME/public_html/script1/index.php on line 88

I installed 4 copies of this script but I want to include the four index files in joomla ..
do you have a solution for that ? ;)

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

Re: Jumi - the set of custom code extensions

Post by MarHaj » Sat Jul 18, 2009 4:38 pm

Cannot redeclare count_days()
I installed 4 copies of this script but I want to include the four index files in joomla ..
do you have a solution for that ?
You have hit the nail on the head: the function count_days() cannot be declared on one page several times.
The only way how to get rid of it is one function (or class) declaration only.

For example you can summarize all your function declaration in one file, e.g. myfunctions.php. Include it once with jumi and call it several times with your script:
{jumi [myfunctions.php]}
{jumi [test1.php]}
{jumi [test2.php]}
{jumi [test3.php]}
etc. where files test1.php, test2.php, ... do not contain function declarations.

Rem1: you can try to include myfunction.php into the Joomla page via Jumi module and call functions test1.php, test2.php in articles as you do.

Rem2: another option is in using object oriented approach but the final philosophy - one declaration/many usage - is the same.
MarHaj

bleustreak1
Joomla! Explorer
Joomla! Explorer
Posts: 401
Joined: Sat Feb 07, 2009 6:06 am

Re: Jumi - the set of custom code extensions

Post by bleustreak1 » Wed Jul 22, 2009 12:06 pm

i am receiving feedback email with the from title as "[email protected]"

from every email that is sent after filling my feedback form which i have created in jumi


in my jumi code i have



mail($mailcc, "mysite Call Me Back ",$callstrBody, "From:$callemail" );

and

i have given

$callemail = "mysite.com" ;

above it


now i believe my hosting provider is getting attached after it with a @

how can i just get from mysite.com in my email

is there something in my jumi form have to change or do i have to change any settings in joomla

User avatar
dannette
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 102
Joined: Sat Apr 28, 2007 9:47 pm
Location: Allentown, PA

Re: Jumi - the set of custom code extensions

Post by dannette » Wed Jul 22, 2009 1:16 pm

bleustreak1 wrote:i am receiving feedback email with the from title as "[email protected]"

from every email that is sent after filling my feedback form which i have created in jumi


in my jumi code i have



mail($mailcc, "mysite Call Me Back ",$callstrBody, "From:$callemail" );

and

i have given

$callemail = "mysite.com" ;

above it


now i believe my hosting provider is getting attached after it with a @

how can i just get from mysite.com in my email

is there something in my jumi form have to change or do i have to change any settings in joomla
The From: should be an email address. You can put

Code: Select all

$headers="From: mysite.com <[email protected]>"
or something like that and just the mysite.com will show up as the 'from' when they get it, but I believe it's looking for an email address so your host is adding it.
Building with Joomla! since 2005!
Dannette Voorhis

bleustreak1
Joomla! Explorer
Joomla! Explorer
Posts: 401
Joined: Sat Feb 07, 2009 6:06 am

Re: Jumi - the set of custom code extensions

Post by bleustreak1 » Thu Jul 23, 2009 5:25 am

dannette wrote:
bleustreak1 wrote:i am receiving feedback email with the from title as "[email protected]"

from every email that is sent after filling my feedback form which i have created in jumi


in my jumi code i have



mail($mailcc, "mysite Call Me Back ",$callstrBody, "From:$callemail" );

and

i have given

$callemail = "mysite.com" ;

above it


now i believe my hosting provider is getting attached after it with a @

how can i just get from mysite.com in my email

is there something in my jumi form have to change or do i have to change any settings in joomla
The From: should be an email address. You can put

Code: Select all

$headers="From: mysite.com <[email protected]>"
or something like that and just the mysite.com will show up as the 'from' when they get it, but I believe it's looking for an email address so your host is adding it.


thanks that solved it

unleash_it
Joomla! Ace
Joomla! Ace
Posts: 1311
Joined: Wed Nov 05, 2008 11:28 pm

Re: Jumi - the set of custom code extensions

Post by unleash_it » Sat Jul 25, 2009 6:50 pm

hello Dear MarHaj,

first of all - you are great. Many many thanks for your contiuend support and your almost endless dedication to the communty. This is really overwhelming to see! MarhaJ I love your scripts and your great engagement. And yes: i am very sure that you have many many friends all over the planet - one each continent in almost every contry!!

Back to the twitter widged-implemnetation on my site - http://www.jobstarters.org [see also above]
move the two lines that start with <script type="text/javascript"... to the bottom of your page (just above </body>)
For this purpose }including javascript snippets before </body> tag) I have invented the solution:

go to your template and just before </body> tag place

Code: Select all

<jdoc:include type="modules" name="[b]jesus_scripts[/b]" />
It creates "fake" module position into which you can inject javacript codes like mentioned, or google analytics tracking script, etc. via Jumi module. It's really simple and functional absolutely. The rest of the twitter code include where you want to see it.[/quote]

MarHaj - so far so good: this term - jesus_scripts" />[/code]- you mentioned - should i type this term again - eg in the Jumi-widged which i create later..!? This is a important question for me.

The rest - well what belongs to the badge-code that i can fetch from Twitter- i think all that belongs to that i understand you. Since i struggle somedays witht the twitter-widget thing i now want to make sure that i get the trick! Well MarHai - one question:

you say:
go to your template and just before </body> tag place

Code: Select all

<jdoc:include type="modules" name="jesus_scripts" />
It creates "fake" module position into which you can inject javacript codes like mentioned, or google analytics tracking script, etc. via Jumi module. It's really simple and functional absolutely.
well - can i do this from the ADMIN-Side or do i have to fetcht the files from the backend of the server!?
Note: i am in vacation at the moment. And i have not t he full access to the site... I would be glad if i can get the twitter-biest up and running from here.

I cannot wait untill i am at home ;)

Marhaj - i look forward to hear from you. Any and all help is greatly appreciated!
btw I can give you full access to the site! - you can get Admin Access to the site!


best regards
joo ;) aka martin
ps - you can mailto [email protected] - i can provide you with the full access to the site - jobstarters.org
regards un-leash,
a big fan for ++ 11 years now: With Joomla you can easily create and extend your website: see the site, that offers you ideas & modules - extensions.joomla.org - it lists over 4000 extensions

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

Re: Jumi - the set of custom code extensions

Post by MarHaj » Sun Jul 26, 2009 8:12 am

Joo_jesus - Martin,
first thanks for your acknowledgment.
It has to be shared with Ed - the other Jumi developer and many many users who have contributed to Jumi with their idea or bug reports.
this term - "jesus_scripts" - you mentioned - should i type this term again - eg in the Jumi-widged which i create later..!? This is a important question for me.
Joo, this term is a module position name. Like "left", "right", "top", ... etc. They are nothing but names of places into which you can publish modules.
Can i do this from the ADMIN-Side or do i have to fetcht the files from the backend of the server!?
If you are on a way you can do it from the admin backend.
1. Go to Extensions -> Template Manager.
2. Select your template and click Edit.
3. Then one more click on "Edit html"
The rest is, I hope, clear. Just for repetition (mother of wisdom):
1. before the </body> tag include

Code: Select all

<jdoc:include type="modules" name="jesus_scripts" />
2. Save your template.
3. Go to (stil in the backend) Extensions -> Modules manager.
4. Choose some of your module for sripts inclusion (e.g. jumi, custom module, etc...).
5. Write into it your javascript code you have obtained from the third party
6. Publish it int jesus_script position.
(remember - You will see nothing in the frontend (at this case) but you can verify the sript is there by "show source code" from your browser.)

As to your offer - allowing me the full access to your site - I prefer not to that.

BTW the first three letters in MarHaj mean Martin like you. :-)
MarHaj

unleash_it
Joomla! Ace
Joomla! Ace
Posts: 1311
Joined: Wed Nov 05, 2008 11:28 pm

Re: Jumi - the set of custom code extensions

Post by unleash_it » Sun Jul 26, 2009 9:34 am

Hello MarHaj - Martin

Update: now it runs like a charme! many many thanks!
MarHaj wrote:Joo_jesus - Martin, first thanks for your acknowledgment. It has to be shared with Ed - the other Jumi developer and many many users who have contributed to Jumi with their idea or bug reports.
A special thank goes out to Ed, the other Jumi-developer and all the contributors.
"jesus_scripts" - this term is a module position name. Like "left", "right", "top", ... etc. They are nothing but names of places into which you can publish modules.
Aahh i understand. I am going to try to do as you adviced me.

many Thanks

martin aka joo ;)

PS - btw: as you see i run JA_Purity on a little site - in BETA http://www.jobstarters.org well - believe it or not: now JA_Purity - with very big hole in the mid of the screen - i mean the distance from the images of the slider to the sobi is quiet tooo big!

see and compare the sites: http://jobstarters.org/index.php?option ... 3&Itemid=3
waht happened: if you go to the SOBI then there is a very very big white space -

just compare between:
1 http://jobstarters.org/
2 http://jobstarters.org/index.php?option ... 3&Itemid=3

JA_Purity - with very big hole in the mid of the screen: how can i make this smaller. That is tooo strange - way to strange! any idea - what can i do!?
regards un-leash,
a big fan for ++ 11 years now: With Joomla you can easily create and extend your website: see the site, that offers you ideas & modules - extensions.joomla.org - it lists over 4000 extensions

chrisfireems
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 116
Joined: Thu Apr 19, 2007 6:02 pm
Location: Pennsylvania

Re: Jumi - the set of custom code extensions

Post by chrisfireems » Tue Jul 28, 2009 1:12 pm

Hello Everyone!

I have been trying to get Jumi to insert a javascript into a few articles. The javascript has a js file and you are suppost to insert with the script html command. I tried using the component to do this and it won't work. I don't see the jumi syntax when I load the article and from what I read on your website that is a good sign. I also tried inserting it using just the plugin with a html file with no head tags or bottom tags (< / body> & < / htmL>). Everything is also published in the administrative backend. Can everyone please offer me some help.

Thanks in advance.

Chris

User avatar
dannette
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 102
Joined: Sat Apr 28, 2007 9:47 pm
Location: Allentown, PA

Re: Jumi - the set of custom code extensions

Post by dannette » Tue Jul 28, 2009 1:26 pm

chrisfireems wrote:Hello Everyone!

I have been trying to get Jumi to insert a javascript into a few articles. The javascript has a js file and you are suppost to insert with the script html command. I tried using the component to do this and it won't work. I don't see the jumi syntax when I load the article and from what I read on your website that is a good sign. I also tried inserting it using just the plugin with a html file with no head tags or bottom tags (< / body> & < / htmL>). Everything is also published in the administrative backend. Can everyone please offer me some help.

Thanks in advance.

Chris
Here is how I insert javascripts - I make them into a php file with the usual header:

Code: Select all

<?php
defined('_JEXEC') OR defined('_VALID_MOS') OR die( "Direct Access Is Not Allowed" );
?>
Then start the javascript:
<script type="text/javascript"> etc.
Then I place this in a folder on the server called jumies inside the includes folder.
Then when I need to call it, use {jumi [includes/jumies/nameofpage.php]}
That should do it.
Building with Joomla! since 2005!
Dannette Voorhis

chrisfireems
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 116
Joined: Thu Apr 19, 2007 6:02 pm
Location: Pennsylvania

Re: Jumi - the set of custom code extensions

Post by chrisfireems » Tue Jul 28, 2009 1:36 pm

dannette wrote:
Here is how I insert javascripts - I make them into a php file with the usual header:

Code: Select all

<?php
defined('_JEXEC') OR defined('_VALID_MOS') OR die( "Direct Access Is Not Allowed" );
?>
Then start the javascript:
<script type="text/javascript"> etc.
Then I place this in a folder on the server called jumies inside the includes folder.
Then when I need to call it, use {jumi [includes/jumies/nameofpage.php]}
That should do it.
Dannette,

Thanks for your quick response. The code that you inserted in your reply is the head code for the php correct? I don't know much about php sorry. How come this has to be done since they say jumi supports javascript? Also wouldn't this work in the component? instead of using a php file? It would basically do the same. Right?

Thanks,

Chris

P.S. Dannette I see you are from Allentown, PA I live an hour away from you near Scranton. I just that it was cool to see someone on here that is in PA

User avatar
dannette
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 102
Joined: Sat Apr 28, 2007 9:47 pm
Location: Allentown, PA

Re: Jumi - the set of custom code extensions

Post by dannette » Tue Jul 28, 2009 1:56 pm

Thanks for your quick response. The code that you inserted in your reply is the head code for the php correct? I don't know much about php sorry. How come this has to be done since they say jumi supports javascript? Also wouldn't this work in the component? instead of using a php file? It would basically do the same. Right?
That's the only php on the page - just insert your javascript below it as usual. Here's what my full page looks like:

Code: Select all

<?php
defined('_JEXEC') OR defined('_VALID_MOS') OR die( "Direct Access Is Not Allowed" );
?>

<script language="javascript" type="text/javascript"> 
<!--//
ccDayNow = new Date();
ccDayThen = new Date("November 6, 2009")
msPerDay = 24 * 60 * 60 * 1000 ;
timeLeft = (ccDayThen.getTime() - ccDayNow.getTime());
cc_daysLeft = timeLeft / msPerDay;
daysLeft = Math.floor(cc_daysLeft);
cc_hrsLeft = (cc_daysLeft - daysLeft)*24;
hrsLeft = Math.floor(cc_hrsLeft);
minsLeft = Math.floor((cc_hrsLeft - hrsLeft)*60);
document.write( "Just "+daysLeft+" days until The Meeting!");
//-->
</script>
So the page this shows up on will show this script where ever I call up {jumi[includes/jumies/nameofpage.php]} saying only:
Just 100 days until The Meeting!
I even put <p> tags around the call with style in it to emphasis it. There are probably other ways to do it but this is what works for me and you don't need to know php for this - just include that php statement at the top and name the page php. I always make sure I have a "sandbox" site to play with and try things out on first.
Dannette
p.s. - I've only been in PA since last Sept. (Grew in in NJ then went to MI, OH, VA, now here).
Building with Joomla! since 2005!
Dannette Voorhis

chrisfireems
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 116
Joined: Thu Apr 19, 2007 6:02 pm
Location: Pennsylvania

Re: Jumi - the set of custom code extensions

Post by chrisfireems » Tue Jul 28, 2009 2:04 pm

dannette,

Okay I will try that. Thanks for the help once again. I appreciate it. I will let you know how I make out.

Chris

P.S. So you are kinda new to PA, well I hope you like it in the old keystone state. I have been here my whole life and I like it, but sometimes wonder whats like in other places. I figure once you been there awhile it is the same. Just different people and sometimes different things to do.

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

Re: Jumi - the set of custom code extensions

Post by MarHaj » Tue Jul 28, 2009 6:58 pm

very big hole in the mid of the screen: how can i make this smaller
Joo - Martin,
the big hole is due to the css style.

You have an inline code in your module <div id="user6">

Code: Select all

<div id="news_image_3-newsimage3" class="gk_news_image_main" style="width: 440px; height: 570px;">
Remove height attribute from and everything will be OK.

BTW: for debugging the bugs like this use firebug extension for firefox or press F12 for IE7, ....

P.S.: congratulations to you with the twitter code!
MarHaj

marlincreek
Joomla! Apprentice
Joomla! Apprentice
Posts: 35
Joined: Fri May 05, 2006 3:45 am

jumi coder 500 internal server error

Post by marlincreek » Wed Jul 29, 2009 5:52 am

I too had the problem when I clicked the jumi coder button in version 2.1

It reminded me of an error I had with another extension... and is somewhat confirmed within the error message itself... the comments about the security settings.

When first installed... the folder plugins/editors-xtd/jumicoder has a 755 security setting... but all of the files under it have 666.

If you use your handy dandy ftp program... or log into the backend of your site and change all file permissions to 755... everything works.

I don't know what causes this... maybe host related?

I hope this helps others... don't give up :D

now to just find that post where it said how to change the size of the coder box so that it would fit in my laptops space.

My suggestion... put this info about file permissions / security someplace prominent... as well as the info on changing the box size.

Thanks for the great tool.

marlincreek
Joomla! Apprentice
Joomla! Apprentice
Posts: 35
Joined: Fri May 05, 2006 3:45 am

Re: Jumi - the set of custom code extensions

Post by marlincreek » Wed Jul 29, 2009 6:10 am

MarHaj wrote:
But can't get it to work in the article.
It depends on the Jumi version you use (sorry for this inconvenience):
For version 2.1 you have to use {jumi *3}{/jumi}

As for Jumicoder size and your laptop: you can accomodate the size of the coder in
plugins/editor-xtd/jumicoder.php line 30

Code: Select all

$button->set('options', "{handler: 'iframe', size: {x: 570, y: 675}}");
and
plugins/editor-xtd/jumicoder/jumicoder_form.php line 20 and 21

Code: Select all

$cols = 60;
$rows = 15;
This is important information for those of us on limited real estate.

For those that need to make the change... these values worked for me.

x: 500, y: 500

$cols = 55;
$rows = 8;

It may not be optimized... but that will be a good starting point.

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

Re: Jumi - the set of custom code extensions

Post by MarHaj » Thu Jul 30, 2009 9:01 am

Marlincreek,
thanks for your insights.

As to the
how to change the size of the coder box so that it would fit in my laptops space....
My suggestion... put this info about file permissions / security someplace prominent... as well as the info on changing the box size...
I think I could add these settings into the button/coder plugin parameters.
Good! Thanks for the idea!
When first installed... the folder plugins/editors-xtd/jumicoder has a 755 security setting... but all of the files under it have 666. If you use your handy dandy ftp program... or log into the backend of your site and change all file permissions to 755... everything works. I don't know what causes this... maybe host related?
Interesting opinion. I do not know the reason too. But I usually advice, if something goes wrong, 755 for folders and 644 for files. On some minority hosts 775 and 664 is necessary.
MarHaj

mschram
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Fri Jul 10, 2009 8:41 pm

Re: Jumi - the set of custom code extensions

Post by mschram » Thu Jul 30, 2009 11:17 am

Hello MarHaj,

First of all, thanks for offering so much flexiblity to Joomla without having to make core hacks.
This is my problem: I have created a jumi module that generates a menu depending on the selected article. I use it for the top menu. It works alright except it won't set the active state of the menu item. I know it is a cosmetical thing, but I hope you can help me.

This is the code:

Code: Select all

<?php
$ref = basename($_SERVER['REQUEST_URI']);
$id = substr($ref,0,strpos($ref,'-')); 

$db  = &JFactory::getDBO(); 

$db->setQuery("SELECT cust_parentid FROM jos_content WHERE id=".$id);

$parentid = $db->loadResult();

$db->setQuery("SELECT id, alias FROM jos_content WHERE cust_parentid=" .$parentid. " ORDER BY cust_type");
$result = $db->loadRowList();

print "<ul id=\"mainlevel-nav\"><li><a href=\"/Joomla15/component/content/article/beschrijving/" . $result['0']['0'] . "-" . $result['0']['1'] . ".html\" class=\"mainlevel-nav\" >Beschrijving</a></li>";
print "<li><a href=\"/Joomla15/component/content/article/specificaties/60-naam.html\" class=\"mainlevel-nav\" >Specificaties</a></li>";
print "<li><a href=\"/Joomla15/component/content/article/afbeeldingen/" . $result['1']['0'] . "-" . $result['1']['1'] . ".html\" class=\"mainlevel-nav\" >Afbeeldingen</a></li>";
print "<li><a href=\"/Joomla15/component/content/article/handleidingen/" . $result['2']['0'] . "-" . $result['2']['1'] . ".html\" class=\"mainlevel-nav\" >Handleidingen</a></li>";
print "<li><a href=\"/Joomla15/component/content/article/recensies/60-naam.html\" class=\"mainlevel-nav\" >Recensies</a></li></ul>";
?>
Thanks!
Martijn

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

Re: Jumi - the set of custom code extensions

Post by MarHaj » Thu Jul 30, 2009 12:19 pm

It works alright except it won't set the active state of the menu item. I know it is a cosmetical thing, but I hope you can help me.
Mschram,
I bet it is just matter of styling: there is no specification of active menu item class in your code.
There are number of variants due to Joomla menu flexibility.
I thing the best way how to reveal your preffered css "active styling" is by "viewing the source code from the browser" or using some web developers tools (i.e. firebug for ff or pres f12 in ie8, ....).
If I remember well it is "ul li.active"

Code: Select all

<div class="moduletable_menu">
<h3>Menu title</h3>
<ul class="menu">
<ul>
<li id="current" class="active"><a href="xxx">uuu</a></li>
etc ...
</ul>
But it really depedns on your implementation ....
MarHaj

mschram
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Fri Jul 10, 2009 8:41 pm

Re: Jumi - the set of custom code extensions

Post by mschram » Thu Jul 30, 2009 5:59 pm

Ok thanks!
it works now
the exact code is class=\"mainlevel-nav\" id=\"active_menu-nav\"

varyduke
Joomla! Apprentice
Joomla! Apprentice
Posts: 49
Joined: Sun Dec 21, 2008 8:38 am

Re: Jumi - the set of custom code extensions

Post by varyduke » Thu Jul 30, 2009 8:28 pm

MarHaj wrote:
i have an article with information in a page.
mean while in the front page, there are a module which content information that is retrieve from that article. how should i do that..?
Zodiok,
retrieving article into the module is quite easy. All you need is article id.

Example of echoing of title and introtext of the article:

Code: Select all

$id=123; //change it to your actual id
$zod_database = &JFactory::getDBO(); 
$zod_query = 'SELECT title, modified FROM #__content WHERE id = ' . (int) $id;
$zod_database->setQuery( $zod_query );
$zod_article = $zod_database->loadObject();
echo "$zod_article->title"."<br />";
echo "$zod_article->introtext";
etc., etc.

You can retrieve all properties of the object $zod_article by its names that can be found in jos_content database table fields names (e.g. intotext, title, ...). The properties values can be accessed by $zod_article->field_name.

It's simple, isn't it?

Rem: I have prepended all your variables names by "zod_" to prevent unwanted interaction of your variables with Joomla global variables.

EverYbOdY
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Fri Jul 31, 2009 2:50 am

Re: Jumi - the set of custom code extensions

Post by EverYbOdY » Fri Jul 31, 2009 2:55 am

Hi, i'm running J1.5.13 + The last stable version of Jumi + sh404sef. I'm using the module (but i've tried the plugin and i had the same issue) in this page: http://www.chatt-gratis.net/oroscopo/or ... iorno.html
As you can see, only Jumi's code is shown, the rest of the page isn't, why?
With J1.0.15 + Jumi + sh404sef I hadn't this issue :'(

Thank you very much.

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

Re: Jumi - the set of custom code extensions

Post by MarHaj » Fri Jul 31, 2009 8:13 am

I'm using the module (but i've tried the plugin and i had the same issue) in this page: http://www.chatt-gratis.net/oroscopo/or ... iorno.html
As you can see, only Jumi's code is shown, the rest of the page isn't, why?
EverYbOdY,
I have seen it: nothing but simple html page.
Strange ...

I think it could be due to the included code: due to its interaction with the rest of the environment (Joomla + sh404sef). By the way - Joomla 1.5 environment is very very different from Joomla 1.0 one.
You can verify it by including the most simple code via Jumi plugin. For example create file hello.php containing nothing but

Code: Select all

<h3>Hello!</h3>
and include it into an article by {jumi [somepath/hello.php]}
If it works as expected then you should check up your code (or post it here for a review).
Will you let me know the result of the test?
MarHaj

EverYbOdY
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Fri Jul 31, 2009 2:50 am

Re: Jumi - the set of custom code extensions

Post by EverYbOdY » Fri Jul 31, 2009 1:34 pm

Yes, sure, Thank you.
I've tried changing my code to <h3>"Hello!"</h3>, but i'm having still the same issue, only this code is displayed :'(

P.S.
Now that i'm using the component and not the module, do i need Jumi's module and plugin enabled? I've disabled them.

Thank you again.


Locked

Return to “Extensions for Joomla! 1.5”