Not logged in. · Lost password · Register
Forum: Customising UNB Designs RSS
New Link in Template
Rumbelstilzchen #1
Member since Sep 2005 · 137 posts
Group memberships: Members
Show profile · Link to this post
Subject: New Link in Template
How can the content of
UnbLink("@smilie", null, true)
direktly be displayed in a template?

Without using this:
  1. <?php echo UnbLink("@smilie", null, true); ?>
Jugendkreis
petrosilius.de
Avatar
Yves (Administrator) #2
User title: UNB developer & webmaster
Member since Jan 2004 · 3814 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
I can't think of another way. What is "@smilie"?
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
Rumbelstilzchen #3
Member since Sep 2005 · 137 posts
Group memberships: Members
Show profile · Link to this post
smilie is a very simple plugin,
it creates an overview-page of all hidden smilies.
this overview can be opend as a popup by clicking the link in posteditor.html bzw. postlist.html

it's just because my useres requested more smilies and all of them don't fit in one line.

For now i will just use
forum.php?req=smilie
As this should work for all useres, when I release it

Off Topic:
Yves hast du meine Mail mit den XHTML/CSS-Fehlern bekommen?
Jugendkreis
petrosilius.de
Avatar
Yves (Administrator) #4
User title: UNB developer & webmaster
Member since Jan 2004 · 3814 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
If you have a plugin that adds this page, it can also set this variable for the use in templates. You can do something like this in your plugin code:

$UNB['TP']['myLinkVariable'] = UnbLink(bla);

Ja, die Mail hab ich bekommen, werd sie mir noch anschauen.
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
Rumbelstilzchen #5
Member since Sep 2005 · 137 posts
Group memberships: Members
Show profile · Link to this post
I have inserted
$UNB['TP']['myLinkSmilie'] = UnbLink("@smilie", null, true);
in smilie.inc.php

but when I insert
{$myLinkSmilie}
in posteditor.html, it's value won't be shown.

Therefore I'll leave it with the static Link...
I will release it today in the plugin-forum
Jugendkreis
petrosilius.de
Avatar
Yves (Administrator) #6
User title: UNB developer & webmaster
Member since Jan 2004 · 3814 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Did you do global $UNB; in your plugin function?
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
Rumbelstilzchen #7
Member since Sep 2005 · 137 posts
Group memberships: Members
Show profile · Link to this post
Yes I did - but it didn't work. For Now I've a workaround:

in smilie.lang.php I inserted:
$UNB_T['_smilie.link'] = UnbLink("@smilie", null, true);

and in posteditor.html I added
{tr "_smilie.link"}

I know it's not what lang-files are designed for, but it works ;-)
Jugendkreis
petrosilius.de
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
This board is powered by the Unclassified NewsBoard software, 20110527-dev, © 2003-2011 by Yves Goergen
Page created in 202 ms (100.9 ms) · 76 database queries in 147.2 ms
Current time: 2012-02-08, 08:52:57 (UTC +01:00)