[pmwiki-devel] Upgrade cookbook recipes/markup

Petko Yotov 5ko at 5ko.fr
Wed Dec 6 11:40:20 PST 2023


I don't use this recipe, or WikiCalendar, but looked into it and it 
"should" have mostly worked.

I made a number of optimizations and minor changes and uploaded a new 
version. It appears to work up to PHP 8.3.0.

Notes about your message:

1. The Markup() registration is commented out, as well as the output 
inside the function, so it is not expected to do anything.

2. The recipe outputs a file Calendar.ics into the uploads/Calendar/ 
directory, only when a page in the "Calendar" wikigroup is edited and 
saved. Nothing is expected to show on your screen, just check that the 
file is saved in the directory at the time of the edit.

3. The recipe would fail if there is no uploads/Calendar/ directory. I 
now changed it to create such a directory if it doesn't exist.

4. If the file is not saved or not updated, you should check the 
permissions for the directory, although if you are able to upload files, 
it "should" work. In fact, the recipe uses the per-group upload 
directory (which is usual in PmWiki) but if you have custom per-page or 
per-wiki upload directories, the recipe's directory may be unexpected 
and may need permissions to be set.

I did not change this as existing users would have already subscribed to 
these files.

5. In the VCalendar event descriptions, the wikipage URLs were in a 
specific format so on some servers the links could possibly not open the 
correct wiki page. I have fixed this to show the actual URLs of the 
pages.

6. There was a call to the deprecated function utf8_decode(), but it 
should not be needed, as VCalendar files are expected to be in UTF-8. 
I've removed it; if the wiki is not in UTF-8, and the Vcalendar worked 
before, it should still work now.


I personally don't use WikiCalendar or VCalendar files but the Validator 
finds many errors in a sample file I generated. Somebody else should 
help with this:

   https://icalendar.org/validator.html

Petko


On 06/12/2023 18:00, Crisses wrote:
> It’s been a decade since I've done any PHP coding — so upgrading some
> wikis that were outdated I’m banging my head against obsoleted
> plug-ins.
> 
> Here’s one I’m at a loss with:
> 
> icalexport.php
> 
> The version on the site is not working, and I’m not sure what’s
> causing it to fail. A few things have changed between PHP versions and
> PmWiki versions that I’m not sure which is the problem.
> 
> Can anyone help with updating icalexport.php to be current? It’s
> probably something in the Markup() function not being parsed
> correctly, but there may be other PHP issues. It’s quite old and the
> recipe says “Stable”.
> 
> Thanks for any help,
> 
> Crisses
> 
> 
> 
> _______________________________________________
> pmwiki-devel mailing list
> pmwiki-devel at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-devel



More information about the pmwiki-devel mailing list