> Well, I don't know if there's any strong reason to not cache SF forms
> - if displaying the name of the current user in a field is the only
> reason for it, that might go away sometime in the next few versions.
>
> Also, I don't think using "NOCACHE" will work in Semantic Calendar - I
> tried having essentially that code within the extension, and it didn't
> have any effect. But if anyone can get SC to disable caching by
> itself, please let me know.
>
Hmm. I've decided to comment out MagicNoCache extension from
LocalSettings.php and just after reloading calendar page
it's css seems to be missed (different font and no grid in calendar
table). Re-enabling the extension and calendar again looks
fine. Why did you come to conclusion that MagicNoCache doesn't work with
Semantic Calendar?
It works for me with MW 1.13.1.
My MagicNoCache.php is attached, so you can compare.
Dmitriy
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Semantic Forms" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/semantic-forms?hl=en
-~----------~----~----~----~------~----~------~--~---
'MagicNoCache',
'url' => 'http://www.mediawiki/wiki/Extension:MagicNoCache',
'author' => 'Kimon Andreou',
'description' => 'Adds a NOCACHE magic word to disable caching of certain pages.',
);
#decalre var to be used for hooks
$NoCache = new NoCache();
#register hooks
$wgHooks['MagicWordMagicWords'][] = array($NoCache, 'addMagicWord');
$wgHooks['MagicWordwgVariableIDs'][] = array($NoCache, 'addMagicWordId');
$wgHooks['LanguageGetMagic'][] = array($NoCache, 'addMagicWordLanguage');
$wgHooks['InternalParseBeforeLinks'][] = array($NoCache, 'checkForMagicWord');
#extension class
class NoCache
{
#constructor - empty
function NoCache() {}
#register the new magic word with the system
function addMagicWord(&$magicWords) {
$magicWords[] = 'MAG_NOCACHE';
return true;
}
#add the id
function addMagicWordId(&$magicWords) {
$magicWords[] = MAG_NOCACHE;
return true;
}
#set the magic word for the various languages - English is default
#todo: add more languages
function addMagicWordLanguage(&$magicWords, $langCode) {
switch($langCode) {
default:
$magicWords[MAG_NOCACHE] = array(0, '__NOCACHE__');
}
return true;
}
#ok, check to see if we have the magic word in the article
function checkForMagicWord(&$parser, &$text) {
global $wgOut;
$mw = MagicWord::get('MAG_NOCACHE');
#woohoo! we do! - now remove the word from the text
if (!in_array($action, array('edit', 'submit')) && $mw->matchAndRemove($text)) {
$parser->disableCache();
$wgOut->enableClientCache(false);
}
return true;
}
}