It is currently Sat May 17, 2008 7:18 pm

Component includer mambot (a lifesaver for some)

Discuss the development and implementation of Joomla! bots/Plugins here.

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.

Component includer mambot (a lifesaver for some)

Postby kauselot on Tue Nov 21, 2006 8:06 pm

Searching the forum returned only "This can't be done". "You can't load a component in content" etc. Maby not the usual way..but - here it is. Simple mambot to include any component in the content. Inspired by facileforms mambot & wrapper component, this is a kind of local wrapper mambot. Without iframe it would be better, but - that's work for future. Open your eyes:)

How to use it:

{component}url{/component}

Where url is relative url to your component WITHOUT "index.php?". So url would look like this: {component}option=com_blabla&Itemid=73&album=7{/component}
Attachments
componentbot.zip
(1.69 KiB) Downloaded 275 times
User avatar
kauselot
Joomla! Intern
Joomla! Intern
 
Posts: 65
Joined: Thu Sep 15, 2005 1:15 am

Re: Component includer mambot (a lifesaver for some)

Postby eyezberg on Tue Nov 21, 2006 8:17 pm

Thanks. Will you add this to the extensions site?
I'd rather have a non-forum link for this, in order to add to bot listing here:
http://www.eyezberg.com/Joomla-CMS/Plug ... rt-II.html
Sometimes one pays most for the things one gets for nothing.
The important thing is not to stop questioning. Curiosity has its own reason for existing. AE
http://joomla15.blogspot.com for J! 1.5 screenshots
http://www.eyezberg.com
User avatar
eyezberg
Joomla! Hero
Joomla! Hero
 
Posts: 2853
Joined: Thu Aug 25, 2005 5:48 pm
Location: Geneva mostly

Re: Component includer mambot (a lifesaver for some)

Postby kauselot on Tue Nov 21, 2006 9:34 pm

I guess I will apply for an account at joomlaforge.
User avatar
kauselot
Joomla! Intern
Joomla! Intern
 
Posts: 65
Joined: Thu Sep 15, 2005 1:15 am

Re: Component includer mambot (a lifesaver for some)

Postby eyezberg on Mon Dec 04, 2006 1:34 pm

As there's no news, I have now linked this to this forum post.
Sometimes one pays most for the things one gets for nothing.
The important thing is not to stop questioning. Curiosity has its own reason for existing. AE
http://joomla15.blogspot.com for J! 1.5 screenshots
http://www.eyezberg.com
User avatar
eyezberg
Joomla! Hero
Joomla! Hero
 
Posts: 2853
Joined: Thu Aug 25, 2005 5:48 pm
Location: Geneva mostly

Re: Component includer mambot (a lifesaver for some)

Postby bigtimeout on Tue Dec 12, 2006 10:50 am

has anyone got a link to this bot that i can use to download it

Thanks

it Ok I had to log in and the link appeared 

gee whiz web 2 is magic.
Last edited by bigtimeout on Tue Dec 12, 2006 10:53 am, edited 1 time in total.
bigtimeout
Joomla! Fledgling
Joomla! Fledgling
 
Posts: 2
Joined: Sat Jan 21, 2006 7:22 am

Re: Component includer mambot (a lifesaver for some)

Postby frdt on Tue Jan 23, 2007 2:15 pm

Hi
sorry but do you have a link to get this mambot ??
thanks
frdt
Joomla! Fledgling
Joomla! Fledgling
 
Posts: 3
Joined: Mon Sep 04, 2006 8:55 am

Re: Component includer mambot (a lifesaver for some)

Postby brian on Tue Jan 23, 2007 2:16 pm

its an attachment in the first post.

note you have to be signed into the forum to see attachments
brian
Joomla! Virtuoso
Joomla! Virtuoso
 
Posts: 4763
Joined: Fri Aug 12, 2005 7:19 am
Location: Leeds, UK

Re: Component includer mambot (a lifesaver for some)

Postby fabs on Fri Mar 23, 2007 12:52 am

somebody should definiteely add this to the forge!!! this is soooooo great!
Please visit my personal website and leave many traces ;)
http://www.ffaabbiiaann.de
If you need webdesign services I can help you out:
http://www.webdesign2punkt0.de
User avatar
fabs
Joomla! Engineer
Joomla! Engineer
 
Posts: 422
Joined: Mon Apr 03, 2006 4:04 pm
Location: Germany

