Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Call a global from a global?

Quote Reply
Call a global from a global?
Hi all, as i understand is a global a peace of code like a function that is called when the tag for it is called.
I have 5 globals for 5 pics i can pass for every link.

Now i try to write another one that translate special code inside a textfield to something else like:
$tmp =~ s/\n/<BR>\n/g;
At this point i will translate something like [pic0] inside the textfield to something like ... img src=...
No prob so far.

But i ask myself if itīs possible to call a sub for my pics from here instead putting the whole code for getting a pic once again in a global?

Hope someone understands my problem and have a clue whatīs to do.

Quote Reply
Re: [Robert] Call a global from a global? In reply to
No, you can't call a global from within a global. What you could do is put your globals into a plugin, then those would be just functions in the module, and you can call other functions (which used to be your globals) without problems.

Iyengar Yoga Resources / GT Plugins