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


PHP uihelper_resize_mk_img函数代码示例

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


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

示例1: render

    function render()
    {
        $data = unserialize(ModuleData::get('showcase'));
        $u = $data['featured_user_name'];
        $upage = PA::$url . '/user/' . $u;
        $up = $data['auto_user_picture_url'];
        $g = TypedGroupEntity::load_for_group($data['featured_group_id']);
        $gname = $g->attributes["name"]["value"];
        $gpage = PA::$url . '/group/gid=' . $data['featured_group_id'];
        $gp = $g->attributes["logo"]["value"];
        //PUT VIDEO STUFF HERE
        $b = TypedGroupEntity::load_for_group($data['featured_business_id']);
        $bname = $b->attributes["name"]["value"];
        $bpage = PA::$url . '/group/gid=' . $data['featured_business_id'];
        $bp = $b->attributes["logo"]["value"];
        $table = '<table width="100%%" border="0" cellpadding="0" cellspacing="0" style="background-color:#fff; padding-top:3px; padding-bottom:10px; ">
					  <tr>
						<th colspan="4" align="center" style="background-color:#999; color:#dfe2e3; padding:4px 0 4px 0;" scope="col">Featured Bar</th>
					  </tr>
					  <tr style="color:#000;">
						<td align="center"><b>User</b></td>
						<td align="center"><b>Group</b></td>
						<td align="center"><b>Video</b></td>
						<td align="center"><b>Business</b></td>
					  </tr>
					  <tr>
						<td align="center">%s</td>
						<td align="center">%s</td>
						<td align="center">%s</td>
						<td align="center">%s</td>
					  </tr>
					</table>';
        $user = "<a href='" . $upage . "'>" . uihelper_resize_mk_img($up, 100, 100, 'images/default.png', 'alt=PeopleAggregator') . "</a><h4>" . $data['featured_user_name'] . "</h4>";
        $group = "<a href='" . $gpage . "'>" . uihelper_resize_mk_img($gp, 100, 100, 'images/default.png', 'alt=PeopleAggregator') . "</a><h4>" . $gname . "</h4>";
        $video = "<a href='http://www.people.tdooner.com/'>" . uihelper_resize_mk_img('images/default.png', 100, 100, 'images/default.png', 'alt=PeopleAggregator') . "</a>";
        $business = "<a href='" . $bpage . "'>" . uihelper_resize_mk_img($bp, 100, 100, 'images/default.png', 'alt=PeopleAggregator') . "</a><h4>" . $bname . "</h4>";
        return sprintf($table, $user, $group, $video, $business);
    }
开发者ID:Cyberspace-Networks,项目名称:PeopleAggregator,代码行数:38,代码来源:ShowCaseModule.php

示例2: uihelper_resize_mk_img

    ?>
