当前位置: 首页>>代码示例>>PHP>>正文


PHP tpl_img_getTag函数代码示例

本文整理汇总了PHP中tpl_img_getTag函数的典型用法代码示例。如果您正苦于以下问题:PHP tpl_img_getTag函数的具体用法?PHP tpl_img_getTag怎么用?PHP tpl_img_getTag使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了tpl_img_getTag函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: hsc

echo $lang['img_copyr'];
?>
</label>
				<input type="text" name="meta[Iptc.CopyrightNotice]" id="copy" class="edit"
         value="<?php 
echo hsc(tpl_img_getTag(array('Iptc.CopyrightNotice', 'Exif.TIFFCopyright', 'Exif.Copyright')));
?>
" /><br />


				<label for="keywords"><?php 
echo $lang['img_keywords'];
?>
</label>
        <textarea name="meta[Iptc.Keywords]" id="keywords" class="edit"><?php 
echo hsc(tpl_img_getTag(array('IPTC.Keywords', 'EXIF.Category')));
?>
</textarea><br />


				<input type="submit" value="<?php 
echo $lang['btn_save'];
?>
" title="ALT+S"
         accesskey="s" class="button" />

			</form>
 		</div>


    <div class="footer">
开发者ID:BackupTheBerlios,项目名称:pyradm-svn,代码行数:31,代码来源:mediaedit.php

示例2: tpl_img

/**
 * Prints the image with a link to the full sized version
 *
 * Only allowed in: detail.php
 *
 * @triggers TPL_IMG_DISPLAY
 * @param $maxwidth  int - maximal width of the image
 * @param $maxheight int - maximal height of the image
 * @param $link bool     - link to the orginal size?
 * @param $params array  - additional image attributes
 * @return mixed Result of TPL_IMG_DISPLAY
 */
function tpl_img($maxwidth = 0, $maxheight = 0, $link = true, $params = null)
{
    global $IMG;
    global $INPUT;
    $w = tpl_img_getTag('File.Width');
    $h = tpl_img_getTag('File.Height');
    //resize to given max values
    $ratio = 1;
    if ($w >= $h) {
        if ($maxwidth && $w >= $maxwidth) {
            $ratio = $maxwidth / $w;
        } elseif ($maxheight && $h > $maxheight) {
            $ratio = $maxheight / $h;
        }
    } else {
        if ($maxheight && $h >= $maxheight) {
            $ratio = $maxheight / $h;
        } elseif ($maxwidth && $w > $maxwidth) {
            $ratio = $maxwidth / $w;
        }
    }
    if ($ratio) {
        $w = floor($ratio * $w);
        $h = floor($ratio * $h);
    }
    //prepare URLs
    $url = ml($IMG, array('cache' => $INPUT->str('cache')), true, '&');
    $src = ml($IMG, array('cache' => $INPUT->str('cache'), 'w' => $w, 'h' => $h), true, '&');
    //prepare attributes
    $alt = tpl_img_getTag('Simple.Title');
    if (is_null($params)) {
        $p = array();
    } else {
        $p = $params;
    }
    if ($w) {
        $p['width'] = $w;
    }
    if ($h) {
        $p['height'] = $h;
    }
    $p['class'] = 'img_detail';
    if ($alt) {
        $p['alt'] = $alt;
        $p['title'] = $alt;
    } else {
        $p['alt'] = '';
    }
    $p['src'] = $src;
    $data = array('url' => $link ? $url : null, 'params' => $p);
    return trigger_event('TPL_IMG_DISPLAY', $data, '_tpl_img_action', true);
}
开发者ID:neosunchess,项目名称:dokuwiki,代码行数:64,代码来源:template.php

示例3: getConfigFiles

                     <?php 
 $config_files = getConfigFiles('mediameta');
 foreach ($config_files as $config_file) {
     if (@file_exists($config_file)) {
         include $config_file;
     }
 }
 foreach ($fields as $key => $tag) {
     $t = array();
     if (!empty($tag[0])) {
         $t = array($tag[0]);
     }
     if (is_array($tag[3])) {
         $t = array_merge($t, $tag[3]);
     }
     $value = tpl_img_getTag($t);
     if ($value) {
         echo '<dt>' . $lang[$tag[1]] . ':</dt><dd>';
         if ($tag[2] == 'date') {
             echo dformat($value);
         } else {
             echo hsc($value);
         }
         echo '</dd>';
     }
 }
 ?>
                 </dl>
                 <?php 
 //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw'));
 ?>
