Learn all about themable functions, the views module and the crazy things you can do in the theme layer to make your site super cool.
about theme_breadcrumb http://api.drupal.org/api/HEAD/function/theme_breadcrumb
in template.php file
function phptemplate_breadcrumb($breadcrumb) { return _phptemplate_callback('breadcrumb', array('breadycrumb' => $breadcrumb));}
in breadcrumb.tpl.php file
<?php if(!empty($breadcrumb)){$output .= '<div class="breadcrumb">'. implode(' » ', $breadcrumb) .'</div>';}?>//basic print<?php print $output; ?>//print short form<?= $output ?>
the implode is putting the array into a string. Yes, you can change the weird character " »", which is the separator drupal uses in its original breadcrumb.
I got it to work after switching the parameters in the implode call.
<div class="breadcrumb"><?php print implode($breadcrumb, ' | ');?></div>
about them_user_profile http://api.drupal.org/api/HEAD/function/theme_user_profile
<div class="profile"> <?= $account->name ?> <?= theme('user_picture', $account) ?></div>
for permissions: in user_profile.tpl.php
<?php global $user; if($user->uid > 0){ // }?>
(user id 0 is always the anonymous user)
<?php global $user; if(user_access('')) { // } $result = db_query("SELECT n.nid FROM { node} n WHERE n.uid = $d n.type='BLOG' AND n.status = 1 ORDER BY n.created DESC", $account->uid); if(db_num_rows($result) > 0) { while ($row = db_fetch_object($result)) { $blog .= node_view(node_load(array('nid' => $row->nid)), true); } }?>
the software steve uses to code is zend. http://www.zend.com/products/zend_studio
about theme_user_list http://api.drupal.org/api/HEAD/function/theme_user_list Basically the profile listing page A good example of that: http://www.askaninja.com/profile (By default it shows a list of user names)
if you look at list reference on http://api.drupal.org, you will find out about where the functions are used. (only on core modules)
Comments
theme_breadcrumb
about theme_breadcrumb
http://api.drupal.org/api/HEAD/function/theme_breadcrumb
in template.php file
function phptemplate_breadcrumb($breadcrumb) {return _phptemplate_callback('breadcrumb', array('breadycrumb' => $breadcrumb));
}
in breadcrumb.tpl.php file
<?phpif(!empty($breadcrumb)){
$output .= '<div class="breadcrumb">'. implode(' » ', $breadcrumb) .'</div>';
}
?>
//basic print
<?php print $output; ?>
//print short form
<?= $output ?>
the implode is putting the array into a string.
Yes, you can change the weird character " »", which is the separator drupal uses in its original breadcrumb.
slight modification of breadcrumb.tpl.php
I got it to work after switching the parameters in the implode call.
<div class="breadcrumb"><?php
print implode($breadcrumb, ' | ');
?>
</div>
theme_user_profile
about them_user_profile
http://api.drupal.org/api/HEAD/function/theme_user_profile
<div class="profile"><?= $account->name ?>
<?= theme('user_picture', $account) ?>
</div>
for permissions:
in user_profile.tpl.php
<?phpglobal $user;
if($user->uid > 0){
//
}
?>
(user id 0 is always the anonymous user)
<?phpglobal $user;
if(user_access('')) {
//
}
$result = db_query("SELECT n.nid FROM { node} n WHERE n.uid = $d n.type='BLOG' AND n.status = 1 ORDER BY n.created DESC", $account->uid);
if(db_num_rows($result) > 0) {
while ($row = db_fetch_object($result)) {
$blog .= node_view(node_load(array('nid' => $row->nid)), true);
}
}
?>
In case you are wondering
the software steve uses to code is zend.
http://www.zend.com/products/zend_studio
theme_user_list
about theme_user_list
http://api.drupal.org/api/HEAD/function/theme_user_list
Basically the profile listing page
A good example of that: http://www.askaninja.com/profile
(By default it shows a list of user names)
if you look at list reference on http://api.drupal.org, you will find out about where the functions are used. (only on core modules)