asterisk2billing.org
http://forum.asterisk2billing.org/

A2billing Joomla integration
http://forum.asterisk2billing.org/viewtopic.php?f=18&t=3054
Page 1 of 2

Author:  mobzone [ Mon Jan 14, 2008 1:45 am ]
Post subject:  A2billing Joomla integration

Hi there

I was able to setup a scenario where a2billing users were registered as Joomla users however i am having an issue with the sessions and authentication.

Heres an overview of what I have done

1.I have joomla and a2billing on 2 seperate databases
2.I used the "MySql Auth Plugin" (http://extensions.joomla.org/component/ ... Itemid,35/ ) to allow a2billing users to automatically register on joomla through the joomla login interface.

Here are the issues
1.The a2billing login form uses different form variables eg pr_login instead of username as form field names

2.i assume the sessions should be setup differently to allow the login. (I am new to php and programming so I am unsure)

I think that a2billing can be integrated with joomla as with this type of bridge however help is needed from a veteran programmer

Thank you for your time and hope some help will come my way

Author:  mobzone [ Tue Jan 15, 2008 6:59 pm ]
Post subject: 

Hi,

Just an update.I am using the email to login users. Thats not the issue. The real issue is that the login interface does not login to both joomla as and a2billing due to the following

1.The username form field in the login module in Joomla using SQL auth is "username" whereas the one used to login a2billing users is called "pr_login"
2.The sessions maybe an issue although if i can get the login form to post "the correct variales to a2billing,ie pr_password and pr_login, this should not be an issue

I have tried the login but the "access denied error is shown when going to the a2billing interface however if i am logged in to a2billing and log in from the joomla sql module login i am take to the a2billing interface

I have tried to incorporate a javascript in the sql joomla module in order to complete the following

1.Firstly equate the variable "username" and "password" in the joomla module login to the a2billing variables "pr_login" and "pr_passwd" or post the form directly to the a2billing customer interface login ie index2.php.
2.I would then setup the SQL module to redirect to the a2billing interface and thus the correct variable will be posted, which is what would be the case if logining in from a2billing itself, and thus the user would be logged in in both joomla nad a2billing

The issue that would remain would be to sort out and syncronise the logout buttons so that is would log the user out from both interfaces

Heres the sql query I used in the SQL login component setup in Joomla

SELECT firstname AS name, email AS username, email AS email, credit, activated, id, id_didgroup, tariff, vat, activatedbyuser FROM cc_card WHERE email = '%{user}' AND uipass = '%{pass}'

a2billing doesnt seem to use MD5 encryption fro the password.

I hope I have explained things clearly and hope that you may be able to help. i am new to progrmming thus it might be easier that it seems to do the javascript code to equate the form variable to be posted

Thanks

Author:  asiby [ Tue Jan 15, 2008 7:37 pm ]
Post subject: 

Is the Joomla form a modules or a component? What is the name of the entity? mod_xxxxx or com_xxxxxx?

If you intend to you that form only for a2billing, you can hack into it and change the name of the for elements value.

Another thing. You might like it. I came across a Mambo/Joomla mambot once. It has the ability to let site administrators enter any PHP or HTML code (including forms) directly as content of a user module. The beauty of this is that you can paste the a2billing login form in there, and edit the action parameter of the form tag and you are done. The action must of course be the domain on which a2billing's customer login form will be processed. No need to manage a separate MySQL.

Regards

Edit: Replaced "... and edit the target parameter of the form tag ..." with "... and edit the action parameter of the form tag ..."

Author:  xrg [ Tue Jan 15, 2008 7:53 pm ]
Post subject: 

Just a hint: if you are planning on combining such different systems on a common database, consider using Postgres rather than MySQL.

The advantage of Postgres is that you can play around with views/rules and have instances of the same database that 'translate' into each system's native tables. Postgres gives you great flexibility in "virtual" tables and objects.

Author:  mobzone [ Tue Jan 15, 2008 9:00 pm ]
Post subject: 

Hi...Thanks for the hint..Will look into it however i have limited experience and to be honest my programming knowledge is limited. I have only worked with mysql and PHP... any help with the javascript code to submit the login form to either 2 locations or to post the variables correctly as described in my last post would be appreciated...I know that this sort of integration is not needed my most people but there are many value added servces as well as business management services that can be integrated to provide a better customer experience as well as manage the business more effectively.

Author:  asiby [ Thu Jan 17, 2008 2:24 pm ]
Post subject: 

Paste this code wherever you want and make sure that you replace your.customerUIdomain.com with the domain name of your A2Billing customer interface.

Code:
<script LANGUAGE="JavaScript">
<!--
   function test()
   {
      if(document.form.pr_login.value=="" || document.form.pr_password.value=="")
      {
         alert("You must enter an username and a password!");
         return false;
      }
      else
      {
         return true;
      }
   }
-->
</script>

<form name="form" method="POST" action="http://your.customerUIdomain.com/userinfo.php" onSubmit="return test()">
   <input type="hidden" name="done" value="submit_log"><br>
   <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
         <td rowspan="3" width="20"></td>
         <td valign="top">
            <label for="pr_login">Username (alias):</label><br>
            <input name="pr_login" type="text" class="form_input_text" id="pr_login">
         </td>
      </tr>
      <tr>
         <td valign="top">
            <label for="pr_password">Password :</label><br>
            <input name="pr_password" type="password" class="form_input_text" id="pr_password">
         </td>
      </tr>
      <tr>
         <td valign="top">
            <input type="submit" name="submit" value="LOGIN" class="form_input_button">&nbsp;<br>
            <br>
            <a href="http://your.customerUIdomain.com/forgotpassword.php">Forgot password?</a>
         </td>
      </tr>      
   </table>
</form>

Author:  asiby [ Thu Feb 21, 2008 8:38 pm ]
Post subject: 

It does, I have already tested it. It is available right now on my domain.

Author:  sonvan [ Thu Feb 21, 2008 11:49 pm ]
Post subject: 

I'm very interested.. anyone able to get this working.. as a module?

Author:  oramatel [ Tue Apr 08, 2008 12:54 am ]
Post subject:  It is working

1) download and install mod_html
2) copy and paste asiby's code into the HTML field
3) make sure the module is published

