WordPress.org

Plugin Directory

Changeset 206731


Ignore:
Timestamp:
02/16/10 21:09:50 (4 years ago)
Author:
KopiPejst
Message:

1.3

Location:
google-buzz-er/trunk
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • google-buzz-er/trunk/README.txt

    r204574 r206731  
    1111 
    1212Show your Google Buzz post on your Wordpress site. Just set you username and place where you want your Google Buzz posts to be shown. 
     13 
     14Features: 
     15* Custom title 
     16* Showing images from post 
     17* Sidebar widget 
    1318 
    1419You can find more information about this plugin on <a href="http://workshop.rs/2010/02/google-buzz-er-google-buzz-for-wordpress/">workshop.rs</a> 
     
    27322. Options for Google Buzz Er 
    28333. Sidebar widget 
     344. Custom header and images from posts 
    2935 
    3036== Changelog == 
     
    3945* Removed include for header section 
    4046 
     47= 1.3 = 
    4148 
     49* Sidebar widget 
     50* No need for inlude line in header 
     51* Avatar is taken from first post 
     52 
  • google-buzz-er/trunk/css/google-buzz-er.css.php

    r204025 r206731  
    99.gber_post { padding: 5px; background-color: #F3F3F3; color: #333333; margin-bottom: 1px; } 
    1010.gber_time { font-style: italic; color: #999999; } 
     11.gber_image { display: block; } 
    1112#gber_small { background: url(../img/gber_small.png) no-repeat right; height: 25px; display: block; } 
  • google-buzz-er/trunk/google-buzz-er-content.php

    r204562 r206731  
    44Plugin URI: http://workshop.rs/2010/02/google-buzz-er-google-buzz-for-wordpress/ 
    55Description: Displaying posts from Google Buzz. 
    6 Version: 1.2 
     6Version: 1.3 
    77Author: Ivan Lazarevic 
    88Author URI: http://www.workshop.rs 
     
    7171            return false; 
    7272        } 
     73 
     74        $imgWidth   = is_numeric(get_option('gber_post_image_width')) ? get_option('gber_post_image_width') : 150;   
     75        $imgShow    = get_option('gber_post_image') ? get_option('gber_post_image') : false; 
    7376         
    7477        foreach($xml->entry as $data){ 
     78                $namespaces = $data->getNameSpaces(true); 
     79 
    7580 
    7681            if($data->content){ 
    77  
    7882                $tmp['content']     = (string)$data->content; 
    7983                $tmp['name']        = $data->author->name; 
     
    8286                $tmp['href']        = $data->link['href']; 
    8387                $tmp['timestamp']   = strtotime($data->updated); 
     88                 
     89                 
     90                $imgSrcCont     = ''; 
     91                if($imgShow){ 
     92                    $media      = $data->children($namespaces['media']); 
     93                    $mediaAttr  = $media->content->attributes(); 
     94                     
     95                    if($mediaAttr[2] == image) { 
     96                        $imgSrc     = $media->content->player->attributes(); 
     97                        $imgSrcCont = "<span class='gber_image'><img src='{$imgSrc[0]}' width='$imgWidth' /></span>";    
     98                    } 
     99                } 
     100                 
     101                $tmp['imgSrcCont']  = $imgSrcCont; 
     102                     
    84103                $sts[] = $tmp;               
    85104            } 
     
    104123     
    105124        $no_of_posts = is_numeric(get_option('gber_number')) ? get_option('gber_number') : 15; 
    106          
     125        $title       = get_option('gber_title') ? get_option('gber_title') : $data[0]['name']; 
    107126         
    108127        $out = " 
    109128        <div id='gber_wrapper'> 
    110129            <div id='gber_title'> 
    111                 <a href='{$data[0]['uri']}'>{$data[0]['name']}</a> 
     130                <a href='{$data[0]['uri']}'>$title</a> 
    112131            </div>"; 
    113132         
     
    117136            <div class='gber_post'> 
    118137                {$v['content']} 
     138                {$v['imgSrcCont']} 
    119139                <span class='gber_time'>{$this->gb_showTime(strtotime($v['updated']))}, </span> 
    120140                <span class='gber_comment'><a href='{$v['href']}'>comment</a></span> 
  • google-buzz-er/trunk/options.php

    r204562 r206731  
    3030        <div class="formrow"> 
    3131            <label for="usernames">Gmail username:</label> 
    32             <input type="text" id="username" name="gber_username" class="gber_input" value="<?php echo get_option('gber_username'); ?>" /> 
     32            <input type="text" id="username" name="gber_username" class="gber_input" size=25 value="<?php echo get_option('gber_username'); ?>" /> 
    3333            <span class="desc">without @gmail.com</span> 
    3434        </div> 
     
    3636        <div class="formrow">        
    3737            <label for="number">Number of Posts:</label> 
    38             <input type="text" id="number" name="gber_number" class="gber_input" value="<?php echo get_option('gber_number'); ?>" /> 
    39             <span class="desc">( 15 by default )</span>                              
     38            <input type="text" id="number" name="gber_number" class="gber_input" size=5 value="<?php echo get_option('gber_number'); ?>" /> 
     39            <span class="desc">15 by default</span>                              
     40        </div>   
     41                 
     42        <h2>Appereance</h2> 
     43         
     44        <div class="formrow">        
     45            <label for="number">Header Title:</label> 
     46            <input type="text" id="title" name="gber_title" class="gber_input" size=25 value="<?php echo get_option('gber_title'); ?>" /> 
     47            <span class="desc">Your name by default</span>                               
     48        </div>       
     49         
     50        <div class="formrow">        
     51            <label>Show Images:</label> 
     52            <?php if(get_option('gber_post_image') != ""){ $ch = "checked=''"; } else { $ch = ''; }?> 
     53            <input type="checkbox" id="images" name="gber_post_image" <?php echo $ch ?> /> 
     54            <span class="desc">Check to show images from your posts in Google Buzz Er box</span>                     
     55        </div>                   
     56 
     57        <div class="formrow">        
     58            <label for="number">Posts Images Width:</label> 
     59            <input type="text" id="images_width" name="gber_post_image_width" class="gber_input" size=5 value="<?php echo get_option('gber_post_image_width'); ?>" /> 
     60            <span class="desc">without px (150 by default)</span>                                
    4061        </div>   
    4162                 
    4263        <input type="hidden" name="action" value="update" /> 
    43         <input type="hidden" name="page_options" value="gber_username,gber_number" /> 
     64        <input type="hidden" name="page_options" value="gber_username,gber_number,gber_title,gber_post_image,gber_post_image_width" /> 
    4465         
    4566        <input type="submit" class="button-primary" value="Save Settings" /> 
     
    5475    #gber h1, #gber h2 { font-family: Georgia; font-style: italic; font-size: 24px; line-height: 35px; font-weight: normal; } 
    5576    #gber label { width: 180px; float: left; color: #000; } 
    56     #gber .gber_input { float: left; width: 300px;  
     77    #gber .gber_input { float: left;  
    5778    #gber .formrow { padding: 7px; clear: both; border-bottom: 1px solid #e5e5e5; border-top: 2px solid #fff; overflow: hidden; zoom: 1;} 
    5879    #gber .first { border-top: none; }  
Note: See TracChangeset for help on using the changeset viewer.