Forums / Cotonti / Extensions / Can someone port the MCalendar plugin?

SunChase
#1 2009-07-30 02:55
As the name of the topic: Can someone port the MCalendar plugin to Cotonti 0.7?
I think i found out why it doesnt work,but im not a programmer.
I think the problem is here: <!-- BEGIN: NEWS -->
The xtemplate didnt like it till i tryed <!-- BEGIN : NEWS -->,but after this the plugin itself stoped functioning...
[url=http://ka13.orgfree.com]KA13[/url] - The essence of creativity
GHengeveld
#2 2009-07-30 03:45
The new tag isn't allowed by XTemplate as far as I know. That's why it doesn't work. The old tag is good but I'm guessing it's not defined properly. Haven't looked at the code though.
tensh
#3 2009-07-30 04:06
I'll look at it and post some info.

Added 1 hour 21 minutes later:

For me it works, with an exception of ajax. Can't reproduce problem... be sure to search forums for version ported to Cotonti.
This post was edited by tensh (2009-07-30 05:39, 15 years ago)
SunChase
#4 2009-07-30 06:15
tensh,you mean this one?

Version=1.3
Date=22-08-2008
Author=Almaz(Edited by Dayver)


Добавлено 18 Минут спустя:

hm.I really dont know what i did but it works ...

Добавлено 3 Минуты спустя:

but now another question.How to put the MCalendar in the forum?
[url=http://ka13.orgfree.com]KA13[/url] - The essence of creativity
This post was edited by SunChase (2009-07-30 06:37, 15 years ago)
tensh
#5 2009-07-31 03:44
I mean this version:
http://www.cotonti.com/forums.php?m=posts&p=631&highlight=MCALENDAR#631

As for forums, it depends where exactly you want to put it. Check if you have the version above, and see the contents: there are many parts that hook up to different Cotonti sections.

I think it would be enough to copy e.g. this file:
<?PHP
/* ====================
Seditio - Website engine
Copyright Neocrome
http://www.neocrome.net

[BEGIN_SED]
File=plugins/mcalendar/mcalendar.list.tags.php
Version=121
Updated=2006-mar-15
Type=Plugin
Author=Neocrome
Description=
[END_SED]

[BEGIN_SED_EXTPLUGIN]
Code=mcalendar
Part=list
File=mcalendar.list.tags
Hooks=list.tags
Tags=list.tpl:{LIST_MCALENDAR}
Minlevel=0
Order=10
[END_SED_EXTPLUGIN]
==================== */
if(!defined('SED_CODE')){die('Wrong URL.');}
require("plugins/mcalendar/inc/main.php");
$t->assign(array("LIST_MCALENDAR"=>$plugin_body));
$plugin_body="";
?>

change it as follows:

<?PHP
/* ====================
Seditio - Website engine
Copyright Neocrome
http://www.neocrome.net

[BEGIN_SED]
File=plugins/mcalendar/mcalendar.forums.sections.tags.php
Version=121
Updated=2006-mar-15
Type=Plugin
Author=Neocrome
Description=
[END_SED]

[BEGIN_SED_EXTPLUGIN]
Code=mcalendar
Part=forums.sections
File=mcalendar.forums.sections.tags
Hooks=forums.sections.tags
Tags=forums.sections.tpl:{FORUMS_SECTIONS_MCALENDAR}
Minlevel=0
Order=10
[END_SED_EXTPLUGIN]
==================== */
if(!defined('SED_CODE')){die('Wrong URL.');}
require("plugins/mcalendar/inc/main.php");
$t->assign(array("FORUMS_SECTIONS_MCALENDAR"=>$plugin_body));
$plugin_body="";
?>

Name it mcalendar.forums.sections.tags.php, and insert the {FORUMS_SECTIONS_MCALENDAR} tag into forums.sections.tpl. It should do the trick...

You can do similar thing for other forums parts (topics, posts, etc).
SunChase
#6 2009-07-31 04:03
tensh,thanks.I'w tried before what you told...but i named the 'Part=' incorrect...
bytheway..do you have the a bug,when you put me mouse over some active date it gives out the title like:"News:2;New users:5" giving incorect info?
[url=http://ka13.orgfree.com]KA13[/url] - The essence of creativity
tensh
#7 2009-07-31 04:08
I cannot tell because I tested it on fresh installation :)
But I'll make it a live site, so I'll let you know later.
SunChase
#8 2009-07-31 04:18
ok.thanks
[url=http://ka13.orgfree.com]KA13[/url] - The essence of creativity