<div id="GroupsDirectoryModule">
  <div class="group_list">
    <table cellspacing="0" cellpadding="0">
     <?php 
    for ($i = 0; $i < $cnt; $i++) {
        $pic = $links[$i]['picture'];
        ?>
         
       <tr>   
         <td align="center" valign="top" width="80">
           <a href="<?php 
        echo PA::$url . PA_ROUTE_GROUP . '/gid=' . $links[$i]['group_id'];
        ?>
"><?php 
        echo uihelper_resize_mk_img($pic, 60, 55, "images/default_group.gif", 'alt="group image"', RESIZE_CROP);
        ?>
</a>
         </td>
              
         <td valign="top" width="415">
           <h2><a href="<?php 
        echo PA::$url . PA_ROUTE_GROUP . '/gid=' . $links[$i]['group_id'];
        ?>
"><?php 
        echo $links[$i]['title'];
        ?>
</a></h2>
               
         <?php 
        echo stripslashes($links[$i]['description']);
开发者ID:Cyberspace-Networks,项目名称:CoreSystem,代码行数:31,代码来源:cnmodule_group_info.php

示例3: build_list_of_items

 private function build_list_of_items($items)
 {
     $entity_attrs = array('user_id', 'giveuser_id', 'family_id', 'network_id', 'entity_id', 'category', 'description', 'media_cid', 'media_type', 'media_file', 'rating', 'place', 'updated', 'created');
     $results = array();
     $cnt = 0;
     foreach ($items as $item) {
         $results[$cnt]['entity_id'] = $item['entity_id'];
         $results[$cnt]['entity_name'] = $item['entity_name'];
         foreach ($entity_attrs as $attr) {
             $results[$cnt][$attr] = !empty($item['attributes'][$attr]['value']) ? $item['attributes'][$attr]['value'] : null;
         }
         $user = new User();
         $user->load((int) $results[$cnt]['user_id']);
         $results[$cnt]['user'] = $user;
         if (!isset($results[$cnt]['giveuser_id']) || empty($results[$cnt]['giveuser_id'])) {
             $results[$cnt]['giveuser_id'] = $this->familly->owner_id;
         }
         $giveuser = new User();
         $giveuser->load((int) $results[$cnt]['giveuser_id']);
         $results[$cnt]['giveuser'] = $giveuser;
         switch ($results[$cnt]['media_type']) {
             case 'image':
                 $default_pic = uihelper_resize_mk_img($results[$cnt]['media_file'], 86, 92, 'images/default_image.png', "", RESIZE_CROP);
                 break;
             case 'audio':
                 $default_pic = uihelper_resize_mk_img(null, 86, 92, 'images/default_audio.png', "", RESIZE_CROP);
                 break;
             case 'video':
                 $default_pic = uihelper_resize_mk_img(null, 86, 92, 'images/default_video.png', "", RESIZE_CROP);
                 break;
             default:
                 $default_pic = $default_pic = uihelper_resize_mk_img(null, 86, 92, 'images/default_image.png', "", RESIZE_CROP);
         }
         if (!empty($results[$cnt]['media_cid'])) {
             $content_url = PA::$url . "/" . FILE_MEDIA_FULL_VIEW . "?cid={$results[$cnt]['media_cid']}";
             $default_pic = "<a href=\"{$content_url}\" alt=\"{$results[$cnt]['media_file']}\">{$default_pic}</a>";
         }
         $results[$cnt]['media_icon'] = $default_pic;
         $cnt++;
     }
     return $results;
 }
开发者ID:Cyberspace-Networks,项目名称:PeopleAggregator,代码行数:42,代码来源:PointsDirectoryModule.php

示例4: catch

            if (!$image_file) {
                $error = $myUploadobj->error;
            }
        } catch (Exception $e) {
            $error = $e->getMessage();
        }
        $img_resized = uihelper_resize_mk_img($image_file, 200, 200, NULL, 'style="margin-left: 10px"');
    }
    echo "{";
    echo "error: '" . $error . "',\n";
    echo "image: '" . htmlspecialchars($img_resized) . "',\n";
    echo "image_file: '" . $image_file . "'\n";
    echo "}";
} else {
    if (preg_match("|http://(.*?)/(.*)|", $img_url, $m)) {
        try {
            list(, $uf_server, $uf_path) = $m;
            $image_file = Storage::save($img_url, basename($uf_path), "critical", "image");
        } catch (Exception $e) {
            $error = $e->getMessage();
        }
        $img_resized = uihelper_resize_mk_img($image_file, 200, 200, NULL, 'style="margin-left: 10px"');
    } else {
        $error = 'Invalid Image URL.';
    }
    echo "{";
    echo "error: '" . $error . "',\n";
    echo "image: '" . htmlspecialchars($img_resized) . "',\n";
    echo "image_file: '" . $image_file . "'\n";
    echo "}";
}
开发者ID:Cyberspace-Networks,项目名称:PeopleAggregator,代码行数:31,代码来源:preview_image.php

示例5: uihelper_resize_mk_img

        echo uihelper_resize_mk_img($item['user']->picture, 64, 64, 'images/default.png', 'style=""');
        ?>
        <a href="<?php 
        echo PA::$url . PA_ROUTE_USER_PUBLIC . "/{$item['user']->user_id}";
        ?>
