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


PHP BigTree::trimLength方法代码示例

本文整理汇总了PHP中BigTree::trimLength方法的典型用法代码示例。如果您正苦于以下问题:PHP BigTree::trimLength方法的具体用法?PHP BigTree::trimLength怎么用?PHP BigTree::trimLength使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BigTree的用法示例。


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

示例1: foreach

    }
    ?>
	<?php 
    foreach ($list as $option) {
        ?>
	<option value="<?php 
        echo BigTree::safeEncode($option["value"]);
        ?>
"<?php 
        if ($field["value"] == $option["value"]) {
            ?>
 selected="selected"<?php 
        }
        if ($option["access_level"]) {
            ?>
 data-access-level="<?php 
            echo $option["access_level"];
            ?>
"<?php 
        }
        ?>
><?php 
        echo BigTree::safeEncode(BigTree::trimLength(strip_tags($option["description"]), 100));
        ?>
</option>
	<?php 
    }
    ?>
</select>
<?php 
}
开发者ID:kalle0045,项目名称:BigTree-CMS,代码行数:31,代码来源:list.php

示例2: foreach

		</li>
		<?php 
        $x++;
    }
    ?>
	</ul>
	<footer>
		<select>
			<?php 
    foreach ($list as $id => $title) {
        ?>
			<option value="<?php 
        echo BigTree::safeEncode($id);
        ?>
"><?php 
        echo BigTree::safeEncode(BigTree::trimLength(strip_tags($title), 100));
        ?>
</option>
			<?php 
    }
    ?>
		</select>
		<a href="#" class="add button"><span class="icon_small icon_small_add"></span>Add Item</a>
		<?php 
    if ($field["options"]["show_add_all"]) {
        ?>
		<a href="#" class="add_all button">Add All</a>
		<?php 
    }
    if ($field["options"]["show_reset"]) {
        ?>
开发者ID:kurt-planet,项目名称:BigTree-CMS,代码行数:31,代码来源:one-to-many.php

示例3: foreach

						<?php 
    $x++;
}
?>
					</ul>
					<footer>
						<select>
							<?php 
foreach ($callouts as $callout) {
    if (!in_array($callout["id"], $group["callouts"])) {
        ?>
							<option value="<?php 
        echo BigTree::safeEncode($callout["id"]);
        ?>
"><?php 
        echo BigTree::safeEncode(BigTree::trimLength(strip_tags($callout["name"]), 100));
        ?>
</option>
							<?php 
    }
}
?>
						</select>
						<a href="#" class="add button"><span class="icon_small icon_small_add"></span>Add Callout</a>
					</footer>
				</div>
			</fieldset>
		</section>
		<footer>
			<input type="submit" class="button blue" value="Update" />
		</footer>
开发者ID:kurt-planet,项目名称:BigTree-CMS,代码行数:31,代码来源:edit.php

示例4:

        echo $field["key"];
        ?>
[<?php 
        echo $x;
        ?>
][__internal-subtitle]" value="<?php 
        echo BigTree::safeEncode($item["__internal-subtitle"]);
        ?>
" />
				<span class="icon_sort"></span>
				<p>
					<?php 
        echo BigTree::trimLength(BigTree::safeEncode($item["__internal-title"]), 100);
        ?>
					<small><?php 
        echo BigTree::trimLength(BigTree::safeEncode($item["__internal-subtitle"]), 100);
        ?>
</small>
				</p>
				<a href="#" class="icon_delete"></a>
				<a href="#" class="icon_edit"></a>
			</li>
			<?php 
        $x++;
    }
    ?>
		</ul>
		<footer>
			<a href="#" class="add_item button"><span class="icon_small icon_small_add"></span>Add Item</a>
			<?php 
    if ($max) {
开发者ID:kalle0045,项目名称:BigTree-CMS,代码行数:31,代码来源:matrix.php

示例5: foreach

            $item[$key] = BigTree::untranslateArray(json_decode($val, true));
        } else {
            $item[$key] = $cms->replaceInternalPageLinks($val);
        }
    }
    if ($feed["options"]["link_gen"]) {
        $link = $feed["options"]["link_gen"];
        foreach ($item as $key => $val) {
            $link = str_replace("{" . $key . "}", $val, $link);
        }
    } else {
        $link = $item[$feed["options"]["link"]];
    }
    $content = $item[$feed["options"]["description"]];
    $limit = $feed["options"]["content_limit"] ? $feed["options"]["content_limit"] : 500;
    $blurb = BigTree::trimLength($content, $limit);
    ?>
		<item>
			<guid><?php 
    echo WWW_ROOT;
    ?>
