Not logged in. · Lost password · Register
Forum: Customising UNB Modifications and plug-ins RSS
global source code variables?
Avatar
madra #1
User title: pixel monkey
Member since Feb 2006 · 47 posts · Location: the intarweb
Group memberships: Members
Show profile · Link to this post
Subject: global source code variables?
is there a definitive list anywhere of all the variables accessible from within UNB?   the link on this page just goes back to the site frontpage

specifically i'm trying to embed a 'flickr badge' at the top of a page, but i want it only to show on one particular forum, so i need some way to test.  eg:


{ if <forumname or forumID == whatever> }
< show flickr badge >
{else}
< don't >
{endif}
**********************
work | play | discuss
**********************
Avatar
NFG #2
Member since Sep 2006 · 120 posts
Group memberships: Members
Show profile · Link to this post
Yves helped me out with exactly this question:

Custom changes for specific forums.  I use it for all kinds of changes to specific forums, including header image changes, and CSS changes for different colours.
Avatar
madra #3
User title: pixel monkey
Member since Feb 2006 · 47 posts · Location: the intarweb
Group memberships: Members
Show profile · Link to this post
i saw that thread yesterday, when i was looking for an answer to my own problem, but i couldnae get  the $HeaderForumID variable yves mentions to return a value.  in the end i hacked it with javascript, grabbing the forum ID off the end of the document.location:

<!-- next stobsaí hack - show flickr badge on ATPS pages -->
<script type="text/javascript">//<![CDATA[
// function to allow one JS file to be included by another
function includeJS(JSfile)
{{
document.write('<script type="text/javascript" src="'
    + JSfile + '"></scr' + 'ipt>');
}

var forumID = (new String(document.location)).substr(-2);
if(forumID == 26){{
document.write('<div class="flickrbadge" style="width:100% height:80px;"><table id="flickrbadgeinner" style="padding:6px;"><tr><td>');
includeJS("http://www.flickr.com/badge_code_v2.gne?show_name=1&count=6&display=random&size=s&layout=h&context=in%2Fpool-appletalker%2F&source=group&group=888453%40N24");
document.write('</td><td><a href="http://www.flickr.com/groups/appletalker/pool/" class="external" target="_blank"><img src="http://www.appletalker.net/grafix/ATPSlogowithtext.png" width="196" height="80" alt="ATPSlogo" style="padding-left:20px;"></a></td></tr></table></div>');
}
else
{{
        ;   
}
//]]></script>

</div>
<!-- end next stobsaí hack - show flickr badge on ATPS pages -->

t'would still be nice if yves bequeathed us a definitive list of available variables tho', before UNB finally gets abandoned in favour of the mythical UNB2.   ;-)
**********************
work | play | discuss
**********************
jense #4
Member since Nov 2006 · 327 posts · Location: Dortmund
Group memberships: Members
Show profile · Link to this post
A definitive list of every template variable, which is anywhere set, is attached (modulo plug-ins).

I'll try to narrow down the 'when is it set?' conditions... or anyone else?
Alala, Alala, Gimme three wishes - CSS
The author has attached one file to this post:
template-variables.list 9.6 kBytes
You have no permission to open this file.
jense #5
Member since Nov 2006 · 327 posts · Location: Dortmund
Group memberships: Members
Show profile · Link to this post
  • more or less common: 'head*' and 'foot*'
  • control panel: 'controlpanel*', 'userprofile*'
  • main: 'forumlist*'
  • post: 'posteditor*'
  • register: 'register*'
  • search: 'search*' (apart from 'searchForumTextBox': (also) main, thread)
  • stat: 'stat*'
  • thread: 'threadSplit*'
  • users: 'userlist*'

  • main, search, thread: 'announcelist*'
  • search, thread: 'postlist*' (apart from 'postlist', 'postlistSimple': (also) post)
  • main, search, stat: 'threadlist*'

Down to 30 items...
Alala, Alala, Gimme three wishes - CSS
The author has attached one file to this post:
template-variables-todo.list 416 Bytes
You have no permission to open this file.
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 180.5 ms (91 ms) · 63 database queries in 146.3 ms
Current time: 2012-02-08, 09:31:14 (UTC +01:00)