Re: Component includer mambot (a lifesaver for some)

Postby fabs on Fri Mar 23, 2007 2:04 am

I experience a problem.... the bot works great and loads the component correctly the first time but when i click any link in the embeded component it reloads the complete website inside the content item with all the template around it instead of just loading the  maincontent area inside the article. is there a possile fix for that?
Please visit my personal website and leave many traces ;)
http://www.ffaabbiiaann.de
If you need webdesign services I can help you out:
http://www.webdesign2punkt0.de
User avatar
fabs
Joomla! Engineer
Joomla! Engineer
 
Posts: 422
Joined: Mon Apr 03, 2006 4:04 pm
Location: Germany

Re: Component includer mambot (a lifesaver for some)

Postby juanchi on Sun Mar 25, 2007 4:44 pm

I'm experiencing the same problem, could anyone have a fix for this or another method of doing this, very easy this could be a really lifesaver but this issue should be fix first.  By the way, great job.
juanchi
Joomla! Fledgling
Joomla! Fledgling
 
Posts: 2
Joined: Sun Dec 24, 2006 8:37 pm

Re: Component includer mambot (a lifesaver for some)

Postby ks_tiwari on Sun Mar 25, 2007 4:53 pm

Hi

Can it be used to show google map (mambot gmap) in forum content or noah classified to map a address ?  or parsing any mambot to elsewhere within other component.
ks_tiwari
Joomla! Apprentice
Joomla! Apprentice
 
Posts: 36
Joined: Sun Oct 22, 2006 2:34 pm

Re: Component includer mambot (a lifesaver for some)

Postby juanchi on Mon Mar 26, 2007 10:51 am

Could this be solve by just including a target="_top" or target="_blank" ? and if so where should be put? Here is the code:
Code: Select all
<?php
/**
* @copyright Copyright (C) 2006 Kause Lotski. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*/

// no direct access
defined( '_VALID_MOS' ) or die( 'Restricted access' );

$_MAMBOTS->registerFunction( 'onPrepareContent', 'botcomponentbot' );

function botcomponentbot( $published, &$row, &$params, $page=0 ) {
   // simple performance check to determine whether bot should process further
   if ( strpos( $row->text, 'component' ) === false ) {
      return true;
   }   

   // define the regular expression for the bot
   $regex = "#{component}(.*?){/component}#s";

   // check whether mambot has been unpublished
   if ( !$published ) {
      $row->text = preg_replace( $regex, '', $row->text );
      return true;
   }

   // perform the replacement
      
   $row->text = preg_replace_callback( $regex, 'botComponentCode_replacer', $row->text );
      
   return true;
}
/**
* Replaces the matched tags an image
* @param array An array of matches (see preg_match_all)
* @return string
*/
function botComponentCode_replacer( &$matches ) {
   global $database ;
   
         $query = "SELECT params"
         . "\n FROM #__mambots"
         . "\n WHERE element = 'componentbot'"
         . "\n AND folder = 'content'"
         ;
         $database->setQuery( $query );
         $database->loadObject($mambot);
      
       $botParams = new mosParameters( $mambot->params );

       $height   = $botParams->def( 'height', '500' );
      $width   = $botParams->def( 'width', '500' );

   $url = $matches[1];
   $url = 'index2.php?' . $url;
   $para =   'id="expose" '.
            'src="'.$url.'" '.
            'width="'.$width.'" '.
            'height="'.$height.'" '.
            'frameborder="0" '.
            'allowtransparency="true" '.
            'scrolling="no" ';

     $url = "<iframe ".$para.">\n".
        "<p>Sorry, your browser cannot display frames!</p>\n".
        "</iframe>\n";

   return $url;
}
?>
juanchi
Joomla! Fledgling
Joomla! Fledgling
 
Posts: 2
Joined: Sun Dec 24, 2006 8:37 pm

Re: Component includer mambot (a lifesaver for some)

Postby kauselot on Sat Apr 14, 2007 9:06 am

Hm, that is indeed true. Links going from inside of the component are genererated in that component and to function properly some kind of replacement should be done before displaying the component inside iframe. Inposible task really (maby javascript could do it?), as iframe is really only a visual integration - until bot is rewritten to work trough fopen. That way executed php could be loaded into variable and replacement of all index.php with index2.php could be done.

Until then this bot is usable mainly for displaying final destinations in components or components, that are themselves embeded in joomla and don't use joomla's links. Bot was developed for expose and work's flawless in there as expose is really flash embeded in joomla.

