/[drupal]/contributions/modules/image_filter/image_filter.module
ViewVC logotype

Diff of /contributions/modules/image_filter/image_filter.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.25, Mon Oct 15 04:41:29 2007 UTC revision 1.26, Sat Oct 20 20:17:15 2007 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: image_filter.module,v 1.24 2007/10/15 01:28:18 davidhull Exp $  // $Id: image_filter.module,v 1.25 2007/10/15 04:41:29 davidhull Exp $
3    
4  function image_filter_short_tip_translated() {  function image_filter_short_tip_translated() {
5    return t(    return t(
# Line 185  function image_filter_process($text) { Line 185  function image_filter_process($text) {
185        $img->link = $args['nolink']        $img->link = $args['nolink']
186          ? NULL          ? NULL
187          : ($linkid ? "node/$linkid" : "node/$img->nid");          : ($linkid ? "node/$linkid" : "node/$img->nid");
188          $img->caption = isset($args['caption'])
189            ? image_filter_attr_value($args['caption'], IMAGE_FILTER_STRING)
190            : NULL;
191    
192        $img_tag = theme("image_inline_img", $img);        $img_tag = theme("image_inline_img", $img);
193        $text = str_replace($match[0], $img_tag, $text);        $text = str_replace($match[0], $img_tag, $text);
# Line 199  function image_filter_process($text) { Line 202  function image_filter_process($text) {
202   * Displays a thumbnail with a link to the image.   * Displays a thumbnail with a link to the image.
203   */   */
204  function theme_image_inline_img($img) {  function theme_image_inline_img($img) {
205      drupal_add_css(drupal_get_path('module', 'image_filter') .'/image_filter.css');
206    
207    $imgtag = "<img src=\"$img->fileurl\"" .    $imgtag = "<img src=\"$img->fileurl\"" .
208      ($img->width ? " width=\"$img->width\"" : '') .      ($img->width ? " width=\"$img->width\"" : '') .
209      ($img->height ? " height=\"$img->height\"" : '') .      ($img->height ? " height=\"$img->height\"" : '') .
# Line 210  function theme_image_inline_img($img) { Line 215  function theme_image_inline_img($img) {
215      " title=\"$img->title\"" .      " title=\"$img->title\"" .
216      ($img->class ? " class=\"$img->class\"" : '') .      ($img->class ? " class=\"$img->class\"" : '') .
217      ($img->style ? " style=\"$img->style\"" : '') . " />";      ($img->style ? " style=\"$img->style\"" : '') . " />";
218    return ($img->link    if ($img->link) {
219            ? l($imgtag, $img->link, array(), NULL, NULL, TRUE, TRUE)      $imgtag = l($imgtag, $img->link, array(), NULL, NULL, TRUE, TRUE);
220            : $imgtag);    }
221      if (isset($img->caption)) {
222        $imgtag = "<div class=\"image_filter\">$imgtag<br />" .
223          "<div class=\"if_caption\">$img->caption</div></div>";
224      }
225      return $imgtag;
226  }  }
227    
228  // Local Variables:  // Local Variables:

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26

  ViewVC Help
Powered by ViewVC 1.1.2