[pmwiki-users] global variables

Marco Ferretti marco.ferretti at gmail.com
Thu Mar 9 11:08:30 CST 2006


On Thursday 09 March 2006 17:37, Patrick R. Michaud wrote:
> On Thu, Mar 09, 2006 at 05:28:21PM +0100, Marco Ferretti wrote:
> > Is there a way to set a variable that exists only in a field and not in
> > all the farm ?
>
> I suspect this isn't answering your question, but variables that are
> set in a field's local/config.php exist only for that field.
>
> > What I would like to achieve is to have is something like $FarmD but for
> > a field ( $FieldD ?? ) .
>
> If you're wanting it to be able to access files on disk (which is what
> $FarmD is used for), then $FieldD would always be '.' .  But again, I'm
> not sure that this is the answer you're looking for.  :-)
>
> Pm
>
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://host.pmichaud.com/mailman/listinfo/pmwiki-users

Ok,
Say I have this directory structure : 
/pmwiki
	/cookbook
		mystuff.php
	/fields
		/field1
			/cookbook ( symlink to ../../cookbook )
			/local
				config.php
			/foo
			
		/field2
			/cookbook ( symlink to ../../cookbook )
			/local
				config.php
			/foo

I want mystuff.php to be able to open 'foo' based on the field.
Based on what you say, provided i included mystuff.php in config.php , theese 
lines 

$location = "./foo";
opendir($location);

will open /pmwiki/fields/field1/foo or /pmwiki/fields/field2/foo depending on 
the field the user is in ?

that sounds great ...


-- 
You are so boring that when I see you my feet go to sleep.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : /pipermail/pmwiki-users/attachments/20060309/eb4b434c/attachment.bin 


More information about the pmwiki-users mailing list