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


PHP te_short函数代码示例

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


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

示例1: te_link

        }
        ?>
					
					<?php 
        if ($context_menu_item->isCurrent()) {
            ?>
					<span class="submenu_current">
					<?php 
        }
        ?>
					
				<a href="<?php 
        echo te_link($context_menu_item->node);
        ?>
"><?php 
        echo te_short($context_menu_item->getTitle(), 25);
        ?>
</a><br/>
					
					<?php 
        if ($context_menu_item->isCurrent()) {
            ?>
					</span>
					<?php 
        }
        ?>
				
					<?php 
        if ($context_menu_item->node->getLevel() == 3) {
            ?>
					</div>
开发者ID:BackupTheBerlios,项目名称:thinkedit-svn,代码行数:31,代码来源:header.template.php

示例2: te_get_section_name

			<a class="<?php 
        echo te_get_section_name($my_relation);
        ?>
_sub" href="<?php 
        echo te_link($my_relation);
        ?>
" title="<?php 
        echo $my_relation->getTitle();
        ?>
">
<img src="<?php 
        echo te_design();
        ?>
/sources/fleche.gif">
<?php 
        echo te_short($my_relation->getTitle(), 25);
        ?>
</a>

			</div>

<?php 
    }
    ?>
</div>
<?php 
}
?>


开发者ID:BackupTheBerlios,项目名称:thinkedit-svn,代码行数:28,代码来源:sidebar.php

示例3: foreach

    foreach ($breadcrumb->getArray() as $menuitem) {
        ?>
				<?php 
        if ($menuitem->isEnd()) {
            ?>
					<?php 
            echo te_short($menuitem->getTitle(), 40);
            ?>
				<?php 
        } else {
            ?>
					<a href="<?php 
            echo $menuitem->getUrl();
            ?>
"><?php 
            echo te_short($menuitem->getTitle(), 20);
            ?>
</a>&gt;
				<?php 
        }
        ?>
		<?php 
    }
}
?>
<!--Parents &gt; Lectures &gt; Les &quot;temps d'arr&ecirc;t&quot;-->
</td>
</tr>
</table>
</td>
</tr>
开发者ID:BackupTheBerlios,项目名称:thinkedit-svn,代码行数:31,代码来源:header.template.php

示例4: te_short

            ?>
				
				
				
				<div class="intro">
				<?php 
            if ($sub_content->get('intro')) {
                ?>
				<?php 
                echo te_short($sub_content->get('intro'), 200);
                ?>
				<?php 
            } else {
                ?>
				<?php 
                echo te_short($sub_content->get('body'), 200);
                ?>
				<?php 
            }
            ?>
				<br/>
				<a href="<?php 
            echo te_link($child);
            ?>
" class="link_intro color100">Entrez &gt;</a>
				</div>
				<?php 
        }
        ?>
				
		<?php 
开发者ID:BackupTheBerlios,项目名称:thinkedit-svn,代码行数:31,代码来源:page.template.php

示例5: foreach

/*********** handle actions **********/
if ($url->get('action') == 'relate') {
    //echo 'I must relate';
    $target = $url->getObject('target_');
    $relation->relate($source, $target);
}
if ($url->get('action') == 'unrelate') {
    //echo 'I must relate';
    $target = $url->getObject('target_');
    $relation->unrelate($source, $target);
}
$relations = $relation->getRelations($source);
if ($relations) {
    foreach ($relations as $relation_object) {
        $relation_object->load();
        $item['title'] = te_short($relation_object->getTitle(), 50);
        $item['icon'] = $relation_object->getIcon();
        $url->set('action', 'unrelate');
        $url->addObject($relation_object, 'target_');
        $item['remove_url'] = $url->render();
        $out['relation']['data'][] = $item;
    }
}
$url = new url();
$url->set('mode', 'relation');
$out['browse_url'] = $url->render('browser.php');
debug($out, 'OUT');
debug($relations);
$out['title'] = 'Relations';
// include template file
include 'relation.template.php';
开发者ID:BackupTheBerlios,项目名称:thinkedit-svn,代码行数:31,代码来源:relation.php

示例6: foreach

        }
        //$nodes[] = $current_node->getChildren();
    }
}
if (isset($nodes) && is_array($nodes)) {
    $i = 0;
    foreach ($nodes as $node_item) {
        // reset node_info for next loop
        $node_info = false;
        /********************* Visit link *****************/
        $url = new url();
        $url->set('node_id', $node_item->getId());
        $content = $node_item->getContent();
        $content->load();
        $node_info['id'] = $node_item->getId();
        $node_info['title'] = te_short($node_item->getTitle(), 60);
        // . ' (' . $node_item->getOrder() . ')';
        $node_info['full_title'] = $node_item->getTitle();
        //$node_info['title'] .= $node_item->getLevel(); // . ' (' . $node_item->getOrder() . ')';
        $node_info['icon'] = $content->getIcon();
        $node_info['url'] = $url->render();
        $node_info['level'] = $node_item->getLevel() + 1;
        /********************* Visit link *****************/
        // a node can be "visited" only if it is allowed to add something inside it
        // else users could go inside a node and nothing could be done there
        if ($node_item->getAllowedItems()) {
            $url = new url();
            $url->set('node_id', $node_item->getId());
            $node_info['visit_url'] = $url->render();
        }
        /********************* Delete link *****************/
开发者ID:BackupTheBerlios,项目名称:thinkedit-svn,代码行数:31,代码来源:structure.php

示例7: te_short

            $class = "tr_on";
        }
        $i++;
        ?>

<tr class="<?php 
        echo $class;
        ?>
">

<td class="power_cell power_cell_border"><img src="<?php 
        echo $item['icon'];
        ?>
"/></td>
<td class="power_cell power_cell_border"><?php 
        echo te_short($item['title'], 30);
        ?>
</td>
<td class="power_cell power_cell_border">
<a class="action_button" href="<?php 
        echo $item['remove_url'];
        ?>
">
<img src="ressource/image/icon/small/list-remove.png">
<?php 
        echo translate('unrelate');
        ?>
</a>
</td>

</tr>
开发者ID:BackupTheBerlios,项目名称:thinkedit-svn,代码行数:31,代码来源:relation.template.php

示例8: foreach

    }
    // build a list of nodes within the current node :
    // if we are in root
    if ($we_are_root) {
        $nodes[] = $current_node;
    } else {
        if ($current_node->hasChildren()) {
            $nodes = $current_node->getChildren();
        }
    }
    if (isset($nodes) && is_array($nodes)) {
        $i = 0;
        foreach ($nodes as $node_item) {
            $content = $node_item->getContent();
            $content->load();
            $item['title'] = te_short($content->getTitle(), 40);
            $item['icon'] = $content->getIcon();
            $url = new url();
            $url->keep('class');
            $url->keep('mode');
            $url->set('node_id', $node_item->getId());
            $item['visit_url'] = $url->render();
            if ($mode == 'relation') {
                $url->addObject($node_item, 'target_');
                $url->set('action', 'relate');
                $item['url'] = $url->render('relation.php');
            }
            $out['items'][] = $item;
        }
    }
}
开发者ID:BackupTheBerlios,项目名称:thinkedit-svn,代码行数:31,代码来源:browser.php

示例9: strip_tags

$root = $thinkedit->newNode();
$root->loadRootNode();
echo '<title>' . strip_tags($root->getTitle()) . '</title>' . "\n";
echo '<link>TODO</link>' . "\n";
$root_content = $root->getContent();
echo '<description><![CDATA[' . "\n" . strip_tags($root_content->get('body')) . "\n" . ']]></description>';
echo '';
$db = $thinkedit->getDb();
$results = $db->select('select * from node where publish = 1 order by created_date desc, id desc limit 1, 20');
if ($results) {
    foreach ($results as $result) {
        $node = $thinkedit->newNode();
        $node->load($result['id']);
        echo '<item>' . "\n";
        echo '<title>' . ' <![CDATA[' . "\n" . $node->getTitle() . "\n" . ']]>' . '</title>' . "\n";
        echo '<link>' . ' <![CDATA[' . "\n" . 'http://' . $_SERVER["SERVER_NAME"] . te_link($node) . "\n" . ']]>' . '</link>' . "\n";
        $content = $node->getContent();
        $content->load();
        if ($content->get('intro')) {
            $intro = $content->get('intro');
        } elseif ($content->get('body')) {
            $intro = te_short($content->get('body'), 200);
        } else {
            $intro = 'no description available';
        }
        echo '<description>' . ' <![CDATA[' . "\n" . $intro . "\n" . ']]>' . '</description>' . "\n";
        echo '</item>' . "\n";
    }
}
echo '</channel>' . "\n";
echo '</rss>' . "\n";
开发者ID:BackupTheBerlios,项目名称:thinkedit-svn,代码行数:31,代码来源:rss.php