" alt="<?php 
        echo $item['user']->display_name;
        ?>
"><?php 
        echo abbreviate_text($item['user']->display_name, 12, 7);
        ?>
</a>
      </div>
      <div class="points_rating">
         <?php 
        echo uihelper_resize_mk_img($item['giveuser']->picture, 32, 32, 'images/default.png', 'style=""');
        ?>
<br />
         <a style="font-weight: normal" href="<?php 
        echo PA::$url . PA_ROUTE_USER_PUBLIC . "/{$item['giveuser']->user_id}";
        ?>
" alt="<?php 
        echo $item['giveuser']->display_name;
        ?>
"><?php 
        echo abbreviate_text($item['giveuser']->display_name, 12, 7);
        ?>
</a><br />
        <p>
         <?php 
        echo $item['rating'];
开发者ID:Cyberspace-Networks,项目名称:CoreSystem,代码行数:31,代码来源:cnmodule.php

示例6: addGroupData

 private function addGroupData($group)
 {
     $owner_id = Group::get_owner_id((int) $group->group_id);
     $group_owner = new User();
     $group_owner->load((int) $owner_id);
     $group_owner_info = $this->getUserProfile($group_owner, 'group.owner');
     // get group owner profile info
     $this->template_vars = array_merge($this->template_vars, $group_owner_info);
     $this->template_vars["%group.icon_image%"] = uihelper_resize_mk_img($group->picture, 219, 35, DEFAULT_NETWORK_ICON, 'alt="' . $group->title . '"');
     $this->template_vars["%group.name%"] = $group->title;
     $this->template_vars["%group.description%"] = $group->description;
     $this->template_vars['%group.member_count%'] = Group::get_member_count($group->group_id);
     $this->template_vars['%group.join_url%'] = UrlHelper::url_for(PA_ROUTE_GROUP, array('action' => 'join', 'gid' => $group->collection_id));
     $this->template_vars['%group.join_link%'] = UrlHelper::link_to(PA_ROUTE_GROUP, $this->template_vars['%group.join_url%'], null, array('action' => 'join', 'gid' => $group->collection_id));
     $this->template_vars["%group.url%"] = UrlHelper::url_for(PA_ROUTE_GROUP, array('gid' => $group->collection_id));
     $this->template_vars["%group.link%"] = UrlHelper::link_to(PA_ROUTE_GROUP, $group->title, null, array('gid' => $group->collection_id));
     $this->template_vars['%group.moderation_url%'] = UrlHelper::url_for(PA_ROUTE_GROUP_MODERATION, array('view' => 'users', 'gid' => $group->collection_id));
     $this->template_vars['%group.moderation_link%'] = UrlHelper::link_to(PA_ROUTE_GROUP_MODERATION, __("Group moderation"), null, array('view' => 'users', 'gid' => $group->collection_id));
 }
开发者ID:Cyberspace-Networks,项目名称:PeopleAggregator,代码行数:19,代码来源:MessageRenderer.class.php

