Logos

Organization logos are uploaded via webform.  The URL is stored in the CiviCRM record, but the directory is in the webform directory.  Civi complains about this all the time, just ignore the complaint.

Image Styles

Ian attempted to apply image styles to the logo, when it is used in views.  It didn't work, but maybe something will someday.  Here was the code:

<?php
   if( isset($row->image_URL)) {
    $logoURL = $row->image_URL;
    $filename = substr(strrchr ( $logoURL, '/' ),1);
    $img_path = file_build_uri('/webform/' . $filename);

        $image_dimensions = getimagesize($row->image_URL);
        $img_setting = array('style_name'=>'pnn_thumbnail',
                                       'path'=>$img_path,
                                        'width'=>$image_dimensions[0],
                                        'height'=>$image_dimensions[1],
                                       );
        print theme('image_style',$img_setting);
        //echo(var_export($img_setting,true));
   }
?>

Create scaled versions

Heather's code will check to see if a scaled version is already created, if not it will be created and stored.  Not elegant, but it works.  Ideally this would be moved out of the view and into a module, because it is being repeated in a lot of displays.

Whether you're looking for volunteer opportunities,
networking events or a job in the nonprofit sector, we can help.

VolunteerEventsJobs