ks_tiwari: it work's the other way - to include component in the content. But if your component processes mambots, that it should work to include any other component. And if component shows google map, there shouldn't be any link problems, as google map is java aplication.
User avatar
kauselot
Joomla! Intern
Joomla! Intern
 
Posts: 65
Joined: Thu Sep 15, 2005 1:15 am

Re: Component includer mambot (a lifesaver for some)

Postby gavara on Sun May 27, 2007 8:30 pm

hola para solucionar el problema que link aparezca en la misma ventana del frame tu puedes poner este código a tu template



de esta forma el link se va redirigir a la ventana originaria. A mi me funciona bien además impinde los wrapper abusivos.

saludo

you can put this java code in your template.
and the mambot and wrapper work ok.

Bye
gavara
Joomla! Apprentice
Joomla! Apprentice
 
Posts: 7
Joined: Thu May 24, 2007 2:37 pm

Re: Component includer mambot (a lifesaver for some)

Postby dax702 on Mon Jun 25, 2007 11:01 pm

For anyone that uses Expose, could this:
http://www.gotgtek.com/forum/index.php?topic=1251.0
be accomplished using this mambot?
http://www.ronpaul2008.com - Vote For Ron Paul in 2008 - Revive The Constitution
User avatar
dax702
Joomla! Engineer
Joomla! Engineer
 
Posts: 325
Joined: Wed Nov 15, 2006 1:20 am
Location: Las Vegas, NV, USA

Re: Component includer mambot (a lifesaver for some)

Postby kauselot on Tue Jun 26, 2007 7:39 am

I developed this mambot because I needed it to include  Expose galleries into some project :)
User avatar
kauselot
Joomla! Intern
Joomla! Intern
 
Posts: 65
Joined: Thu Sep 15, 2005 1:15 am

Re: Component includer mambot (a lifesaver for some)

Postby dax702 on Tue Jun 26, 2007 7:43 am

Then you are a wonderful person! I tried it and it works! Thanks so much for developing tihis mambot!
http://www.ronpaul2008.com - Vote For Ron Paul in 2008 - Revive The Constitution
User avatar
dax702
Joomla! Engineer
Joomla! Engineer
 
Posts: 325
Joined: Wed Nov 15, 2006 1:20 am
Location: Las Vegas, NV, USA

Re: Component includer mambot (a lifesaver for some)

Postby mamebou on Tue Jul 24, 2007 10:03 am

:)
dax702 wrote:Then you are a wonderful person! I tried it and it works! Thanks so much for developing tihis mambot!


Totally daccord! Great job!
mamebou
Joomla! Fledgling
Joomla! Fledgling
 
Posts: 1
Joined: Tue Jul 24, 2007 9:39 am

Re: Component includer mambot (a lifesaver for some)

Postby kauselot on Mon Jul 30, 2007 7:04 am

This mambot and module that forces links from component that is beeing included to be opened in full page (not in iframe) can now bo found here: http://joomlacode.org/gf/project/kausproject/
User avatar
kauselot
Joomla! Intern
Joomla! Intern
 
Posts: 65
Joined: Thu Sep 15, 2005 1:15 am

Re: Component includer mambot (a lifesaver for some)

Postby zandstra on Mon Aug 06, 2007 8:40 pm

hello
I am trying to use this mabomt but i am stuck.
I have made a new position in the template.. what is the next step?. where am i supposes to to type componet]url[component] ? Sorry if this is a stupid question
zandstra
Joomla! Apprentice
Joomla! Apprentice
 
Posts: 11
Joined: Sun Sep 03, 2006 9:18 am

Re: Component includer mambot (a lifesaver for some)

Postby kauselot on Wed Aug 08, 2007 3:48 pm

This is mabot, so you must enter the code somewhere in your normal content (a.g. article or news), not in the module.
User avatar
kauselot
Joomla! Intern
Joomla! Intern
 
Posts: 65
Joined: Thu Sep 15, 2005 1:15 am

Re: Component includer mambot (a lifesaver for some)

Postby lindsaker on Thu Aug 23, 2007 3:12 pm

Um ... where do I find the url for my component?  :-\
lindsaker
Joomla! Apprentice
Joomla! Apprentice
 
Posts: 29
Joined: Mon Jul 16, 2007 9:18 pm

Re: Component includer mambot (a lifesaver for some)

