+ Reply to Thread
Results 1 to 2 of 2

Thread: [IPB,Nucleus/B:CMS] Tutorial How to integrate IP.Board to BLOG:CMS/Nucleus

  1. #1
    ohubsch is offline x10Hosting Member ohubsch is an unknown quantity at this point
    Join Date
    Nov 2007
    Posts
    3

    [IPB,Nucleus/B:CMS] Tutorial How to integrate IP.Board to BLOG:CMS/Nucleus

    Hello dear comunity

    My tutorial is about using CREATE VIEW and also CREATE TRIGGER for use one user acc in IP.Board and B:CMS/Nucleus. So it is first step to integrate IP.Board to those CMSs . Next step will be link to that forum &
    use TRIGGER for teams (for ex. you have an IP.Board forum, and you want to moderators can post items (articles) to your B:CMS/Nucleus site.)

    B:CMS/Nucleus using for authorization only one table, nucleus_member. IP.Board for same using three tables, ipb_members (user name);ipb_members_extra (email); ipb_members_converge (password hash).
    We have luck, because all B:CMS/Nucleus requirement is included in IPB tables also. So, we will DROP table member (BACKUP first if you have any data in this table!!!), and create VIEW to three ipb tables.

    For ex that:
    Code:
    DROP TABLE `nucleus_member`;
    
    CREATE VIEW `nucleus_member` AS 
    SELECT 
    	`m`.`id` AS `mnumber`,
    	`m`.`name` AS `mname`,
    	`m`.`members_display_name` AS `mrealname`,
    	`m`.`email` AS `memail`,
    	`e`.`website` AS `murl`,
    	`e`.`notes` AS `mnotes`,
    	`c`.`converge_pass_hash` AS `mpassword`,
    	`c`.`converge_pass_salt` AS `mcookiehash`,
    	`m`.`member_login_key` AS `mcookiekey`,
    	`e`.`mcanlogin` AS `mcanlogin`,
    	`e`.`deflang` AS `deflang`,
    	`e`.`madmin` AS `madmin` 
    FROM (
    	(`ipb_members` `m` 
    	JOIN `ipb_member_extra` `e` ON ((`m`.`id` = `e`.`id`))) 
    	JOIN `ipb_members_converge` `c` ON 
    		((`m`.`id` = `c`.`converge_id`)));

    So that is our first step .. If you create acc in forum now, you have acc in B:CMS/Nucleus also.


    In B:CMS/Nucleus there are table nucleus_team, what says, where user can send article / item.TRIGGER is action, what will be run, if you run query INSERT, UPDATE OR DELETE.

    So in our example, we have group with moderators (mgroup=7), and we want users in this group can post articles / items.

    TRIGGER:

    Code:
    CREATE TRIGGER `newmember_to_team` 
    BEFORE UPDATE ON `ipb_members` 
    FOR EACH ROW 
    BEGIN
    	IF (NEW.mgroup <> OLD.mgroup) THEN
    		DELETE FROM team WHERE tmember = NEW.id;
    		IF (NEW.mgroup=7) THEN
    			INSERT INTO nucleus_team (tmember, tblog, tadmin) 
    				VALUES (NEW.id, 24, 0);
    		END IF;
    	END IF;
    END;
    This trigger do:
    If there are user in mgroup=7, we will write privileges to him,
    so he is able to post new article/item. If not, it delete his privileges.
    We must also create delete trigger:

    Code:
     CREATE TRIGGER `delete_member_from_team` 
    BEFORE DELETE ON `ipb_members` 
    FOR EACH ROW 
    BEGIN
    	DELETE FROM team WHERE tmember = OLD.id;
    END;
    it is run, when you delete user from database.

    I am glad if it help anyone user in this great community .
    Last edited by ohubsch; 11-19-2007 at 04:43 AM.

  2. #2
    zzurrien's Avatar
    zzurrien is offline x10Hosting Member zzurrien is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    -
    Posts
    45

    Re: [IPB,Nucleus/B:CMS] Tutorial How to integrate IP.Board to BLOG:CMS/Nucleus

    Thanks for guide
    Can be helpful if I use IP.Board and B:CMS/Nucleus some day...
    - zzurrien

+ Reply to Thread

Similar Threads

  1. Network Folder Sharing Tutorial
    By TheJeffsta in forum Computers & Technology
    Replies: 0
    Last Post: 03-31-2006, 02:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers