Plugin Directory

Changeset 502611


Ignore:
Timestamp:
02/09/2012 09:47:56 AM (14 years ago)
Author:
nickiler
Message:

Added vanilla cookie removal on WordPress logout

Location:
wp-vanilla-connect/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • wp-vanilla-connect/trunk/readme.txt

    r493682 r502611  
    55Requires at least: 3.0
    66Tested up to: 3.3.1
    7 Stable tag: 1.1
    8 
     7Stable tag: 1.1.1
    98
    109This plugin allows your WordPress users to authenticate and login to Vanilla forums like Facebook Connect.
     
    1211== Description ==
    1312
    14 *   Embedded forums plugin is not supported, however it does appear to work, if you check out the [forums](http://wordpress.org/support/topic/717306), so keep this in mind when you are rating its usefulness. Embedded at the time of this plugin is not supported in jsConnect or WP Vanilla Connect.
    15 
    16 WordPress users logon seamlessly via jsConnect and SSO into your Vanilla Forums. Just install [jsConnect](http://vanillaforums.org/addon/jsconnect-plugin), then copy links and codes from WP to Vanilla jsConnect and your linked up. Takes about 5 minutes to download and install.
     13WordPress users logon seamlessly via jsConnect and SSO into your Vanilla Forums. Just install [jsConnect](http://vanillaforums.org/addon/jsconnect-plugin) addon in Vanilla, then copy links and codes from WP to jsConnect and your linked up. Takes about 5 minutes to download and install.
    1714
    1815I built this for myself and decided to polish it up for open source release. None of the current methods for linking Vanilla and WordPress work for my server and DNS setup. I will follow the jsConnect project
     
    3128WP Vanilla Connect Features:
    3229
    33 *   Seamless integration with WordPress with autologin via login URL.
     30*   Seamless WordPress integration with autologin via login URL.
    3431*   Automatically generates URL's for jsConnect (Vanilla's recommended method in place of ProxyConnect).
    3532*   Attach Gravatar's to users instead of the default image if their email address is registered on Gravatar.com. Has an option to serve over SSL and Non-SSL.
     
    5350= Does this plugin work with the <embed> addon that comes with Vanilla? =
    5451
    55 No, not offically. I have not tested with the embedded addon and don't know anything about it what so ever. I have however added an experimental unsupported option for generating the URL for you, but I'm not sure how realiable this is becuase I cannot test it. If you would like to hire me for configuration contact me @Nickiler on twitter.
     52No, not offically. I have tested this under my own server configuration and everything works just fine. I can't however garantee it works for everyone becuase the VanillaForums <Embedded> plugin is pretty old and not updated for a long time. If you have issues just paste the javascript embed code directly into a page. This also works just fine for my setup. There are ways to hook into WP using filters and actions if you need something more advanced.
    5653
    5754= Can I disable the other login methods in Vanilla? =
     
    8481== Changelog ==
    8582
     83= 1.1.1 =
     84
     85* Added feature that removes the Vanilla logged on cookie when you log out of WordPress.
     86
    8687= 1.1 =
    8788
     
    9899Released beta
    99100
     101== Upgrade Notice ==
    100102
     103= 1.1.1 =
     104
     105* Added experimental URL generation code for embedded forums - unsupported. Your current settings will be protected.
  • wp-vanilla-connect/trunk/style.css

    r490108 r502611  
    124124    border-bottom: 1px solid #6abdf5;
    125125}
     126#form_sub_boxes div{
     127    margin-right: 15px;
     128    float:left;
     129}
  • wp-vanilla-connect/trunk/wp-vanilla-connect-options.php

    r493041 r502611  
    3737
    3838            <tr valign="top">
    39                 <th scope="row">What is the URL of your Vanilla Forums? <br />
     39                <th scope="row">Vanilla URL and Cookie Settings - What is the URL of your Vanilla Forums?<br />
    4040                <span>( http:// or https:// )</span>
    4141               
     
    4848                   
    4949               
     50                     
     51                       
     52                       <br /><br />
     53           
     54                       <div id="form_sub_boxes">
     55                        <div>
     56                       
     57                        <span>Name</span>
     58                       
     59                       <input class="textbox" type="text"
     60                       name="wp_vanilla_connect_option[vcname]" size="10px"
     61                       value="<?php echo (isset($options['vcname']) && !empty($options['vcname']) ? $options['vcname'] : 'Vanilla'); ?>" />
     62                       
     63               
     64                       
     65                       </div>
     66                       
     67                       
     68                       
    5069                       <div>
    51                        <span>Experimental Feature for Vanilla Embedded forums - Unsupported</span>
    52                        
    53                        <input class="checkbox"
    54                        name="wp_vanilla_connect_option[embedded]" type="checkbox"
    55                        value="1"  <?php if(isset($options['embedded'])) checked('1', $options['embedded'] ); ?> />
     70                     
     71                       
     72                           <span>Path</span>
     73                       
     74                       <input class="textbox" type="text"
     75                       name="wp_vanilla_connect_option[vcpath]" size="10px"
     76                       value="<?php echo (isset($options['vcpath']) && !empty($options['vcpath']) ? $options['vcpath'] : '/'); ?>" />
     77                   
     78                       
     79                     
    5680                       </div>
    57                
     81                       
     82                       <div>
     83                         
     84                       <span>Domain</span>
     85                       <input class="textbox" type="text"
     86                       name="wp_vanilla_connect_option[vcdomain]" size="10px"
     87                       value="<?php echo (isset($options['vcdomain']) ? $options['vcdomain'] : ''); ?>" />
     88                     
     89                       
     90                       
     91                       </div>
     92                       
     93                       <br style="clear:both" />
     94                       <strong>Vanilla Cookie Settings</strong>
     95                       If you don't know the cookie name and path the defaults will be used. I would leave domain blank. <br />
     96                       
     97                    </div>
     98           
    5899                </td>
    59100   
  • wp-vanilla-connect/trunk/wp-vanilla-connect.php

    r493041 r502611  
    44Description: Authenticates a user in Vanilla Forums if they are already logged into WordPress for a seamless user experience.
    55Author: Nicholas P. Iler
    6 Version: 1.1
     6Version: 1.1.1
    77Author URI: http://www.ilertech.com
    88Plugin URI: http://www.ilertech.com/plugins/wp-vanilla-connect
     
    262262        update_option('wp_vanilla_connect_option', $this->options);
    263263    }
     264   
     265    public function vanilla_logout(){
     266        $this->set_option();
     267       
     268        // Get the custom settings if there are any otherwise use the defaults we know should work for everyone else
     269        $name = (!isset($this->options['vcname']) ? 'Vanilla' : $this->options['vcname']);
     270        $path = (!isset($this->options['vcpath']) ? '/' : $this->options['vcpath']);
     271        $domain = $this->options['vcdomain'];
     272       
     273        setcookie($name, "", time() - 3600, $path, $domain );
     274    }
    264275}
    265276
     
    319330        }
    320331    }
     332   
     333    // If this is a logout add the action to remove vanilla cookie
     334    if(basename($_SERVER['PHP_SELF']) == 'wp-login.php' && isset($_REQUEST['action']) && $_REQUEST['action'] == 'logout'){
     335        $wpvc = new WP_Vanilla_Connect();
     336        add_action('wp_logout', array($wpvc, 'vanilla_logout'));
     337    }
     338   
    321339}elseif(basename($_SERVER['PHP_SELF']) == 'plugins.php'){ // only runs from the plugin.php page
    322340    // Activation hooks sets up the initial client_id and secret
Note: See TracChangeset for help on using the changeset viewer.