feeds/<?php 
    echo $feed["route"];
    ?>
/<?php 
    echo $f["id"];
    ?>
</guid>
			<title><![CDATA[<?php 
    echo strip_tags($item[$feed["options"]["title"]]);
    ?>
开发者ID:kurt-planet,项目名称:BigTree-CMS,代码行数:31,代码来源:rss2.php

示例6: foreach

foreach ($entries as $entry) {
    ?>
		<li>
			<input type="hidden" name="<?php 
    echo $field["key"];
    ?>
[<?php 
    echo $x;
    ?>
]" value="<?php 
    echo htmlspecialchars(json_encode($entry));
    ?>
" />
			<span class="icon_sort"></span>
			<p><?php 
    echo BigTree::safeEncode(BigTree::trimLength(strip_tags(current($entry)), 100));
    ?>
</p>
			<a href="#" class="icon_delete"></a>
			<a href="#" class="icon_edit"></a>
		</li>
		<?php 
    $x++;
}
?>
	</ul>
	<footer>
		<a href="#" class="add button"><span class="icon_small icon_small_add"></span>Add Item</a>
	</footer>
</div>
<script>
开发者ID:matthisamoto,项目名称:Graphfan,代码行数:31,代码来源:array.php

示例7: sqlescape

    $search_term = $admin->makeIPL($search_term);
}
$w = "'%" . sqlescape($search_term) . "%'";
// Get the "Pages" results.
$r = $admin->searchPages($search_term, array("title", "resources", "meta_keywords", "meta_description", "nav_title"), "50");
$pages = array();
foreach ($r as $f) {
    $access_level = $admin->getPageAccessLevel($f["id"]);
    if ($access_level) {
        $res = json_decode($f["resources"], true);
        $bc = $cms->getBreadcrumbByPage($f);
        $bc_parts = array();
        foreach ($bc as $part) {
            $bc_parts[] = '<a href="' . ADMIN_ROOT . 'pages/view-tree/' . $part["id"] . '/">' . $part["title"] . '</a>';
        }
        $result = array("id" => $f["id"], "title" => $f["nav_title"], "description" => BigTree::trimLength(strip_tags($res["page_content"]), 450), "link" => ADMIN_ROOT . "pages/edit/" . $f["id"] . "/", "breadcrumb" => implode(" &rsaquo; ", $bc_parts));
        $pages[] = $result;
        $total_results++;
    }
}
if (count($pages)) {
    $results["Pages"] = $pages;
}
// Get every module's results based on auto module views.
$modules = $admin->getModules("name ASC");
foreach ($modules as $m) {
    // Get all auto module view actions for this module.
    $actions = $admin->getModuleActions($m);
    foreach ($actions as $action) {
        if ($action["view"]) {
            $view = BigTreeAutoModule::getView($action["view"]);
开发者ID:kurt-planet,项目名称:BigTree-CMS,代码行数:31,代码来源:search.php

示例8: isset

<?php

$admin->requireLevel(1);
$query = isset($_GET["query"]) ? $_GET["query"] : "";
$page = isset($_GET["page"]) ? $_GET["page"] : 1;
$pages = $admin->getSettingsPageCount($query);
$results = $admin->getPageOfSettings($page, $query);
foreach ($results as $item) {
    if (is_array($item["value"])) {
        $value = "&mdash; Click Edit To View &mdash;";
    } else {
        $value = BigTree::trimLength(strip_tags($item["value"]), 100);
    }
    ?>
<li>
	<section class="settings_name"><?php 
    echo $item["name"];
    ?>
</section>
	<section class="settings_value"><?php 
    echo $value;
    ?>
</section>
	<section class="view_action"><a href="<?php 
    echo ADMIN_ROOT;
    ?>
settings/edit/<?php 
    echo $item["id"];
    ?>
/" class="icon_edit"></a></section>
</li>
开发者ID:matthisamoto,项目名称:Graphfan,代码行数:31,代码来源:get-page.php


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