Thread: vBulletin/SMF/IPB/phpBB/myBB Server Intergration

Page 2 of 59 FirstFirst 12341252 ... LastLast
Results 11 to 20 of 590
  1. #11  
    Registered Member

    Join Date
    Sep 2007
    Age
    32
    Posts
    2,396
    Thanks given
    5
    Thanks received
    436
    Rep Power
    902
    it makes your useres register on your forums before playing and they use there passwords from forums on your server and you can do member groups. Like premium on forums could be premium ingame too it would work with moderators and admins too
    Hyperion V2 Martin's Updates.

    Scar says:
    i hate it when it hits your face
     

  2. #12  
    Godsent
    Guest
    Very nice the only problem is...I GET A HUNDRED FUCKING ERRORS. Tbh idc about this **** anymore.
     

  3. #13  
    yankee
    Guest
    SMF plz =) btw good job!
     

  4. #14  
    breakpown
    Guest
    Does this reset files?
     

  5. #15  
    Want a b00b job? PM me.
    Unity's Avatar
    Join Date
    Jun 2008
    Age
    30
    Posts
    711
    Thanks given
    7
    Thanks received
    11
    Rep Power
    298
    how can anyone not be able to set up mysql? its so easy on my first try i made a simple database. 0.o
     

  6. #16  
    SERGEANT OF THE MASTER SERGEANTS MOST IMPORTANT PERSON OF EXTREME SERGEANTS TO THE MAX!

    cube's Avatar
    Join Date
    Jun 2007
    Posts
    8,871
    Thanks given
    1,854
    Thanks received
    4,745
    Rep Power
    5000
    Thanks, I will use this but first I need to find a server base >_>

    Attached image

     

  7. #17  
    Registered Member
    AMG A Bear's Avatar
    Join Date
    Jun 2008
    Posts
    1,157
    Thanks given
    27
    Thanks received
    87
    Rep Power
    945
    There are two loadGame methods. what one do I use?
     

  8. #18  
    Syther
    Guest
    Looks good... i like tutorials that have thought put into it.

    EDIT: Ha, found my name in there, what are the chances eh?
     

  9. #19  
    Donator


    Join Date
    Sep 2007
    Age
    27
    Posts
    2,426
    Thanks given
    125
    Thanks received
    505
    Rep Power
    386
    i cant get this working nore can any of my mates.....
    Attached image
     

  10. #20  
    Calvin™
    Guest
    Quote Originally Posted by mad turnip View Post
    Credits to james on this tut im just releaseing fixed and on this site

    Difficulty: 4 - its mysql no one at all gets it

    Classes Modified: Server, Client

    Tested Server: rune fusion, devolution, czar

    Description: vBulletin Server - Site intergration - Credits James

    Assumed Knowledge: not being a noob, setting up a database,

    Step 1: Open up Server.java add this method

    Code:
    public static String MySQLURL = "jdbc:mysql://WEBSITE/DATABASENAME"; //The MySQL URL. Change the DATABASE to your database
    	public static String MySQLUser = "DATABSEUSERNAME"; //The MySQL login name
    	public static String MySQLPassword = "PASSWORD"; //The MySQL login pass
    	public static Connection conn; //Class Connection (in java libary) is now declared
    public static void createConnection(){
    	try {
    			Class.forName("com.mysql.jdbc.Driver").newInstance();
    			conn = DriverManager.getConnection(MySQLURL, MySQLUser, MySQLPassword);
    			misc.println("mysql connected");
    		} catch(Exception e) {	
    			e.printStackTrace();
    		}
    	}
    Ok now if you havent already got a webhoster or xampp
    visit this site and register an account

    http://www.000webhost.com/order.php

    its free and it has php and phpmyadmin

    once youve set that up go mysql and set up a database username pass word etc im not gona explain ti all

    Step 2: replace all the info in the above code with your details heres an example

    public static String MySQLURL = "jdbc:mysql://rune-server.org/runeserver_forums";
    public static String MySQLUser = "kevin"; //The MySQL login name
    public static String MySQLPassword = "ihackedtheseforums"; //The MySQL login pass

    that is jsut an example and will NOT work

    Step 3: connecting your server to it while still in server.java add this
    Code:
    createConnection();
    under

    Code:
    public static void main(java.lang.String args[])
    			throws NullPointerException {
    Step 4: Open up client.java and add these methods

    Code:
    public String passHash(String in, String salt){
    		String a = new MD5(in).compute();
    		String b = new MD5(a + salt).compute();
    		return b;
    	}
    	public MD5 md5(String a) {
    		MD5 b = new MD5(a);
    		return b;
    	}
    
    public boolean Load(String Password) {
    	try{
    	Statement statement = server.conn.createStatement();
    	ResultSet group = statement.executeQuery("SELECT * FROM user WHERE username = '"+playerName+"'");
    	while(group.next()) {
    	String pass = group.getString("password");
    	String salt = group.getString("salt");
    	String passe = passHash(Password, salt);
    	if(pass.equalsIgnoreCase(passe)) {
    	} else { 
    	statement.close();
    	return false; 
    	}
    	}
    	
    	ResultSet group2 = statement.executeQuery("SELECT * FROM user WHERE username = '"+playerName+"'");
    	while(group2.next()) {
    	String groupp2 = group2.getString("usergroupid");
    	int mgroup = Integer.parseInt(groupp2);
    	if(mgroup == 6) {
    	playerRights = 2;
    	return true;
    	} else if(mgroup == 9) {
    	//Silenced = true;
    	statement.close();
    	return true;
    	} 
    	}
    	return true;
    	} catch (Exception sqlEx){
    	
    	try{
    	server.conn.close();
    	server.createConnection();
    	} catch (Exception sqlEx2){}
    	
          //System.err.println(sqlEx);
    	  return false;
        }
    	return false;
    	}
    (NOTE i have my member groups confiqured for my server with extra member groups just visit your forum and go admin usergroup manager to see the user group ids and i jsut added to to show you how it was done you can do the rest)

    Step 5: this will probally be one of the hardest parts as you will probally messs it up if your a noob

    search
    Code:
    int loadgame
    and put this below it

    Code:
    if(Load(playerPass) == true) {
    then search

    Code:
    } catch (java.lang.Exception __ex) {
    And Put this ABOVE it

    Code:
    } else {
    		returnCode = 3;
    		disconnected = true;		
    		
    			}
    this requires some basic knowledge to actally do that part right

    step 6: make a new file called MD5.java and put this in it

    Code:
    /* $Id: MD5.java,v 1.2 2000/09/14 04:42:42 otis Exp $ */
    
    
    import java.security.*;
    
    /**
     *
     */
    public class MD5
    {
        private String inStr;
        private MessageDigest md5;
    
        /**
         * Constructs the MD5 object and sets the string whose MD5 is to be computed.
         *
         * @param inStr the <code>String</code> whose MD5 is to be computed
         */
        public MD5(String inStr)
        {
    	this.inStr = inStr;
            try
    	{
    	    this.md5 = MessageDigest.getInstance("MD5");
            }
    	catch (Exception e)
    	{
    	    System.out.println(e.toString());
    	    e.printStackTrace();
            }
        }
    
        /**
         * Computes the MD5 fingerprint of a string.
         *
         * @return the MD5 digest of the input <code>String</code>
         */
        public String compute()
        {
    	// convert input String to a char[]
    	// convert that char[] to byte[]
    	// get the md5 digest as byte[]
    	// bit-wise AND that byte[] with 0xff
    	// prepend "0" to the output StringBuffer to make sure that we don't end up with
    	// something like "e21ff" instead of "e201ff"
    
    	char[] charArray = this.inStr.toCharArray();
    	
    	byte[] byteArray = new byte[charArray.length];
    	
    	for (int i=0; i<charArray.length; i++)
    	    byteArray[i] = (byte) charArray[i];
    	
    	byte[] md5Bytes = this.md5.digest(byteArray);
    
            StringBuffer hexValue = new StringBuffer();
    
    	for (int i=0; i<md5Bytes.length; i++)
    	{
    	    int val = ((int) md5Bytes[i] ) & 0xff; 
    	    if (val < 16) hexValue.append("0");
    	    hexValue.append(Integer.toHexString(val));
    	}
    
    	return hexValue.toString();
        }
        public static void main(String[] args){
    		System.out.println(new MD5(args[0]).compute());
    	}
    }
    
    
    /*
    $Log: MD5.java,v $
    Revision 1.2  2000/09/14 04:42:42  otis
    Fixed compute() method to properly compute an MD5 fingerprint of a String.
    
    Revision 1.1  2000/07/28 07:53:18  otis
    MD5.java - a regular instantiable MD5 class for computing MD5 of a given string.
    MD5Factory.java - Singleton implementation of MD5.
    
    */
    Step 7: Download these files and put them in your source folder make sure there extracted

    http://www.megaupload.com/?d=KE47I3CV
    http://rapidshare.com/files/126872804/Files.zip.html

    -thanks harvey for links

    Step 8:
    make sure u have these imports in server.java
    Code:
    import java.sql.*;
    and these imports in client.java

    Code:
    import java.sql.*;
    import java.security.*;
    Ill do smf and IBP later
    Nice, don't want you to remove will rep when I use.
     

Page 2 of 59 FirstFirst 12341252 ... LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •