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


PHP Text::widget方法代码示例

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


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

示例1: foreach

        echo $group;
        ?>
">

                <div class="discover-arrow-left">
                    <a class="discover-arrow" href="#invest_on" rev="invest_on" rel="<?php 
        echo 'invest_on-' . $projects['prev'];
        ?>
">&nbsp;</a>
                </div>

                <?php 
        foreach ($projects['items'] as $project) {
            $url = SITE_URL . '/widget/project/' . $project->id;
            $widget_code = Text::widget($url . $lsuf);
            $widget_code_investor = Text::widget($url . '/invested/' . $user->id . '/' . $lsuf);
            ?>
                <div style="float:left;">
                      <?php 
            echo new View('view/project/widget/project.html.php', array('project' => $project, 'investor' => $user));
            ?>
                <br clear="both"/>
                <?php 
            if ($project->status > 2) {
                ?>
                      <div id="widget-code" style="float:none;width:250px;margin-left:25px;">
                          <div class="wc-embed" onclick="$('#widget_code').focus();$('#widget_code').select()"><?php 
                echo Text::get('dashboard-embed_code');
                ?>
</div>
                        <textarea id="widget_code" style="width:230px;margin:0 0 10px;" onclick="this.focus();this.select()" readonly="readonly"><?php 
开发者ID:anvnguyen,项目名称:Goteo,代码行数:31,代码来源:summary.html.php

示例2: array

 *
 *  Goteo is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Affero General Public License for more details.
 *
 *  You should have received a copy of the GNU Affero General Public License
 *  along with Goteo.  If not, see <http://www.gnu.org/licenses/agpl.txt>.
 *
 */
use Goteo\Core\View, Goteo\Model\Image, Goteo\Library\Text;
//@NODESYS
//@CALLSYS
$bodyClass = 'home';
// para que el prologue ponga el código js para botón facebook en el bannerside
$fbCode = Text::widget(Text::get('social-account-facebook'), 'fb');
// metas og: para que al compartir en facebook coja las imagenes de novedades
$ogmeta = array('title' => 'Goteo.org', 'description' => 'Goteo.org', 'url' => SITE_URL);
if (!empty($this['posts'])) {
    foreach ($this['posts'] as $post) {
        if (count($post->gallery) > 1) {
            foreach ($post->gallery as $pbimg) {
                if ($pbimg instanceof Image) {
                    $ogmeta['image'][] = $pbimg->getLink(500, 285);
                }
            }
        } elseif (!empty($post->image)) {
            $ogmeta['image'][] = $post->image->getLink(500, 285);
        }
    }
}
开发者ID:isbkch,项目名称:Goteo,代码行数:31,代码来源:index.html.php

示例3: urlencode

	use Goteo\Core\View,
        Goteo\Library\Text;

	$url = SITE_URL . '/widget/project/' . urlencode($this['project']->id);



    if (LANG != 'es')
        $url .= '?lang=' . LANG;

    if (isset($this['investor']) && is_object($this['investor'])) {
        $url .= '/invested/'.$this['investor']->id;
    }

	$widget_code = Text::widget($url);
?>
<script type="text/javascript">
	// Mark DOM as javascript-enabled
	jQuery(document).ready(function ($) { 
		/*$("#code").click(function(){
			$("#code").focus();
			$("#code").select();					
		});*/
		
	});
</script>
<div id="project-code">
    <?php
        // el proyecto de trabajo
        echo new View('view/project/widget/project.html.php', $this);
开发者ID:kenjs,项目名称:Goteo,代码行数:30,代码来源:embed.html.php


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