Foren / Cotonti / Extensions / PHP.out?

geting $var

Dave
#1 19. Mai 2009, 21:48
i have standalone plugin (clan roster based on team plugin)


nothing special :p but i was trying to get $status @ index,

i fould @ neocrome.net:

Set the hook as global, for tags, you just use the {PHP.*} tag
Example, if your var is called $myvar in your plugin, you'll use {PHP.myvar} in your TPL files, or if your var is $out['myvar'] you'd use {PHP.out.myvar}

but {PHP.status} or {PHP.out.status} doesnt work... help ?

*bump*
Your advertisement here :-)

Cotonti Genoa based site: forgotten-garage.pl

Dieser Beitrag wurde von Dave (am 13. Juli 2009, 05:18, vor 15 Jahre) bearbeitet
Trustmaster
#2 13. Juli 2009, 06:40
It depends on when you link to that variable. In Cotonti <= 0.0.5 it has to be assigned before XTemplate object is constructed. In 0.0.6 there will be no such limitation.
May the Source be with you!
Lombi
#3 13. Juli 2009, 07:02
It also needs to exist globally or at least in that location. So if it's not in the location you want to place it in (whatever.tags) try to make that part global.

Then it'll work :)
<a href="http://www.domenlo.com">Surreal Art</a>
Dave
#4 13. Juli 2009, 12:33
i tryed Hooks=global, is that what u mean?
Your advertisement here :-)

Cotonti Genoa based site: forgotten-garage.pl
Trustmaster
#5 13. Juli 2009, 13:24
No, he meant it has to be in global scope.
May the Source be with you!
Dave
#6 13. Juli 2009, 13:30
mine english and php knowlage lack here :-/ so any tips how to do it?

*bump*
Your advertisement here :-)

Cotonti Genoa based site: forgotten-garage.pl

Dieser Beitrag wurde von Dave (am 13. Juli 2009, 21:29, vor 15 Jahre) bearbeitet
Trustmaster
#7 13. Juli 2009, 23:16
Wait 2 days for 0.0.6 release and {PHP.status} will work for you there.
May the Source be with you!
Dave
#8 25. Juli 2009, 01:43
# Trustmaster : Wait 2 days for 0.0.6 release and {PHP.status} will work for you there.

so will it be correct? atm i updated to: http://www.cotonti.com/downloads/releases/cotonti_genoa_6 and this isnt working :s

or simply should i try to make roster.index.php and include tags inside? and what about that global thing if its not Hooks=global? :s
Your advertisement here :-)

Cotonti Genoa based site: forgotten-garage.pl
Trustmaster
#9 25. Juli 2009, 03:42
It doesn't need Hooks=global. But that's really strange {PHP.status} doesn't work for you
May the Source be with you!
Dave
#10 25. Juli 2009, 04:05
i wont give up, ill keep trying ... thx for help, i hope i can count on u :P

Added 6 minutes later:

i tryed: {PHP.status} {PHP.out.q3roster} .. no result ...

ill try to make it like minichat, plugin.index.php (with tags inside)
Your advertisement here :-)

Cotonti Genoa based site: forgotten-garage.pl

Dieser Beitrag wurde von Dave (am 25. Juli 2009, 04:12, vor 15 Jahre) bearbeitet
Trustmaster
#11 25. Juli 2009, 05:34
Try assigning it a tag:
$t->assign('PLUGIN_ROSTER_STATUS', $status);
May the Source be with you!