Thats it. i got it working following those steps. Hope it works for you.
Good Luck!
David

Author:  gonzogg [ Thu Jan 14, 2010 5:01 pm ]
Post subject:  Re: A2billing Joomla integration

I like this idea, however when a customer log in it navigate away from the joomla website. How can I use this module and open the customer page inside the website, like when using wrapper?

Author:  gonzogg [ Fri Jan 15, 2010 1:41 am ]
Post subject:  Re: A2billing Joomla integration

What I meant is, when I use wrapper it opens inside, but if I use mod_html with asiby's code it opens in the same browser, but outside my website just like going directly to the a2b server. Is this the normal behavior of mod_html or I am doing something wrong?

Author:  ladude626 [ Thu Mar 25, 2010 4:02 am ]
Post subject:  Re: A2billing Joomla integration

I came across another addon for Joomla that is meant to bridge Joomla with many other programs. It's called JFusion http://www.jfusion.org and it currently can bridge to 12+ other applications (using Plugins for each app) right now. It comes with very detailed API instructions on how to create plugins. Anybody want to take a crack at it?

Author:  magnussolution [ Thu Dec 29, 2011 1:58 pm ]
Post subject:  Re: A2billing Joomla integration

Component for integration a2billing customer in joomla

http://magnussolution.com/es/com_magnus.zip

Author:  sonvan [ Tue Jan 24, 2012 3:12 am ]
Post subject:  Re: A2billing Joomla integration

anyone tested the magnus component?

Author:  jansalex [ Sat Mar 03, 2012 8:58 pm ]
Post subject:  Re: A2billing Joomla integration

I did install this component but nothing appears on the admin panel.

Regards.

Page 1 of 2 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/