login / register snippet help
underpressure - October 9, 2007 - 14:24
| Project: | Internet Services (with 2nd Edition) |
| Version: | 5.x-1.1 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | won't fix |
Jump to:
Description
Good day,
I'd like to implement the php snippet in the Internet_services theme into my own theme but unsure how to do it can you please assist me?
I tried placing the code from the search-theme-form.tpl.php into the page tpl directly but it didn't work.
here is your code:
<?php
global $user;
if (!$user->uid) {
$message .= '<div>' . t('Please <a href="@login">Login</a> or <a href="@register">Register</a>', array('@login' => url('user/login'), '@register' => url('user/register'))) . '</div>';
$message .= '<div>' . t('<a href="@password">Request New Password</a>', array('@password' => url('user/password'))) . '</div>';
}
else {
$message .= '<div>' . t('Welcome @user', array('@user' => $user->name)) . '</div>';
$message .= '<div>' . t('<a href="@view">View</a> | <a href="@edit">Edit</a> | <a href="@logout">Logout</a>', array('@view' => url('user/' . $user->uid), '@edit' => url('user/' . $user->uid . '/edit'), '@logout' => url('logout'))) . '</div>';
}
?><?php
function phptemplate_search_theme_form($form) {
return _phptemplate_callback('search-theme-form', array('form' => $form));
}
function internet_services_primary($items = array()) {
$menu = menu_get_item(variable_get('menu_primary_menu', 0));
$output = '<div class="title">' . $menu['title'] . '</div>';
$output .= theme('links', $items);
return $output;
}
?>
#1
May I have more information what are you going to do with?
#2
I have a custom theme for my website and I'd like to free up space in my left column by getting rid of the log in block.
I want to place the links to log in, register, my account as in the Internet_services theme in the upper most right hand corner of my theme.
I'd like it to be independent of the search form.
here is a suggestion someone made on how to do it: http://drupal.org/node/186424#comment-625378
#3