• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

JForum integration

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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]
 
reply
    Bookmark Topic Watch Topic
  • New Topic