Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
User Documentation and How To's:
How To: Integrate Jamroom with Mambo CMS : UPDATED 03/19/05
djmerlyn
Jamroom Ustad


Joined: 18 Dec 2003
Posts: 13497
Location: Behind You

Posted: 03/01/05 11:35 
Just a few posts back it mentions that you need to merge the mambo and jamroom databases. I don't use these CMS things, but it is likely the problem since you have your DB's seperate.

Cheers!


_________________
Pro JR Hosting, now 50% off!
-100% Guaranteed

"more server and network power than any host, dedicated to your jamroom site"
Back to top
LBT



Joined: 08 Mar 2005
Posts: 1
Location: Australia

Posted: 03/08/05 23:16 
Mambo and Jamroom together in 1 db - is this stial a valid option using versions 4.5.2 Mambo and 2.28 Jamroom?

Am a user of Mambo (earlier versions) and would like to create a site utilizing both programs but not sure whether to keep them seperate at first (databases seperate) or to have them merged to start with.

Would appreciate all feedback and thoughts.

Thank you guy's
LBT

Back to top
johnypneumo



Joined: 15 Jan 2004
Posts: 954
Location: united kingdom

Posted: 03/10/05 02:05 
mines merged, using mambo 4.5.0 and jamroom 2.27 ,works well Smile


_________________
V7 music.com
Back to top
pleclair



Joined: 27 Jan 2005
Posts: 65

Posted: 03/14/05 12:10 
Hi WERKREW,

It appears the song rating module is sorting incorrectly.
Note: In .php file where the orderID is set to ASC, it should be set to DESC..

Thanks
Paul

Back to top
werkkrew



Joined: 20 Feb 2004
Posts: 126
Location: Phildadelphia, PA USA

Posted: 03/17/05 01:03 
I realized that when I coded the separate database stuff I messed something up, I think...since I use a merged DB I cant test it really...

Ill go back and look at it, sorry to any who were inconvenienced, ill let everyone know once the problem is fixed

For now, I fixed the ordering in the one rating module, and I also began working on the updates for the spotlight module.

Ill work on the database stuff later, not in the mood for that right now


_________________
My Site:
www.werkkrew.com
Affordable Web Design and Site Hosting:
www.werktheweb.com

Back to top
johnypneumo



Joined: 15 Jan 2004
Posts: 954
Location: united kingdom

Posted: 03/18/05 13:26 
Hey werkkrew
dont suppose you got the v1 of these modules anywhere have you ? Very Happy
im still using mambo 4.5.0 and dont intend on upgrading for another 6 months yet,and i was looking for the Rating module, highest rated etc,.
cheers mate.


_________________
V7 music.com
Back to top
werkkrew



Joined: 20 Feb 2004
Posts: 126
Location: Phildadelphia, PA USA

Posted: 03/19/05 21:57 
I might have them somewhere....I dont know.

Mambo 4.5.2 is out. I upgraded to 4.5.1 from 4.0.9 a while back, it was pretty harmless.


_________________
My Site:
www.werkkrew.com
Affordable Web Design and Site Hosting:
www.werktheweb.com

Back to top
werkkrew



Joined: 20 Feb 2004
Posts: 126
Location: Phildadelphia, PA USA

Posted: 03/19/05 22:12 
Well, an update has occured, see first post for more info.

Spotlight module has been updated to include requested features.


_________________
My Site:
www.werkkrew.com
Affordable Web Design and Site Hosting:
www.werktheweb.com

Back to top
jackdaris



Joined: 16 Oct 2004
Posts: 371
Location: Star Ship Enterprise 2693

Posted: 03/20/05 10:24 

werkkrew:
Well, an update has occured, see first post for more info.

Spotlight module has been updated to include requested features.


Looks great. how did u get it to list 3 songs.

Back to top
johnypneumo



Joined: 15 Jan 2004
Posts: 954
Location: united kingdom

Posted: 03/21/05 12:58 

werkkrew:
I might have them somewhere....I dont know.

Mambo 4.5.2 is out. I upgraded to 4.5.1 from 4.0.9 a while back, it was pretty harmless.

Yeh im kinda testing 4.5.2.1 ,altho there is something realy nice about 4.5.0,ill upgrade ,but id rather ait untill maybe 4.5.3 is out., Very Happy


_________________
V7 music.com
Back to top
rgnelson



Joined: 28 Feb 2005
Posts: 726

Posted: 03/29/05 21:28 
I am using Mambo 4.5.2
I am using JamRoom 2.30.
I am using bonus pack 2.23
I am using phpBB component 1.2.4 RC2 - This is phpBB 2.0.13
From this site: http://www.tim-online.nl/index.php/component/option,com_docman/task,view_category/Itemid,55/subcat,9/catid,21/limitstart,0/limit,5/

I am running phpBB inside mambo. This component uses a login module. You disable the mambo login and use the login module from the above link. This works fine. If I login to phpbb, it logs me into mambo. If I log into mambo it logs me into phpbb.

Now the problem - The first artist to create a new account in jamroom gets added to the mos_users table as id 0 (the administrator is id 62? and there is an Anonymous account with user id -1?) and gets added to the jamroom_user table as id 1 (the administrator is id 0). - ok, so the first user gets added in both tables.

