This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes JForum and the fly likes JForum integration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "JForum integration" Watch "JForum integration" New topic
Author

JForum integration

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I would like to ask about JForum integration with other web applications.

the business i am working on requires me to remotely create forums, and forum groups as a response to some events that happens in my application flow, so my application needs to have access to the JForum services which may be deployed on a different server, so what is the recommended and most clean approach should i consider to do such a job ?


Thank you

hazem
[originally posted on jforum.net by haf@harf.com]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
JForum2 does not have a public API, so we usually instruct to send HTTP calls to the desired actions (for example, if you want to create a new forum, send an http call to the forum action of the admin module, much like if you were browsing it and doing the steps manually).

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Rafael Steil, tell me please, where can I get the documentation about the HTTP call API for the actions?

I need the following function:
- create new forum user
- auto login the user

Thanks!
[originally posted on jforum.net by yuriypalych]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi,

Here is the HTTP call for logging in a user:

http://localhost:8080/jforum/jforum.page?module=user&action=validateLogin&username=Admin&password=admin

I am still working on the call for creating new users, will post it here when I am done.
[originally posted on jforum.net by Tasha888]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Here is the HTTP call for creating a user:

http://localhost:8080/jforum/jforum.page?module=user&action=insertSave&username=test&email=test@test.com&password=test&password_confirm=test

Just a note:
The terms and conditions will not be displayed for the user to accept/decline, so you might want to display the terms and conditions before making the call.
[originally posted on jforum.net by Tasha888]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
If you want to integrate via a java back-end:

String jForumURL = "http://localhost:8080/jforum/jforum.page?";
String data = "module=user&action=insertSave&username="+user.getDisplayName()+"&email="+user.getEmail()+"&password="+password+"&password_confirm="+user.getPassword();
URL url = new URL(jForumURL);
URLConnection conn = url.openConnection();
conn.setDoOutput(true);

OutputStreamWriter writer = new OutputStreamWriter(conn.getOutputStream());
writer.write(data);
writer.flush();

// Get the response
BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String line;

while ((line = reader.readLine()) != null) {
//Check if it was successful or not
}

writer.close();
reader.close();

[originally posted on jforum.net by Tasha888]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hello,

I am working on a project that comes to insert the function of storage and query of videos in forums like to know how I could do to start changing the code to add this functionality JForum now thank you!
[originally posted on jforum.net by Carlos_ds_jar]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JForum integration
 
Similar Threads
Accessing JForum Variables from "External" JSP Pages
Using JForum user management in other applications
Creating new users dynamically
Administrator access to Jforum with authentication by Cookie
SSO - email address