开发者ID:cpolzer,项目名称:dokutwitterbootstrap,代码行数:31,代码来源:detail.php

示例4: hsc

    if ($t) {
        print '<dt>' . $lang['img_copyr'] . ':</dt><dd>' . hsc($t) . '</dd>';
    }
    $t = tpl_img_getTag('File.Format');
    if ($t) {
        print '<dt>' . $lang['img_format'] . ':</dt><dd>' . hsc($t) . '</dd>';
    }
    $t = tpl_img_getTag('File.NiceSize');
    if ($t) {
        print '<dt>' . $lang['img_fsize'] . ':</dt><dd>' . hsc($t) . '</dd>';
    }
    $t = tpl_img_getTag('Simple.Camera');
    if ($t) {
        print '<dt>' . $lang['img_camera'] . ':</dt><dd>' . hsc($t) . '</dd>';
    }
    $t = tpl_img_getTag(array('IPTC.Keywords', 'IPTC.Category', 'xmp.dc:subject'));
    if ($t) {
        print '<dt>' . $lang['img_keywords'] . ':</dt><dd>' . hsc($t) . '</dd>';
    }
    ?>
      </dl>
      <?php 
    //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw'));
    ?>
    </div>

  <?php 
}
?>
  </div>
</div>
开发者ID:omusico,项目名称:isle-web-framework,代码行数:31,代码来源:detail.php

示例5: tpl_includeFile

                    <?php 
tpl_includeFile('pageheader.html');
?>
                    <!-- detail start -->
                    <?php 
if ($ERROR) {
    echo '<h1>' . $ERROR . '</h1>';
} else {
    ?>
                        <?php 
    if ($REV) {
        echo p_locale_xhtml('showrev');
    }
    ?>
                        <h1><?php 
    echo nl2br(hsc(tpl_img_getTag('simple.title')));
    ?>
</h1>

                        <?php 
    tpl_img(900, 700);
    /* parameters: maximum width, maximum height (and more) */
    ?>

                        <div class="img_detail">
                            <?php 
    tpl_img_meta();
    ?>
                            <dl>
                            <?php 
    echo '<dt>' . $lang['reference'] . ':</dt>';
开发者ID:kevinlovesing,项目名称:dokuwiki,代码行数:31,代码来源:detail.php

示例6: str_replace

    $back_to = str_replace('action', 'action btn btn-success', $back_to);
    $media_mgr = str_replace('action', 'action btn btn-default', $media_mgr);
    echo $back_to . "\n" . $media_mgr;
    ?>
          </div>

          <div class="modal fade" tabindex="-1" id="detail-dialog" role="dialog">
            <div class="modal-dialog">
              <div class="modal-content">
                <div class="modal-header">
                  <button type="button" class="close" data-dismiss="modal" aria-label="<?php 
    echo $lang['js']['mediaclose'];
    ?>
"><span aria-hidden="true">&times;</span></button>
                  <h4 class="modal-title"><i class="fa fa-fw fa-info-circle text-primary"></i> <?php 
    echo hsc(tpl_img_getTag('IPTC.Headline', $IMG));
    ?>
</h4>
                </div>
                <div class="modal-body">

                  <?php 
    tpl_img_meta();
    //Comment in for Debug
    //dbg(tpl_img_getTag('Simple.Raw'));
    ?>

                  <hr/>

                  <dl class="dl-horizontal">
                    <?php 
开发者ID:huksley,项目名称:dokuwiki-template-bootstrap3,代码行数:31,代码来源:detail.php

示例7: array_merge

        }
        if (is_array($tag[3])) {
            $t = array_merge($t, $tag[3]);
        }
        $value = tpl_img_getTag($t);
        if ($value) {
            echo '<dt>' . $lang[$tag[1]] . ':</dt><dd>';
            if ($tag[2] == 'date') {
                echo dformat($value);
            } else {
                echo hsc($value);
            }
            echo '</dd>';
        }
    }
    $t_array = media_inuse(tpl_img_getTag('IPTC.File.Name', $IMG));
    if (isset($t_array[0])) {
        echo '<dt>' . $lang['reference'] . ':</dt>';
        foreach ($t_array as $t) {
            echo '<dd>' . html_wikilink($t, $t) . '</dd>';
        }
    }
    ?>
                    </dl>
                    <?php 
    //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw'));
    ?>
                </div>
                <div class="clearer"></div>
            </div><!-- /.content -->
开发者ID:RJWoodhead,项目名称:dokuwiki-template-monobook,代码行数:30,代码来源:inc_detail.php

示例8: hsc

    if ($t) {
        print '<dt>' . $lang['img_copyr'] . ':</dt><dd>' . hsc($t) . '</dd>';
    }
    $t = tpl_img_getTag('File.Format');
    if ($t) {
        print '<dt>' . $lang['img_format'] . ':</dt><dd>' . hsc($t) . '</dd>';
    }
    $t = tpl_img_getTag('File.NiceSize');
    if ($t) {
        print '<dt>' . $lang['img_fsize'] . ':</dt><dd>' . hsc($t) . '</dd>';
    }
    $t = tpl_img_getTag('Simple.Camera');
    if ($t) {
        print '<dt>' . $lang['img_camera'] . ':</dt><dd>' . hsc($t) . '</dd>';
    }
    $t = tpl_img_getTag(array('IPTC.Keywords', 'IPTC.Category'));
    if ($t) {
        print '<dt>' . $lang['img_keywords'] . ':</dt><dd>' . hsc($t) . '</dd>';
    }
    ?>
      </dl>
      <?php 
    //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw'));
    ?>
    </div>

  <?php 
}
?>
  </div>
</div>
开发者ID:bomberstudios,项目名称:green-theme-for-dokuwiki,代码行数:31,代码来源:detail.php

示例9: media_metaform

/**
 * Display the form to edit image meta data
 *
 * @author Andreas Gohr <andi@splitbrain.org>
 * @author Kate Arzamastseva <pshns@ukr.net>
 */
function media_metaform($id, $auth)
{
    global $lang;
    if ($auth < AUTH_UPLOAD) {
        echo '<div class="nothing">' . $lang['media_perm_upload'] . '</div>' . NL;
        return false;
    }
    // load the field descriptions
    static $fields = null;
    if (is_null($fields)) {
        $config_files = getConfigFiles('mediameta');
        foreach ($config_files as $config_file) {
            if (@file_exists($config_file)) {
                include $config_file;
            }
        }
    }
    $src = mediaFN($id);
    // output
    $form = new Doku_Form(array('action' => media_managerURL(array('tab_details' => 'view'), '&'), 'class' => 'meta'));
    $form->addHidden('img', $id);
    $form->addHidden('mediado', 'save');
    foreach ($fields as $key => $field) {
        // get current value
        if (empty($field[0])) {
            continue;
        }
        $tags = array($field[0]);
        if (is_array($field[3])) {
            $tags = array_merge($tags, $field[3]);
        }
        $value = tpl_img_getTag($tags, '', $src);
        $value = cleanText($value);
        // prepare attributes
        $p = array();
        $p['class'] = 'edit';
        $p['id'] = 'meta__' . $key;
        $p['name'] = 'meta[' . $field[0] . ']';
        $p_attrs = array('class' => 'edit');
        $form->addElement('<div class="row">');
        if ($field[2] == 'text') {
            $form->addElement(form_makeField('text', $p['name'], $value, $lang[$field[1]] ? $lang[$field[1]] : $field[1] . ':', $p['id'], $p['class'], $p_attrs));
        } else {
            $att = buildAttributes($p);
            $form->addElement('<label for="meta__' . $key . '">' . $lang[$field[1]] . '</label>');
            $form->addElement("<textarea {$att} rows=\"6\" cols=\"50\">" . formText($value) . '</textarea>');
        }
        $form->addElement('</div>' . NL);
    }
    $form->addElement('<div class="buttons">');
    $form->addElement(form_makeButton('submit', '', $lang['btn_save'], array('accesskey' => 's', 'name' => 'mediado[save]')));
    $form->addElement('</div>' . NL);
    $form->printForm();
    return true;
}
开发者ID:yjliugit,项目名称:dokuwiki,代码行数:61,代码来源:media.php

示例10: tpl_img_getTag

?>
      <div class="content" style="width: <?php 
echo tpl_img_getTag('File.Width') + 10;
?>
px; padding-top: 15px;">
      <center>
  <?php 
#tpl_img();
?>
  <img src="<?php 
echo ml($IMG);
?>
" width="<?php 
echo tpl_img_getTag('File.Width');
?>
" height="<? echo tpl_img_getTag('File.Height')?>">
  <br><br>Back to <?php 
echo tpl_pagelink($ID);
?>
<br><br>
      </center>
      </div>
    </div>

  <?php 
flush();
?>
</div>

<?php 
tpl_indexerWebBug();
开发者ID:BackupTheBerlios,项目名称:openaqua-svn,代码行数:31,代码来源:detail.php

示例11: media_metaform

/**
 * Display the form to edit image meta data
 *
 * @author Andreas Gohr <andi@splitbrain.org>
 */
function media_metaform($id, $auth)
{
    if ($auth < AUTH_UPLOAD) {
        return false;
    }
    global $lang, $config_cascade;
    // load the field descriptions
    static $fields = null;
    if (is_null($fields)) {
        foreach (array('default', 'local') as $config_group) {
            if (empty($config_cascade['mediameta'][$config_group])) {
                continue;
            }
            foreach ($config_cascade['mediameta'][$config_group] as $config_file) {
                if (@file_exists($config_file)) {
                    include $config_file;
                }
            }
        }
    }
    $src = mediaFN($id);
    // output
    echo '<h1>' . hsc(noNS($id)) . '</h1>' . NL;
    echo '<form action="' . DOKU_BASE . 'lib/exe/mediamanager.php" accept-charset="utf-8" method="post" class="meta">' . NL;
    formSecurityToken();
    foreach ($fields as $key => $field) {
        // get current value
        $tags = array($field[0]);
        if (is_array($field[3])) {
            $tags = array_merge($tags, $field[3]);
        }
        $value = tpl_img_getTag($tags, '', $src);
        $value = cleanText($value);
        // prepare attributes
        $p = array();
        $p['class'] = 'edit';
        $p['id'] = 'meta__' . $key;
        $p['name'] = 'meta[' . $field[0] . ']';
        // put label
        echo '<div class="metafield">';
        echo '<label for="meta__' . $key . '">';
        echo $lang[$field[1]] ? $lang[$field[1]] : $field[1];
        echo ':</label>';
        // put input field
        if ($field[2] == 'text') {
            $p['value'] = $value;
            $p['type'] = 'text';
            $att = buildAttributes($p);
            echo "<input {$att}/>" . NL;
        } else {
            $att = buildAttributes($p);
            echo "<textarea {$att} rows=\"6\" cols=\"50\">" . formText($value) . '</textarea>' . NL;
        }
        echo '</div>' . NL;
    }
    echo '<div class="buttons">' . NL;
    echo '<input type="hidden" name="img" value="' . hsc($id) . '" />' . NL;
    echo '<input name="do[save]" type="submit" value="' . $lang['btn_save'] . '" title="' . $lang['btn_save'] . ' [S]" accesskey="s" class="button" />' . NL;
    echo '<input name="do[cancel]" type="submit" value="' . $lang['btn_cancel'] . '" title="' . $lang['btn_cancel'] . ' [C]" accesskey="c" class="button" />' . NL;
    echo '</div>' . NL;
    echo '</form>' . NL;
}
开发者ID:lorea,项目名称:Hydra-dev,代码行数:67,代码来源:media.php

示例12: tpl_img

/**
 * Prints the image with a link to the full sized version
 *
 * Only allowed in: detail.php
 */
function tpl_img($maxwidth = 0, $maxheight = 0)
{
    global $IMG;
    $w = tpl_img_getTag('File.Width');
    $h = tpl_img_getTag('File.Height');
    //resize to given max values
    $ratio = 1;
    if ($w >= $h) {
        if ($maxwidth && $w >= $maxwidth) {
            $ratio = $maxwidth / $w;
        } elseif ($maxheight && $h > $maxheight) {
            $ratio = $maxheight / $h;
        }
    } else {
        if ($maxheight && $h >= $maxheight) {
            $ratio = $maxheight / $h;
        } elseif ($maxwidth && $w > $maxwidth) {
            $ratio = $maxwidth / $w;
        }
    }
    if ($ratio) {
        $w = floor($ratio * $w);
        $h = floor($ratio * $h);
    }
    //prepare URLs
    $url = ml($IMG, array('cache' => $_REQUEST['cache']));
    $src = ml($IMG, array('cache' => $_REQUEST['cache'], 'w' => $w, 'h' => $h));
    //prepare attributes
    $alt = tpl_img_getTag('Simple.Title');
    $p = array();
    if ($w) {
        $p['width'] = $w;
    }
    if ($h) {
        $p['height'] = $h;
    }
    $p['class'] = 'img_detail';
    if ($alt) {
        $p['alt'] = $alt;
        $p['title'] = $alt;
    } else {
        $p['alt'] = '';
    }
    $p = buildAttributes($p);
    print '<a href="' . $url . '">';
    print '<img src="' . $src . '" ' . $p . '/>';
    print '</a>';
    return true;
}
开发者ID:jalemanyf,项目名称:wsnlocalizationscala,代码行数:54,代码来源:template.php


注:本文中的tpl_img_getTag函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。