drupal views 2 theming: access other fields value in your field template

if you need access other fields in your field template, you can access them by

<?
echo $row->{$view->field[‘FIELD_ID’]->field_alias};
?>

You will be able to add some logic to your template like

<?

if($row->{$view->field[field_B_value]->field_alias})
{
echo $output  ;
}
else
{
echo “B is not available”;
}

?>

Note the ‘FIELD_ID’ can be something different depending on the field type. it can be “field_B_nid” (if it is node reference), or “field_B_value” if it is a regular text field, or “field_B_rating” (if a five star rating field). You can check all of your FIELD_ID by the following code

<?

foreach($view->field as $k=>$f){
echo $k;
}
exit;

?>

put the above code to your template file and view your view’s page url, you will see the output of the FIELD_ID of your fields.

the advantage of doing this instead of using directly $row->FIELD_ALIAS_NAME, is you don’t need update your views theme each time you update your view (for example, adding a new field), because the FIELD_ALIAS_NAME can change when fields are changed or reordered.

the credits go to vatavale at http://drupal.org/node/763620

good luck .

Read More

Windows 2003 Server can not access SharePoint Webdav Folder by UNC

Windows 2003 server has service “WebClient” disabled by default.
 
This service has to be on in order to access “File Share” by SharePoint Webdav. Below are the procedures to enable this service.
 
1. Login to the server with administrator account. Click Start–>Run, type in services.msc, press enter.
 
2. Locate the service called “WebClient”, Double click this service. The properties window will show up.
 
3. Change the Startup Type from Disabled to Automatic. Click Apply button on the bottom.
 
4. Click Start button. Make sure the service correctly (The Service Status should read Started).
 
5. Click OK to close the window.
 
6. Try to access the “File Share” again.

Read More