Recent Changes - Search:

PmWiki

pmwiki.org

Blocklist-Talk

This is a talk page for improving Blocklist.


How do i configure the blocklist to also check third party cookbook scripts, in my case Cookbook.Guestbook? This scripts posts to pmwiki using the hidden field action=guestbook in the form.

So i have tried putting in tho local config:

$BlocklistActions['guestbook'] = 1;

But that does not get it working. If i try it manually by calling the blocklist from within the guestbook-script

global $Enablepost;
Blocklist($pagename,$some_text_string);
if ($Enablepost)
{
WritePage($datapagename,$rcpage);
}

Bas? May 05, 2008, at 03:52 PM


blocklist bug! I create SiteAdmin.Blocklist

SiteAdmin.Blocklist

  • block:caca.com

config.php

  • $EnableBlocklist = 1;

When I edit a page, the script "scripts / blocklist.php" is played ... caca.com but is added to the page ...

Help please!

the script never gets in the if clause as Enablepost is not set?

$EnablePost is set to 1 early in pmwiki.php. Do you have a standard pmwiki installation or there are some recipes which use a different mechanism for editing pages? --Petko February 15, 2012, at 01:58 AM

EDIT ! Thanks ! My problem is with the translation ;)

Vous pouvez m'écrire en français. Le Blocklist fonctionne sur plusieurs wikis. Je ne sais pas si Fox est compatible avec Blocklist, si vous modifiez des pages avec des formulaires Fox, je suppose qu'il faut demander au développeur HansB (en anglais ou en allemand). --Petko February 15, 2012, at 03:55 PM

Pour les activer Blocklist avec Fox je viens de faire $BlocklistActions['foxpost'] = 1; et ça marche !(dans config.php)


How do I temporarily disable the blocklist. I have a password-edit only site with HTML enabled and want(!) to be able to add javascript <script> tags etc. on my sidebar. I can re-enable it when my edit (add a searchbox) is done. $EnableBlocklist = 0; is not working. XES July 05, 2013, at 07:44 AM

Nevermind -- it was also enabled in a recipe.

I do not manage to get the automatic blocklist download working (pmwiki blocklist) A file SiteAdmin.Blocklist-pmwiki is created, but it is empty.

Any hints? Klonk November 06, 2013, at 01:25 PM

It should be SiteAdmin.Blocklist-PmWiki with proper capital letters, not all lowercase pmwiki. Use the following in config.php to download it. --Petko November 06, 2013, at 06:16 PM

  $EnableBlocklist = 10; # not 1
  $BlocklistDownload["$SiteAdminGroup.Blocklist-PmWiki"] = array('format' => 'pmwiki');

Sorry, a misspelling from my side. But see yourself how it looks like: http://www.loncarek.de/pages/SiteAdmin/Blocklist-PmWiki

Maybe I forgot some configuration? Or are there some special rights I have to give? Or modules to load/activate? Klonk November 07, 2013, at 01:24 AM

That group is password-protected so I cannot see the page and even if there is a page Blocklist-PmWiki. Do you have $EnableBlocklist = 10; and not 1? --Petko November 07, 2013, at 02:22 PM

Yes I have $EnableBlocklist = 10; And the only content of that created page is:

## blocklist-note:   NOTE: This page is automatically generated by blocklist.php
## blocklist-note:   NOTE: Any edits to this page may be lost!
## blocklist-url:    listDownloadUrl
## blocklist-when:   2013-11-09T08:13:10
#  blocklist-format: listFormat
listData

Klonk November 09, 2013, at 01:57 AM

Do you have a custom markup or a custom PageVariable called {$Block} in (farm)config.php, in a recipe or in a skin? It may get evaluated before the blocklist functions get to save the data. Disable that markup/variable and try again. --Petko November 09, 2013, at 03:57 AM

I haven't found anything. Disabled all recipes and skins - still does not work! After some more testing: For whatever reason sometimes it is loaded, sometimes not.... I have no idea. I use the fox cookbook reciepe and I don't know wheter blocklist works there anyways... Klonk November 10, 2013, at 06:06 AM

I haven't had the opportunity to review Fox. You should test if it works with the normal PmWiki editing mecanism. In the page content you posted above, instead of listDownloadUrl, listFormat and listData, PmWiki has $BlocklistDownloadUrl, $BlocklistFormat and $BlocklistData just before the downloaded list is saved to the page. Upon saving, these variables are replaced with their values, "http://www.pmwiki.org/blocklists/SiteAdmin.Blocklist-PmWiki", "pmwiki" and the content of SiteAdmin.Blocklist. The fact that you see listFormat means that in some of your *.php file(s) there is a variable $Block or {$Block} which is defined and is empty, so the "$Block" part from "$BlocklistFormat" is replaced with nothing, before the replacement of the full $BlocklistFormat which never happens. The fact that you see the time means that the $CurrentTimeISO variable is correctly replaced with the time. So the replacement works but there is a variable $Block that breaks some of the other variables. I would scan all *.php files looking for "$Block" in order to find it and deactivate it - eventually renaming it to something different. --Petko November 10, 2013, at 09:03 AM

Also note that PmWiki waits at least 24 hours before trying to download the data again. While testing you may want to set in config.php $BlocklistDownloadRefresh = -1; so that it will try to download the data at every save. When it works, remove this line. --Petko November 10, 2013, at 09:15 AM

It took me some time, but I guess, I found it. Seems to be bug in PmWiki!

The only position I found $Block was in pmwiki.php line 1483, in function FormatTableRow. There a global variable $Block was defined but nowhere used. Can you confirm that? If so, should I open a PITS issue or will you?

Earliest this evening I have access to my server to check whether removing the global variable $Block helps.

Thanks for your patience and help! Klonk November 21, 2013, at 05:27 AM

This is a nice catch, thanks. (I wonder how that function is triggered on your wiki and not on others.) No need to open a PITS entry, I just removed the variable for the next version. I hope that it will fix your blocklist problems. --Petko November 21, 2013, at 02:15 PM

This is a talk page for improving PmWiki.Blocklist.

Edit - History - Print - Recent Changes - Search
Page last modified on November 21, 2013, at 02:15 PM