1

Re: Instant Indicia

The Indicia download page now includes Instant Indicia. This is a modified version of Drupal 6 which provides you with a website tailored to biological recording purposes immediately after installation. Once installed, you just have to tick boxes to indicate which features you want (e.g. a recording form, list of latest images, forum etc) and you are pretty much done.

Download the tutorials as well from http://code.google.com/p/indicia/downloads/list for lots of information on getting started with Instant Indicia and Drupal!

John van Breda
Biodiverse IT

2

Re: Instant Indicia

Hi John

This looks an exciting development! However, I just tried installing and have hit some problems.

At the Configure Site page I first of all  got a message telling me to rename _helper_config.php to helper_config.php, which I did (but it seems odd).

Now I get the repeated warning: warning: preg_match() [function.preg-match]:

Compilation failed: unrecognized character after (?< at offset 10 in ......../httpdocs/sites/all/modules/iform/iform.module on line 89.

Cheers

Alan

Alan Hale
Aberystwyth

3

Re: Instant Indicia

Hi Alan
The _helper_config issue depends on your server permissions setup - if this can be done automatically then it is, otherwise it has to ask you to do it.
Can you check line 89 of your iform module please. It should read:

preg_match('/^node\/(?<nid>\d+)/', $item['link_path'], $matches);

If that is correct, then can you try setting up a test page on your server with the following code in it:

preg_match('/^node\/(?<nid>\d+)/', 'node/2', $matches);
print_r($matches);

That should output:
Array ( [0] => node/2 [nid] => 2 [1] => 2 )

Thanks

John van Breda
Biodiverse IT

4

Re: Instant Indicia

Hi John - yes, line 89 looks the same to me, but I re-typed it in just in case.

I've run the test script you provided - this fails to print anything.

Cheers

Alan

Alan Hale
Aberystwyth

5

Re: Instant Indicia

Hi,
Did you remember to wrap the code snippet in php tags?
Jim

6

Re: Instant Indicia

Hi Jim - yes I did. And if I put a print statement of my own in, it prints out.

I've  put the file with the code snippet in the site document root - should it go elsewhere?

Cheers

Alan

Alan Hale
Aberystwyth

7

Re: Instant Indicia

Hi Alan
No, anywhere should be fine. It is simply a call to PHP's pattern matching system which should return the output in the $matches variable. It looks like your PHP version does not behave like mine for some reason. I'll Google a bit and get back to you.
Regards

John van Breda
Biodiverse IT

8

Re: Instant Indicia

Ah, just spotted something. Are you perhaps running PHP 5.2.1 or lower? If so, then there is a difference in handling of the match patterns which will affect this. The following should work:

<?php
preg_match('/^node\/(?P<nid>\d+)/', 'node/2', $matches);
print_r($matches);
?>

If this is the problem, then to fix Indicia you will need to open the iform.module file and insert the extra P on lines 86 and 106. You can view the differences in the file at http://code.google.com/p/indicia/source … orm.module. This will of course be fixed in the next release.

John van Breda
Biodiverse IT

9

Re: Instant Indicia

Hi John - yes, that code snippet works now. I'll modify the iform code later (currently struggling with upgrading my warehouse server! Been a while since I attended to it and I'm still on v.04).

Cheers

Alan

Alan Hale
Aberystwyth

10

Re: Instant Indicia

First reaction (now I've got past initial glitches on my system) - absolutely brilliant! Great work, John (and anyone else involved).

Alan Hale
Aberystwyth