The second user that creates a new account gets added to the jamroom_user table as user id 2. - (that's all good.) But I get this error when the post_user script tries to add the user to the mos_users table:


Code
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /config/post_user.php on line 53

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /config/post_user.php on line 58
failed to insert new user into the phpBB2 user table
MySQL error:1062 - Duplicate entry '0' for key 1


So, to me, it looks like the post_user script is not getting what our next user will be? It is trying to add the new user again as user id 0?
This is the post_user that I am using - from the latest download here:
http://www.jamroom.net/phpBB2/viewtopic.php?t=1168


Code
<?php
#------------------------------------------------------------
# Jamroom phpBB2 user-add post_user plug-in
# version 1.0 by Brian Johnson
#
# This Jamroom Post_User plug-in will create a user account
# in a phpBB forum when a user is added to Jamroom
#
# NOTE!! This plug in will only work with phpBB2 running in
# a MySQL database, and must be renamed to "post_user.php"
# before it will work.
#------------------------------------------------------------


# note: to see all of the available information that is
# exported into this plug-in, uncomment the following 2 lines
# this will prevent the user from being added to your phpBB,
# but will allow you to dump the incoming variables.
#debug($data,000000);
#exit;


#------------------------------------------------------------
# configuration
#------------------------------------------------------------
$phpbb_server = 'localhost';  // machine phpBB is running on
$phpbb_dbase  = 'MyDataBaseName';      // phpBB Database name

$phpbb_user   = 'MyDataBaseUserName';           // database user name
$phpbb_pass   = 'MyDataBasePassword';           // database user password
$phpbb_prefix = 'mos';      // default phpBB2 table prefix


#------------------------------------------------------------
# You should not need to edit below here
#------------------------------------------------------------
# connect up to the mysql database
$con = mysql_connect($phpbb_server,$phpbb_user,$phpbb_pass)
  or die("unable to connect to the phpBB2 database server!

          <br>MySQL error:". mysql_errno() .' - '. mysql_error());


# select our table
mysql_select_db($phpbb_dbase,$con)
  or die("unable to open the phpBB2 database!
          <br>MySQL error:". mysql_errno() .' - '. mysql_error());


# first - get what our next user_id is going to be
$rv = "SELECT MAX(user_id + 1) as new_id FROM {$phpbb_prefix}_users";
$rs = mysql_query($rv,$con);
if (mysql_num_rows($rs) > 0)
{
  $_row = mysql_fetch_assoc($rs);
  $new_id = $_row['new_id'];
}
mysql_free_result($rs);


# our user password comes in unencrypted - lets MD5 it
$pass = md5($data['user_password']);


# now build and run our query
$rv = "INSERT INTO {$phpbb_prefix}_users (
         name,
         username,
         email,
         password,
         usertype,
         block,
         sendEmail,
         gid,
         registerDate )
       VALUES (
         '{$data['user_nickname']}',
         '{$data['user_nickname']}',
         '{$data['user_emailadr']}',
         '{$pass}',
         'user',
         0,
         0,
         18,
         ". time() .")";


# run the query
mysql_query($rv,$con)
  or die("failed to insert new user into the phpBB2 user table
          <br>MySQL error:". mysql_errno() .' - '. mysql_error());

# log our success
jmLogger(0,'INF',"(user plugin) the user &quot;{$data['user_nickname']}&quot was successfully added to Mambo");


?>


Any thoughts on this?

Back to top
werkkrew



Joined: 20 Feb 2004
Posts: 126
Location: Phildadelphia, PA USA

Posted: 03/29/05 23:30 
If you are using his post_user script, it might not work with how the person who made the component changed the tables for mambo/phpbb

If I remember correctly, as you have stated, the phpbb component uses a phpbb table and the mambo table for users.

The structure probably isnt the same as the default phpbb tables are, as it includes mambo information too.

Youll have to edit the code a bit to fid the new db structure.


_________________
My Site:
www.werkkrew.com
Affordable Web Design and Site Hosting:
www.werktheweb.com

Back to top
rgnelson



Joined: 28 Feb 2005
Posts: 726

Posted: 03/30/05 06:37 
WerKKreW,
Thanks for the reply and thanks for the modules!

I am using the post_user script from your packages.
It works great for the first user, or any user after that as long as there is not a user with the id 0 already there.
If I use phpmyadmin and change the id for the first user from 0 to any other number, the post user script will add the next user with no errors. (I gets added as user id 0)

I was wondering if the problem is here in the post user script:

Code
# first - get what our next user_id is going to be
$rv = "SELECT MAX(user_id + 1) as new_id FROM {$phpbb_prefix}_users";
$rs = mysql_query($rv,$con);
if (mysql_num_rows($rs) > 0)
{
  $_row = mysql_fetch_assoc($rs);
  $new_id = $_row['new_id'];
}
mysql_free_result($rs);


Thanks again fo taking a look.

Back to top
werkkrew



Joined: 20 Feb 2004
Posts: 126
Location: Phildadelphia, PA USA

Posted: 03/30/05 22:50 
I pretty much just modded what bigguy had written to work with mambo, but on second glance, the id table is usually auto-increment, so theres no reason to specify an ID...

Ill take a look at it


_________________
My Site:
www.werkkrew.com
Affordable Web Design and Site Hosting:
www.werktheweb.com

Back to top
rgnelson



Joined: 28 Feb 2005
Posts: 726

Posted: 03/31/05 08:13 
Thank you!

Back to top
Display posts from previous:   
User Support Forum Archive (Read Only)
User Documentation and How To's

< Previous12345...1112131415Next >
 
Solutions
• Social Media Platform
• Social Networking Software
• Musician Website Manager
• Community Builder
Products
• Jamroom Core
• Jamroom Addons
• Jamroom Modules
• Jamroom Marketplace
Support
• Support Forum
• Documentation
• Support Center
• Contact Support
Community
• Community Forum
• Member Sites
• Developers
Company
• About Us
• Contact Us
• Privacy Policy
©2003 - 2010 Talldude Networks, LLC.