Returning ONLY the data from a function, not all the joomla code...
Moderators: tjay, seadap, Rogue4ngel, matthewhayashida
Returning ONLY the data from a function, not all the joomla code...
hi there, I have a function in my component that is being called by an http request from another program, I need to return a simple value to my program and not all the joomla code,
any ideas how I can do this?
any ideas how I can do this?
Paul Preibisch - Educational Technologist
Fire Centaur - English Village - Secondlife
http://slurl.com/secondlife/English%20V ... 20Village&
Fire Centaur - English Village - Secondlife
http://slurl.com/secondlife/English%20V ... 20Village&
Re: Returning ONLY the data from a function, not all the joomla code...
I'm not quite sure how to implement this idea but I figured I'd throw it out there. You could use something like an rss feed to return an xml file that your program could parse to get the data you want.
Also, failing that, you could scrape the data you need out of the joomla code by searching for a token that marks the beginning and ending of the data you want..
Just a couple of ideas. I'm sure there's an easy way to do what you're looking for.
Also, failing that, you could scrape the data you need out of the joomla code by searching for a token that marks the beginning and ending of the data you want..
Just a couple of ideas. I'm sure there's an easy way to do what you're looking for.
Knowledge is realizing that the street is one-way, wisdom is looking both directions anyway.
Re: Returning ONLY the data from a function, not all the joomla code...
nice thanks man,
But I think I got it! Basically, all I need to do is create a tempalte that only has:
Then, i need to create a menu item for the component, and then assign that template for it, that yields only the data I need! Cheers!
But I think I got it! Basically, all I need to do is create a tempalte that only has:
Then, i need to create a menu item for the component, and then assign that template for it, that yields only the data I need! Cheers!
Paul Preibisch - Educational Technologist
Fire Centaur - English Village - Secondlife
http://slurl.com/secondlife/English%20V ... 20Village&
Fire Centaur - English Village - Secondlife
http://slurl.com/secondlife/English%20V ... 20Village&
where does come from? and how do I get rid of it?
I just noticed, when I view source, it's not completely bare - I still see a strange comment
""
where does come from? and how do I get rid of it?
""
where does come from? and how do I get rid of it?
Paul Preibisch - Educational Technologist
Fire Centaur - English Village - Secondlife
http://slurl.com/secondlife/English%20V ... 20Village&
Fire Centaur - English Village - Secondlife
http://slurl.com/secondlife/English%20V ... 20Village&
- DeanMarshall
- Joomla! Apprentice
- Posts: 46
- Joined: Fri Aug 19, 2005 2:26 am
- Location: Lancaster, Lancashire, United Kingdom
- Contact:
Re: Returning ONLY the data from a function, not all the joomla code...
It looks from your previous comments like you are using Joomla 1.0.x
This forum is aiming - I think - at the Joomla 1.5 branch.
One other method that will work with Joomla 1.0.x is to link to index2.php rather than index.php
this should output just the components output without any superfluous formatting.
Dean
This forum is aiming - I think - at the Joomla 1.5 branch.
One other method that will work with Joomla 1.0.x is to link to index2.php rather than index.php
this should output just the components output without any superfluous formatting.
Dean
Dean Marshall - http://www.deanmarshall.co.uk/
Mambo and Joomla Consultant
Add an Amazon Store to your site: http://www.Project-TinA.com/ (coming soon)
Mambo and Joomla Consultant
Add an Amazon Store to your site: http://www.Project-TinA.com/ (coming soon)
Re: Returning ONLY the data from a function, not all the joomla code...
Thanks for catching this Dean, you are right - I am using joomla 1.0.13
Cheers!
Cheers!
Paul Preibisch - Educational Technologist
Fire Centaur - English Village - Secondlife
http://slurl.com/secondlife/English%20V ... 20Village&
Fire Centaur - English Village - Secondlife
http://slurl.com/secondlife/English%20V ... 20Village&
Re: Returning ONLY the data from a function, not all the joomla code...
Also,
you will want to pass on the request string: &no_html=1
Ian
you will want to pass on the request string: &no_html=1
Ian
Help test my Component XML Generator Tool!
http://extensions.joomla.org/component/option,com_mtree/task,viewlink/link_id,1997/Itemid,35/
All feedback appreciated!
http://extensions.joomla.org/component/option,com_mtree/task,viewlink/link_id,1997/Itemid,35/
All feedback appreciated!
- jalil
- Joomla! Enthusiast
- Posts: 128
- Joined: Wed Jul 04, 2007 4:54 am
- Location: Kuala Lumpur, Malaysia
- Contact:
Re: Returning ONLY the data from a function, not all the joomla code...
DeanMarshall wrote:It looks from your previous comments like you are using Joomla 1.0.x
This forum is aiming - I think - at the Joomla 1.5 branch.
One other method that will work with Joomla 1.0.x is to link to index2.php rather than index.php
this should output just the components output without any superfluous formatting.
Dean
this forum is ? where should 1.0 coding discussions be held, i need to start with 1.0, then speed to 1.5
btw fire2006, i use the same method you thought of to get pure text menus for mobiles and it works a treat. just so you know you are on the right track.