News:

Join the Facebook Fan Page.

Main Menu

Top Menu Bar Code

Started by nitecrawler, May 05, 2006, 12:18:51 AM

Previous topic - Next topic

nitecrawler

This is the code which generate a 'button like' with the text register:


// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo ($current_action == 'register' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'register' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=register">' , $txt[97] , '</a>
</td>' , $current_action == 'register' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


Similarly, I want to have a button before to Login and Register, as 'Add to Del.icio.us'. I've made a new variable in the themes/default/langauges/index.english as
$txt[001] = 'Add to Del.icio.us';

How do I retrieve the current document location and also the title. document.location.href and document.title can provide that, but I really do not know how to integrate Javascript into PHP. When I tried, it gave a parse error.  :(

Can anyone provide me the code to make this work?   8)

Thanks in advance..

Dannii

"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Advertisement: