Skip to:
Content

BuddyPress.org

Changeset 117


Ignore:
Timestamp:
05/15/2008 03:50:01 PM (18 years ago)
Author:
jbasdf
Message:

updated bp_friends template tags

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-friends/bp-friends-templatetags.php

    r113 r117  
    22
    33Class BP_Friends_Template {
    4        
    5         var $user_id;
    64       
    75        function bp_friends_template() {
     
    1311
    1412function bp_list_friends() {
    15         global $friends_template;
    16         return $friends_template->list_friends();
     13        $bp_friends = new BP_Friends();
     14        $friends = $bp_friends->get_friends();
    1715}
    1816
    19 function bp_find_friends() {
    20         global $friends_template;
    21         return $friends_template->find_friends();
     17function bp_validate_friend_search_terms() {
     18        $message = null;
     19        if(isset($_POST['searchterm']) && isset($_POST['search']))
     20        {
     21                if($_POST['searchterm'] == "")
     22                {
     23                        $message = __("Please make sure you enter something to search for.");
     24                }
     25                else if(strlen($_POST['searchterm']) < 3)
     26                {
     27                        $message = __("Your search term must be longer than 3 letters.");
     28                }
     29        }
     30        return $message;
    2231}
    2332
     33function bp_output_find_friends_message($message) {
     34        if ( isset($message) ) {
     35                if($type == 'error') { $type = "error"; } else { $type = "updated"; } ?>
     36                        <div id="message" class="<?php echo $type; ?>">
     37                                <p><?php echo $message; ?></p>
     38                        </div> <?php
     39                return true;
     40        } else {
     41                return false;
     42        }
     43}
    2444?>
  • trunk/buddypress-theme/default/style.css

    r38 r117  
    192192        }
    193193       
    194                 ul#quickLinks li {
    195                         border-bottom: 1px solid #ccc;
    196                         padding: 0.3em 0;
    197                 }
     194        ul#quickLinks li {
     195                border-bottom: 1px solid #ccc;
     196                padding: 0.3em 0;
     197        }
    198198
    199199        ul#components li {
     
    201201                border-bottom: 2px solid #ccc;
    202202        }
    203                 ul#components li ul li {
    204                         border: none;
    205                         margin: 0;
    206                         padding: 0.3em 0;
    207                 }
    208                
    209                 ul#components li h2 {
    210                         margin: 0;
    211                         font-family: georgia, times, serif;
    212                         font-weight: normal;
    213                         font-size: 1.4em;
    214                         border-bottom: 1px solid #ccc;
    215                         padding: 0 0 0.2em 0;
    216                 }
     203        ul#components li ul li {
     204                border: none;
     205                margin: 0;
     206                padding: 0.3em 0;
     207        }
     208
     209        ul#components li h2 {
     210                margin: 0;
     211                font-family: georgia, times, serif;
     212                font-weight: normal;
     213                font-size: 1.4em;
     214                border-bottom: 1px solid #ccc;
     215                padding: 0 0 0.2em 0;
     216        }
     217
     218/** SIGNUP FORM **/
     219table#extraFields td label,
     220div.radio span,
     221div.checkbox span {
     222        font-weight: bold;
     223        display: block;
     224        float: left;
     225        width: 115px;
     226}
     227
     228table#extraFields td input[type="text"] {
     229        font-size: 24px;
     230        width: 280px;
     231}
     232
     233table#extraFields td textarea {
     234        width: 280px;
     235        height: 120px;
     236}
     237
     238table#extraFields td select {
     239        width: 280px;
     240}
     241
     242table#extraFields td div.datefield select {
     243        width: auto;
     244}
     245
     246table#extraFields td div.radio label,
     247table#extraFields td div.checkbox label {
     248        display: inline;
     249        font-weight: normal;
     250        float: none;
     251}
     252
     253table#extraFields td div.radio input,
     254table#extraFields td div.checkbox input {
     255        width: auto;
     256}
     257
     258span.desc {
     259        margin-left: 115px;
     260        font-weight: normal;
     261}
     262
     263div.error {
     264        font-weight: bold;
     265        margin: 10px 0 10px 113px;
     266}
Note: See TracChangeset for help on using the changeset viewer.