Postby kauselot on Thu Aug 23, 2007 4:36 pm

Create a menu entry to that component
User avatar
kauselot
Joomla! Intern
Joomla! Intern
 
Posts: 65
Joined: Thu Sep 15, 2005 1:15 am

Component includer mambot Iframe issue

Postby dlester on Sat Sep 15, 2007 4:38 pm

Hello
first thanks for designing a great Mambot

I have gotten the Mambot  to work it, displays my Expose Component just fine on the static page I specified,,,Except its only 200 by 200 or whatever the default size is. I have changed the frame size in the Mambot itself and even gone in and changed the width and height in the .XML and .PHP file. No matter what I do the size of "Expose Component" stays the same,,which is way too small. Can someone tell me what I'm missing.

I have seen this problem listed on other sites with the fix being, to adjust your frame size to whatever you need in the Mambot Parameters page in Joomla. But like I said this has not worked for me. if possible I would like to do away with the scroll bars that appear as well.

Thanks
Dan
dlester
Joomla! Fledgling
Joomla! Fledgling
 
Posts: 2
Joined: Sat Sep 15, 2007 4:07 pm

Re: Component includer mambot (a lifesaver for some)

Postby kauselot on Sat Sep 15, 2007 6:52 pm

You can change iframe size in the mabot backend settings. But of course, this "window" to your component can't be bigger than table/div that surrounds it (a recent case from another user).
Size of component that loads in the iframe is set in the component. In Expose this is done trough XML settings.
User avatar
kauselot
Joomla! Intern
Joomla! Intern
 
Posts: 65
Joined: Thu Sep 15, 2005 1:15 am

Re: Component includer mambot (a lifesaver for some)

Postby dlester on Sat Sep 15, 2007 9:05 pm

kauselot wrote:You can change iframe size in the mabot backend settings. But of course, this "window" to your component can't be bigger than table/div that surrounds it (a recent case from another user).
Size of component that loads in the iframe is set in the component. In Expose this is done trough XML settings.



Hey kauselot

I did everything to work but,,I don't know what I did to make it work. I did uninstall Component Includer and start from scratch, which means that during my first attempt at setting things I made a mistake somewhere along the way. Thank you for replying so quickly to my post, keep on creating great things for Joomla

Be Blessed
Dan
dlester
Joomla! Fledgling
Joomla! Fledgling
 
Posts: 2
Joined: Sat Sep 15, 2007 4:07 pm

Re: Component includer mambot (a lifesaver for some)

Postby claudia23 on Tue Oct 16, 2007 9:41 am

Hey everybody,
I was trying to use the allowtransparency params to avoid that my iframe gets the same color as the site background.
I modified the code like this: 'allowtransparency="false" ', but nothing happens.
Can you help me?
thanks
cla
claudia23
Joomla! Apprentice
Joomla! Apprentice
 
Posts: 13
Joined: Sun Nov 13, 2005 8:22 pm

Re: Component includer mambot (a lifesaver for some)

Postby Kiper on Sun Oct 28, 2007 9:24 pm

Just want to say thank you, Kauselot! The perfect mambot! Small but genial!
User avatar
Kiper
Joomla! Intern
Joomla! Intern
 
Posts: 54
Joined: Wed Nov 01, 2006 6:20 pm

Re: Component includer mambot (a lifesaver for some)

Postby mattiz on Sat Nov 24, 2007 8:56 am

This  script is excellent!

It works fine, but is it possible to edit the header info of the iframe? I would like to use a javascript, only for the iframe.
mattiz
Joomla! Apprentice
Joomla! Apprentice
 
Posts: 13
Joined: Sun Aug 28, 2005 9:29 pm

The Iframe loads a different color when I use this mambot... Help!

Postby mattrogers1 on Sat Jan 12, 2008 12:10 am

Hi Joomlies,

Thanks for the great Mambot...

Im using it to display the Expose Gallery,  I have all the setting correct and the gallery looks great on its own... However, when I run it in a content item using the Mambot the Iframe turns the surrounding area to grey... Please Help?

Thank you all.

Peace and Love, matt :pop

pic included as attachment
Attachments
help with Iframe.jpg
mattrogers1
Joomla! Apprentice
Joomla! Apprentice
 
Posts: 28
Joined: Thu Dec 21, 2006 6:25 pm

Next

Return to Plugins/Mambots

Who is online

Users browsing this forum: No registered users