Drupal is up and running but how do I ...?

Customized Search for Users... to include avitars

Hi guys,

I am working on customizing my USER search results to include avitars while leaving the CONTENT search result output alone.

Here is what I have so far:

This code passes search_item to phptemplate. It belongs in template.php

<?php
function phptemplate_search_item($user, $fields = array()) {
return _phptemplate_callback('search_item', array('user' => $user, 'fields' => $fields));
}
?>

Then I have another file, search_item.tpl.php, which uses an if else statement to output one type of search results for content searches, and a different output for user searches. What I tried to do was put my modified output in the if statement and the origonal search code (from search.module) into the else statement.

if (arg(0)=="search"&&arg(1)=="user") {  //modified search output for user searches
<div id="profilelist">
        <?php if($user->picture): 

endif;

if(!$user->picture):

endif;

print l(ucwords($user->name), 'user/'. $user->uid);
Name: print ucwords($user->profile_fname) print ucwords($user->profile_lname)
Location: print ucwords($user->profile_city) , print ucwords($user->profile_country)

}

else { //code taken from search.module
if (module_hook($type, 'search_item')) {
$output = module_invoke($type, 'search_item', $item);
}
else {
$output = '

'. check_plain($item['title']) .'

';
$info = array();
if ($item['type']) {
$info[] = $item['type'];
}
if ($item['user']) {
$info[] = $item['user'];
}
if ($item['date']) {
$info[] = format_date($item['date'], 'small');
}
if (is_array($item['extra'])) {
$info = array_merge($info, $item['extra']);
}
$output .= '

'. ($item['snippet'] ? '

'. $item['snippet'] . '

short news on drupal

do you know which modul, or how i (or users) can adding
short news which one will be shown in the side bar, on main page ?

e.g.: top middle in the: http://old.blackhole.sk, or left in the www.abclinuxu.cz and so on..

something like shoutbox, but it isnt good enought for this.

i search, but i cant find anything.

tnx very much.

find out what domain i'm on via php?

sorry folks, just haven't been able to find this on google.

i want to use php to identify what domain the user is coming from.

not what path, what domain.

imagine you had three subdomains all pointing to the same page.

is it happy.drupal.org, sad.drupal.org, or drupal.org?

depending on which it is, the user gets a message.

how could you create php conditional responses for those subdomains?

Search function never returns results.

Hello,

When I search, no matter what I enter, I never get any results. I can enter, verbatim, the titles of nodes, text in those nodes, words that appear on various pages 100s of times, and nothing ever comes up except search tips. Any ideas why?

Forrest

Character limit on frontpage leadin?

Hello everyone,

Is there a way to limit the amount of text that appears on the frontpage leadins? Right now, most seem to go until the first paragraph break. Maybe even a tag that would command the break without disrupting the layout.

Thanks!
Jen :)

htmlarea doesn't seem to work

I've installed Htmlarea module. Everything seems to be working properly, but the editor window doesn't come up on text areas.

I regularly post at another drupal website which uses this module and it works fine, so there is no problem with my browser.

Yes, I have selected the module, and permissions and default settings.

Is there anything else left to do?
Could it be something to do with Javascript?

thanks for all assists.
Jbc
eternalpurpose.org.uk

Pages

Subscribe with RSS Subscribe to RSS - Post installation