PDA

View Full Version : REQUEST: Include content component/mambot


vilhelmk
22.04.2004, 12:13
Does anybody feel like writing the ultimate mambot ;)

Imagine if you via a mambot could include any page from your mamboserver on any page. Or at least any page from your content. Mambobrothers have done something simular with their mosDMlist that lists a subcategory from DocMan.

If any page could be part of any page then you wouldn't have to copy/paste and edit the same info over and over again or write static file for inclusion.

So how about it? The IncludeContent Mambot - who want's to be popular :happy: (personally I wouldn't mind - but I'am just a poor graphics guy :rolleyes: )

And the next step... build in the IncludeContent Mambot into HTMLarea 3 EXT - then you could just pick you page/element to be included from a list :)

Makes any sence to anyone???

/Vilhemk/Denmark

vilhelmk
23.04.2004, 11:49
Why everything so easy in MAMBO ?? :) (hope it's ok to answer to your own posting btw)

Found a solution that will enable you to use an article as a content item in another article...:

Download and install the mosphp mambot (you'll find it at www.mamboportal.com) and thanks to Andrew Eddie for creating the mambot!!

Then create a code that will select and return a value from a field in the mambo database. (you'll need to know what table and field you are looking for, that's the tricky part. Access the database through phpmyadmin and explore)

Example (you've created content in the introtext part of an article and now I want to use this as an element on another page):
I've checked my database and know that I am looking for the table mos_content, the field is introtext and the id is 3. Inser the follosing code on your page (or article if you will).

{mosphp} global $database; $database->setQuery('SELECT introtext FROM mos_content WHERE id=3'); $content = $database->loadResult(); return $content;
{/mosphp} (the code is an alteration of a code I found at www.mambobrothers.com)

Not very user friendly but it does the job. I wonder how much work it would be to make it a real mambot or a functionality in the HTMLarea 3 ... I guess I'll just have to dream about that :)

If anybody has a more intelligent way of doing this I would love to hear about it... It is i admit a very limited solution... :O But it will work great for a table or standard items on an article pages...

/vilhelmk/Denmark

Digby007
30.01.2005, 07:08
Along the same lines, you mentioned you could add an include file to content areas (!--#include file="includes/custom/details.html" -->). How do I do this?