Difference between revisions of "Talk:Calendar"
(New section: Same problem) |
(→More event-categories) |
||
(30 intermediate revisions by 10 users not shown) | |||
Line 106: | Line 106: | ||
Thanks, | Thanks, | ||
Micah | Micah | ||
+ | |||
+ | <big>Re: Create Event</big><br> | ||
+ | Although Gero has mentioned below that this is a MW 1.12 problem, I still encounter this issue with a MW 1.13 install. A solution definitely exists because this site is running MW 1.13 and the input box appears when one tries to create an event in the semeb.com calendar. Gero, how did you solve the problem? | ||
+ | --[[User:Hydro|Hydro]] 16:47, 3 January 2009 (UTC) | ||
+ | |||
+ | == Template:Create_Event- SOLUTION == | ||
+ | |||
+ | This worked for me. The error seemed to be because the template create event wasn't formatted correctly. | ||
+ | |||
+ | '''Steps to fix''' | ||
+ | * I downloaded the latest version of input box and installed in the normal way - [http://www.mediawiki.org/wiki/Extension:InputBox Latest Input Box version from Media wiki] | ||
+ | * Having installed all other DPL calender bits go to Template:Create Event | ||
+ | * Replace the contents with the following | ||
+ | <pre> | ||
+ | Create an event for '''{{{prefix}}}''' | ||
+ | <inputbox> | ||
+ | type=create | ||
+ | buttonlabel=create | ||
+ | width=25 | ||
+ | preload=Template:Event template | ||
+ | {{#if:{{{namespace|}}}|titleprefix={{{namespace}}}:{{{prefix}}}_|titleprefix={{{prefix}}}_}} | ||
+ | editintro=Event intro | ||
+ | break=no | ||
+ | </inputbox> | ||
+ | {{#if:{{#var:purpose}}|Do not forget to assign your event description to category ''{{#var:purpose}}''}} | ||
+ | </nowiki> | ||
+ | </pre> | ||
+ | |||
+ | * The problem seems to have been the pipes at the start of each line and the format of the input box tag | ||
+ | |||
+ | Hope this works for the rest of you | ||
+ | --[[User:Clemo|Clemo]] 17:44, 1 February 2009 (UTC) | ||
+ | |||
+ | |||
+ | I've just noticed this gets the form to render but the date prefix no longer is added to the page title | ||
+ | any ideas anyone? | ||
+ | --[[User:Clemo|Clemo]] 18:18, 1 February 2009 (UTC) | ||
+ | |||
+ | === workaround === | ||
+ | |||
+ | the prefix won't show because the template can't expand if it is in an extension-tag. To work around this, admittedly very inelegantly, I created another parser-function that simply ouputs the <nowiki> <inputbox></nowiki> tags with the prefix as a parameter. For some reason I could not make it work for titlelprefix, but it worked when I set the prefix as an option for default. here's the parserfunction: | ||
+ | |||
+ | <pre> | ||
+ | $wgExtensionFunctions[] = 'efTestInputBx_Setup'; | ||
+ | # Add a hook to initialise the magic word | ||
+ | $wgHooks['LanguageGetMagic'][] = 'efTestInputBx_Magic'; | ||
+ | |||
+ | function efTestInputBx_Setup() { | ||
+ | global $wgParser; | ||
+ | # Set a function hook associating the "example" magic word with our function | ||
+ | $wgParser->setFunctionHook( 'inputbx', 'efTestInputBx_Render' ); | ||
+ | } | ||
+ | |||
+ | function efTestInputBx_Magic( &$magicWords, $langCode ) { | ||
+ | # Add the magic word | ||
+ | # The first array element is case sensitive, in this case it is not case sensitive | ||
+ | # All remaining elements are synonyms for our parser function | ||
+ | $magicWords['inputbx'] = array( 0, 'inputbx' ); | ||
+ | # unless we return true, other parser functions extensions won't get loaded. | ||
+ | return true; | ||
+ | } | ||
+ | |||
+ | function efTestInputBx_Render( &$parser, $param1 = '') { | ||
+ | # The parser function itself | ||
+ | # The input parameters are wikitext with templates expanded | ||
+ | # The output should be wikitext too | ||
+ | $output =" <inputbox> | ||
+ | type=create | ||
+ | buttonlabel=create | ||
+ | width=25 | ||
+ | preload=Template:Event template | ||
+ | default=$param1 | ||
+ | editintro=Event intro | ||
+ | break=no | ||
+ | </inputbox>"; | ||
+ | return array($output, 'noparse' => false, 'isHTML' => true); | ||
+ | |||
+ | # return $output; | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | I added that code to inputbox.php but you could make a seperate file I guess. I omitted the if function because for my purposes I don't need it, but with some basic php-skill anyone can add it. | ||
+ | |||
+ | And to use it you just write | ||
+ | <pre> | ||
+ | {{#inputbx:{{{prefix}}} }} | ||
+ | </pre> | ||
+ | in the Create Event template. | ||
+ | |||
+ | Let me know if you can get it to work in the titleprefix option. | ||
+ | |||
+ | === Not including === | ||
+ | |||
+ | I've tried the above solutions, but Template:Event template is just not preloaded. I'm running MW 1.13 on a windows apache server, if that info has relevance. | ||
+ | |||
+ | Hope you guys have some idea as to why this won't work. Is there any other way to preload this stuff? I suppose I could create a namespace for Events and add a template to that. | ||
== Same problem == | == Same problem == | ||
I am having the same problem with the special page create event. I have it loaded in both a unix environment and a windows and all i can get is the code. | I am having the same problem with the special page create event. I have it loaded in both a unix environment and a windows and all i can get is the code. | ||
+ | |||
+ | ''Addition'' I tried copying/pasting the code that shows up on the special page create event into a brand new 'normal' page that i named create event.. and it shows up fine as an input box. just not sure how to get it to work with the code since all the hyperlinks point to the special page which doesn't work | ||
+ | |||
+ | ''04-16-08 Addition'' | ||
+ | I think i just found out it's a problem between using 1.11 and 1.12. i have a copy of 1.11 and everything works just fine. in 1.12 it appears that the special page create event no longer works. i wonder if this is the nested template problem mentioned on the front page | ||
Also had a question about the downloads. In the instruction it says: | Also had a question about the downloads. In the instruction it says: | ||
Line 123: | Line 224: | ||
But when you get the first download it includes Variables and StringFunctions.. Which one are we supposed to use? the one from the bundle or the one from mediawiki? | But when you get the first download it includes Variables and StringFunctions.. Which one are we supposed to use? the one from the bundle or the one from mediawiki? | ||
+ | |||
+ | === Reply === | ||
+ | I am afraid you are another victim of 1.12. incompatibilities with former versions. Please help us to put pressure on MW developers (see homepage of this wiki and foloow the link; please support the bugzilla issue regarding DPL). | ||
+ | |||
+ | The calendar works fine with the versions of other extensions which are delivered in a bundle together with DPL. The ''ZIP archive'' is the master (in case there is a duplication/redundancy with a page of this wiki). Other versions may or may not work - there is no common release management possible for extensions which are independently developed and maintained by different people. [[User:Gero|Gero]] 12:46, 17 April 2008 (CEST) | ||
+ | |||
+ | |||
+ | =='latest' Calendar version ? == | ||
+ | |||
+ | Gero, I didn't get a reply from you regarding upgrading from the earlier to the latest version of your Calendar, so I did it anyway, following the instructions on the install page .. I downloaded the zip file, installed all the relevant files which were needed (some were newer than mine) ... | ||
+ | |||
+ | I then exported the templates as suggested and imported them to my wiki after deleting my 'old' Calendar templates .. The 'Event info' would not import .. Eventually discovered that I was getting an error: | ||
+ | [Sat May 10 18:18:09 2008] [error] [client xxx.xxx.xxx.xxx] PHP Fatal error: Call to undefined function mb_strpos() in xxxxxxxx/extensions/StringFunctions/StringFunctions.php on line 160, referer: http://www.zs6ro.co.za/wiki/index.php?title=Event_intro&action=edit | ||
+ | I then changed my StringFunctions.php file back to the 'old' one but got the same error report .. | ||
+ | |||
+ | Line 160 of StringFunctions.php is '$ret = mb_strpos ( $inStr, $inNeedle, intval ( $inOffset ) );' | ||
+ | |||
+ | If I click on 'Current events' I get a mangled page ... | ||
+ | |||
+ | My wiki version is 1.12.0 ; My PHP version is 5.2.6 (apache2handler) ; MySQL version is 5.0.18-Max ... | ||
+ | |||
+ | My wiki webpage is 'http://www.zs6ro.co.za' .. Please advise and edit if required Gero .. Thanks .. | ||
+ | |||
+ | --[[User:Zs6ro|Zs6ro]] 18:38, 10 May 2008 (CEST) | ||
+ | |||
+ | === Reply === | ||
+ | Sorry for the trouble you are having. My family convinced me to have a week of holiday starting tomorrow ;-), so I will come back to this issue the week after next week. [[User:Gero|Gero]] 01:46, 11 May 2008 (CEST) | ||
+ | |||
+ | ==Confusion??== | ||
+ | Ok on the front page it reads: <font style='color:orange'>DPL should work under MW 1.12 and after with full functionality. Thanks to all who contributed to the necessary modifications in MW 1.12 / 1.13. If you use DPL with MW 1.12 or later and notice any differences compared to older MediaWIki versions: please report!</font> But here on the discussion page it sounds like this is not entirely true because some of the issues people are having (Create event showing as html rather than input box) are being attributed to 1.12 breaking things. Could someone please clarify? I downloaded all the files again and imported the templates; i am using 1.12. Should things work now or do i still need to incorporate the line <font style='color:green'>$wgParserConf['class'] = 'Parser_OldPP';</font> in my LocalSettings.php to get the calendar to work? | ||
+ | |||
+ | --[[User:Caile13|Kay]] | ||
+ | |||
+ | By now it should work ''without'' the special configuration in your LocalSettings.php. If it doesn´t: please let us know! [[User:Gero|Gero]] 19:05, 28 May 2008 (CEST) | ||
+ | |||
+ | It does not work on my wiki without the Parser_OldPP line added. | ||
+ | Based on the info on the Special Pages --> version here is my information: | ||
+ | :MediaWiki 1.12.0 | ||
+ | :PHP 5.2.4 | ||
+ | :MySQL 5.0.44sp1 | ||
+ | :DPL2 1.7.4 | ||
+ | :ParserFunctions 1.1.1 (i downloaded the version that said was for 1.12 | ||
+ | :InputBox does not show a version | ||
+ | :StringFuntions 1.9.3 | ||
+ | :Variables does not show a version | ||
+ | I also re-exported the template pages from here and deleted the pages on my wiki and reimported. All of them except one showed updated versions on import. | ||
+ | The calendar itself looks ok but when you click on a date to add an event you see html code rather than the input box. | ||
+ | |||
+ | If you need any further information, please let me know. | ||
+ | |||
+ | --[[User:Caile13|Kay]] | ||
+ | Just to follow up again. YOu said if there were still issues to let you know, and i did but i haven't heard anything back and i'm not sure what to do from here on out. I would like to continue to be able to use DPL.. and specifically the Calendar but the calendar doesn't work on my wiki w/o the Parser_OldPP line and that line causes other things to break so i am rather at an impasse. If i don't get this sorted out i am going to have to remove the calendar and i'd really rather not do that if there is anyway to work around the problems without causing more. | ||
+ | |||
+ | --[[User:Caile13|Kay]] | ||
+ | |||
+ | Ok. i was told to 'let us know' if the extension doesn't work. I did.. i gave all the details i know to give.. i've followed up left and right and can't get any responses.. and i'm at wit's end as to what to try now so it looks like i am going to have to do without the DPL calendar. If this ever gets fixed to work with 1.12 and without the Parser_OldPP line added to LocalSettings or someone has the time/inclination to help me work through this, i'd be very grateful but for the time being the broken 'Create events' page is causing too much confusion that i can't leave it there any longer. | ||
+ | |||
+ | --[[User:Caile13|Kay]] | ||
+ | |||
+ | Sorry that you have such trouble. Currently I do not have much time for DPL due to many other obligations. But this will change again after summer. [[User:Gero|Gero]] 22:21, 10 June 2008 (CEST) | ||
+ | |||
+ | == Namespace help! == | ||
+ | |||
+ | I've been having significant issues with getting the calendar to work with different namespaces. I have a projects namespace that I wanted to have a calendar for and another namespace called Office that I've also created a calendar for. The calendar seems fine, however if I try to view the next month I get the following error: | ||
+ | |||
+ | %DPL-1.7.4-ERROR: Wrong '$0' parameter: 'namespace'! Help: $0= empty string (Main). | ||
+ | |||
+ | This is the URL: *hidden*/wiki/index.php/Special:Call/:Current_events%2Cyear%3D2008%2Cmonth%3D07%2Cbasepage%3DCurrent_events%2CeventList%3Dcurrent%2Cpurpose%3D%2Cnolink%3D%2Cnoadd%3D%2Cshow%3D%2Cnamespace%3DFASRO_Projects%2Cwidth%3D | ||
+ | |||
+ | This is my calendar definition: | ||
+ | |||
+ | <nowiki>{{:Current events|namespace=FASRO_Projects}}</nowiki> | ||
+ | |||
+ | Any help would be appreciated. | ||
+ | |||
+ | -Jeff | ||
+ | |||
+ | === Gero - Help === | ||
+ | |||
+ | ---- | ||
+ | |||
+ | Your reply .. | ||
+ | Sorry for the trouble you are having. My family convinced me to have a week of holiday starting tomorrow ;-), | ||
+ | so I will come back to this issue the week after next week. [[User:Gero|Gero]] 01:46, 11 May 2008 (CEST) | ||
+ | |||
+ | Thought I would get back to you and ask again for help ... | ||
+ | |||
+ | If I click on my 'Current events' I get a mangled page ... | ||
+ | |||
+ | My wiki version is 1.12.0 ; My PHP version is 5.2.6 (apache2handler) ; MySQL version is 5.0.18-Max ... | ||
+ | |||
+ | My wiki webpage is 'http://www.zs6ro.co.za' .. Please advise and edit if required Gero .. Thanks .. | ||
+ | |||
+ | --[[User:Zs6ro|Zs6ro]] 11:36, 2 August 2008 (CEST) | ||
+ | |||
+ | == no days shown on calendar == | ||
+ | |||
+ | Hi, | ||
+ | |||
+ | I'm having a problem with the calendar. It does not show any days below the weekday-abbreviatons, a link to Vorlage:Calendar/MonthStartMi appears above the calendar. | ||
+ | |||
+ | In the LocalSettings.php $wgLanguageCode = "de" is set, since the WIKI-users are from austria. | ||
+ | The templates I use were exported from this WIKI (as recomended on the installation page) and imported in my WIKI without probs. | ||
+ | |||
+ | I've already deleted the temlates changed the $wgLanguageCode to "en" and did the import again. T´his did not help either. | ||
+ | |||
+ | Does anybody use the calender in a german Wiki? Can somebody help me to succeed with the installation? | ||
+ | |||
+ | Thank, | ||
+ | Akos | ||
+ | |||
+ | PS.: my environmet : | ||
+ | MediaWiki 1.13.1 | ||
+ | PHP 5.1.2 (apache2handler) | ||
+ | MySQL 5.0.26 | ||
+ | |||
+ | |||
+ | --[[User:adomjan|adomjan]] 11:21, 6 October 2008 (CEST) | ||
+ | |||
+ | ==Use of "#time|D" is incorrect == | ||
+ | According to http://meta.wikimedia.org/wiki/ParserFunctions#.23time: | ||
+ | <blockquote> | ||
+ | D An abbreviation for the day of the week. '''Rarely internationalised'''. | ||
+ | </blockquote> | ||
+ | For example, for russian "time|D" is not "Mon-Sat" but is "Пн-Вс", | ||
+ | and all based on templates "Calendar/MonthStartXX" failed. | ||
+ | It will be good to use only number based parametrisation of template names, | ||
+ | independent to localization. | ||
+ | --[[User:StasFomin|StasFomin]] 11:46, 17 November 2008 (UTC) | ||
+ | |||
+ | == How to show just the calendar? == | ||
+ | |||
+ | I need to put the calendar alone on my frontpage without the actual list of current events. I've tried tampering with Current Events but I can't remove it without striking out everything. Any suggestions? It can't be that hard if you know what you're doing with the DPL-syntax and not just deleting stuff like me :) | ||
+ | |||
+ | --[[User:Martinfs|Martin]] 14:13, 3 March 2009 (GMT +1) | ||
+ | |||
+ | Figured it out - deleted the DPL-Query from Template:Calendar Month. Feel free to delete this at will. | ||
+ | |||
+ | --[[User:Martinfs|Martin]] 16:27, 3 March 2009 (GMT +1) | ||
+ | |||
+ | == More event-categories == | ||
+ | |||
+ | Hi, | ||
+ | |||
+ | I need two distinct event categories -- and I want them to appear in distinguishable ways in the calendar! | ||
+ | |||
+ | Here's what I've done so far: | ||
+ | |||
+ | # Changed Template:Event to take a parameter, so that my users can define one of two event types. (In this case, Community event or Industry event. | ||
+ | # Changed Template:Calendar_month to show two seperate lists of events (one for each type, yes!) by simply duplicating the dpl-query that outputs the sortable table with events and have these two lists get their contents from my two new categories. | ||
+ | |||
+ | Now, I can't figure out where the actual graphical calendar view selects it's pages. Obviously, a page must belong to the Event-category to appear there, and if I could figure out where that critieria is specified, maybe I could accomplish what I need. Like having community events show in color and industry events show in another. Then I can get rid of the base Event-category all together. | ||
+ | |||
+ | I hope someone has an idea for this! | ||
+ | |||
+ | --[[User:Martinfs|Martinfs]] 07:23, 9 September 2009 (UTC) | ||
+ | |||
+ | :Did you see that there is already a concept for different event types? You only need to use the "purpose" parameter and you have to assign your articles to the Event Category AND to your purose-categories. While the first happnes implicitly when calling the "Event" template, the latter must be done exolicitly. --[[User:Gero|Gero]] 11:40, 10 September 2009 (UTC) |
Latest revision as of 12:40, 10 September 2009
Template talk:CalendarSingle
Contents
- 1 Template talk:CalendarSingle
- 2 Date bug
- 3 Template talk:Calendar month
- 4 Strange Behavior - date of Jan 1, 2008 incorrect
- 5 How to upgrade from 'old' to 'latest' Calendar version ?
- 6 DPL Error
- 7 Template:Create_Event
- 8 Template:Create_Event- SOLUTION
- 9 Same problem
- 10 'latest' Calendar version ?
- 11 Confusion??
- 12 Namespace help!
- 13 no days shown on calendar
- 14 Use of "#time|D" is incorrect
- 15 How to show just the calendar?
- 16 More event-categories
hey
I've made a preload version of the calendar which directs to Template:Monthly_calendar [1], and if the month calendar doesnt exist yet, creates it. Now to find a few to pass the month-number... Maybe is possible by extracting it from the {{PAGENAME}}.
{{Calendar/MonthStart{{#time:D|{{{year}}}-{{{month}}}-01 +1 second}} |cur_month={{#time:F|{{{year}}}-{{{month}}}-03}} |prev_month={{#ifexist: {{{basepage}}} {{#time:F Y|{{{year}}}-{{{month}}}-03 -1 month}}|[[{{{basepage}}} {{#time:F Y|{{{year}}}-{{{month}}}-03 -1 month}}|<<]]|[{{fullurl:{{{basepage}}} {{#time:F Y|{{{year}}}-{{{month}}}-03 -1 month}}|action=edit&preload=Template:Monthly_calendar}} <<]}} |next_month={{#ifexist: {{{basepage}}} {{#time:F Y|{{{year}}}-{{{month}}}-03 +1 month}}|[[{{{basepage}}} {{#time:F Y|{{{year}}}-{{{month}}}-03 +1 month}}|>>]]| [{{fullurl:{{{basepage}}} {{#time:F Y|{{{year}}}-{{{month}}}-03 +1 month}}|action=edit&preload=Template:Monthly_calendar}} >>]}}
-- Eiland 01:19, 26 August 2007 (CEST)
Date bug
If you look at the calendar, you will see that this month (December 2007) starts on a Friday. This is not correct, it should start on a saturday. You can correct this by changing
{{Calendar/MonthStart{{#time:D|{{{year}}}-{{{month}}}-01 +1 second}}
to
{{Calendar/MonthStart{{#time:D|{{{year}}}-{{{month}}}-02 +1 second}}
. But I really don't think this is the best way to do it. I have it changed this way on my wiki, but I'd really like to see a proper solution.
--El sjaako 03:25, 18 December 2007 (CET)
Reply
For some strange reason the #time function seems to deliver different values under different versions of MW / PHP. Indeed it may be necessdary to use day 1/8/15/22 here or 2/9/16/23. So if months start at the wrong day just change the number here. Maybe sometime there will be a better solution ... Gero 08:38, 22 December 2007 (CET)
Re reply
Hi Gero. Yes. you are right. The early code had run right results in my wiki until I imported the new code you saved the version. Now I've changed it to early right version for me.
- My environment
- Win XP
- MediaWiki: 1.11.0
- The AppServ Open Project - 2.5.7 for Windows
- PHP: 5.1.6 (apache2handler)
- MySQL: 5.0.24a-community-nt-log
Template talk:Calendar month
Instead of a link to the header of the page, is it possible that the calendar supplies a link to the actual page whihc is on a specific date, so for example directly to 2007-08-22 The Birthday Party? -- Eiland 21:25, 25 August 2007 (CEST)
- You could change the 'Calendar link'. Leave away the # sign before the %PAGE% ... Gero 15:02, 26 August 2007 (CEST)
- Ah! that was easy! -- Eiland 15:32, 26 August 2007 (CEST)
- On second thought, yes it works, but what will happen when there will be two events for one day? I'll have to think of something clever. Maybe some kind of interim pages which noted that there were two entries with that date, and offers choice. But this seems quite something to implement. Or maybe a date which collects all pages starting with 2007-08-31; that could be a DPL'd page, no? -- 11:49, 31 August 2007 (CEST)
I really like DPL Calendar. It works beautifully with the skin Monobook. However, my wiki's default skin is gumax 3.0 [2]. Sadly, when I try to view my calendar in that skin the page that loads is completely blank. Any ideas as to what might be going on and how I might fix it? Will gladly provide full information regarding setup if that would be useful. --Rowenrye 21:02, 18 January 2008 (CET)
Resolved It turns out that although gumax 3.0 seemed to be working perfectly well, I needed to update to gumax 3.3. DPL calendar now works with that skin as well. The problem was with the skin not with DPL Calendar. Forgot to sign my first time through, so both the problem and the resolution have the same timestamp. --Rowenrye 21:02, 18 January 2008 (CET)
Strange Behavior - date of Jan 1, 2008 incorrect
I have calendar up and running. There is just one very strange problem: Jan 1, 2008 appears as a Wednesday, rather than as a Tuesday when I go to Current Events in my wiki. I don't know how to correct this, or if I might have done something to create the problem in the first place. Please advise.
--Rowenrye 23:10, 24 January 2008 (CET)
The reason for this is still unclear. It varies between installations, maybe depending on the php version used. You must change a value in Template:CalendarSingle from 16 to 15. There is a comment at the point where you have to do this.
- Gero 08:48, 25 January 2008 (CET)
Comment located. Change performed. Problem fixed. Thanks for the prompt assistance and thanks for making such a good calendar tool for use with mediawiki.
--Rowenrye 08:59, 25 January 2008 (CET)
How to upgrade from 'old' to 'latest' Calendar version ?
Hallo gero - remember me ?? - Now don't get a heart attack ...
I am still using your 'old' Calendar version ... I see that your latest version has some neat changes ... What is required for me to upgrade to your latest Calender version?
I would rather ask before downloading all the files and then end up with a problem ..
When i upgrade, will I lose all my calendar entries ???
--Zs6ro 23:45, 5 February 2008 (CET)
DPL Error
Hi,
I have just install the template and when call it I am geting the following error
%DPL-1.6.5-ERROR: Wrong 'notnamespace' parameter: 'Template'! Help: notnamespace= empty string (Main) | AWMN-2764 | AWMN-2764_συζήτηση | Calendar | MediaWiki | MediaWiki_talk | Property | Property_talk | Relation | Relation_talk | Type | Type_talk | Βοήθεια | Εικόνα | Κατηγορία | Πρότυπο | Συζήτηση | Συζήτηση_βοήθειας | Συζήτηση_εικόνας | Συζήτηση_κατηγορίας | Συζήτηση_προτύπου | Συζήτηση_χρήστη | Χρήστης.
Can you help me with this ?
Thanks
--Eaggelidis 18:46, 10 February 2008 (CET)
Maybe there is a linefeed too much...
- I suggest that you leave the URL to your wiki here then we can have a look.
- Gero 22:02, 11 February 2008 (CET)
I have a suggestion...
- Go to Template:Calendar month and search for the line that contains notnamespace. Replace Template with the translation of Template in your language. i.e. "notnamespace=Template" in "notnamespace=Here the translation of Template in your language - (greek) i suppose"
- Hydro 15:00, 14 March 2008 (CET)
Template:Create_Event
Hi,
When I compile Template:Create_Event in my wiki it gives me the raw html code on the page.
It looks like this
Create an event for {{{prefix}}} <form name="createbox" action="/TaxCon/12/index.php" method="get" class="createbox" onsubmit="document.createbox.title.value = document.createbox.titleprefix.value + document.createbox.title.value;"> <input type='hidden' name="action" value="edit" /> <input type="hidden" name="preload" value="Template:Event template" /> <input type="hidden" name="editintro" value="Event intro" /> <input type='hidden' name="titleprefix" value="{{{prefix}}}_" /> <input class="createboxInput" name="title" type="text" value="" size="25" /> <input type='submit' name="create" class="createboxButton" value="create" /> </form>
Actually when I saw it on your page it showed me the input box.
When I checked the source of the page it showed me:
<table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td bgcolor=""><form name="createbox" action="/TaxCon/12/index.php" method="get" class="createbox" <p> onsubmit="document.createbox.title.value = document.createbox.titleprefix.value + document.createbox.title.value;"> <input type='hidden' name="action" value="edit" /> <input type="hidden" name="preload" value="Template:Event template" /> <input type="hidden" name="editintro" value="Event intro" /> <input type='hidden' name="titleprefix" value="{{{prefix}}}_" /> </p><p> <input class="createboxInput" name="title" type="text" value="" size="25" /> <input type='submit' name="create" class="createboxButton" value="create" /> </form> </p> </td> </tr> </table>
How do I rectify this? NilamDoc 22:20, 14 March 2008 (CET)
Re: Create Event
Hi, I'd like to let you know I'm getting the same thing. Anybody have any ideas on how to address this?
Thanks, Micah
Re: Create Event
Although Gero has mentioned below that this is a MW 1.12 problem, I still encounter this issue with a MW 1.13 install. A solution definitely exists because this site is running MW 1.13 and the input box appears when one tries to create an event in the semeb.com calendar. Gero, how did you solve the problem?
--Hydro 16:47, 3 January 2009 (UTC)
Template:Create_Event- SOLUTION
This worked for me. The error seemed to be because the template create event wasn't formatted correctly.
Steps to fix
- I downloaded the latest version of input box and installed in the normal way - Latest Input Box version from Media wiki
- Having installed all other DPL calender bits go to Template:Create Event
- Replace the contents with the following
Create an event for '''{{{prefix}}}''' <inputbox> type=create buttonlabel=create width=25 preload=Template:Event template {{#if:{{{namespace|}}}|titleprefix={{{namespace}}}:{{{prefix}}}_|titleprefix={{{prefix}}}_}} editintro=Event intro break=no </inputbox> {{#if:{{#var:purpose}}|Do not forget to assign your event description to category ''{{#var:purpose}}''}} </nowiki>
- The problem seems to have been the pipes at the start of each line and the format of the input box tag
Hope this works for the rest of you --Clemo 17:44, 1 February 2009 (UTC)
I've just noticed this gets the form to render but the date prefix no longer is added to the page title
any ideas anyone?
--Clemo 18:18, 1 February 2009 (UTC)
workaround
the prefix won't show because the template can't expand if it is in an extension-tag. To work around this, admittedly very inelegantly, I created another parser-function that simply ouputs the <inputbox> tags with the prefix as a parameter. For some reason I could not make it work for titlelprefix, but it worked when I set the prefix as an option for default. here's the parserfunction:
$wgExtensionFunctions[] = 'efTestInputBx_Setup'; # Add a hook to initialise the magic word $wgHooks['LanguageGetMagic'][] = 'efTestInputBx_Magic'; function efTestInputBx_Setup() { global $wgParser; # Set a function hook associating the "example" magic word with our function $wgParser->setFunctionHook( 'inputbx', 'efTestInputBx_Render' ); } function efTestInputBx_Magic( &$magicWords, $langCode ) { # Add the magic word # The first array element is case sensitive, in this case it is not case sensitive # All remaining elements are synonyms for our parser function $magicWords['inputbx'] = array( 0, 'inputbx' ); # unless we return true, other parser functions extensions won't get loaded. return true; } function efTestInputBx_Render( &$parser, $param1 = '') { # The parser function itself # The input parameters are wikitext with templates expanded # The output should be wikitext too $output =" <inputbox> type=create buttonlabel=create width=25 preload=Template:Event template default=$param1 editintro=Event intro break=no </inputbox>"; return array($output, 'noparse' => false, 'isHTML' => true); # return $output; }
I added that code to inputbox.php but you could make a seperate file I guess. I omitted the if function because for my purposes I don't need it, but with some basic php-skill anyone can add it.
And to use it you just write
{{#inputbx:{{{prefix}}} }}
in the Create Event template.
Let me know if you can get it to work in the titleprefix option.
Not including
I've tried the above solutions, but Template:Event template is just not preloaded. I'm running MW 1.13 on a windows apache server, if that info has relevance.
Hope you guys have some idea as to why this won't work. Is there any other way to preload this stuff? I suppose I could create a namespace for Events and add a template to that.
Same problem
I am having the same problem with the special page create event. I have it loaded in both a unix environment and a windows and all i can get is the code.
Addition I tried copying/pasting the code that shows up on the special page create event into a brand new 'normal' page that i named create event.. and it shows up fine as an input box. just not sure how to get it to work with the code since all the hyperlinks point to the special page which doesn't work
04-16-08 Addition I think i just found out it's a problem between using 1.11 and 1.12. i have a copy of 1.11 and everything works just fine. in 1.12 it appears that the special page create event no longer works. i wonder if this is the nested template problem mentioned on the front page
Also had a question about the downloads. In the instruction it says:
- from this website (via Download and unzip)
- DPL extension
- Call extension
- Inputbox extension (this is slightly modified compared to the official release)
- from mediawiki.org:
- mw:Extension:VariablesExtension
- mw:Extension:StringFunctions -- there is a slightly enhanced version of this extension under StringFunctions in this :wiki which understands regular expressions; it is recommended (though currently not necessary) to use that one
- Extension:ParserFunctions
But when you get the first download it includes Variables and StringFunctions.. Which one are we supposed to use? the one from the bundle or the one from mediawiki?
Reply
I am afraid you are another victim of 1.12. incompatibilities with former versions. Please help us to put pressure on MW developers (see homepage of this wiki and foloow the link; please support the bugzilla issue regarding DPL).
The calendar works fine with the versions of other extensions which are delivered in a bundle together with DPL. The ZIP archive is the master (in case there is a duplication/redundancy with a page of this wiki). Other versions may or may not work - there is no common release management possible for extensions which are independently developed and maintained by different people. Gero 12:46, 17 April 2008 (CEST)
'latest' Calendar version ?
Gero, I didn't get a reply from you regarding upgrading from the earlier to the latest version of your Calendar, so I did it anyway, following the instructions on the install page .. I downloaded the zip file, installed all the relevant files which were needed (some were newer than mine) ...
I then exported the templates as suggested and imported them to my wiki after deleting my 'old' Calendar templates .. The 'Event info' would not import .. Eventually discovered that I was getting an error:
[Sat May 10 18:18:09 2008] [error] [client xxx.xxx.xxx.xxx] PHP Fatal error: Call to undefined function mb_strpos() in xxxxxxxx/extensions/StringFunctions/StringFunctions.php on line 160, referer: http://www.zs6ro.co.za/wiki/index.php?title=Event_intro&action=edit
I then changed my StringFunctions.php file back to the 'old' one but got the same error report ..
Line 160 of StringFunctions.php is '$ret = mb_strpos ( $inStr, $inNeedle, intval ( $inOffset ) );'
If I click on 'Current events' I get a mangled page ...
My wiki version is 1.12.0 ; My PHP version is 5.2.6 (apache2handler) ; MySQL version is 5.0.18-Max ...
My wiki webpage is 'http://www.zs6ro.co.za' .. Please advise and edit if required Gero .. Thanks ..
--Zs6ro 18:38, 10 May 2008 (CEST)
Reply
Sorry for the trouble you are having. My family convinced me to have a week of holiday starting tomorrow ;-), so I will come back to this issue the week after next week. Gero 01:46, 11 May 2008 (CEST)
Confusion??
Ok on the front page it reads: DPL should work under MW 1.12 and after with full functionality. Thanks to all who contributed to the necessary modifications in MW 1.12 / 1.13. If you use DPL with MW 1.12 or later and notice any differences compared to older MediaWIki versions: please report! But here on the discussion page it sounds like this is not entirely true because some of the issues people are having (Create event showing as html rather than input box) are being attributed to 1.12 breaking things. Could someone please clarify? I downloaded all the files again and imported the templates; i am using 1.12. Should things work now or do i still need to incorporate the line $wgParserConf['class'] = 'Parser_OldPP'; in my LocalSettings.php to get the calendar to work?
--Kay
By now it should work without the special configuration in your LocalSettings.php. If it doesn´t: please let us know! Gero 19:05, 28 May 2008 (CEST)
It does not work on my wiki without the Parser_OldPP line added. Based on the info on the Special Pages --> version here is my information:
- MediaWiki 1.12.0
- PHP 5.2.4
- MySQL 5.0.44sp1
- DPL2 1.7.4
- ParserFunctions 1.1.1 (i downloaded the version that said was for 1.12
- InputBox does not show a version
- StringFuntions 1.9.3
- Variables does not show a version
I also re-exported the template pages from here and deleted the pages on my wiki and reimported. All of them except one showed updated versions on import. The calendar itself looks ok but when you click on a date to add an event you see html code rather than the input box.
If you need any further information, please let me know.
--Kay Just to follow up again. YOu said if there were still issues to let you know, and i did but i haven't heard anything back and i'm not sure what to do from here on out. I would like to continue to be able to use DPL.. and specifically the Calendar but the calendar doesn't work on my wiki w/o the Parser_OldPP line and that line causes other things to break so i am rather at an impasse. If i don't get this sorted out i am going to have to remove the calendar and i'd really rather not do that if there is anyway to work around the problems without causing more.
--Kay
Ok. i was told to 'let us know' if the extension doesn't work. I did.. i gave all the details i know to give.. i've followed up left and right and can't get any responses.. and i'm at wit's end as to what to try now so it looks like i am going to have to do without the DPL calendar. If this ever gets fixed to work with 1.12 and without the Parser_OldPP line added to LocalSettings or someone has the time/inclination to help me work through this, i'd be very grateful but for the time being the broken 'Create events' page is causing too much confusion that i can't leave it there any longer.
--Kay
Sorry that you have such trouble. Currently I do not have much time for DPL due to many other obligations. But this will change again after summer. Gero 22:21, 10 June 2008 (CEST)
Namespace help!
I've been having significant issues with getting the calendar to work with different namespaces. I have a projects namespace that I wanted to have a calendar for and another namespace called Office that I've also created a calendar for. The calendar seems fine, however if I try to view the next month I get the following error:
%DPL-1.7.4-ERROR: Wrong '$0' parameter: 'namespace'! Help: $0= empty string (Main).
This is the URL: *hidden*/wiki/index.php/Special:Call/:Current_events%2Cyear%3D2008%2Cmonth%3D07%2Cbasepage%3DCurrent_events%2CeventList%3Dcurrent%2Cpurpose%3D%2Cnolink%3D%2Cnoadd%3D%2Cshow%3D%2Cnamespace%3DFASRO_Projects%2Cwidth%3D
This is my calendar definition:
{{:Current events|namespace=FASRO_Projects}}
Any help would be appreciated.
-Jeff
Gero - Help
Your reply ..
Sorry for the trouble you are having. My family convinced me to have a week of holiday starting tomorrow ;-), so I will come back to this issue the week after next week. Gero 01:46, 11 May 2008 (CEST)
Thought I would get back to you and ask again for help ...
If I click on my 'Current events' I get a mangled page ...
My wiki version is 1.12.0 ; My PHP version is 5.2.6 (apache2handler) ; MySQL version is 5.0.18-Max ...
My wiki webpage is 'http://www.zs6ro.co.za' .. Please advise and edit if required Gero .. Thanks ..
--Zs6ro 11:36, 2 August 2008 (CEST)
no days shown on calendar
Hi,
I'm having a problem with the calendar. It does not show any days below the weekday-abbreviatons, a link to Vorlage:Calendar/MonthStartMi appears above the calendar.
In the LocalSettings.php $wgLanguageCode = "de" is set, since the WIKI-users are from austria. The templates I use were exported from this WIKI (as recomended on the installation page) and imported in my WIKI without probs.
I've already deleted the temlates changed the $wgLanguageCode to "en" and did the import again. T´his did not help either.
Does anybody use the calender in a german Wiki? Can somebody help me to succeed with the installation?
Thank, Akos
PS.: my environmet : MediaWiki 1.13.1 PHP 5.1.2 (apache2handler) MySQL 5.0.26
--adomjan 11:21, 6 October 2008 (CEST)
Use of "#time|D" is incorrect
According to http://meta.wikimedia.org/wiki/ParserFunctions#.23time:
D An abbreviation for the day of the week. Rarely internationalised.
For example, for russian "time|D" is not "Mon-Sat" but is "Пн-Вс", and all based on templates "Calendar/MonthStartXX" failed. It will be good to use only number based parametrisation of template names, independent to localization. --StasFomin 11:46, 17 November 2008 (UTC)
How to show just the calendar?
I need to put the calendar alone on my frontpage without the actual list of current events. I've tried tampering with Current Events but I can't remove it without striking out everything. Any suggestions? It can't be that hard if you know what you're doing with the DPL-syntax and not just deleting stuff like me :)
--Martin 14:13, 3 March 2009 (GMT +1)
Figured it out - deleted the DPL-Query from Template:Calendar Month. Feel free to delete this at will.
--Martin 16:27, 3 March 2009 (GMT +1)
More event-categories
Hi,
I need two distinct event categories -- and I want them to appear in distinguishable ways in the calendar!
Here's what I've done so far:
- Changed Template:Event to take a parameter, so that my users can define one of two event types. (In this case, Community event or Industry event.
- Changed Template:Calendar_month to show two seperate lists of events (one for each type, yes!) by simply duplicating the dpl-query that outputs the sortable table with events and have these two lists get their contents from my two new categories.
Now, I can't figure out where the actual graphical calendar view selects it's pages. Obviously, a page must belong to the Event-category to appear there, and if I could figure out where that critieria is specified, maybe I could accomplish what I need. Like having community events show in color and industry events show in another. Then I can get rid of the base Event-category all together.
I hope someone has an idea for this!
--Martinfs 07:23, 9 September 2009 (UTC)
- Did you see that there is already a concept for different event types? You only need to use the "purpose" parameter and you have to assign your articles to the Event Category AND to your purose-categories. While the first happnes implicitly when calling the "Event" template, the latter must be done exolicitly. --Gero 11:40, 10 September 2009 (UTC)