Results 1 to 6 of 6

Thread: External Content module, interest?

  1. #1
    New user
    Join Date
    02-28-11.
    Posts
    13

    Default External Content module, interest?

    I have been working on my first Contao module lately hence all the questions lately! It's a module which allows you to display content from external resources. For example, a WordPress blog. At the moment it's working in two steps you have a backend module where you can register or add your data providers.

    Next step, you can create instance of the frontend module which allows you to pick the data provider to use and the module template and item template to use. And bang you got your list from the external resource. Currently I am using it for displaying content from a web-service. A simple data provider is written which does two things:

    • Retrieves the data from the web-service and based on the passed query data (GET, POST) it will determine the appropriate url and then loads it[/*:m:3jtnc5fq]
    • After successfully loading the cache will be updated, if necessary, and then the data get processed and an array will be returned to the module[/*:m:3jtnc5fq]


    I am curious if anyone would be interested in this module? I will make a simple WordPress dataprovider class as an example which talks straight with the WordPress database and retrieves the data. Currently, it's still a bit rough because I haven't found a good way to generate "fields" on demand in a frontend module instance and then serialize the settings back to a specific database field in tl_module.

  2. #2
    Experienced user
    Join Date
    01-12-10.
    Posts
    814

    Default Re: External Content module, interest?

    Depends on what mechanism your using. RSS readers are already available, and wordpress can provide data as RSS.

    But if you mean interpreting another website on the fly, the raw html I'd be interested. At work we have a supplier who's products keep changing. We want to keep our website up to date but at the same time try to not reveal the supplier (high competition). So a solid way to display their info and anonimizing their contents would be something I might use...

  3. #3
    Experienced user
    Join Date
    06-20-09.
    Posts
    1,311

    Default Re: External Content module, interest?

    Hi sprog,
    it sounds promising - and I'm sure there will be interest. Sometimes its a bit hard to visualise what a module can be used for, or its full potential, until you play with it and see. Are you meaning that it will be able to dip into external databases (with Permissions of course), extract the content, and database into Contao?

    Ruud ... http://www.contao.org/extension-list...010009.en.html

  4. #4
    New user
    Join Date
    02-28-11.
    Posts
    13

    Default Re: External Content module, interest?

    First of all sorry for the late reply but for months I have been unable to access this forum. Finally it's working again!

    The module works in such manner that you can use a common building blocks like RemoteXMLDataProvider. This class is then responsible for parsing and/or serializing the data into a usable format normally arrays. A special frontend module can then leverage this dataprovider because the serialized data gets passed to the template of choice of the frontend module.

    At the moment the serialized data can be cached via n minutes and won't do the remote request again until the cache is invalidated. Works nicely. A special data provider (which supports GET parameters) is being used to achieve the section over here: http://www.parlamentswahlen-2011.ch/medien.html

    On the page their are two instance of the module one to create the combobox on the left and list the news item on the right.

  5. #5
    Experienced user
    Join Date
    06-20-09.
    Posts
    1,311

    Default Re: External Content module, interest?

    Looks good.
    I'd love to have a play.
    I notice that "Baader Casper" throws an error to screen though (maybe errors are on in Settings?).

  6. #6
    New user
    Join Date
    02-28-11.
    Posts
    13

    Default Re: External Content module, interest?

    Thanks! I fixed that problem. I accidently left the xml parser error list on in my custom provider. I have fixed that. Thanks for telling me!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •