Forumlar / Cotonti / Extensions / Own Plugin Tag in BEGIN: USER

scriptor
#1 2010-07-28 01:04
I want to set a TAG in the Template in the Part:
<!-- BEGIN: USER -->
{MY_PLUGIN_TAG}
<!-- END: USER-->

The Tag is in my Plugin.header.php

[BEGIN_SED_EXTPLUGIN]
Code=sociallike
Part=main
File=sociallike.header
Hooks=header.tags
Tags=header.tpl:{SLHEADER_SOCIALLIKESTART}
Minlevel=0
Order=11
[END_SED_EXTPLUGIN]

...

$t->assign("SLHEADER_SOCIALLIKENEWS",$itsactive);
$t->assign("SLHEADER_SOCIALLIKESTART",$START);

Can anyone help me?
[url=http://www.freak-forum.de]Freak-Forum.de[/url] - The Freakstyle Community<br />
[url=http://www.adelmann-solutions.com]adelmann-solutions, webdesign Freiburg[/url]
urlkiller
#2 2010-07-28 01:42
i encountered some Problems nesting the Comment-Tags in another...

Maybe you make the check if the user is logged in also in your Plugin...

if($userid!=0) {my tags}

<!-- BEGIN: USER -->
{REGULAR_TAGS}
<!-- END: USER-->
<!-- BEGIN: YOUR_TAGS-->
{YOUR_TAGS}
<!-- END: YOUR_TAGS-->
URL shortener: <a href="http://bbm.li/!7AD5C7">http://bbm.li/!7AD5C7</a>
GHengeveld
#3 2010-09-13 18:09
It's easy. In your plugin, just do this:

if($usr['id'] > 0)
{
$t->assign(array(-- YOUR TAGS --));
$t->parse('MAIN.USER');
}

Anything inside the USER block will be ignored if the user isn't logged. If the block will be nested inside another block, don't forget to update the parse to something like MAIN.PARENT.USER