[support] $script empty for anonymous users
Davide Michel 'ZioBudda' Morelli
michel at ziobudda.net
Mon Mar 30 09:44:14 UTC 2009
Hi all, this is the first time that I see this thing: in my theme I have
these lines:
<?php echo $scripts; ?>
<script type="text/javascript" src="<?php echo $directory;
?>/js/onebip.js"></script>
All works for loggedin users, but $scripts is empty for the anonymous
users. Why this ? Why $scripts is empty for anonymous users ?
Now, to resolve this problem I have delete the line
<script type="text/javascript" src="<?php echo $directory;
?>/js/onebip.js"></script>
from my page.tpl.php file, and I have create a template.php file with
this code:
<?php
drupal_add_js("sites/all/themes/onebipv1/js/onebip.js");
?php>
and now all works. But why this ? If this is correct: how can I retrieve
the values of my themes directory ($directory in the page.tpl.file) ?
Tnx.
--
Michel 'ZioBudda' Morelli michel at ziobudda.net
Consulenza sistemistica in ambito OpenSource.
Sviluppo applicazioni web dinamiche (LAMP+Ajax)
Telefono: 0200619074
Telefono Cell: +39-3939890025 -- Fax: +39-0291390660
http://www.ziobudda.net ICQ: 58351764
http://www.ziobuddalabs.it Skype: zio_budda
http://www.ziodrupal.net MSN: michel at ziobuddalabs.it
JABBER: michel at ziobuddalabs.it
More information about the support
mailing list