示例10: check_user

check_user();
if ($url->get('action') == 'init') {
    if (isset($_SERVER['HTTP_REFERER'])) {
        $session->set('action', 'relate');
        $session->set('referrer', $_SERVER['HTTP_REFERER']);
    } else {
        trigger_error('no referrer found, cannot relate currently');
    }
}
if ($url->get('action') == 'relate') {
    $session->delete('action');
    echo 'I need to do a relation';
}
if ($url->get('action') == 'cancel') {
}
$source = $url->getObject();
debug($source, 'Source');
require_once ROOT . '/class/relation.class.php';
$out['title'] = 'Relations';
$relation = new relation();
$relations = $relation->getRelations($source);
if ($relations) {
    foreach ($relations as $relation_object) {
        $item['title'] = te_short(20, $relation_object->getTitle());
        $item['icon'] = $relation_object->getIcon();
        $out['relation']['data'][] = $item;
    }
}
debug($out, 'OUT');
debug($relations);
die;
开发者ID:BackupTheBerlios,项目名称:thinkedit-svn,代码行数:31,代码来源:relate.php

示例11: foreach

        if (is_array($sibling_menu->getArray(true))) {
            ?>
								<?php 
            foreach ($sibling_menu->getArray(true) as $sibling_menu_item) {
                ?>
								<option value="<?php 
                echo $sibling_menu_item->getUrl();
                ?>
" <?php 
                if ($sibling_menu_item->isCurrent()) {
                    ?>
selected="selected"<?php 
                }
                ?>
><?php 
                echo te_short($sibling_menu_item->getTitle(), 50);
                ?>
</option>
								<?php 
            }
            ?>
						<?php 
        }
        ?>
				</select>
				<div style="margin-bottom: 30px;"></div>
		<?php 
    }
}
?>
开发者ID:BackupTheBerlios,项目名称:thinkedit-svn,代码行数:30,代码来源:content_header.php

示例12: te_design

                ?>
">
										<?php 
            } else {
                ?>
										<img src="<?php 
                echo te_design();
                ?>
/sources/vignette.gif">
										<?php 
            }
            ?>
										<br/>
										<div class="vignette_title">
										<?php 
            echo te_short($sub_content->getTitle(), 25);
            ?>
										</div>
										</a>
										</div>
		
						<?php 
        }
        ?>
				
				<?php 
    }
    ?>
		
<?php 
}
开发者ID:BackupTheBerlios,项目名称:thinkedit-svn,代码行数:31,代码来源:liste_vignettes.php

示例13: if

            	<?php if ($sub_content_file): ?>
            		<div class="cover_intro">
            		<a href="<?php echo te_link($child);?>">
            		<img src="<?php echo $sub_content_file->getThumbnail(array('w'=>80, 'h'=>80, 'zc'=>1)); ?>"/>
            		</a>
            		</div>
            	<?php endif; ?>
            <?php endif; ?>
            */
            ?>
				
				
				
				<div class="intro">
				<?php 
            echo te_short($sub_content->get('intro'), 120);
            ?>
				<br/>
				<a href="<?php 
            echo te_link($child);
            ?>
" class="link_intro color100">Entrez &gt;</a>
				</div>
				<?php 
        }
        ?>
				
		<?php 
    }
    ?>
		</div>
开发者ID:BackupTheBerlios,项目名称:thinkedit-svn,代码行数:31,代码来源:news.template.php


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