Difference between revisions of "Talk:Test calendar"
(→ctype_alpha) |
(→ctype_alpha) |
||
Line 73: | Line 73: | ||
* MySQL: 5.0.20-Debian_1-log | * MySQL: 5.0.20-Debian_1-log | ||
===ctype_alpha=== | ===ctype_alpha=== | ||
− | ctype_alpha not available, had to add | + | '''function ctype_alpha not available''', had to add the following to Expr.php |
if ( !function_exists('ctype_alpha') ) { | if ( !function_exists('ctype_alpha') ) { | ||
function ctype_alpha($string) { | function ctype_alpha($string) { | ||
− | if ( !preg_match('|[^\pL]|', $string) ) | + | //if ( !preg_match('|[^\pL]|', $string) ) |
− | /* alternative: */ // if ( !preg_match('|[^A-Za-z]|', $string) ) | + | /* Warning: preg_match() [function.preg-match]: Compilation failed: PCRE does not support |
+ | \L, \l, \N, \P, \p, \U, \u, or \X at offset 3 in | ||
+ | /.../extensions/ParserFunctions/Expr.php on line 6 | ||
+ | */ | ||
+ | /* alternative: */ // | ||
+ | if ( !preg_match('|[^A-Za-z]|', $string) ) | ||
return true; | return true; | ||
else | else |
Revision as of 10:19, 11 August 2007
Contents
Customization questions
Some questions (--Eiland 15:44, 13 April 2007 (CEST)):
- I want the date syntax to be 2007-04-05 whatever event, so dashes instead of slashes; where do I modify this template?
- In Current events April 2007 replace the / by - in default=2007-04-05 my event name and titlematch=2007-04%
- In Template:Calendar link |titlematch={{{year}}}/{{{month}}}/{{{day}}}% into |titlematch={{{year}}}-{{{month}}}-{{{day}}}%
- Is it possible to make a template for upcoming events? So for example the 10 next upcoming events? Or the ten next days?
- Next ten days should be easy, as dpl can take several arguments for "titlematch". Create a template with the following code, and insert it in a page (you may change the "order" method at the last line, depending on how you want to see things):
{{#dpl:category=Events |titlematch={{#time:Y/m/d | +1 days}}%¦{{#time:Y/m/d | +2 days}}% |include=#Summary,#Participants |mode=userformat |resultsheader=There are %PAGES% events planned in the next 2 days. |noresultsheader=No events planned so far for the next 2 days. |listseparators=¶{¦ class="wikitable" ¶!Date / Event name ¶!Categories ¶!Event summary ¶!Participants,¶¦-¶¦<h5>[[%PAGE%]]</h5>¶¦ %CATLIST%,,¶¦} |secseparators=¶¦ |ordermethod=title |addcategories=true |order=descending }}--Ycombarnous 19:38, 16 April 2007 (CEST)
- Yep, thats it. Had some difficulty, before I remembered to replace the Y/m/d by Y-m-d's --Eiland 12:33, 17 April 2007 (CEST)
- Can these events be imported/RSSFeed' anywhere (maybe this is a DPL function?)
- On the monthly calendar layout, the date of the month could have __<<__ april __>>__-links for moving to the previous/next month.
- Not sure what you mean here, there is already a a link on both sides of the month name to go to the previous/next one? --Ycombarnous 19:38, 16 April 2007 (CEST)
- Ah, interesting, you're right. I don't have that. Is it another template? or is it the #ifexist phrase in Template:CalendarSingle? --12:33, 17 April 2007 (CEST)
- When you call the "CalendarSingle" template, you have to specify the "basepage" name. Below is the code it will use to find if there is a previous month page existing (basically, if current calendar month is May, it will look for "Basepage April 2007" article, and add a "previous" link if it exists):
{{#ifexist: {{{basepage}}} {{#time:F Y|{{{year}}}-{{{month}}}-03 -1 month}}|[[{{{basepage}}} {{#time:F Y|{{{year}}}-{{{month}}}-03 -1 month}}|<<]]|}}
- --Ycombarnous 12:43, 17 April 2007 (CEST)
- Is it possible that, when it not exist, it creates a new age, just like the new-event-form, according to a Template:Month? That would save me from copying-in all the months myself --Eiland 18:57, 17 April 2007 (CEST)
- --Ycombarnous 12:43, 17 April 2007 (CEST)
backlink
Maybe the individual event pages should contain a back-link to the calendar page? --Gero 07:01, 16 April 2007 (CEST)
- Or a little calendar on each page? Tobias Conradi 19:04, 10 August 2007 (CEST)
publishing the calendar templates
- Did you ever think of publishing these templates under wiki extensions "calendar" ?
--Gero 17:37, 16 April 2007 (CEST)
- I added them in Extension:Calendar. Do you think that's the right place? --Ycombarnous 17:56, 16 April 2007 (CEST)
- Yes, I thought of that place. Your calender solution competes very well with the other extensions around, I think. -- 84.58.213.243 20:50, 16 April 2007 (CEST)
The User:Hex2bit/Calendar may be a good choose
I would like to use User:Hex2bit/Calendar because it can creates calendar for each member using the wiki, but it cann't create a page with a title using the format like "03-01-2007". So anyone have ideas to solve the problem.
ISO 8601 conformance
Can the examples be changed to be ISO 8601 comform? [1] If it is ok, I would do the work. Tobias Conradi 18:58, 10 August 2007 (CEST)
- http://semeb.com/dpldemo/index.php?title=Template:Calendar_link&diff=prev&oldid=5339
- old: |titlematch={{{year}}}/{{{month}}}/{{{day}}}%
- did not work: new: |titlematch={{{year}}}/{{{month}}}/{{{day}}}%|{{{year}}}-{{{month}}}-{{{day}}}%
- {{{year}}}-{{{month}}}-{{{day}}}%
- http://semeb.com/dpldemo/index.php?title=Template%3ACalendar_month&diff=5361&oldid=5334
- old: |titlematch={{{year}}}/{{{month}}}/%
- did not work: new: |titlematch={{{year}}}/{{{month}}}/%|{{{year}}}-{{{month}}}-%
- new: |{{{year}}}-{{{month}}}-%
- old2: default=YYYY/mm/dd my event name
- new2: default=YYYY-mm-dd my event name
I was not able to create support of old and new format Tobias Conradi 02:57, 11 August 2007 (CEST)
ParserFunctions/Expr.php errors
- MediaWiki: 1.9.1
- PHP: 5.1.2-Debian-0.1~sarge1 (apache2handler)
- MySQL: 5.0.20-Debian_1-log
ctype_alpha
function ctype_alpha not available, had to add the following to Expr.php
if ( !function_exists('ctype_alpha') ) { function ctype_alpha($string) { //if ( !preg_match('|[^\pL]|', $string) ) /* Warning: preg_match() [function.preg-match]: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 3 in /.../extensions/ParserFunctions/Expr.php on line 6 */ /* alternative: */ // if ( !preg_match('|[^A-Za-z]|', $string) ) return true; else return false; } }
pregmatch
Warning: preg_match() [function.preg-match]: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 3 in /.../extensions/ParserFunctions/Expr.php on line 6
Tobias Conradi 11:00, 11 August 2007 (CEST)