Elxis CMS Forum
Extensions => Bots and plugins => Topic started by: wbread on January 08, 2011, 16:32:57
-
Based on eForum Discussion bot and Easy gallery button
after activating the bot page does not load, white sheet, what did I do wrong? ???
eforumdiscussion.btn.xml
<?xml version="1.0" encoding="utf-8"?>
<mosinstall type="mambot" group="editors-xtd" version="2009.1">
<name>eforumdiscussion.btn</name>
<author>wbread</author>
<creationDate>2011-01-08 14:14:30</creationDate>
<copyright>(C) 2005-2011 wbdesign. All rights reserved</copyright>
<license>Creative Commons 3.0 SA</license>
<authorEmail>wbread@runsite.ru</authorEmail>
<authorUrl>www.runsite.ru</authorUrl>
<version>1.0</version>
<description>
<![CDATA[
<p>Display on Elxis content items a redirect link which bot will connect this with the corresponding eForum topic you like. (Button for the editor)</p>
<p>You can find the topic id for eForum component on administrator area on eForum Component.<br/>
Other choices that we can find the id of the topic is the url link. The number absolutely before the <b>.html</b>
like : http://www.domain-name.com/eforum/announcements/<b>472</b>.html?msg=473</p>
]]></description>
<files>
<filename mambot="eforumdiscussion.btn">eforumdiscussion.btn.php</filename>
<filename>eforumdiscussion.png</filename>
</files>
</mosinstall>
eforumdiscussion.btn.php
<?php
/**
* @version 1.0
* @package: eForum Discussion button
* @author: wbread
* @email: wbread@runsite.ru
* @link: http://www.runsite.ru
* @license: Creative Commons 3.0 Share Alike
* @copyright: (C) 2005-2011 wbdesign. All rights reserved.
* @description: Display on Elxis content items a redirect link which bot will connect this with the corresponding eForum topic you like. (Button for the editor)
*/
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
$_MAMBOTS->registerFunction('onCustomEditorButton', 'boteforumdiscussion.btn');
function boteforumdiscussion.btn() {
$tip = 'Provides button to insert {eforum}forum_id{/eforum} into content edit box<br>';
$tip .= '<b>Examples:</b><br />';
$tip .= '{eforum}45{/eforum}<br />';
return array('eforumdiscussion.png', '{eforum}forum_id{/eforum}', $tip);
}
?>
-
Replace
$_MAMBOTS->registerFunction('onCustomEditorButton', 'boteforumdiscussion.btn');
with
$_MAMBOTS->registerFunction('onCustomEditorButton', 'botEforumDiscussion');
Replace
function boteforumdiscussion.btn() {
with
function botEforumDiscussion() {
-
:D thanks all work
-
The bot is wrong.
A function name in PHP can not contain a dot "."
-
I can publish it on the official site?
-
I can publish it on the official site?
YES :)
-
somehow