You are here:  » Working inside joomla cms


Working inside joomla cms

Submitted by murph on Fri, 2006-07-28 09:12 in

I require something to display an affiliate feed to different pages of content on my joomla site. Can this software work within the joomla framework? Also, could i set the url for the feed parsed according to the page i am on (maybe by grabbing the first meta keyword or something?)

Submitted by support on Fri, 2006-07-28 09:36

Hi,

There's nothing stopping you working with Magic Parser within the Joomla framework - you can after all customise your site with as much of your own PHP as you wish.

Likewise, the feed URL can of course be generated from any other PHP variable that you have access to on the page. You mention using a meta keyword for example - I don't know how Joomla manages meta keywords in terms of page generation; but if the keywords are in a variable that you can read then you can certainly generate a URL.

A word of warning however; if you are going to use Magic Parser in "Real Time" (i.e. for generating content on every page view); then make sure that this is considered acceptable use by the company providing the feed; and also use a Format String to avoid a double-opening of the remote file.

In general, Magic Parser would be used in a batch process to process a feed overnight; but it is certainly possible to use it in this way and there are users who do similar things.

Cheers,
David.

Submitted by murph on Fri, 2006-07-28 12:00

well i have been told that no results may be cached, so i guess it will have to be queried everytime :( I have bought btw :) I have got it working inside joomla - when i'm brave i'll attempt to stick in a module!.

One thing if i declare a variable eg

$keyword = "pets";

Should i then replace the part of the rss string with

.'$keyword'.

That doesn't seem to work?

Also, do you know joomla at all? I need to determine the current page i'm on (id) so that when i query the db, i can select the correct row and determine the page_alias...this will then be used as the keyword for the rss url

Submitted by murph on Fri, 2006-07-28 13:02

I have the joomla part working now, just need to be able to add a dynamic keyword to the rss url string inside:

MagicParser_parse("http://search.MYPPC.com/search/xml/results.asp?affiliateid=4460&keyword=MYKEYWORD&hits=10&page=1&bkfill=1&host=127.0.0.1&referralurl=www.ABC.com","myRecordHandler","xml|SEARCHRESULTS/RESULTSET/RESULT/");

Submitted by support on Fri, 2006-07-28 13:30

Hi,

There should be no problem incorporating your keyword into the URL.

Always use PHP's urlencode() function when constructing a URL from other variables; so you will have this:

MagicParser_parse("http://search.MYPPC.com/search/xml/results.asp?affiliateid=4460&keyword=".urlencode($keyword)."&hits=10&page=1&bkfill=1&host=127.0.0.1&referralurl=www.ABC.com","myRecordHandler","xml|SEARCHRESULTS/RESULTSET/RESULT/");

Hope this helps!
Cheers,
David.

Submitted by murph on Fri, 2006-07-28 18:09

Spot on :) Thanks, job done! Now to attempt putting it all in a module for joomla!

Submitted by tpd123 on Fri, 2006-11-24 04:49

Hi Murph,
Did you have any luck incorporating this into Joomla?
Its something I wish to be able to do.
Thanks