Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 14,076 through 14,100 (of 32,522 total)
  • Author
    Search Results
  • #135426
    Rachel Biel
    Participant

    BBpress has reduced the text editor to a minimal one that is really sub-par, in my opinion. I would really like to use something like a TinyMCE version that works for all of the users. There is this one, set up for bbpress, but only authors and above see it: http://wordpress.org/plugins/bbpress-enable-tinymce-visual-tab/

    We are an arts org and we need to have good ways to share visual content. I loaded GD BBPress Attachments which is fine for uploading images and docs, but you can’t insert them into the text: http://www.dev4press.com/plugin/gd-bbpress-attachments/

    I found this one: http://premiumsoftware.net/CLEditor/Index, but it’s not as nice as the TinyMCE ones that I’ve used and it shows the bbpress one (the minimal one) right above it, so that is confusing, too. Do you have any recommendations of what would work well for us?

    Site: http://www.tafaforum.com/
    We’re using the latest updates of bbPress, etc.

    I’m pretty savvy (even though I don’t write code) and I don’t even know what “ol” means, much less the other artists who are using our forum…

    Rachel Biel
    Participant

    I have a problem and I don’t know if it is related to BuddyPress or BBPress and it’s made it very confusing for our users. The same thread shows up in the three pages: Activity Streams, Group Home Page and Group Forum Page. I have deactivated the sitewide Forums as I think it is confusing enough without it. So, we are focusing on having Group topics and discussing within them. But, because the thread shows up in all three places and can be replied to in any of them, one would think that the replies would follow through on all of the pages where the thread is displayed.

    I think that this might have something to do with nested replies. They show up on the Activity Streams (if one replies on that page) and on the Group Home page, but they don’t follow through on the forum. You can see it here: http://www.tafaforum.com/user-groups/blogging-general/ Members are supposed to register their blogs on the Topic page of the forum: http://www.tafaforum.com/user-groups/blogging-general/forum/topic/register-your-blog-here/ Most did not understand that they should go to their page and just added their blogs to the Home page of that group. I replied with “Added” for the ones that I added to the RSS Feed (http://www.tafaforum.com/tafamemberblogs/) But, my “Added” reply does not show up on the Forum Topic version of the same thread.

    Any suggestions on how to deal with this? It makes things very confusing.

    I don’t want to mess with code so if you have suggestions, please make them for what can be done within the BBPress or BuddyPress options….

    #135424
    designerdougm
    Participant

    I’ve been digging around in the code and it seem like it’s impossible to make a user type that can view a forum but not post in it. Am I missing something?

    It seems like a user’s ability to post/reply is global. Is there any way to quickly accomplish this?

    My goal:

    A user type that can view public and private forums, but only post in public.

    I was originally attempting to add a new forum type, but quickly realized it was out of scope for the timeframe I’m looking to accomplish this in. That said, regardless of whether or not I add a new forum type, or repurpose existing types, I’m at a brick wall if there’s no way to check posting privileges in an individual forum. Has anyone tackled this issue already? I love the simplicity of bbPress and really want to avoid having to use a more fleshed out forum package, but this is a very necessary feature.

    #135400
    Hansaplastique
    Participant

    This “topic” was also discussed in an older (2 years old) Post.
    But no clarification how “safe” it is to remove the mod_security rule for particular bbPress links (which ones, anyone?).

    #135399
    Hansaplastique
    Participant

    Since bbPress sanitizes a post, is it save to disable the mod_security rule (for forum pages only) concerning the SQL injection rules?

    (what do you do on this forum?)

    #135398
    Hansaplastique
    Participant

    Alright found the cause of this issue: mod_secure is catching it 🙁

    Any way to make this work without compromising security?
    (ie. the bbpress.org server seems to be fine with posting this)

    #135396
    Hansaplastique
    Participant

    FYI: I have looked at Debugging in WordPRess.

    I did install the “debug bar” but the amount of queries and info after a post is not telling me why it did not post.

    Are there other factors that can make it that such a post will not be posted?
    (ie. mod_secure on the webserver, etc – any logs I can snoop through, etc)

    #135394
    Hansaplastique
    Participant

    One step further: if I try to submit this code in my test environment (local network), it works just fine.

    Does anyone have an idea how to debug/approach this issue?

    #135381
    Hansaplastique
    Participant

    Since that worked just fine here, I’ll have to blame my own editor 🙂
    (I’m using a rich editor, not TinyMCE)

    If I send “rich” content to BBPress (ie. HTML), what would the proper formatting be for code?

    #135380
    Hansaplastique
    Participant

    Well after playing with this issue for several hours I have narrowed the problem down to this;

    If I try to post the following trivial example code example:

    update project_management set prj_first_activated = CURRENT_DATE;

    the post will not be posted (I guess trying that here will help get insight – if it behaves the same, then I know that there is a good chance that it’s BBPress related).

    If I leave the “=” out of the code however, it posts just fine.

    #135378
    Hansaplastique
    Participant

    I have a section in my bbPress Forums (bbPress 2.3.2 + WordPress 3.5.2) related to SQL.
    So … users will post SQL example code, but it appears bbPress is simply rejecting the entire post, without even a warning.

    Is this a “standard” filtering by bbPress (to avoid injections)?
    Is there a way around this limitation?
    Does it involve only a few keywords/characters?

    (Yes; I did try Google and searching this forum)

    Any help or insight would be very much appreciated 🙂

    #135374
    @mercime
    Moderator

    @janhoos to control page titles in bbPress pages, add to your stylesheet:

    body.bbpress h1.entry-title {
    // your styles here
    }
    #135369
    RiGoRmOrTiS_UK
    Participant

    I would really like to get the @username displayed under a person’s name next to the avatar; the same as these forums; some of my forum users have changed their display names and its making it less user friendly when people try to use @username to get someone’s attention through mentions.

    I have read all the info from @johnjamesjacoby above; but it kinda went over my head; ideally I’d love to know exactly what php file to edit and what code to insert and at what specific line/area of said PHP file 🙂 if possible!

    Hope someone can help! thanks!

    #135366
    Travis
    Participant

    I had to add another line to get this working:

    add_theme_support( 'post-thumbnails', array( 'forum' ) );
    add_post_type_support('forum', 'thumbnail');
    
    #135364
    wghyzer
    Participant

    The short code [bbp-forum-index] displays an entire list of forums while the side bar widget bbPress List can be made to display just the Forum root. Is there a way to either make the [bbp-forum-index] display just the forum rootlist or can the widget bbPress List be made to display on a page?

    Thank You

    #135359
    jwondrusch
    Participant

    After much trial and error, I’ve come to a solution that retains permission control and shows the first post when using Wishlist Member with bbPress:

    
    // Create a new filtering function that will add our where clause to the query
    add_filter( 'posts_where', 'your_filter_where', 99 );
    function your_filter_where( $where ) {
    
    	global $post;
            
            // Limit to posts so it's not ruining permission queries all around the site.  You could also check user level if you need further specificity.
    	if( get_post_type( $post->ID ) == 'topic' ) {
    
                    // The Solution: Match based on post id AND parent id.  The admin query did this, the user query did not, so we do a simple search and replace to make it happen.
    		$search = $wpdb->prefix . 'posts.post_parent = ' . $post->ID;
    		$replace = '( ' . $wpdb->prefix . 'posts.post_parent = ' . $post->ID . ' OR ' . $wpdb->prefix.'posts.ID = ' . $post->ID . ' ) ';
    		
    		$where = str_replace( $search, $replace, $where);
    
    	}
    
    	return $where;
    }
    

    Due to the way that WLM obfuscates their code, it’s impossible to know exactly HOW they are re-constructing queries, but this is a quick starting point for anyone looking to solve the issue of WLM not showing bbPress’s first post in a topic to users.

    Hope it helps!

    Jonathan

    #135351
    Developer ICAN
    Participant

    Hi,

    Is it possible to add a forum to my WP sites existing category list? I’d see this as just adding the categories box as you see in the post admin screen to the forum admin screen?

    This is what i’m trying to do ..

    I have posts on my site that represent the stages in a pregnancy (1-40). Rather than using a shortcode to add a forum to each of these posts (40 of them and possible more), i was thinking i could just add something to the template of the post to pull all forums that have been added to the category this post has been added to?

    Is this possible anyone?

    Thanks for any help in advance!

    #135342

    In reply to: Color my forums

    yguvvala
    Participant

    Hi Tecca,

    That didnt work. changing this codes doesnt reflect any changes on my forums page. in my Godaddy account i am changing this under

    webroot / wp-content / plugins / bbpress / templates / default / css / bbpress.css

    if you think am editing wrong file please let me know.

    #135341

    In reply to: Color my forums

    Tecca
    Participant

    In your bbpress.css file, change the background of each of these:

    .entry-title {
    background: red;
    }
    
    #bbpress-forums div.odd,
    #bbpress-forums ul.odd {
    background: yellow;
    }
    
    #bbpress-forums div.even,
    #bbpress-forums ul.even {
    background: green;
    }

    Just change those color names to hex codes to make them look a bit better.

    ovizii
    Participant

    These two are in need of a serious overhaul and I lack the skills to do it. Please read this text and let me know if you agree or if I’m looking for something nobody else needs?

    Lets look at the recent replies widget:
    If I have the widget show the last 10 replies, and the last 10 replies happened to be on the same topic, you only see that one topic, everything else is drowned out.
    The good thing is, if I click on a reply, I jump straight to that reply, not to the beginning of the topic.

    Lets look at the recent topics widget:
    Sorting by newest topics, this is pretty neat but I wish one could also show the specific forum with each recent topic shown. Clicking a topic sends you to the beginning of that particular topic, which is cool, after all its a new topic.

    Now to get what I was looking for with regards to the recent replies, I am now using the recent topics widget but sorted by topics with recent replies. Except that it doesn’t list the latest poster but the thread creator and it links to the topic’s beginning and not to the latest reply.

    I kinda feel we had a lot more power, plugins and extensibility with the old bbpress before version 2 came along.

    Unfortunately, I’m not a coder so I can either wait until someone helps out or move to another solution.

    Any thoughts?

    #135324
    Mariusz Szatkowski
    Participant

    @baldg0at
    Your code does not work in functions.php
    It returns all the WP posts, not bbpress posts ;(
    Please help!

    #135306
    kathrynananda
    Participant

    it’s happening whether I use the built in forum space or same problem when i use a short code in the groups extras page.

    forums are loading fine when they are on single forum page, or short code calls them into a worpdress page.

    totally stumped.

    http://www.cielcolab.com

    dvclmn
    Participant

    Hey guys, thanks for taking the time to look after this.

    I know there are a lot of posts dedicated to vBulletin import issues, but after hours of searching I haven’t been able to find a resolution. Hoping you can help!

    I have read the known issues page (http://codex.bbpress.org/import-forums/vbulletin/) thoroughly and have made sure every detail is correct:

    Selected Platform: vBulletin
    Database Server: IP or hostname (in my case another-castle.com)
    Database Port Use default 3306 if unsure
    Database Name Name of the database with your old forum data
    Database User User for your database connection
    Database Password Password to access the database
    Table Prefix (in my case vb_)

    I just get ‘no forums/users/etc to convert’.

    No data is imported.

    I know that you can’t know if I’m getting a password or username wrong, but I am using the details I use to successfully log in to my server/phpMyadmin etc.

    I am in such urgent need of this to work that I am happy to pay for further support – whatever it takes. Please let me know if there’s any more information I can give to help this along.

    Thanks so much.

    Dave.

    #135299
    cappazushi
    Participant

    The best I can do is get the sidebar showing up underneath to forums.

    http://www.jrpgclub.com/forums/

    (I don’t think the sidebar will show up on any other pages in the forum section yet, as I have added the code into any other templates.)

    All I needed to do to get them to show was drop in:

    <?php get_sidebar(); ?>

    Correct positioning is a real hassle though. Can anyone help me? I’d very much appreciate it.

    #135287
    vogelsang
    Participant

    I am working on getting a drupal forum migrated to bbpress. I am using the bbpress importer tool. The forum I am migrating has about 4000 topics and 40000 replies. The migration works fine for a few topics, but seems to get stuck at random places after about a 1000 records are migrated. This makes me think that it is not a data problem. More likely some sort of timeout.

    Have any of you experienced something similar? I am running things locally with the most recent stable versions of WP and bbpress.

    Here is my script. It is not well-tested. Any suggestions for improvements are welcome and feel free to use it as part of bbpress in whatever way you feel like.

    
    <?php
    
    /**
     * Implementation of Drupal Forum converter.
     */
    class Drupal extends BBP_Converter_Base
    {
    	function __construct()
    	{
    		parent::__construct();
    		$this->setup_globals();
    	}
    
    	public function setup_globals()
    	{
    		/** Forum Section ******************************************************/
    
    		// Forum id. Stored in postmeta.
    		$this->field_map[] = array(
    			'from_tablename' => 'taxonomy_term_data', 'from_fieldname' => 'tid', //TODO correct ID??
    			'to_type' => 'forum', 'to_fieldname' => '_bbp_forum_id',
    		);
    		
    		// Forum parent id.  If no parent, than 0. Stored in postmeta.
    		//$this->field_map[] = array(
    		//	'from_tablename' => 'forum', 'from_fieldname' => 'parentid',
    		//	'to_type' => 'forum', 'to_fieldname' => '_bbp_parent_id'
    		//);
    		
    		// Forum title.
    		$this->field_map[] = array(
    			'from_tablename' => 'taxonomy_term_data', 'from_fieldname' => 'name',
    			'to_type' => 'forum', 'to_fieldname' => 'post_title'
    		);
    		
    		// Forum slug. Clean name.
    		$this->field_map[] = array(
    			'from_tablename' => 'taxonomy_term_data', 'from_fieldname' => 'name',
    			'to_type' => 'forum', 'to_fieldname' => 'post_name',
    			'callback_method' => 'callback_slug'
    		);
    		
    		// Forum description.
    		$this->field_map[] = array(
    			'from_tablename' => 'taxonomy_term_data', 'from_fieldname' => 'description',
    			'to_type' => 'forum', 'to_fieldname' => 'post_content',
    			'callback_method' => 'callback_null'
    		);
    		
    		// Forum display order.  Starts from 1.
    		$this->field_map[] = array(
    			'from_tablename' => 'taxonomy_term_data', 'from_fieldname' => 'weight',
    			'to_type' => 'forum', 'to_fieldname' => 'menu_order'
    		);
    		
    		// Forum date update.
    		$this->field_map[] = array(
    			'to_type' => 'forum', 'to_fieldname' => 'post_date',
    			'default' => date('Y-m-d H:i:s')
    		);
    		$this->field_map[] = array(
    			'to_type' => 'forum', 'to_fieldname' => 'post_date_gmt',
    			'default' => date('Y-m-d H:i:s')
    		);
    		$this->field_map[] = array(
    			'to_type' => 'forum', 'to_fieldname' => 'post_modified',
    			'default' => date('Y-m-d H:i:s')
    		);
    		$this->field_map[] = array(
    			'to_type' => 'forum', 'to_fieldname' => 'post_modified_gmt',
    			'default' => date('Y-m-d H:i:s')
    		);
    
    		/** Topic Section ******************************************************/
    
    		// Topic id. Stored in postmeta.
    		$this->field_map[] = array(
    			'from_tablename' => 'forum_index', 'from_fieldname' => 'nid',
    			'to_type' => 'topic', 'to_fieldname' => '_bbp_topic_id'
    		);
    		
    		// Forum id. Stored in postmeta.
    		$this->field_map[] = array(
    			'from_tablename' => 'forum_index', 'from_fieldname' => 'tid',
    			'to_type' => 'topic', 'to_fieldname' => '_bbp_forum_id',
    			'callback_method' => 'callback_forumid'
    		);
    				
    		// Topic author.
    		$this->field_map[] = array(
    			'from_tablename' => 'node', 
    			'from_fieldname' =>  'uid',
    			'join_tablename'  => 'forum_index',
    			'join_type'       => 'INNER',
    			'join_expression' => 'ON node.nid = forum_index.nid',
    			'to_type' => 'topic', 
    			'to_fieldname' => 'post_author',
    			'callback_method' => 'callback_userid'
    		);	
    
    		// Topic content.
    		// Note: We join the posts table because topics do not have content.
    		$this->field_map[] = array(
    			'from_tablename'  => 'field_data_body',
    			'from_fieldname'  => 'body_value',
    			'join_tablename'  => 'node',
    			'join_type'       => 'INNER',
    			'join_expression' => 'ON field_data_body.revision_id = node.vid', 			
    			'to_type'         => 'topic',
    			'to_fieldname'    => 'post_content',
    			'callback_method' => 'callback_html'
    		);		
    				
    		// Topic title.
    		$this->field_map[] = array(
    			'from_tablename' => 'forum_index', 'from_fieldname' => 'title',
    			'to_type' => 'topic', 'to_fieldname' => 'post_title'
    		);
    		
    		// Topic slug. Clean name.
    		$this->field_map[] = array(
    			'from_tablename' => 'forum_index', 
    			'from_fieldname' => 'title',
    			'to_type' => 'topic', 
    			'to_fieldname' => 'post_name',
    			'callback_method' => 'callback_slug'
    		);
    		
    		// Forum id.  If no parent, than 0.	
    		$this->field_map[] = array(
    			'from_tablename' => 'forum_index', 'from_fieldname' => 'tid',
    			'to_type' => 'topic', 'to_fieldname' => 'post_parent',
    			'callback_method' => 'callback_forumid'
    		);
    
    		// Topic reply count
    		// $this->field_map[] = array(
    			// 'from_tablename'  => 'forum_index',
    			// 'from_fieldname'  => 'comment_count',
    			// 'to_type'         => 'topic',
    			// 'to_fieldname'    => '_bbp_reply_count'
    			// //,
    			// //'callback_method' => 'callback_topic_reply_count'
    		// );
    		
    		// Topic date update.
    		$this->field_map[] = array(
    			'from_tablename' => 'forum_index', 'from_fieldname' => 'created',
    			'to_type' => 'topic', 'to_fieldname' => 'post_date',
    			'callback_method' => 'callback_datetime'
    		);
    		$this->field_map[] = array(
    			'from_tablename' => 'forum_index', 'from_fieldname' => 'created',
    			'to_type' => 'topic', 'to_fieldname' => 'post_date_gmt',
    			'callback_method' => 'callback_datetime'
    		);
    		$this->field_map[] = array(
    			'from_tablename' => 'forum_index', 'from_fieldname' => 'last_comment_timestamp',
    			'to_type' => 'topic', 'to_fieldname' => 'post_modified',
    			'callback_method' => 'callback_datetime'
    		);
    		$this->field_map[] = array(
    			'from_tablename' => 'forum_index', 'from_fieldname' => 'last_comment_timestamp',
    			'to_type' => 'topic', 'to_fieldname' => 'post_modified_gmt',
    			'callback_method' => 'callback_datetime'
    		);
    
    		/** Tags Section ******************************************************/
    		
    		// Topic id.
    		// $this->field_map[] = array(
    			// 'from_tablename' => 'tagcontent', 'from_fieldname' => 'contentid',
    			// 'to_type' => 'tags', 'to_fieldname' => 'objectid',
    			// 'callback_method' => 'callback_topicid'
    		// );
    		
    		//Tags text.
    		// $this->field_map[] = array(
    			// 'from_tablename' => 'tag', 'from_fieldname' => 'tagtext',
    			// 'join_tablename' => 'tagcontent', 'join_type' => 'INNER', 'join_expression' => 'USING (tagid)',
    			// 'to_type' => 'tags', 'to_fieldname' => 'name'
    		// );		
    
    		/** Post Section ******************************************************/
    
    		// Post id. Stores in postmeta.
    		$this->field_map[] = array(
    			'from_tablename' => 'comment', 'from_fieldname' => 'cid',
    			'to_type' => 'reply', 'to_fieldname' => '_bbp_post_id'
    		);
    		
    		// Forum id. Stores in postmeta.
    		$this->field_map[] = array(
    			'from_tablename' => 'forum', 
    			'from_fieldname' => 'tid',
    			'join_tablename'  => 'comment',
    			'join_type'       => 'INNER',
    			'join_expression' => 'ON forum.nid = comment.nid',
    			'to_type' => 'reply', 'to_fieldname' => '_bbp_forum_id',
    			'callback_method' => 'callback_topicid_to_forumid'
    		);
    		
    		// Topic id. Stores in postmeta.
    		$this->field_map[] = array(
    			'from_tablename' => 'comment', 'from_fieldname' => 'nid',
    			'to_type' => 'reply', 'to_fieldname' => '_bbp_topic_id',
    			'callback_method' => 'callback_topicid'
    		);
    		
    		// Author ip.
    		$this->field_map[] = array(
    			'from_tablename' => 'comment', 'from_fieldname' => 'hostname',
    			'to_type' => 'reply', 'to_fieldname' => '__bbp_author_ip'
    		);	
    			
    		// Post author.
    		$this->field_map[] = array(
    			'from_tablename' => 'comment', 'from_fieldname' => 'uid',
    			'to_type' => 'reply', 'to_fieldname' => 'post_author',
    			'callback_method' => 'callback_userid'
    		);
    		
    		// Topic title.
    		$this->field_map[] = array(
    			'from_tablename' => 'comment', 'from_fieldname' => 'subject',
    			'to_type' => 'reply', 'to_fieldname' => 'post_title'
    		);
    		
    		// Topic slug. Clean name.
    		$this->field_map[] = array(
    			'from_tablename' => 'comment', 
    			'from_fieldname' => 'subject',
    			'to_type' => 'reply', 
    			'to_fieldname' => 'post_name',
    			'callback_method' => 'callback_slug'
    		);
    		
    		// Post content.
    		// Note: We join the posts table because topics do not have content.
    		$this->field_map[] = array(
    			'from_tablename'  => 'field_data_comment_body',
    			'from_fieldname'  => 'comment_body_value',
    			'join_tablename'  => 'comment',
    			// 'join_type'       => 'INNER',
    			'join_expression' => 'ON field_data_comment_body.entity_id = comment.cid',
    			'to_type'         => 'reply',
    			'to_fieldname'    => 'post_content',
    			'callback_method' => 'callback_html'
    		);	
    		
    		// Post content.
    		// BRUGES IKKE - SE OVENFOR
    		// $this->field_map[] = array(
    			// 'from_tablename' => 'post', 'from_fieldname' => 'pagetext',
    			// 'to_type' => 'reply', 
    			// 'to_fieldname' => 'post_content',
    			// 'callback_method' => 'callback_html'
    		// );
    		
    		// Topic id.  If no parent, than 0.
    		$this->field_map[] = array(
    			'from_tablename' => 'comment', 'from_fieldname' => 'nid',
    			'to_type' => 'reply', 'to_fieldname' => 'post_parent',
    			'callback_method' => 'callback_topicid'
    		);
    
    		// Topic date update.
    		$this->field_map[] = array(
    			'from_tablename' => 'comment', 
    			'from_fieldname' => 'created',
    			'to_type' => 'reply', 
    			'to_fieldname' => 'post_date',
    			'callback_method' => 'callback_datetime'
    		);
    		$this->field_map[] = array(
    			'from_tablename' => 'comment', 
    			'from_fieldname' => 'created',
    			'to_type' => 'reply', 
    			'to_fieldname' => 'post_date_gmt',
    			'callback_method' => 'callback_datetime'
    		);
    		$this->field_map[] = array(
    			'from_tablename' => 'comment', 
    			'from_fieldname' => 'changed',
    			'to_type' => 'reply', 
    			'to_fieldname' => 'post_modified',
    			'callback_method' => 'callback_datetime'
    		);
    		$this->field_map[] = array(
    			'from_tablename' => 'comment', 
    			'from_fieldname' => 'changed',
    			'to_type' => 'reply', 
    			'to_fieldname' => 'post_modified_gmt',
    			'callback_method' => 'callback_datetime'
    		);
    
    		/** User Section ******************************************************/
    
    		// Store old User id. Stores in usermeta.
    		// $this->field_map[] = array(
    			// 'from_tablename' => 'users', 'from_fieldname' => 'uid',
    			// 'to_type' => 'user', 'to_fieldname' => '_bbp_user_id'
    		// );
    		
    		// Store old User password. Stores in usermeta serialized with salt.
    		// $this->field_map[] = array(
    			// 'from_tablename' => 'users', 'from_fieldname' => 'pass',
    			// 'to_type' => 'user', 'to_fieldname' => '_bbp_password',
    			// 'callback_method' => 'callback_savepass'
    		// );
    
    		// Store old User Salt. This is only used for the SELECT row info for the above password save
    		// todo ???
    		//$this->field_map[] = array(
    		//	'from_tablename' => 'users', 'from_fieldname' => 'salt',
    		//	'to_type' => 'user', 'to_fieldname' => ''
    		//);
    				
    		// // User password verify class. Stores in usermeta for verifying password.
    		// $this->field_map[] = array(
    			// 'to_type' => 'users', 'to_fieldname' => '_bbp_class',
    			// 'default' => 'Vbulletin'
    		// );
    		
    		// // User name.
    		// $this->field_map[] = array(
    			// 'from_tablename' => 'users', 'from_fieldname' => 'name',
    			// 'to_type' => 'user', 'to_fieldname' => 'user_login'
    		// );
    				
    		// // User email.
    		// $this->field_map[] = array(
    			// 'from_tablename' => 'users', 'from_fieldname' => 'mail',
    			// 'to_type' => 'user', 'to_fieldname' => 'user_email'
    		// );
    		
    		// User homepage.
    		// $this->field_map[] = array(
    			// 'from_tablename' => 'users', 'from_fieldname' => 'homepage',
    			// 'to_type' => 'user', 'to_fieldname' => 'user_url'
    		// );
    		
    		// User registered.
    		// $this->field_map[] = array(
    			// 'from_tablename' => 'users', 'from_fieldname' => 'created',
    			// 'to_type' => 'user', 'to_fieldname' => 'user_registered',
    			// 'callback_method' => 'callback_datetime'
    		// );
    		
    		// User aim.
    		//$this->field_map[] = array(
    		//	'from_tablename' => 'users', 'from_fieldname' => 'aim',
    		//	'to_type' => 'user', 'to_fieldname' => 'aim'
    		//);
    		
    		// User yahoo.
    		//$this->field_map[] = array(
    		//	'from_tablename' => 'users', 'from_fieldname' => 'yahoo',
    		//	'to_type' => 'user', 'to_fieldname' => 'yim'
    		//);	
    	}
    	
    	/**
    	 * This method allows us to indicates what is or is not converted for each
    	 * converter.
    	 */
    	public function info()
    	{
    		return '';
    	}
    
    	/**
    	 * This method is to save the salt and password together.  That
    	 * way when we authenticate it we can get it out of the database
    	 * as one value. Array values are auto sanitized by WordPress.
    	 */
    	public function callback_savepass( $field, $row )
    	{
    		$pass_array = array( 'hash' => $field, 'salt' => $row['salt'] );
    		return $pass_array;
    	}
    
    	/**
    	 * This method is to take the pass out of the database and compare
    	 * to a pass the user has typed in.
    	 */
    	public function authenticate_pass( $password, $serialized_pass )
    	{
    		$pass_array = unserialize( $serialized_pass );
    		return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ) );
    	}
    
    }
    
Viewing 25 results - 14,076 through 14,100 (of 32,522 total)
Skip to toolbar