本文整理汇总了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'];
?>
"> </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
示例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);
}
}
}
示例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);