示例7: foreach

 * For questions, help, comments, discussion, etc. please visit
 * https://github.com/CyberspaceNetworks/CoreSystem
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 */
if (is_array($links) && sizeof($links) > 0) {
    ?>
    <?php 
    foreach ($links as $link) {
        ?>
        <li>
            <a href="<?php 
        echo PA::$url . PA_ROUTE_GROUP . "/gid=" . $link['id'];
        ?>
">
                <?php 
        echo uihelper_resize_mk_img($link['picture'], 125, 125, "files/img/image_not_available.png", 'alt="Group image"', RESIZE_CROP);
        ?>
            </a>
            <a href="<?php 
        echo PA::$url . PA_ROUTE_GROUP . "/gid=" . $link['id'];
        ?>
">
                <?php 
        echo chop_string(stripslashes($link['title']), 17);
        ?>
            </a>
            <span class="users-list-date">
                <?php 
        echo uihelper_plural($link['members'], '' . __('Member') . '');
        ?>
            </span>
开发者ID:Cyberspace-Networks,项目名称:CoreSystem,代码行数:31,代码来源:cnmodule.php

示例8: __

    </div>

    <div class="field_medium_event" style="height:90px;">
      <h4><label for="event_description"><?= __("Event description") ?></label></h4>
      <div class="center">
      <textarea id="event_description" name="event_description" cols="20" rows="5" style="height:auto;"><?
        echo @$ed['event_description'];
      ?></textarea>
      </div>
    </div>


<?php if (!empty($ed['banner'])) { ?>
      <div class="field_medium_event" style="height:90px;">
        <h4><?=__("Current Event Banner")?></h4>
          <?php echo uihelper_resize_mk_img($ed['banner'], 430, 80,
          NULL, 'alt="Current Event Banner"', RESIZE_FIT); ?>
      </div>
<? } ?>
      <div class="field">
        <h4><label for="upload_event_bannere">
        <?=__("Upload Event Banner")?></label></h4>
        <input name="userfile" type="file" class="text" id="upload_user_event_banner"/>
      </div>
    
    <div class="button_position">
      <? if ($is_edit) { ?>
      <input type="submit" name="update" value="Update Event" />
      <input type="submit" name="delete" value="Delete Event" onclick="return confirm('<?= __("Are you sure you want to delete this Event?") ?>');"/>
      <input type="button" name="back" value="Cancel" onclick="javascript: history.back();" />
      <? } else { ?>
      <input type="submit" name="create" value="Create Event" />
开发者ID:Cyberspace-Networks,项目名称:PeopleAggregator,代码行数:32,代码来源:edit_event.php

示例9: __

     <?php 
echo __("Choose File");
?>
    </div>
          </div>
           
          <?php 
if (!empty($group_photo)) {
    ?>
          <div class="field_bigger">
            <h4><label for="Current_Photo"><?php 
    echo __("Current Photo");
    ?>
</label></h4>
            <?php 
    echo uihelper_resize_mk_img($group_photo, 100, 100, "files/img/image_not_available.png", 'alt="Group photo."', RESIZE_FIT);
    ?>
          </div>
          <?php 
}
?>
        
          <div class="field_bigger">
            <h4><label for="Group description"><?php 
echo __("Group Description");
?>
:</label></h4>
            <textarea id="group_description" name="groupdesc" cols="64" rows="5"><?php 
echo $body;
?>
</textarea>
开发者ID:Cyberspace-Networks,项目名称:CoreSystem,代码行数:31,代码来源:cnmodule_content.php

示例10: count

    </select>
    <hr/>
    <?php 
} else {
}
?>

<ul class="list-group">
    <?php 
if (!empty($links)) {
    $cnt = count($links);
    for ($counter = 0; $counter < $cnt; $counter++) {
        ?>
            <li class="list-group-item">
                <a href="http://<? echo $links[$counter]->address .'.' . PA::$domain_suffix . BASE_URL_REL . PA_ROUTE_HOME_PAGE?>" ><?php 
        echo uihelper_resize_mk_img(trim($links[$counter]->inner_logo_image), 250, 250, PA::$theme_rel . "/img/default-network-image.gif");
        ?>
</a>
                <hr/>
                <a href="http://<? echo $links[$counter]->address . '.' . PA::$domain_suffix . BASE_URL_REL . PA_ROUTE_HOME_PAGE?>" ><?php 
        echo chop_string(stripslashes($links[$counter]->name), 16);
        ?>
</a>
                <span class="badge">
                    <?php 
        echo uihelper_plural($links[$counter]->member_count, "Member");
        ?>
                </span>
            </li>
            <?php 
    }
开发者ID:Cyberspace-Networks,项目名称:CoreSystem,代码行数:31,代码来源:cnmodule.php

示例11: catch

 $inv->inv_summary = "Invitation from {$user->first_name} {$user->last_name} to join {$group_name}";
 $inv->inv_message = !empty($invitation_message) ? $invitation_message : NULL;
 try {
     $inv->send();
 } catch (PAException $e) {
     $save_msg = "{$e->message}";
     $save_error = TRUE;
 }
 if ($save_error == TRUE) {
     $msg[] = "Sorry: you are unable to invite a friend. <br /> Reason: " . $sav_msg;
 } else {
     // invitation has been sent, now send email
     $user = new User();
     $user->load((int) $login_uid);
     $invitee_image = uihelper_resize_mk_user_img($user->picture, 80, 80, 'alt="' . $user->first_name . '" align="left" style="padding: 0px 12px 12px 0px;"');
     $group_icon_image = uihelper_resize_mk_img('files/' . $group->picture, 219, 35, 'files/' . DEFAULT_NETWORK_ICON, 'alt="' . $group->title . '"');
     $user_type = Group::get_user_type($login_uid, $gid);
     if ($user_type == OWNER) {
         $mail_type = 'invite_group';
     } else {
         if ($user_type == MEMBER) {
             $mail_type = 'invite_group_by_member';
         }
     }
     $group_url = $base_url . '/group.php?gid=' . $inv->inv_collection_id;
     $invitee_url = url_for('user_blog', array('login' => $user->login_name));
     $array_of_data = array('first_name' => $user->first_name, 'last_name' => $user->last_name, 'user_name' => $user->login_name, 'user_id' => $user->user_id, 'message' => $inv->inv_message, 'group_name' => $inv->inv_group_name, 'accept_url' => $inv->accept_url, 'register_url' => $inv->register_url, 'invited_user_name' => $inv->inv_user_first_name, 'invitee_image' => $invitee_image, 'group_id' => $inv->inv_collection_id, 'group_description' => $group->description, 'group_icon_image' => $group_icon_image, 'group_url' => $group_url, 'network_name' => $network_info->name, 'invitee_url' => $invitee_url, 'config_site_name' => $config_site_name);
     $check = pa_mail($inv->inv_email, $mail_type, $array_of_data, $user->email);
     $succ_msg .= $valid_user_first_emails[$counter] . ', ';
     if ($counter == $valid_cnt - 1) {
         $succ_msg = substr($succ_msg, 0, -2);
开发者ID:CivicCommons,项目名称:oldBellCaPA,代码行数:31,代码来源:action.php

示例12: array

            $images =& $badge[$badge_key];
            if (@$images['enabled']) {
                $html .= <<<ENS
<h4>My {$display_name}</h4>
ENS;
                $recent = Content::get_recent_content_for_user($user->user_id, $content_type, 8);
                $items_html = array();
                foreach ($recent as $obj) {
                    if ($thumbnail_key) {
                        if (strstr($obj[$thumbnail_key], "http://")) {
                            $img = '<img src="' . $obj[$thumbnail_key] . '" width="75px" height="75px" border="0" />';
                        } else {
                            $img = uihelper_resize_mk_img("files/" . $obj[$thumbnail_key], 75, 75);
                        }
                    } else {
                        $img = uihelper_resize_mk_img("{$current_theme_rel_path}/{$icon_file}", 75, 75, NULL, "", RESIZE_FIT_NO_EXPAND);
                    }
                    $url_enc = htmlspecialchars("{$base_url}/media_full_view.php?cid=" . $obj['content_id'] . "&type=" . $mfv_type);
                    $title_enc = htmlspecialchars($obj['title']);
                    $h = <<<EOS
<div class="badge_person">
<a href="{$url_enc}" target="_blank"><div class="person_image">{$img}</div><div class="person_name">{$title_enc}</div></a>
</div>
EOS;
                    $items_html[] = array("item", $h);
                }
                $html .= badge_render_section($items_html);
            }
        }
    } else {
        // old-style friends / groups badge
开发者ID:CivicCommons,项目名称:oldBellCaPA,代码行数:31,代码来源:badge.php

示例13: uihelper_resize_mk_img

    <div class="group_list">
      <table cellspacing="0" cellpadding="0">
        <?php 
    for ($i = 0; $i < $cnt; $i++) {
        $pic = $links[$i]['picture'];
        ?>
         
        <tr>

          <td align="center" valign="top" width="80">
            <a href="<?php 
        echo $links[$i]['hyper_link'];
        ?>
"><?php 
        echo uihelper_resize_mk_img($pic, 60, 55, DEFAULT_USER_PHOTO_REL, 'alt="sender"', RESIZE_CROP);
        ?>
</a>
          </td>

          <td valign="top" width="415">
            <a href="<?php 
        echo $links[$i]['hyper_link'];
        ?>
"><?php 
        echo $links[$i]['user_name'];
        ?>
 said:</a><br />


                <?php 
开发者ID:Cyberspace-Networks,项目名称:CoreSystem,代码行数:30,代码来源:cnmodule_content.php

示例14: __

    echo __("Paste the complete URL of the network here");
    ?>
.</div>
    </div>
    
    <div class="field_bigger">
      <h4><label for="curr_desk_image"><?php 
    echo __("Showcased Network Image");
    ?>
</label></h4>
      <div class="curr_image">
        <?php 
    if (!empty($networks_data[$counter]['network_image'])) {
        ?>
        <?php 
        echo uihelper_resize_mk_img($networks_data[$counter]['network_image'], 90, 90, 'files/img/image_not_available.png', 'alt="Cyberspace-Networks"');
        ?>
        <?php 
    } else {
        echo __('No image selected.');
    }
    ?>
      </div>
    </div>
    
    <div class="field_medium">
      <h4><label for="slogan-sub"><?php 
    echo __("Caption");
    ?>
</label></h4>
      <input type="text" class="text longer" id="caption_<?php 
开发者ID:Cyberspace-Networks,项目名称:CoreSystem,代码行数:31,代码来源:cnmodule_content_showcased_networks.php

示例15: catch

             if ($error != TRUE) {
                 try {
                     $inv->send();
                 } catch (PAException $e) {
                     $msg = "{$e->message}";
                     $save_error = TRUE;
                 }
             }
             if ($save_error == TRUE) {
                 $msg = "Sorry: you are unable to invite a friend. <br /> Reason: " . $msg;
             } else {
                 // invitation has been sent, now send mail
                 $user = new User();
                 $user->load((int) $_SESSION['user']['id']);
                 $invitee_image = uihelper_resize_mk_user_img($user->picture, 80, 80, 'alt="' . $user->first_name . '" align="left" style="padding: 0px 12px 12px 0px;"');
                 $network_icon_image = uihelper_resize_mk_img('files/' . $network_info->inner_logo_image, 219, 35, 'files/' . DEFAULT_NETWORK_ICON, 'alt="' . $network_info->name . '"');
                 $invitee_url = url_for('user_blog', array('login' => $user->login_name));
                 $mail_type = "invite_pa";
                 $array_of_data = array('first_name' => $user->first_name, 'last_name' => $user->last_name, 'user_name' => $user->login_name, 'user_id' => $user->user_id, 'message' => $inv->inv_message, 'accept_url' => $inv->accept_url, 'register_url' => $inv->register_url, 'invited_user_name' => $inv->inv_user_first_name, 'invitee_image' => $invitee_image, 'network_name' => $network_info->name, 'network_description' => $network_info->description, 'network_icon_image' => $network_icon_image, 'invitee_url' => $invitee_url, 'config_site_name' => $config_site_name);
                 $check = pa_mail($inv->inv_email, $mail_type, $array_of_data, $user->email);
                 $msg .= '<br />' . $valid_user_first_emails[$counter];
                 if ($counter == $valid_cnt - 1) {
                     $msg = "<br />An Invitation has been sent to -" . $msg;
                 }
             }
         }
         // end for : invitation to multiple email
         $_POST = array();
         // unset $_POST, if invitation has been successfully made.
     }
 }
开发者ID:CivicCommons,项目名称:oldBellCaPA,代码行数:31,代码来源:invitation.php


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