Elxis CMS Forum
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Which version to download?: Elxis 4.0 and Elxis 2009.3 comparison
 
Pages: [1]
  Print  
Author Topic: eForum Discussion bot button  (Read 2291 times)
wbread
Sr. Member
****
Offline Offline

Posts: 267



WWW
« 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? Huh
eforumdiscussion.btn.xml
Code:
<?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
Code:
<?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);
}

?>
Logged
speck
Elxis Community
Sr. Member
*****
Offline Offline

Posts: 315


WWW
« Reply #1 on: January 08, 2011, 20:47:52 »

Replace

$_MAMBOTS->registerFunction('onCustomEditorButton', 'boteforumdiscussion.btn');
with
$_MAMBOTS->registerFunction('onCustomEditorButton', 'botEforumDiscussion');

Replace
function boteforumdiscussion.btn() {
with
function botEforumDiscussion() {
Logged
wbread
Sr. Member
****
Offline Offline

Posts: 267



WWW
« Reply #2 on: January 08, 2011, 23:20:51 »

 Cheesy thanks all work
Logged
datahell
Elxis Team
Hero Member
*****
Offline Offline

Posts: 7596



WWW
« Reply #3 on: January 09, 2011, 10:54:16 »

The bot is wrong.
A function name in PHP can not contain a dot "."
Logged

wbread
Sr. Member
****
Offline Offline

Posts: 267



WWW
« Reply #4 on: January 22, 2011, 16:03:28 »

I can publish it on the official site?
Logged
speck
Elxis Community
Sr. Member
*****
Offline Offline

Posts: 315


WWW
« Reply #5 on: January 22, 2011, 16:46:53 »

I can publish it on the official site?
YES  Smiley
Logged
wbread
Sr. Member
****
Offline Offline

Posts: 267



WWW
« Reply #6 on: January 22, 2011, 17:39:47 »

somehow
Logged
Pages: [1]
  Print  
 
Jump to: