本文整理汇总了PHP中tidy_trim函数的典型用法代码示例。如果您正苦于以下问题:PHP tidy_trim函数的具体用法?PHP tidy_trim怎么用?PHP tidy_trim使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tidy_trim函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: HookResourceconnectCollectionsThumblistextra
function HookResourceconnectCollectionsThumblistextra()
{
global $usercollection;
$thumbs = sql_query("select * from resourceconnect_collection_resources where collection='{$usercollection}' order by date_added desc");
foreach ($thumbs as $thumb) {
?>
<!--Resource Panel-->
<div class="CollectionPanelShell">
<table border="0" class="CollectionResourceAlign"><tr><td>
<a target="main" href="../plugins/resourceconnect/pages/view.php?url=<?php
echo urlencode($thumb["url"]);
?>
&k=<?php
echo getval("k", "");
?>
&col=<?php
echo $usercollection;
?>
"><img border=0 src="<?php
echo $thumb["thumb"];
?>
" class="CollectImageBorder" /></a></td>
</tr></table>
<div class="CollectionPanelInfo"><a target="main" href="../plugins/resourceconnect/pages/view.php?url=<?php
echo urlencode($thumb["url"]);
?>
&k=<?php
echo getval("k", "");
?>
&col=<?php
echo $usercollection;
?>
"><?php
echo tidy_trim(i18n_get_translated($thumb["title"]), 15);
?>
</a> </div>
<div class="CollectionPanelInfo">
<a href="collections.php?resourceconnect_remove=<?php
echo $thumb["ref"];
?>
&nc=<?php
echo time();
?>
">x Remove</a></div>
</div>
<?php
}
}
示例2: get_nopreview_icon
<img border=0 src="../gfx/<?php
echo get_nopreview_icon($result[$n]["resource_type"], $result[$n]["file_extension"], true);
?>
"/><?php
}
?>
</a></td>
</tr></table>
<div class="CollectionPanelInfo"><a href="<?php
echo $baseurl_short;
?>
pages/view.php?ref=<?php
echo $rref;
?>
" onClick="return CentralSpaceLoad(this,true);"><?php
echo tidy_trim(i18n_get_translated($title), 15);
?>
</a> </div>
<?php
hook("relatedresourceaddlink");
?>
</div>
<?php
}
?>
<div class="clearerleft"> </div>
<a href="<?php
echo $baseurl_short;
?>
pages/search.php?search=<?php
示例3: highlightkeywords
<td><?php echo $lang["date"]?></td>
<td><?php echo $lang["news_headline"]?></td>
<td><?php echo $lang["news_body"]?></td>
<td><div class="ListTools"><?php echo $lang["tools"]?></div></td>
</tr>
<?php
for ($n=$offset;(($n<count($news)) && ($n<($offset+$per_page)));$n++)
{
?>
<tr>
<td><div class="ListTitle"><?php echo highlightkeywords($news[$n]["date"],$findtext,true);?></div></td>
<td><div class="ListTitle"><?php echo "<a href=\"" . $baseurl . "/plugins/news/pages/news.php?ref=" . $news[$n]["ref"] . "\">" . highlightkeywords($news[$n]["title"],$findtext,true);?></a></div></td>
<td><?php echo highlightkeywords(tidy_trim(htmlspecialchars($news[$n]["body"]),100),$findtext,true)?></td>
<td>
<div class="ListTools">
<a href="news_content_edit.php?ref=<?php echo $news[$n]["ref"]?>&backurl=<?php echo urlencode($url . "&offset=" . $offset . "&findtext=" . $findtext)?>">> <?php echo $lang["action-edit"]?> </a>
<a href="#" onclick="if (confirm('<?php echo $lang["confirm-deletion"]?>')) {document.getElementById('newsdelete').value='<?php echo $news[$n]["ref"]?>';document.getElementById('newsform').submit();} return false;">> <?php echo $lang["action-delete"]?></a>
</div>
</td>
</tr>
<?php
}
?>
</table>
</div>
<div class="BottomInpageNav"><?php pager(true); ?></div>
示例4: get_nopreview_icon
echo $baseurl;
?>
/gfx/<?php
echo get_nopreview_icon($result["resource_type"], $result["file_extension"], false, false, true);
?>
"
/><?php
}
?>
</a>
</td>
</tr>
</table>
<div class="ResourcePanelInfo"><?php
echo tidy_trim($title, 25);
?>
</div>
<div class="ResourcePanelIcons">
<span class="IconCollect"><a target="collections" href="<?php
echo $add_url;
?>
" onClick="return CollectionDivLoad(this,true);"><img src="../gfx/interface/sp.gif" alt="" width="22" height="12" /></a></span>
</div>
<div class="clearer"></div>
</div>
</div>
<?php
示例5: if
if (isset($metadata_template_title_field) && isset($metadata_template_resource_type))
{
if ($result[$n]['resource_type']==$metadata_template_resource_type)
{
$title=$result[$n]["field".$metadata_template_title_field];
$title_field=$metadata_template_title_field;
}
}
$field_type=sql_value("select type value from resource_type_field where ref=$title_field","");
if($field_type==8){
$title=strip_tags($title);
$title=str_replace(" "," ",$title);
}
?>
<?php if (!hook("replacecolresourcetitle")){?>
<div class="CollectionPanelInfo"><a onclick="return <?php echo ($resource_view_modal?"Modal":"CentralSpace") ?>Load(this,true);" href="<?php echo $baseurl_short?>pages/view.php?ref=<?php echo urlencode($ref) ?>&search=<?php echo urlencode("!collection" . $usercollection)?>&k=<?php echo urlencode($k) ?>" <?php if (!$infobox) { ?>title="<?php echo htmlspecialchars(i18n_get_translated($result[$n]["field".$view_title_field]))?>"<?php } ?> ><?php echo htmlspecialchars(tidy_trim(i18n_get_translated($title),14));?></a> </div>
<?php } ?>
<?php if ($k!="" && $feedback) { # Allow feedback for external access key users
?>
<div class="CollectionPanelInfo">
<span class="IconComment <?php if ($result[$n]["commentset"]>0) { ?>IconCommentAnim<?php } ?>"><a onclick="return CentralSpaceLoad(this,true);" href="<?php echo $baseurl_short?>pages/collection_comment.php?ref=<?php echo urlencode($ref) ?>&collection=<?php echo urlencode($usercollection) ?>&k=<?php echo urlencode($k) ?>"><img src="<?php echo $baseurl_short?>gfx/interface/sp.gif" alt="" width="14" height="12" /></a></span>
</div>
<?php } ?>
<?php if ($k=="") { ?><div class="CollectionPanelInfo">
<?php if (($feedback) || (($collection_reorder_caption || $collection_commenting))) { ?>
<span class="IconComment <?php if ($result[$n]["commentset"]>0) { ?>IconCommentAnim<?php } ?>"><a onclick="return CentralSpaceLoad(this,true);" href="<?php echo $baseurl_short?>pages/collection_comment.php?ref=<?php echo urlencode($ref) ?>&collection=<?php echo urlencode($usercollection) ?>"><img src="<?php echo $baseurl_short?>gfx/interface/sp.gif" alt="" width="14" height="12" /></a></span>
<?php } ?>
<?php if (!isset($cinfo['savedsearch'])||(isset($cinfo['savedsearch'])&&$cinfo['savedsearch']==null)){ // add 'remove' link only if this is not a smart collection
示例6: tidy_trim
</div></td>
</tr>
<?php
for ($n = $offset; $n < count($keywords) && $n < $offset + $per_page; $n++) {
?>
<tr>
<td><div class="ListTitle"><a href="team_related_keywords_edit.php?keyword=<?php
echo $keywords[$n]["keyword"];
?>
"><?php
echo $keywords[$n]["keyword"];
?>
</div></td>
<td><?php
echo tidy_trim(htmlspecialchars($keywords[$n]["related"]), 45);
?>
</td>
<td><div class="ListTools"><a href="team_related_keywords_edit.php?keyword=<?php
echo $keywords[$n]["keyword"];
?>
">> <?php
echo $lang["action-edit"];
?>
</a></div></td>
</tr>
<?php
}
?>
</table>
示例7: get_nopreview_icon
<img border=0 src="../gfx/<?php
echo get_nopreview_icon($result[$n]["resource_type"], $result[$n]["file_extension"], true);
?>
"/><?php
}
?>
</a></td>
</tr></table>
<div class="CollectionPanelInfo"><a href="<?php
echo $baseurl_short;
?>
pages/view.php?ref=<?php
echo $rref;
?>
" onClick="return CentralSpaceLoad(this,true);"><?php
echo tidy_trim(i18n_get_translated($title), $related_resources_title_trim);
?>
</a> </div>
<?php
hook("relatedresourceaddlink");
?>
</div>
<?php
}
?>
<div class="clearerleft"> </div>
<a href="<?php
echo $baseurl_short;
?>
pages/search.php?search=<?php
示例8: CentralSpaceLoad
echo $url;
?>
" onClick="return CentralSpaceLoad(this,true);" <?php
if (!$infobox) {
?>
title="<?php
echo str_replace(array("\"", "'"), "", htmlspecialchars(i18n_get_translated($value)));
?>
"<?php
}
//end if infobox
?>
><?php
}
//end link
echo highlightkeywords(tidy_trim(TidyList(i18n_get_translated($value)), 28), $search, $df[$x]['partial_index'], $df[$x]['name'], $df[$x]['indexed']);
if ($x == 0) {
// add link if necessary
?>
</a><?php
}
//end link
?>
</div><div class="clearer"></div>
<?php
}
}
?>
<?php
}
?>
示例9: urlencode
echo $baseurl_short;
?>
pages/view.php?ref=<?php
echo urlencode($ref);
?>
&search=<?php
echo urlencode("!collection" . $usercollection);
?>
&k=<?php
echo urlencode($k);
?>
" title="<?php
echo htmlspecialchars(i18n_get_translated($result[$n]["field" . $view_title_field]));
?>
"><?php
echo htmlspecialchars(tidy_trim(i18n_get_translated($title), 14));
?>
</a> </div>
<?php
}
?>
<?php
if ($k != "" && $feedback) {
# Allow feedback for external access key users
?>
<div class="CollectionPanelInfo">
<span class="IconComment <?php
if ($result[$n]["commentset"] > 0) {
?>
IconCommentAnim<?php
示例10: CentralSpaceLoad
echo $text[$n]["name"];
?>
&findpage=<?php
echo $findpage;
?>
&findname=<?php
echo $findname;
?>
&findtext=<?php
echo $findtext;
?>
&offset=<?php
echo $offset;
?>
" onClick="return CentralSpaceLoad(this,true);"><?php
echo highlightkeywords(tidy_trim(htmlspecialchars($text[$n]["text"]), 100), $findtext, true);
?>
</a></td>
<td><div class="ListTools"><a href="<?php
echo $baseurl_short;
?>
pages/team/team_content_edit.php?page=<?php
echo $text[$n]["page"];
?>
&name=<?php
echo $text[$n]["name"];
?>
&findpage=<?php
echo $findpage;
?>
示例11: format_display_field
function format_display_field($value){
// applies trim/wordwrap/highlights
global $results_title_trim,$results_title_wordwrap,$df,$x,$search;
$string=i18n_get_translated($value);
$string=TidyList($string);
$string=tidy_trim($string,$results_title_trim);
$wordbreaktag="<wbr>"; // $wordbreaktag="​" I'm having slightly better luck with <wbr>, but this pends more testing.
// Opera doesn't renders the zero-width space with a small box.
$extra_word_separators=array("_"); // only underscore is necessary (regex considers underscores not to separate words,
// but we want them to); I've based these transformations on an array just in case more characters act this way.
$ews_replace=array();
foreach($extra_word_separators as $extra_word_separator){
$ews_replace[]="{".$extra_word_separator." }";
}
//print_r($config_separators_replace);
$string=str_replace($extra_word_separators,$ews_replace,$string);
$string=wordwrap($string,$results_title_wordwrap,"#zwspace",false);
$string=str_replace($ews_replace,$extra_word_separators,$string);
$string=htmlspecialchars($string);
$string=highlightkeywords($string,$search,$df[$x]['partial_index'],$df[$x]['name'],$df[$x]['indexed']);
$ews_replace2=array();
foreach($extra_word_separators as $extra_word_separator){
$ews_replace2[]="{".$extra_word_separator."#zwspace}";
}
$ews_replace3=array();
foreach($extra_word_separators as $extra_word_separator){
$ews_replace3[]=$wordbreaktag.$extra_word_separator;
}
$string=str_replace($ews_replace2,$ews_replace3,$string);
$string=str_replace("#zwspace",$wordbreaktag." ",$string);
return $string;
}
示例12: hook
<?php
}
if ($display == "list") {
?>
<tr <?php
hook("collectionlistrowstyle");
?>
>
<?php
hook("listsearchpubliccheckboxes");
?>
<td nowrap><div class="ListTitle"><a href="<?php
echo $pub_url;
?>
"><?php
echo $lang["collection"] . ": " . highlightkeywords(tidy_trim(i18n_get_translated($collections[$n]["name"]), 45), $search);
?>
</a></div></td>
<?php
for ($x = 0; $x < count($df) - 1; $x++) {
?>
<td>-</td><?php
}
?>
<td>-</td>
<?php
if ($display_user_rating_stars && $k == "") {
?>
<td> </td><?php
}
?>
示例13: if
?>
<?php
// extended css behavior
if ( in_array($df[$x]['ref'],$thumbs_display_extended_fields) &&
( (isset($metadata_template_title_field) && $df[$x]['ref']!=$metadata_template_title_field) || !isset($metadata_template_title_field) ) ){ ?>
<?php if (!hook("replaceresourcepanelinfo")){?>
<div class="ResourcePanelInfo"><div class="extended">
<?php if ($x==0){ // add link if necessary ?><a href="<?php echo $url?>" onClick="return CentralSpaceLoad(this,true);" <?php if (!$infobox) { ?>title="<?php echo str_replace(array("\"","'"),"",htmlspecialchars(i18n_get_translated($value)))?>"<?php } //end if infobox ?>><?php } //end link
echo format_display_field($value);
?><?php if ($show_extension_in_search) { ?><?php echo " " . str_replace_formatted_placeholder("%extension", $result[$n]["file_extension"], $lang["fileextension-inside-brackets"])?><?php } ?><?php if ($x==0){ // add link if necessary ?></a><?php } //end link?> </div></div>
<?php } /* end hook replaceresourcepanelinfo */?>
<?php
// normal behavior
} else if ( (isset($metadata_template_title_field)&&$df[$x]['ref']!=$metadata_template_title_field) || !isset($metadata_template_title_field) ) {?>
<div class="ResourcePanelInfo"><?php if ($x==0){ // add link if necessary ?><a href="<?php echo $url?>" onClick="return CentralSpaceLoad(this,true);" <?php if (!$infobox) { ?>title="<?php echo str_replace(array("\"","'"),"",htmlspecialchars(i18n_get_translated($value)))?>"<?php } //end if infobox ?>><?php } //end link?><?php echo highlightkeywords(tidy_trim(TidyList(i18n_get_translated($value)),$search_results_title_trim),$search,$df[$x]['partial_index'],$df[$x]['name'],$df[$x]['indexed'])?><?php if ($x==0){ // add link if necessary ?></a><?php } //end link?> </div><div class="clearer"></div>
<?php } ?>
<?php
}
?>
<!-- Checkboxes -->
<div class="ResourcePanelIcons">
<?php if(!hook("thumbscheckboxes")){?>
<?php if ($use_checkboxes_for_selection){?><input type="checkbox" id="check<?php echo htmlspecialchars($ref)?>" class="checkselect" <?php if (in_array($ref,$collectionresources)){ ?>checked<?php } ?> onclick="if (jQuery('#check<?php echo htmlspecialchars($ref)?>').attr('checked')=='checked'){ AddResourceToCollection(<?php echo htmlspecialchars($ref)?>); } else if (jQuery('#check<?php echo htmlspecialchars($ref)?>').attr('checked')!='checked'){ RemoveResourceFromCollection(<?php echo htmlspecialchars($ref)?>); }"> <?php } ?>
<?php } # end hook thumbscheckboxes?>
<?php if ($display_resource_id_in_thumbnail && $ref>0) { echo htmlspecialchars($ref); } else { ?> <?php } ?>
</div>
<?php if (!hook("replaceresourcetools")){?>
示例14: i18n_get_collection_name
$collection_tag = $lang['collection'];
} else {
$collection_prefix = "";
# The prefix $lang['smartcollection'] . ": " is added in i18n_get_collection_name()
$collection_tag = $lang['smartcollection'];
}
if (!hook("replacelistviewcolresults")) {
?>
<td nowrap><div class="ListTitle"><a onClick="return CentralSpaceLoad(this,true);" href="<?php
echo $pub_url;
?>
" title="<?php
echo str_replace(array("\"", "'"), "", $collection_prefix . i18n_get_collection_name($collections[$n]));
?>
"><?php
echo $collection_prefix . highlightkeywords(tidy_trim(i18n_get_collection_name($collections[$n]), 45), $search);
?>
</a></div></td>
<?php
for ($x = 0; $x < count($df) - 1; $x++) {
?>
<td>-</td><?php
}
?>
<td>-</td>
<?php
if ($display_user_rating_stars && $k == "") {
?>
<td> </td><?php
}
?>
示例15: hook
{
?>
<tr <?php hook("collectionlistrowstyle");?>>
<?php hook ("listsearchpubliccheckboxes");
if ($use_checkboxes_for_selection){echo "<td></td>";}
if (!isset($collections[$n]['savedsearch'])||(isset($collections[$n]['savedsearch'])&&$collections[$n]['savedsearch']==null))
{
$collection_prefix = $lang["collection"] . ": ";
$collection_tag = $lang['collection'];
}
else
{
$collection_prefix = ""; # The prefix $lang['smartcollection'] . ": " is added in i18n_get_collection_name()
$collection_tag = $lang['smartcollection'];
}?>
<td nowrap><div class="ListTitle"><a onClick="return CentralSpaceLoad(this,true);" href="<?php echo $pub_url?>" title="<?php echo str_replace(array("\"","'"),"", $collection_prefix . i18n_get_collection_name($collections[$n]))?>"><?php echo $collection_prefix . highlightkeywords(tidy_trim(i18n_get_collection_name($collections[$n]),45),$search)?></a></div></td>
<?php
for ($x=0;$x<count($df)-1;$x++){
?><td>-</td><?php
}
?>
<td>-</td>
<?php if ($display_user_rating_stars && $k==""){ ?><td> </td><?php } ?>
<?php if ($id_column){?><td><?php echo $collections[$n]['ref']?></td><?php } ?>
<?php if ($resource_type_column){?><td><?php echo $collection_tag?></td><?php } ?>
<?php if ($date_column){?><td><?php echo nicedate($collections[$n]["created"],false,true)?></td><?php } ?>
<?php hook("addlistviewcolumnpublic");?>
<td><div class="ListTools">
<?php if (!hook("replacecollectiontools")){?>
<a href="<?php echo $baseurl_short?>pages/collections.php?collection=<?php echo $collections[$n]["ref"]?>" onClick="return CollectionDivLoad(this);">> <?php echo $lang["action-select"]?></a> <a onClick="return CentralSpaceLoad(this,true);" href="<?php echo $pub_url?>">> <?php echo $lang["viewall"]?></a>