Exemple #1
0
 */
elgg_load_js("zhp.edit");
elgg_load_js("location");
?>
<div>
	<label><?php 
echo elgg_echo('name');
?>
</label>
	<?php 
echo elgg_view('input/text', array('name' => 'name', 'value' => $vars['entity']->name));
?>
</div>
<?php 
$fieldsWithAccess = array("contactemail", "phone", "birthDay", "QQ");
$iDD = genTagDiv("zhp_interest_dd", "zhp-i-opt");
$sticky_values = elgg_get_sticky_values('profile:edit');
$profile_fields = elgg_get_config('profile_fields');
if (is_array($profile_fields) && count($profile_fields) > 0) {
    foreach ($profile_fields as $shortname => $valtype) {
        $metadata = elgg_get_metadata(array('guid' => $vars['entity']->guid, 'metadata_name' => $shortname, 'limit' => false));
        if ($metadata) {
            if (is_array($metadata)) {
                $value = '';
                foreach ($metadata as $md) {
                    if (!empty($value)) {
                        $value .= ', ';
                    }
                    $value .= $md->value;
                    $access_id = $md->access_id;
                }
Exemple #2
0
$option_string = elgg_echo('groups:search:tags');
$params = array('name' => 'tag', 'id' => 'zhf_tag_input', 'class' => 'zhaohu-search-div-input', 'value' => elgg_echo('AllInterests'));
echo elgg_view('input/text', $params);
echo elgg_echo('groups:around');
echo elgg_view('input/text', array('name' => 'zhf_state_input', 'id' => 'zhf_state_input', 'class' => 'zhaohu-search-div-input', 'value' => 'WA'));
$stateDD = "<ul id='zhf_state_dd' class='zh-state-dd'>";
foreach (elgg_get_config('zhstates') as $t) {
    $stateDD .= "<li>" . elgg_view("output/url", array("href" => "#", "text" => elgg_echo($t), "class" => "zhf-state-opt")) . "</li>";
}
$stateDD .= "</ul>";
echo $stateDD;
echo elgg_view('input/text', array('name' => 'zhf_city_input', 'id' => 'zhf_city_input', 'class' => 'zhaohu-search-div-input', 'value' => 'Seattle'));
echo "<ul id='zhf_city_dd' class='zht_dd zht_dd_city_position'></ul>";
echo elgg_view("output/url", array('class' => 'zhaohu-search', "href" => "#", "text" => elgg_echo('find:groups'), "id" => "zhf_groups"));
echo elgg_view("output/url", array('class' => 'zhaohu-search', "href" => "#", "text" => elgg_echo('find:zhaohus'), "id" => "zhf_zhaohus"));
echo genTagDiv("zhf_tag_dd", "tag-opt");
echo '</div><div id="zhaohu_past"><input type="checkbox" name="zhf_past" id="zhf_past" value="1" />';
echo elgg_echo('zhaohu:past_zhaohus');
echo "</div><div id=\"zhaohu_search_result_div\">";
// home page left side bar
$popular_interests_ul = elgg_view("zhaohu_manager/popular_interests");
$hot_topics = elgg_view("zhaohu_manager/hot_topics");
echo '<div id="zhaohu_homepage_left_side_bar">' . $popular_interests_ul . $hot_topics . '</div>';
echo "<div id='find_result_groups' class='find_result_entities'></div>";
echo "<div id='find_result_zhaohus' class='find_result_entities'></div>";
// home page right side bar
$follow_us = elgg_view("zhaohu_manager/follow_us");
$recommended_zhaohus = elgg_view("zhaohu_manager/recommended_zhaohus");
$recommended_groups = elgg_view("zhaohu_manager/recommended_groups");
$wechat_qrcode = elgg_view("zhaohu_manager/wechat_qrcode");
echo '<div id="zhaohu_homepage_right_side_bar">' . $recommended_zhaohus . $recommended_groups . $follow_us . $wechat_qrcode . '</div>';
Exemple #3
0
$form_body .= elgg_view('input/hidden', array('name' => 'guid', 'value' => $fields["guid"]));
$form_body .= elgg_view('input/hidden', array('name' => 'container_guid', 'value' => $fields["container_guid"]));
$form_body .= "<table>";
$form_body .= "<tr><td class='zhaohu_manager_zhaohu_edit_label'>" . elgg_echo('title') . " *</td><td>" . elgg_view('input/text', array('name' => 'title', 'value' => $fields["title"])) . "</td></tr>";
$form_body .= "<tr><td class='zhaohu_manager_zhaohu_edit_label'>" . elgg_echo('zhaohu:edit:start:date') . " *</td>";
$form_body .= "<td>" . elgg_view('input/date', array('name' => 'start_day', 'id' => 'start_day', 'value' => $fields["start_day"], "class" => "zhaohu_manager_zhaohu_edit_date")) . "</td></tr>";
$form_body .= "<tr><td class='zhaohu_manager_zhaohu_edit_label'>" . elgg_echo('zhaohu:edit:start:time') . "</td>";
$form_body .= "<td>" . zhaohu_manager_get_form_pulldown_hours('start_time_hours', date('H', $fields["start_time"]));
$form_body .= zhaohu_manager_get_form_pulldown_minutes('start_time_minutes', date('i', $fields["start_time"])) . "</td></tr>";
$form_body .= "<tr><td class='zhaohu_manager_zhaohu_edit_label'>" . elgg_echo('zhaohu:edit:end:date') . "</td>";
$form_body .= "<td>" . elgg_view('input/date', array('name' => 'end_day', 'id' => 'end_day', 'value' => $fields["end_day"], "class" => "zhaohu_manager_zhaohu_edit_date")) . "</td></tr>";
$form_body .= "<tr><td class='zhaohu_manager_zhaohu_edit_label'>" . elgg_echo('zhaohu:edit:end:time') . "</td>";
$form_body .= "<td>" . zhaohu_manager_get_form_pulldown_hours('end_time_hours', date('H', $fields["end_ts"]));
$form_body .= zhaohu_manager_get_form_pulldown_minutes('end_time_minutes', date('i', $fields["end_ts"])) . "</td></tr>";
$form_body .= "<tr><td class='zhaohu_manager_zhaohu_edit_label'>" . elgg_echo('description') . " *</td><td>" . elgg_view('input/longtext', array('name' => 'description', 'value' => $fields["description"])) . "</td></tr>";
$iDD = genTagDiv("zhe_i_dd", "zhe-i-opt");
$form_body .= "<tr><td class='zhaohu_manager_zhaohu_edit_label'>" . elgg_echo('tags') . " *</td><td>" . elgg_view('input/tags', array('id' => 'zhe_i', 'name' => 'tags', 'value' => $fields["tags"]));
$form_body .= $iDD;
$form_body .= "</td></tr>";
$form_body .= "<tr><td class='zhaohu_manager_zhaohu_edit_label'>" . elgg_echo('zhaohu:edit:icon') . "</td><td>" . elgg_view('input/file', array('name' => 'icon')) . "</td></tr>";
if (!empty($currentIcon)) {
    $form_body .= "<tr><td class='zhaohu_manager_zhaohu_edit_label'>" . elgg_echo('zhaohu:edit:currenticon') . "</td><td>" . $currentIcon . "<br />" . elgg_view('input/checkboxes', array('name' => 'delete_current_icon', 'id' => 'delete_current_icon', 'value' => 0, 'options' => array(elgg_echo('zhaohu:edit:delete_current_icon') => '1'))) . "</td></tr>";
}
if ($fields["country"] == ELGG_ENTITIES_ANY_VALUE) {
    $fields["country"] = 'US';
}
$form_body .= "<tr><td class='zhaohu_manager_zhaohu_edit_label'>" . elgg_echo('zhaohu:country') . " *</td><td>" . elgg_view('input/dropdown', array('id' => 'zh_country', 'name' => 'country', 'value' => $fields["country"], 'options_values' => array('CA' => elgg_echo('can'), 'US' => elgg_echo('usa')))) . "</td></tr>";
$form_body .= "<tr><td class='zhaohu_manager_zhaohu_edit_label'>" . elgg_echo('zhaohu:state') . " *</td><td>" . elgg_view('input/dropdown', array('id' => 'zh_state', 'name' => 'state', 'value' => $fields["state"])) . "</td></tr>";
echo elgg_view('input/hidden', array('id' => 'zh_state_val', 'value' => $fields["state"]));
$form_body .= "<tr><td class='zhaohu_manager_zhaohu_edit_label'>" . elgg_echo('zhaohu:city') . " *</td><td>" . elgg_view('input/text', array('id' => 'zhe_city', 'name' => 'city', 'value' => $fields["city"])) . "</td></tr>";
$form_body .= "<tr><td class='zhaohu_manager_zhaohu_edit_label'>" . elgg_echo('zhaohu:address') . "</td><td>" . elgg_view('input/text', array('id' => 'zhe_address', 'name' => 'address', 'value' => $fields["address"])) . "</td></tr>";