แมมบอท MosModule ตัวนี้มีประโยชน์กับหลายๆ ท่าน ที่ต้องการนำโมดูลมาแสดงใน content (ตรงกลาง)
ดาวน์โหลดได้จาก
http://mambo-code.org/gf/download/frsrelease/123/145/bot_mosmodule115l.zip [แก้ไข url]
ความสามารถและวิธีการใช้ตามด้านล่างนี้ เปิดดิกฯแปลเอานะครับ (ใครจะเขียนอธิบายเป็นไทยเผื่อแผ่ท่านอื่นๆ ก็จะขอบคุณมากๆ ครับ)
Features & Usage:. Run as legacy mambot support and ability to run inside module (see below)
. MosModule is a mambot to displays any module, article, textsizer, video, exec snippet and external php script inside a content item.
. Use mosmodule to get RSS feeds from anywhere using the user module with RSS URL
. external script: Please see hello.php for a sample on passing variable between mosmodule and external script
Note:. Important: Make sure to save the setting at least once and enable MosModule in Mambot manager!
. This is a rewrite of modulebot to be compatible with Mambo 4.5.1 or above
. The default folder for external script is "mosmodule" but you can change it in param screen
. Snippet should not have <?php ?> tags where as phpinc should have the tags
. By default, the module will fill the width of the content area. If you wish to control the width and positioning of modules in content area, you will want to enclose the mosmodule tag(s) in a div and either assign a class to controll the display in your template_css.css file, or use inline styles (if you are using a WYSIWYG editor, you will need to switch to source mode in order to create the <div> tag).
Usage: (Note: extra space to avoid parsing the mambot)
{ mosmodule list} - Displays a list of available modules and block positions.
{ mosmodule module=modulename1,(optional:module2,module3,etc} - Ex: {mosmosule module=Search,poll}
{ mosmodule random=FAQ,(option:title)} - Displays the entire section randomly, default to don't show title
{ mosmodule articleid=2,(optional:introtext|fulltext|all)} - Displays an article inside another article, default is all
{ mosmodule codeid=2} - Displays an article inside another article as code listing
{ mosmodule snippet=2} - Execute and displays an article inside another article as PHP code
{ mosmodule phpinc=hello.php,firtname,lastname} - Include php file, Execute and displays an inside an article
{ mosmodule video=Video_url} - Play embed video from YouTube, Yahoo Video, Google Video or any embed flash video
{ mosmodule videoegg=VE_Path} - VideoEgg Path to your uploaded video file.
{ mosmodule textsizer=idtag} - textsizer to resize text by passing the id tag of your content
Complex Usage: (Note: extra space to avoid parsing the mambot)
. phpinc: Some working sample
+ Assuming your hello.php is in {yourcmsroot}/yourfolder/hello.php then you would put this in your content
{ mosmodule phpinc=hello.php,firtname,lastname}
>>>>>NOTE: You will need to create a folder called 'mosmodule' in the root directory. Your php scripts will go here. This folder's path can be changed by altering the 'Foldername' parameter in the mosmodule setup
. video: Some working sample from YouTube, Yahoo video, and Google video
+ YouTube: { mosmodule video=http://www.youtube.com/v/ekcYc3zrJHI}
+ Yahoo Video: { mosmodule video=http://us.i1.yimg.com/cosmos.bcst.yahoo.com/player/media/swf/FLVVideoSolo.swf}
+ Google Video: { mosmodule video=http://video.google.com/googleplayer.swf?docId=-4897647549985392214&hl=en}
. videoEgg: Some working sample from VideoEgg
+ VideoEgg : { mosmodule videoegg=/gid328/cid1096/9B/2Q/1171378165tCRacTofc58XDo0sWG5H}
Legacy mambot notes:
. copy {ROOT}/mambots/content/mosmodule.php to {ROOT}/mambots
=== Read this, only if you want to use mosmodule in user module ===- To run inside a module to call other module, hack the includes/frontend.html.php around line 51
Replace this: echo $module->content;
With this:
$mosmodulefunc=$mosConfig_absolute_path."/mambots/content/mosmodule/mosmodule_func.php";
if (file_exists($mosmodulefunc)) { include_once($mosmodulefunc); }
if (function_exists('mosmodule_bot')) { echo mosmodule_bot($module->content); }
else echo $module->content;
or this to allow php code in module
$mosmodulefunc=$mosConfig_absolute_path."/mambots/content/mosmodule/mosmodule_func.php";
if (function_exists('mosmodule_bot')) { echo eval('?>'.mosmodule_bot($module->content).'<?php '); }
else echo eval('?>'.$module->content.'<?php ');
=== Read this, only if you want to use mosmodule in user module ===