Ignore:
Timestamp:
02/26/10 12:56:11 (3 years ago)
Author:
nick_ramsay
Message:

[Branch 1.2] Various plugin updates, mostly extending user profiles with navigation links and pages.

Location:
branches/1.2/content/plugins
Files:
1 added
12 edited

Legend:

Unmodified
Added
Removed
  • branches/1.2/content/plugins/comments/comments.php

    r1222 r1247  
    33 * name: Comments 
    44 * description: Enables logged-in users to comment on posts 
    5  * version: 1.5 
     5 * version: 1.6 
    66 * folder: comments 
    77 * class: Comments 
    88 * type: comments 
    99 * requires: sb_base 0.1, users 1.1 
    10  * hooks: install_plugin, theme_index_top, header_include, admin_header_include_raw, theme_index_main, sb_base_show_post_extra_fields, sb_base_post_show_post, admin_plugin_settings, admin_sidebar_plugin_settings, submit_2_fields, submit_edit_admin_fields, post_delete_post, profile_usage, , admin_theme_main_stats, breadcrumbs, submit_functions_process_submitted, submit_2_process_submission 
     10 * hooks: install_plugin, theme_index_top, header_include, admin_header_include_raw, theme_index_main, sb_base_show_post_extra_fields, sb_base_post_show_post, admin_plugin_settings, admin_sidebar_plugin_settings, submit_2_fields, submit_edit_admin_fields, post_delete_post, profile_navigation, , admin_theme_main_stats, breadcrumbs, submit_functions_process_submitted, submit_2_process_submission 
    1111 * 
    1212 * PHP version 5 
     
    689689        $h->db->query($h->db->prepare($sql, $h->post->id)); 
    690690    } 
    691      
    692      
    693     /** 
    694      * Add all comments link to Profile 
    695      */ 
    696     public function profile_usage($h) 
    697     { 
    698         echo "<a id='profile_see_comments' href='" . $h->url(array('page'=>'comments', 'user'=>$h->vars['user']->name)) . "'>"; 
    699         echo $h->lang['comments_profile_see_comments'] . "."; 
    700         echo "</a>"; 
    701          
     691 
     692     
     693    /** 
     694     * Profile navigation link 
     695     */ 
     696    public function profile_navigation($h) 
     697    { 
     698        echo "<li><a href='" . $h->url(array('page'=>'comments', 'user'=>$h->vars['user']->name)) . "'>" . $h->lang['users_all_comments']  . "</a></li>\n"; 
    702699    } 
    703700     
     
    853850        */ 
    854851     
    855         mail($to, $subject, $message, $headers); 
     852        $h->email($to, $subject, $message, $headers); 
    856853    } 
    857854} 
  • branches/1.2/content/plugins/comments/languages/comments_language.php

    r1222 r1247  
    110110$lang["comment_rss_commented_on"] = " commented on "; 
    111111 
    112 /* User Profile */ 
    113 $lang["comments_profile_see_comments"] = " or click here to see my comments"; 
    114  
    115112/* Admin Stats */ 
    116113$lang["comments_admin_stats_total_comments"] = "Total comments"; 
  • branches/1.2/content/plugins/comments/readme.txt

    r1222 r1247  
    1515Changelog 
    1616--------- 
    17 v.1.5 2009/02/23 - Nick - Shows messages for moderated comments: "Awaiting approval", "Exceeded Daily Limit", etc. 
    18 v.1.4 2009/02/09 - Nick - Option to hide comments after X down votes, plus pagination code changes 
    19 v.1.3 2009/01/17 - Nick - Added option for avatar size 
     17v.1.6 2010/02/26 - Nick - Adds link to profile navigation; Email changed to go through Hotaru's "email" function  
     18v.1.5 2010/02/23 - Nick - Shows messages for moderated comments: "Awaiting approval", "Exceeded Daily Limit", etc. 
     19v.1.4 2010/02/09 - Nick - Option to hide comments after X down votes, plus pagination code changes 
     20v.1.3 2010/01/17 - Nick - Added option for avatar size 
    2021v.1.2 2009/12/30 - Nick - Updates for compatibility with Hotaru 1.0 
    2122v.1.1 2009/11/25 - Nick - Bug fix for comment form closing when a post is edited by a non-admin user 
  • branches/1.2/content/plugins/hello_universe/hello_universe.php

    r1100 r1247  
    33 * name: Hello Universe 
    44 * description: Demonstrates how to make plugins 
    5  * version: 0.6 
     5 * version: 0.7 
    66 * folder: hello_universe 
    77 * class: HelloUniverse 
    8  * hooks: theme_index_top, theme_index_main, theme_index_sidebar 
     8 * hooks: theme_index_top, theme_index_main, theme_index_sidebar, profile_navigation 
    99 * author: Nick Ramsay 
    1010 * authorurl: http://hotarucms.org/member.php?1-Nick 
     
    6868                return true; 
    6969                break; 
    70             default: 
     70            case 'profile_example': 
     71                $user = $h->cage->get->testUsername('user'); 
     72                if ($user) { 
     73                    // create a user object and fill it with user info 
     74                    $h->vars['user'] = new UserAuth(); 
     75                    $user_info = $h->vars['user']->getUserBasic($h, 0, $user); 
     76                    if ($user_info) { 
     77                        // only show the page if the user exists: 
     78                        $h->pageType = 'user'; 
     79                        $h->displayTemplate('users_navigation', 'users'); // Displays user navigation from Users plugin 
     80                        $h->displayTemplate('profile_example'); // Displays the page from this plugin folder 
     81                        return true; 
     82                    } 
     83                } 
     84                break; 
     85            case 'index': 
    7186                $this->mainPage($h); 
    7287                return true; 
     88                break; 
     89            default: 
     90                // do nothing 
    7391                break; 
    7492        } 
     
    142160        return false; 
    143161    } 
     162     
     163     
     164    /** 
     165     * FUNCTION #6 
     166     * 
     167     * Profile navigation link 
     168     */ 
     169    public function profile_navigation($h) 
     170    { 
     171        echo "<li><a href='" . $h->url(array('page'=>'profile_example', 'user'=>$h->vars['user']->name)) . "'>" . $h->lang['hello_universe_profile_example'] . "</a></li>\n"; 
     172    } 
    144173 
    145174} 
  • branches/1.2/content/plugins/hello_universe/languages/hello_universe_language.php

    r847 r1247  
    4242$lang["hello_universe_form_submit"] = "Submit"; 
    4343 
     44/* Example User Page */ 
     45$lang["hello_universe_profile_example"] = "Example Page"; 
     46 
    4447/* Common language */ 
    4548$lang["hello_universe_back_home"] = "Back Home"; 
  • branches/1.2/content/plugins/hello_universe/readme.txt

    r849 r1247  
    1313Changelog 
    1414--------- 
     15v.0.7 2010/02/26 - Nick - Demonstration of adding a page to a user profile 
    1516v.0.6 2009/12/28 - Nick - Updates for compatibility with Hotaru 1.0 
    1617v.0.5 2009/10/19 - Nick - Bug fixes 
  • branches/1.2/content/plugins/rpx/readme.txt

    r951 r1247  
    1818Changelog 
    1919--------- 
     20v.0.5 2010/02/25 - Nick - New plugin hook in register template (used by TOS AntiSpam plugin) 
    2021v.0.4 2010/01/16 - Nick - Fixes for RPX change from GET to POST method 
    2122v.0.3 2010/01/04 - Nick - Updates for compatibility with Hotaru 1.0 
  • branches/1.2/content/plugins/rpx/rpx.php

    r1121 r1247  
    33 * name: RPX 
    44 * description: Enables registration and login with Twitter, Facebook ,Google, etc. 
    5  * version: 0.4 
     5 * version: 0.5 
    66 * folder: rpx 
    77 * class: RPX 
  • branches/1.2/content/plugins/sb_base/readme.txt

    r1217 r1247  
    1414Changelog 
    1515--------- 
     16v.0.5 2010/02/26 - Nick - Filters hidden from user pages; Added profile navigation link 
    1617v.0.4 2010/02/23 - Nick - Bug fix for user RSS feed and showing messages above posts 
    1718v.0.3 2010/02/21 - Nick - Bug fixes, cleaner list template and new "sb_no_posts" template 
  • branches/1.2/content/plugins/sb_base/sb_base.php

    r1217 r1247  
    33 * name: SB Base 
    44 * description: Social Bookmarking base - provides "list" and "post" templates.  
    5  * version: 0.4 
     5 * version: 0.5 
    66 * folder: sb_base 
    77 * class: SbBase 
    88 * type: base 
    9  * hooks: install_plugin, theme_index_top, header_meta, header_include, navigation, breadcrumbs, theme_index_main, admin_plugin_settings, admin_sidebar_plugin_settings, admin_maintenance_database, admin_maintenance_top, admin_theme_main_stats, user_settings_pre_save, user_settings_fill_form, user_settings_extra_settings, theme_index_pre_main 
     9 * hooks: install_plugin, theme_index_top, header_meta, header_include, navigation, breadcrumbs, theme_index_main, admin_plugin_settings, admin_sidebar_plugin_settings, admin_maintenance_database, admin_maintenance_top, admin_theme_main_stats, user_settings_pre_save, user_settings_fill_form, user_settings_extra_settings, theme_index_pre_main, profile_navigation 
    1010 * author: Nick Ramsay 
    1111 * authorurl: http://hotarucms.org/member.php?1-Nick 
     
    542542     
    543543     
     544    /** 
     545     * Profile navigation link 
     546     */ 
     547    public function profile_navigation($h) 
     548    { 
     549        echo "<li><a href='" . $h->url(array('page'=>'all', 'user'=>$h->vars['user']->name)) . "'>" . $h->lang["users_all_posts"] . "</a></li>\n"; 
     550    } 
     551     
     552     
    544553    /**  
    545554     * Prepare sort links 
  • branches/1.2/content/plugins/user_signin/readme.txt

    r1220 r1247  
    1515Changelog 
    1616--------- 
     17v.0.3 2010/02/26 - Nick - New plugin hook in the registration form; mail sent through Hotaru's email function 
    1718v.0.2 2010/02/23 - Nick - Throws out killspammed, banned or suspended users when checking the cookie 
    1819v.0.1 2009/12/27 - Nick - Released first version 
  • branches/1.2/content/plugins/user_signin/user_signin.php

    r1220 r1247  
    33 * name: User Signin 
    44 * description: Provides user registration and login 
    5  * version: 0.2 
     5 * version: 0.3 
    66 * folder: user_signin 
    77 * type: signin 
     
    598598        */ 
    599599 
    600         mail($to, $subject, $body, $headers);     
     600        $h->email($to, $subject, $body, $headers);     
    601601    } 
    602602     
Note: See TracChangeset for help on using the changeset viewer.