UBB.Dev
Posted By: Stefan_dup1 Beta-[6.3] HiveMail - Integration 1.0 - 08/11/2003 5:14 AM
[:"red"]This modification is for experienced users only.[/]

Mod Name / Version: HiveMail - Integration 1.0

Description: This hack integrates UBB.threads™'s user database with HiveMail and viceversa. When users registers at your forums, they can request an email account too, the internal registration of HiveMail could be optionally switched off. Users will be notified about new mails automatically similar to the pm-system of UBB.threads™.

Working Under: UBB.threads™ 6.3.1 & HiveMail 1.21

Mod Status: Beta

Any pre-requisites: Working HiveMail 1.21

Author(s): Charles/marsdev.net & Stefan/thinkfactory.de

Date: 08/10/03

Files altered in UBB.threads™: adduser.php, changebasic.php, editbasic.php, newuser.php, ubbt.inc.php, ubbthreads.php, editbasic.tmpl, newuser_signup.tmpl, doapproveuser.php, newpm.gif

Files altered in HiveMail: global.php, options.password.php, read.email.php and the Template 'login'

New Files in UBB.threads™: newem.gif

New Files in HiveMail: includes/ubbthreads_plugin.php

Database altered for UBB.threads™: Yes - see documentation.

Database altered for HiveMail: Yes - see documentation.

Info/Instructions: "Remember: Safe often, save early" (Leisure Sweet Larry I from Sierra, 1991) - so make a backup before changing anything!


Download: Click here!

[]http://www.thinkfactory.de/downloads/counter/test.png[/]


Disclaimer: Please backup every file that you intend to modify. If the modification modifies the database, it's a good idea to backup your database before doing so.

Note: If you modify your UBB.threads™ code, you may be giving up your right for "official" support from Infopop. If you need official support, you'll need to restore unmodified files.

Posted By: JoshPet Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/11/2003 5:22 AM
Wow - Nice Job.

Thank you!
Posted By: shortbus Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/11/2003 5:56 AM
Awesome! Great Job man!
Posted By: Ian_W Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/11/2003 11:52 AM
Excellent - looked at hivemail myself recently would be a great add on.
Posted By: jluerken Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/11/2003 2:41 PM
Please remember that UBB.threads/UBB.threads.sql must look different if you're using table prefixes.
Code
<br />ALTER TABLE w3t_user ADD hm_userid int(10) unsigned NOT NULL default "0";<br />

must be changed to
Code
<br />ALTER TABLE ***PREFIX***_user ADD hm_userid int(10) unsigned NOT NULL default "0";<br />
where ***PREFIX*** is your table prefix.

For the hivemail.sql its not needed to do any changes cause in the actual version hivemail does not support prefixes
Posted By: jluerken Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/11/2003 2:44 PM
One additional thing again:

Within UBB.threads.sql the line must be
Code
 <br />ALTER TABLE w3t_Users ADD hm_userid int(10) unsigned NOT NULL default "0"; <br />

and not
Code
 <br />ALTER TABLE w3t_user ADD hm_userid int(10) unsigned NOT NULL default "0"; <br />


I phoned Stefan and he changed the .Zip File already
Posted By: Stefan_dup1 Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/11/2003 2:45 PM
Zip fixed
Posted By: msula Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/11/2003 3:33 PM
Oh my, you are my hero!

One question.. do you have any provisions for allowing hivemail to access to only certain groups? For example I just want my paying members to be able to setup accounts, not everyone

Othewise, looks awesome!
Posted By: Stefan_dup1 Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/11/2003 4:14 PM
Hi Jeremy,

the hack actually doesn't know anything about usergroups from threads ...
Posted By: ericgtr Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/11/2003 4:14 PM
If anyone get's this working under 6.2.3 let me know, looks like a great addition.
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/11/2003 4:29 PM
In fact this would be quite easy to add. just remove the bit on registration page and in the my home part modify the code so that it check for the user group beforehand.

I do not have the code with me right now but if you need some help let me know I'll post it.
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/11/2003 4:34 PM
oups mistake
Posted By: msula Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/11/2003 5:01 PM
Hmm.. well the basis of the hack is perfect, clean interface, easy to use.. so I guess what I'm looking to do is disable the ability for new users to choose an email when they sign up. And essentially, only allow users in my "paying" groups to have the webmail link in their top window and if they don't have an account when they click on it they see the email signup page.

I know that is probably a bit beyond a "simple" fix.. but if anyone is interested in making this possible, please let me know
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/11/2003 5:10 PM
not it is an easy fix I can do it for you
Posted By: msula Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/11/2003 5:15 PM
That would be great charles, just let me know if you need any specific information or if I didn't explain what I needed clearly
Posted By: Charles adding group control - 08/11/2003 5:24 PM
in editbasic.php

at the top of file

modify the auth line to have something like:
Code
 <br />$user = $userob -> authenticate("U_Groups"); <br />


find what you added for the modification:
Code
 <br />//If user has HiveMail Account do not show Form <br />if  ($hm_userid != '0') { <br />	$choosehmname = ""; <br /> <br />} <br />


replace by:
Code
 <br />//If user has no rights or has HiveMail Account do not show Form <br />if( (!preg_match("/-5-/",$user['U_Groups'])) or ($hm_userid != '0')) { <br />	$choosehmname = ""; <br />} <br />

replace 5 by your group number

this is not tested let me know how it goes
Posted By: msula Re: adding group control - 08/11/2003 5:26 PM
[]Charles said:
in editbasic.php

at the top of file

modify the auth line to have something like:
Code
<br />$user = $userob -> authenticate("U_Groups");<br />


find what you added for the modification:
Code
<br />//If user has HiveMail Account do not show Form<br />if  ($hm_userid != '0') {<br />	$choosehmname = "";<br /><br />}<br />


replace by:
Code
<br />//If user has no rights or has HiveMail Account do not show Form<br />if( (!preg_match("/-5-/",$user['U_Groups'])) or ($hm_userid != '0')) {<br />	$choosehmname = "";<br />}<br />

replace 5 by your group number

this is not tested let me know how it goes
[/]

Great, I'll give it a try a little later today. Thanks!
Posted By: JoshPet Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/11/2003 6:11 PM
[]Jeremy said:
Oh my, you are my hero!

One question.. do you have any provisions for allowing hivemail to access to only certain groups? For example I just want my paying members to be able to setup accounts, not everyone

Othewise, looks awesome! [/]

But it looks like you signup in the profile.... it would be very easy to restrict access to that part (hide it) in the profile and only display it for certain groups.
Posted By: JoshPet Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/11/2003 6:11 PM
Never mind - I see it was already addressed when I got to page 2.
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/11/2003 6:42 PM
I told you that once I got back to threads it would be nasty

this makes it my second *offical* modification for threads
Posted By: jluerken Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/11/2003 6:47 PM
[]ericgtr said:
If anyone get's this working under 6.2.3 let me know, looks like a great addition. [/]

I gave it a try with UBBT 6.2.3 and HM 1.2SP1 and it worked with several changes.

You must create a new table called alias which is included in HM 1.2.1 and change some parts within UBBT 6.2.3.

Problem that I have at the moment is that I have so many hacks installed that I am running into trouble installing this hack.
It took 2 hours to modify all the instructions that they fit to my system but then it worked.

The problem is that there is no option that if I delete a forum user the mailuser is also deleted and the way around.
This makes the hack unusable to me at the moment.

Also HM 1.2SP1 makes a lot of trouble cause all the tables have different names (Prefixes are now allowed in this version and a lot of new tables were added).
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/11/2003 6:53 PM
[] The problem is that there is no option that if I delete a forum user the mailuser is also deleted and the way around.
This makes the hack unusable to me at the moment. [/] It was a decision we made with Stefan. Once the user was approved we never delete the email account but now this can be added. just look at the bit in doapproveuser and apply it to the code which deletes a user
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/11/2003 6:58 PM
[]Also HM 1.2SP1 makes a lot of trouble cause all the tables have different names (Prefixes are now allowed in this version and a lot of new tables were added). [/] why not use the latest hivemail version?
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/12/2003 6:05 AM
Oh thank God! You are so awesome for this mod! Thanks!
--EDIT--
Will this work with Hivemail 1.3?
Posted By: jluerken Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/12/2003 8:08 AM
[]Charles said:
[]Also HM 1.2SP1 makes a lot of trouble cause all the tables have different names (Prefixes are now allowed in this version and a lot of new tables were added). [/] why not use the latest hivemail version? [/]

I modified the templates of Hivemail to gave it the same look as my board. A change to 1.2.1 will bring up a lot of work cause I have to do the changes again and that took hours.

At the moment 1.2.1 isn't stable enough. Take a look at the buglist

I will switch over sooner or later but at the moment the old rule counts: NEVER CHANGE A RUNNING SYSTEM

@Rest: 1.3 is not out and if this hack will work with 1.3 is written in the starts cause no one knows which changes 1.3 will bring exactly.
Posted By: msula Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/12/2003 4:51 PM
Ok... for now I'm just trying to install the hack as per the instructions (I'll attempt my own groups modification later).

And I'm running into problems even with a standard install. When I go to my main forum index (ubbthreads.php) I get this:

[]Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/mypath/mail/includes/ubbthreads_plugin.php on line 24

Fatal error: Call to undefined function: update_newmail() in /home/mypath/forums/ubbthreads.php on line 25[/]

So, I commented out the function around line 24 of the plugin file.. then it was reporting the same error in that file at line 55.

So I went ahead and replaced my original files... just wondering where to look to figure this out. Also, says that one function is undefined... strange.
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/12/2003 5:14 PM
hard to say like that it should be this line correct?
Code
 $result=$dbh->do_query("SELECT * FROM $options['database'].hive_setting"); 
first is the table he is calling correct? if you are running both under the same database try removing $options['database']. and see what happens
Posted By: msula Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/12/2003 5:38 PM
Correct, that is the line.

I may try applying the hack again, I may have missed something, but this wasn't all that complicated, so not sure what I may have done
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/12/2003 5:55 PM
each section of the hack is pretty much independant so you can really hack file by file and see the result each time.

just make sure to start by creating the new cells in the database. and having the options in hivemail and threads set up
I have tackled this one also and am getting the same error.

Here is the error on the ubbthreads.php page:

SQL ERROR: Tue, Aug 12 2003 09:41:48 -0700 Database error only visible to forum administrators

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/socaps/public_html/test/ubbthreads/mysql.inc.php on line 131

Warning: Cannot modify header information - headers already sent by (output started at /home/socaps/public_html/test/ubbthreads/mysql.inc.php:217) in /home/socaps/public_html/test/ubbthreads/ubbt.inc.php on line 239




This is the error on the login.php page (my home link):

SQL ERROR: Tue, Aug 12 2003 09:44:41 -0700 Database error only visible to forum administrators

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/socaps/public_html/test/ubbthreads/mysql.inc.php on line 131


Here is what the error log is showing:

Unable to do_query: SELECT * FROM .hive_setting - Table 'socaps_test.hive_setting' doesn't exist
Posted By: dimopoulos Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/12/2003 7:09 PM
[]Charles said:
hard to say like that it should be this line correct?
Code
 $result=$dbh->do_query("SELECT * FROM $options['database'].hive_setting"); 
first is the table he is calling correct? if you are running both under the same database try removing $options['database']. and see what happens [/]

I had the same problem. Change all the instances of

$options['database'].

to

{$options['database']}.

You will also see that there is also a $options['dbserver']

A couple more variables also need to be treated this way.

Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/12/2003 7:40 PM
I'm sorry, but which version of Hivemail do I need. Your instructions say 1.21, but I don't see that for downlad @ Hivemail.com. I'm currently running 1.2. You said that 1.2.1 is too buggy and that you would have to redo the templates for Hivemail. So when you say 1.21, do you mean 1.2 w/ SP1? One final thing, what about users who are already signed up for both the forums and the email on the same site? Will they also get the PM-style notifications? What if they have different usernames for the email and for the forums? Thanks!
Posted By: dimopoulos Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/12/2003 7:52 PM
I think based on the table names it should be 1.2.1 but I might be wrong.

Another thing. There is a reference to a field called hm_emails on the ubbt.inc.php but that field is not in the database. When I did create it it still didn't show up the emails received.
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/12/2003 8:25 PM
hm_emails needs to be added to the w3t_users table and is refeshed when you visit forum home or my home we did since in order to reduce the number of queries.
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/12/2003 8:28 PM
hivemail 1.2.1 is available from the member area.

check http://forum.hivemail.com/showthread.php?threadid=1699 for more informations.

and no users will not get the pm style notification since you need to link both accounts by entering the forum id in HM and the HMid id threads. You could do this by hand but by default users will be offered to create an account.
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/12/2003 10:49 PM
So if I want to link forum accounts and mail accounts that are owned by the same user before integration, it would be done manually. I haven't downloaded this mod yet, but are instructions included on how to do that? I have no problem doing it manually for my existing users.
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/12/2003 10:58 PM
no instructions but it is pretty straight foward add the HM id in the hm_userid field in w3t_users and the user number in hive_user in the VBid field
Posted By: Stefan_dup1 Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/13/2003 11:54 AM
[]dimopoulos said:

I had the same problem. Change all the instances of

$options['database'].

to

{$options['database']}.

[/]

Zip updated for this.
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/13/2003 11:58 AM
just a note: If you are running Hivemail and UBB.threads on 2 differents databases they must be located on the same server and have the same login/password.
Posted By: Astaran Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/13/2003 12:23 PM
Maybe a bit offtopic, but where can i find some technical details about Hivemail(
especially the backend)?
Does it parse all incoming mail from a catch all account and inserts the data into a MySQL table?
Posted By: dimopoulos Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/13/2003 12:49 PM
[]Astaran said:
Maybe a bit offtopic, but where can i find some technical details about Hivemail(
especially the backend)?
Does it parse all incoming mail from a catch all account and inserts the data into a MySQL table? [/]
Yes that is what it does Astaran. A cron script or a scheduled task in windows is responsible for this. The data is stored either in the database (the whole message) or in a file and the database (some data like the headers etc.)
Posted By: dimopoulos Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/13/2003 12:55 PM
Also Stefan if I may a couple of corrections:

1. ubbt.inc.php
Function send_header. You need to include in the authenticate function the hm_emails field, otherwise it will always return zero. Hence you need to find this:

// -------------------------------------------------------------------
// If we don't have a status then they we need to try and authenticate
if (!isset($user['U_Status'])) {
$userob = new user;
$user = $userob -> authenticate();
}

and replace it with this:

// -------------------------------------------------------------------
// If we don't have a status then they we need to try and authenticate
if (!isset($user['U_Status'])) {
$userob = new user;
$user = $userob -> authenticate("hm_emails");
}

if (!isset($user['hm_emails'])) {
$userob = new user;
$user = $userob -> authenticate("hm_emails");
}

2. ubbthreads_plugin.php
Function update_newmail

Change the function to :

function update_newmail() {
global $dbh, $config;

$userob = new user;
$user = $userob -> authenticate("hm_userid");

if ($user['U_Number']) {

$Uid = addslashes($user['U_Number']);
$hiveid = $user['hm_userid'];

if ($hiveid != "0") {
$query = "SELECT userid FROM {$options['database']}.hive_message WHERE userid = $hiveid AND status = 0";
$sth = $dbh -> do_query($query);
$count=mysql_num_rows($sth);
if ($count > 0) {
$newemail = $count;
} else {
$newemail = 0;
}
$dbh -> do_query("UPDATE {$config['dbname']}.{$config['tbprefix']}Users SET hm_emails = '$newemail' WHERE hm_userid = $hiveid");
}
}

}

This will use the .threads authenticate to see if the user is logged in and with one query retrieve the hm_userid as well. Also please note that the UPDATE query needs the {$config['dbname']) and not the 'dbserver', otherwise it points to the localhost (or wherever your DB is stored) instead of the database name.

It is working great for me!! Great job!

(now all I have to do is create some templates to match those of the .threads )
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/13/2003 1:35 PM
dimopoulos I don't think this is needed.

The way I chose was to have hm_email by default in the userob routine so it is part of the default just like new PM, maybe I missed that part will documenting the hack but It should work like this.

OK, checking the code I did forget something gimme a minute to tell you what it is supposed to be.
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/13/2003 1:43 PM
there my code in ubbt.inc.php was
Code
  // ----------------------------------------------------------------- <br />  // We are automatically adding StyleSheet, Status, Privates and <br />  // FrontPage and Number to each SQL call because this information is needed by <br />  // every script that makes a call to authenticate <br />     if ($Query != "*") { <br />        if ($Query) { $Query .=","; } <br />        $Query .= "U_Username,U_Password,U_SessionId, U_StyleSheet, U_Status, U_Privates, U_FrontPage, U_Number, U_Banned, hm_emails"; <br />      } <br /> 


since hm_emails is used on all pages we need it here, sorry for the bug
Posted By: Stefan_dup1 Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/13/2003 1:48 PM
[]Astaran said:
Maybe a bit offtopic, but where can i find some technical details about Hivemail(especially the backend)?
Does it parse all incoming mail from a catch all account and inserts the data into a MySQL table? [/]

It's choosable ... saving in MySQL or flatfile ...

english / german features list

Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/13/2003 1:54 PM
the zip was updated in order to reflect my mistake

*Baaaad Charles*
Posted By: dimopoulos Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/13/2003 2:00 PM
Thanks Charles
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/13/2003 2:02 PM
also just for your info your update email function cannot work because we need to know if we have new emails BEFORE we identify otherwise the flashing image will use the old data. The goal is to update the data before we actually call for it
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/13/2003 2:31 PM
I am writing a small installer to handle the sql part.

for those who can't wait you can run the following command to update your login template

Code
 <br />UPDATE hive_template SET user_data = REPLACE(user_data,"vb_","ubbt_"), parsed_data = REPLACE(parsed_data,"vb_","ubbt_") WHERE title = 'login' <br />


hope this will help some of you

Updated to replace both cells, untested let me know if it works.
Posted By: dimopoulos Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/13/2003 2:58 PM
Charles, do we need to change the parsed_data field as well or just the user_data?
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/13/2003 3:00 PM
well I tried the hivemail CP and apparently the only thing tou can edit is the user_data field. the other one is used I think to know which ones have been changed but I am not sure.
Posted By: Stefan_dup1 Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/13/2003 3:05 PM
[]dimopoulos said:
Charles, do we need to change the parsed_data field as well or just the user_data? [/]

the parsed template parts of hm will be updated on saving the template ... forget about this.
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/13/2003 3:07 PM
well yes but since we don't edit through the CP should I modify it too in my query?

what is it used for?
Posted By: Stefan_dup1 Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/13/2003 3:08 PM
Right Charles, forgot about this ... we need to update this too
Posted By: Stefan_dup1 Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/13/2003 3:08 PM
... only if we're using your install - script
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/13/2003 3:18 PM
ok updated the query
Posted By: msula Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/13/2003 5:51 PM
Let me know when everything is figured out... then I'll try to install it again
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/13/2003 5:53 PM
it should be perfect now []https://www.ubbdev.com/threads/php/uploads/panels/9432-2968.png[/]
Posted By: msula Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/13/2003 6:20 PM
oh sure, right when I prepare myself to take a nice break, it's ready I need a nap, you guys make my head spin
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/13/2003 6:22 PM
well it works great when I do it but I need you guys to tell me when I forgot to put all the code in the files now if I did everything were would the fun be?
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/13/2003 11:01 PM
Hi. Can I use the PIPE gateway for Hivemail instead of the POP gateway with this integration? Also, would you recommend merging the two databases into one?
Posted By: Stefan_dup1 Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/14/2003 2:08 AM
[]donJulio said:
Hi. Can I use the PIPE gateway for Hivemail instead of the POP gateway with this integration?[/]

This is irrelevant for the hack

[]Also, would you recommend merging the two databases into one?[/]

Not really ... if it runs fine, why change?
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/14/2003 7:12 AM
Sorry but just one more question. I am going to give this a whirl tomorrow, but I need absolute clarification on which version of Hivemail to use. In the instructions it says version "1.21". I've never heard of that one. Charles said 1.2SP1 causes problems because the tables have different names. Because he is the co-author of this mod, I'm assuming it's not that one. Later jluerken stated that it would be unstable w/ 1.2.1 (which is different than "1.21") because there is a long bug list w/ that version (which is currently a Release Candidate only). I'm running version 1.2 right now. Is that the one I need? I don't know what 1.21 is
Posted By: sportbikes Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/14/2003 10:25 AM
Although not specifically related to the hack... does anyone have a concern of allowing the use of your domain name for the mail? I have concerns of malicious mailings and or SPAM that might get the domain name Blacklisted.
Posted By: dimopoulos Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/14/2003 10:27 AM
Not me because my forum is by invitation only and I know personally more than 70% of the members. Other people though might want to consider this.
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/14/2003 10:40 AM
don Julio, this hack uses version 1.2.1 of hivemail eventhough it is only a release candidate but I was not going to hack an outdated version
Posted By: dimopoulos Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/14/2003 10:50 AM
Hmmm.. I seem to have a slight problem though... When a user goes to change their profile (edit/changebasic.php) they do manage to change their date (clicking Submit) but the forum presents this message:


Fatal error: Cannot redeclare hivemail_check_name() (previously declared in c:\<path here>\mail\includes\ubbthreads_plugin.php:74)
in c:\<path here>\mail\includes\ubbthreads_plugin.php on line 72

Obviously there is a redeclaration somewhere. I tried to replace the require calls with require_once but had little effect...

Any ideas welcome.
Posted By: dimopoulos Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/14/2003 10:52 AM
Ok I managed to sort it out. I changed the call from require to require_once in the ubbt.inc.php and it worked like magic
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/14/2003 11:05 AM
could you test this fix? if it works everywhere I will update the instructions
Posted By: dimopoulos Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/14/2003 11:20 AM
I am still not clear why people opt for require. It does produce a fatal error if it there is a problem which is the good side but why not use require_once. If the script has already been included then it will not reload.

This minor change has worked very well for me on a Windows host with Apache. If others can please check if this works (on Linix boxes with Apache etc.) we can update the instructions accordingly.
Posted By: Stefan_dup1 Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/14/2003 1:28 PM
[]sportbikes said:
Although not specifically related to the hack... does anyone have a concern of allowing the use of your domain name for the mail? I have concerns of malicious mailings and or SPAM that might get the domain name Blacklisted.
[/]

Real spammers would'nt use hivemail (or an account anyhwere), cause the admin could restrict the maximum recipients per message and additionally define a time limit between sending two or more mails ... for a better understanding i'll attach a screenshot of the admin area (definition of usergroups) ... click here for a bigger view

Attached picture 91926-usergroups.gif
Posted By: sportbikes Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/14/2003 8:35 PM
[]Stefan said:
Real spammers would'nt use hivemail (or an account anyhwere), cause the admin could restrict the maximum recipients per message and additionally define a time limit between sending two or more mails ... for a better understanding i'll attach a screenshot of the admin area (definition of usergroups) ... click here for a bigger view [/]

Thanks! I was unaware of the admin functions.

I was not thinking of real spammers, but just a way for someone who may wish to purposely bring harm to the site, whether it is a banned member coming back under a dynamic IP or the site next door who doesn't like that you are suceeding
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/14/2003 8:38 PM
this is why you might want to limit this function to specific user groups
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/15/2003 1:10 AM
I'm almost done w/ the integration, but I ran into this problem in the Hivemail file changes, and it was right at the end:
login-Template:
---------------

Replace all "vb_" parts with "ubbt_"

What is the file this is in? Where do I go? I'm sure it's a simple "Replace" command from the edit menu, but I don't know where to go to do this part.

Secondly, can you write here the SQL command(s) I would need to integrate and existing forum user w/ their existing email account? Thanks!

---EDIT---
BTW, where do I define the variable [UBBT_PATH] that is on the line that I add to Hivemail global.php? I got an error (many errors, but this was one of them) because of this. I replaced the variable and put the actual path to the config.inc.php file, but thzt's only because I don't recall seeing where to declare that variable.
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/15/2003 10:03 AM
don Julio you can use the following command to update the login Template. There is no file it is in the HIVE database.
Code
<br />UPDATE hive_template SET user_data = REPLACE(user_data,"vb_","ubbt_"), parsed_data = REPLACE(parsed_data,"vb_","ubbt_") WHERE title = 'login'<br />


for updating the user profile I can't think of anything because you would need to know what email adress is associated with which profile. So unless they use the hivemail email in their ubb.threads profile there is no waz no actually know.
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/15/2003 9:13 PM
I think I did everything correctly and I'm getting this error in my forums:
[] SQL ERROR: Database error only visible to forum administrators

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/laondal/public_html/foros/mysql.inc.php on line 131
SQL ERROR: Database error only visible to forum administrators

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/laondal/public_html/foros/mysql.inc.php on line 131 [/]

The email seems to be working all right. This is the second time I've done the integration and I solved the email problem (which was that I didn't go to the admin area of hivemail and turn on the integration). But in my forums I'm getting that error. Plus the cookies don't seem to be working because I was logged out. I tried logging back in to see what the database error was and it said that the username and password couldn't be found. I tried again w/ a different user name and the same thing happened However when I replace the forums with the old ones (I'm talking about the forums directory), everything works fine, minius the Hivemail integration. Is there a problem with my database?

--EDIT--

I get this error when trying to read mail:
[] MySQL error: Unknown column 'hm_emails' in 'field list'
MySQL error number: 1054
Script: /correo/read.email.php?messageid=1243
Date: August 15, 2003, 12:15 pm

Invalid query: UPDATE laondal_boards.w3t_Users
SET hm_emails = hm_emails - 1
WHERE hm_userid = 3 [/]
Good damn thing I have both databases backed up from before integration. Any idea on what the problem is?
Same problem here. I have done a fresh install like 3 or 4 times now with the latest download.

I think this is a great addition and am looking forward in using it.

BWilliams
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/15/2003 11:15 PM
did you actually add the fields to your w3t_users tables?

you need to run the sql query to do so
[]Charles said:
did you actually add the fields to your w3t_users tables?

you need to run the sql query to do so [/]
I did. The only query needed is the one in the download, right?
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/15/2003 11:52 PM
dunno, it should add 2 fields, hm_userid and hm_emails
[]Charles said:
dunno, it should add 2 fields, hm_userid and hm_emails [/]
The query I ran only added the hm_userid field. What am I missing here, I am going crazy !!!!
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/16/2003 7:40 AM
Same here as well. The sql file that is in the UBB.Threads folder only adde dthe hm_userid field.
--EDIT--
Since you can use a query to replace vb_ with ubbt_, why not just add that to the hivemail.sql file, or at the very least put it in the instructions? It's a lot faster than manually finding and editing the templates from the Hivemail administration area. Just a suggestion
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/16/2003 10:49 AM
ok, so just use the same query but replace hm_userid with hm_emails

Don_Julio, in time I will do an install script for all the SQL stuff but right now I am in the middle of my exams if I posted the vb_ -> ubbt_ query in the forums it was only in order to help people who did not understand how to edit hivemail templates
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/16/2003 4:40 PM
Ok. Adding that field hm_emails seems to have taken care of the SQL errors I was having as well as the cookie problems. However there are still problems. Fist I went into my profile to go to the editbasic.php file. However I didn't even get to the My Home (the login.php) because I got this error:
[]
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/laondal/public_html/correo/includes/ubbthreads_plugin.php on line 147

Fatal error: Call to undefined function: update_newmail() in /home/laondal/public_html/foros/ubbt.inc.php on line 1507 [/]

I'll double check the work I did on the ubbt.inc.php file, but there must be a problem with tht ubbthreads_plugin.php file in the /includes directory under correo (correo=mail in Spanish). We didn't have to edit this file so I must have come with the problem.

I logged out to register a new user (just to see if the option for a Hivemail email account) would appear, and it didn't. I got everything else, but at the top of the page was this error:
[] Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/laondal/public_html/correo/includes/ubbthreads_plugin.php on line 147 [/]

The same error in the ubbthreads_plugin as before

---EDIT---
It seems I'm getting errors on every .php page that I edited. I clicked on a category to go to the ubbthreads.php page and this is all I got on the screen:
[] Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/laondal/public_html/correo/includes/ubbthreads_plugin.php on line 147

Fatal error: Call to undefined function: update_newmail() in /home/laondal/public_html/foros/ubbthreads.php on line 25 [/] and nothing else . I looked at the ubbthreads_plugin and it looks like if whatever is wrong on line 147, it'll fix both errors. I think. I just don't know what the problem is on line 147 or how to fix it.

--EDIT #2 --
BTW, the read.email.php error I mentioned earlier also seems to have gone away when I added the hm_emails field to the Threads database
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/16/2003 5:46 PM
could you show me what line 147 is? I don't have access to anything here.

thanks.
[]Charles said:
could you show me what line 147 is? I don't have access to anything here.

thanks. [/]


Code
  <br />$sth = $dbh -> do_query("SELECT hm_userid FROM $config['dbserver'].{$config['tbprefix']}Users WHERE U_Number = $Uid");<br />



I think this was mentioned above and someone recommended to change $config['dbserver'] to {$config['dbserver']} and I have tried that and it didn't take the errors away. At least I am not the only one having problems
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/16/2003 6:03 PM
ok you do not have the latest version of the hack please download again
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/16/2003 7:22 PM
I just downloaded this hack again and I still get the same error for line 147 of ubbthreads_plugin.php.
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/17/2003 12:49 PM
just by curiosity, you use 2 different databases but you have the same login and password for both correct?
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/17/2003 5:36 PM
I didn't before, but I made sure that they were after reading the instructions in the mod.
---EDIT---
I think I may take a couple days off from this mod and try again later, perhaps Tuesday. In the meantime I'll see if there aren't any other mods that I need to install, since every other one I've finally got up and running correctly. FYI, I'm running the forums and the email on the modified databases w/o any problems, even though I'm using the versions of forums and email that aren't hacked for the Hivemail integration.
Inquiring minds want to know.....

Has anyone, excluding Charles and Stefan, got this integration to work yet? I am really excited about it and am looking forward to using it, but I am still having problems. I am still a newbie at this hacking stuff, but it looks the the issues all lead back to the ubbthreads_plugin.php file.
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/18/2003 7:03 PM
Are you getting that same error that I am?
[]donJulio said:
Are you getting that same error that I am? [/]
EXACT errors. Must be something we're doing
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/18/2003 7:38 PM
ok guys, end of my exams so more time to help you. I need the EXACT error you are getting and not just only available to admins

if needed at the en ubbt.inc.php you have an option to show sql errors to everyone.
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/18/2003 11:15 PM
At the moment I'm not getting any more SQL errors, now that I've added hm_emails to the w3t_Users table. The error that I got was one I've already mentioned above, on line 147 of the ubbthreads_plugin.php file. In a bit I'll be able to put up a link to the page w/ the errors.
[]Charles said:
ok guys, end of my exams so more time to help you. I need the EXACT error you are getting and not just only available to admins

if needed at the en ubbt.inc.php you have an option to show sql errors to everyone. [/]


Here are the errors I am getting:

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/socaps/public_html/test/hivemail/includes/ubbthreads_plugin.php on line 147

Fatal error: Call to undefined function: update_newmail() in /home/socaps/public_html/test/ubbthreads/ubbt.inc.php on line 1485



and



Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/socaps/public_html/test/hivemail/includes/ubbthreads_plugin.php on line 147

Fatal error: Call to undefined function: update_newmail() in /home/socaps/public_html/test/ubbthreads/ubbthreads.php on line 25



and

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/socaps/public_html/test/hivemail/includes/ubbthreads_plugin.php on line 147

Warning: Cannot modify header information - headers already sent by (output started at /home/socaps/public_html/test/hivemail/includes/ubbthreads_plugin.php:147) in /home/socaps/public_html/test/ubbthreads/ubbt.inc.php on line 250



Any ideas?

fyi, the "test" folder is a sub domain http://test.socaps.com
Posted By: dimopoulos Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/19/2003 1:42 PM
BWilliams,

I got this mod to work and it works like a dream. If you want help, feel free to send me your files and I will check them with beyond compare and send them back to you. I often find myself not noticing a small typo which will throw things off.

I have sent you a PM with my email address.
Posted By: dimopoulos Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/19/2003 1:44 PM
As for the last error you are getting I believe it has to do with the include/require directive. Try using require_once in the ubbt.inc.php file.
Posted By: msula Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/19/2003 2:39 PM
I am going to try and attempt this one more time tonight. I took a few days off, so I should be ready to go at it again
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/22/2003 5:18 PM
so guys did it work out using require_once?
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/24/2003 7:00 PM
I'm not sure about require_once. Nikos changed the ubbthreads_plugin.php file and I had to combine the two databases into two to get it to work. I am still having a bug though. When a new user signs up, they get an error on the adduser.php page. Then when the check the email account that they use in the signup (the one that the password gets sent to), the entire body of the message is:
[no message].

Also, I sent an email to the new Hivemail account created for this test user and they didn't get a PM style notification that there was new mail.
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/24/2003 10:31 PM
it would really help if you could give me the error they get.

as for the new email icon, the database is only refreshed when you visit front page or my home. I did this in order to reduce the number of queries.
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/30/2003 9:08 AM
so? no errors everything is fine? we can give it a finished status?
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/30/2003 6:46 PM
I haven't finished yet. I took a break and recently integrated Photopost to my site(s). I'll get back to Hivemail this week. I don't know how Billy's site is coming along.
[]donJulio said:
I haven't finished yet. I took a break and recently integrated Photopost to my site(s). I'll get back to Hivemail this week. I don't know how Bobby's site is coming along. [/]
I have it up and running on my test site, but haven't had much time to play with it this last few days. I got some help from Nikos last week and he seemed to get it working, but I think there may still be some other issues with it.

BWilliams
Posted By: dimopoulos Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/31/2003 6:09 PM
The only thing that I haven't tested is different databases for hivemail and .threads. It appears that if you have them separate it doesn't work because the $options array seems to be empty - hence the query reading the settings fails. I will test this on my dev site and report back the findings.
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/31/2003 7:26 PM
W/ Nikos' help I have this halfway working. Users can sign-up and get the new email account, or do it from their control panel. When they sign-up for the forums and the email account together, I get this error at the top of the adduser.php page:
[] Parse error: parse error in /home/laondal/public_html/foros/adduser.php(458) : eval()'d code on line 1 [/]
I checked out line 458 on the adduser.php script and this is what it looks like:
[] eval ("\$msg = "{$ubbt_lang['PASS_BODY']}";"); [/]
I say it halfway works because in spite of this error, users still get signed up to both systems. There is one big problem though. The email that gets sent to new users for the forums, the one that says someone from such-and-such IP has registered such-and-such username w/ such-and-such password is sent w/ no contents. I tested it out after trying the integration again and the body of this email message was:
[] [no message] [/]
That's a very bad thing I let my users pick their initial password, but if I didn't this would completely prohibit them from ever getting their password or perhaps account activated.

One other thing is the PM-style notifications don't seem to be working for me still, even when I visit my control panel. Do either of you (Bobby or Nikos) have this part working correctly?
BTW: As Nikos already mentioned, I had to merge the two databases into one to get this to work.
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/31/2003 7:33 PM
for the pm style notification stupid quetion but did you upload the image?
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 08/31/2003 8:41 PM
Yep:
http://www.laondalatina.com/foros/images/newem.gif
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/01/2003 9:35 PM
I just checked Charles and the problem w/ the blank email message w/o a password seems to be (as far as I can tell) a problem w/ Threads. I went back to the non-hivemial integration version I was running (having just upgraded to 6.3.2) and the same thing happens. Strange because just to be sure I copied a virgin copy of adduser.php to the threads folder from a virgin (non-hacked) copy of threads I have on my hard drive. I wonder if it's a bug in threads? So I guess my real problem at the moment is the PM style notification?

BTW: How does the pm style notification work? Does it take you to the hivemail index page when you click on the newem.gif image while at the same time logging you into the mail program?
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/02/2003 6:07 PM
try installing a new version of threads on your server and see if you can't still get the email. maybe a hack is creating a conflict. Do you get the flashing PM indicator?

Do a test, 2 thing might be wrong.

Use PHP my admin and check the hm_email row in your profile if you have 0 make it 2 or whatever and see if you now have the flashing PM.

If you do then the problem is with the update routine.

If you have something else than 0 then the problem is with the flashing email routine (which is an exact copy of the PM one)
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/02/2003 7:40 PM
Ok. I changed hm_emails from 0 to 3 and the PM indicator for new emails (newem.gif) did appear I clicked on it and it took me to the Hivemail index page. At least I know how that works now. So I guess the problems is as you said, in the update routine.
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/02/2003 7:49 PM
other question.

In your hm_userid did you enter your hivemail userid ? (the same number you have in your hivemail profile)
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/02/2003 8:31 PM
Yeah. I'm hm_userid 3. I had asked you how to do this earlier, but I just visually edited the row for my user through PHPMyAdmin . If you want you can try it out yourself through my site:
http://www.laondalatina.com//foros/newuser.php?Cat=
Sign up for the forums as well as the email account and send yourself a test email. To get to the Hivemail folder, just click on Email in the top navigation bar
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/05/2003 2:06 AM
So.....?????

Are these issues all sorted out?

I would like to purchase HiveMail for the sole purpose of integrating it into my Threads but would like to know if these issues are resolved.

Also - are the email accounts created at the time of registration proprietary HiveMail accounts or are they standard format - meaning can they also be added to Outlook as an additional account?

One final thing - of those of you who have up and running HiveMail integration - would you allow me to "test drive" it before I drop $130 on the license? Maybe create a temporary account for trial?

Thank you,

Tom
Posted By: msula Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/05/2003 2:24 AM
[]Tom_H said:
Also - are the email accounts created at the time of registration proprietary HiveMail accounts or are they standard format - meaning can they also be added to Outlook as an additional account?
[/]

No, at this time HiveMail doesn't have POP3 support. From what I've read, it is in the works.. but not currently, it is a webmail application right now.
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/05/2003 2:32 AM
[]Jeremy said:
[]Tom_H said:
Also - are the email accounts created at the time of registration proprietary HiveMail accounts or are they standard format - meaning can they also be added to Outlook as an additional account?
[/]

No, at this time HiveMail doesn't have POP3 support. From what I've read, it is in the works.. but not currently, it is a webmail application right now. [/]

Outlook does support IMAP - just wondering if HiveMail uses some quirky interface for mail where Outlook would not be able to access it?

Any idea about the bugs/issues that the previous users addressed - resolved - user error - hack installs like a dream?

THX
tom
Posted By: msula Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/05/2003 3:53 AM
Still, hivemail won't be able to have people access it through external means (outlook, pocomail, eudora, etc...) Hivemail strictly runs via a webmail interface... where things are stored in a database, and actual email accounts are not created on the server. So the only way to check mail right now is via a web browser.

But like I said, they are working to release modules to allow people to check mail from their own mail programs, it is just they are not out yet, and they may an additional fee on top of the software if they are released.
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/05/2003 6:07 AM
Just so you know Charles, that adduser.php error I was getting was due to a bug I just discovered in the languages/spanish/adduser.php script. I just never noticed it until I tried the hivemail integration. Once I finished the integration I tried registering test users to make sure it was working and that's when I noticed the bug, and since I had edited adduser.php in the integration, I thought it was due to the mod. Not so! One less thing to worry about
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/05/2003 7:27 AM
I've decided to jump into this one.

This is going to be a fresh install of HiveMail so are there any suggestions as to the best way to set it up (fresh HiveMail that is) for the integration?

Is the recommendation to set up HiveMail with a mySQL DB of the same name and same password?

Suggestions are GREATLY appreciated.

Tom
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/05/2003 7:46 AM
I (and others) haven't been able to get this going correctly unless Threads and Hivemail both use the same database. I've gotten this working almost completely, w/ the only problem being that I don't get the flashing email .gif for new emails, which is a problem w/ the update routine (according to the test Charles asked me to do). But other than that it works great. I haven't downloaded this zip in a while, but there were problems w/ mine:
1. The .sql file only inserts hm_userid into the w3t_Users table, when it should also insert a field called hm_emails (or hm_email). More on this is somewhere in the thread if you look for it.

2. Use the SQL command mentioned earlier in this thread to change the hivemail templates (much easier & faster).

3. You may need a revision of the ubbt_plugin.php file that Nikos created. I can email that to you if you need it.

Good luck!
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/05/2003 10:02 AM
the zip file should be up to date appart from the require_once since I am still not sure it helps or not
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/07/2003 11:45 PM
Charles -

Could you hack some code for me (or post the code) which would make the users log-in their email address and not allow the option of selecting their own email address? Basically using the original signup page while automatically creating an email account with the users "user" name. I think that (for me anyway) this is an easier way to keep track of email addresses.

--EDIT--
For now I'm going to add the hack as is since I haven't fully deployed the site - so if you do want to tackle the code for me that is where I'm coming from. And if you don't have time to do it - no sweat.
--EDIT--

Thanks
Post deleted by Tom_H
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 5:15 AM
You need to modify the mySQL file in the zip - add this line:
-------------------------------------------------
ALTER TABLE w3t_Users ADD hm_emails int(10) unsigned NOT NULL default "0";
-------------------------------------------------

No more SQL errors - CAN access my board again - still no hivemail integration.....
Post deleted by Tom_H
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 7:17 AM
Down to one error and one problem...

--ERROR-----------------------------------------------------
SQL ERROR: Mon, Sep 08 2003 00:10:22 -0500 Database error only visible to forum administrators

Warning: Cannot modify header information - headers already sent by (output started at /home/tomh68/public_html/ubbthreads/mysql.inc.php:236) in /home/tomh68/public_html/ubbthreads/ubbt.inc.php on line 239
--END ERROR-------------------------------------------------

This happens on new user sign-up - feel free to check it out for yourself...www.udtsealboard.com.

Also - There is no option for checking mail in the users "My Home". I would assume that there's supposed to be but I have none??

Went through the mod twice checking everything and can't seem to find any differences.

Any ideas?

Tom
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 8:14 AM
[]Tom_H said:
Charles -

Could you hack some code for me (or post the code) which would make the users log-in their email address and not allow the option of selecting their own email address? Basically using the original signup page while automatically creating an email account with the users "user" name. I think that (for me anyway) this is an easier way to keep track of email addresses.

--EDIT--
For now I'm going to add the hack as is since I haven't fully deployed the site - so if you do want to tackle the code for me that is where I'm coming from. And if you don't have time to do it - no sweat.
--EDIT--

Thanks [/]This is easy to do, I will post the code later today
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 8:20 AM
[]Tom_H said:
Down to one error and one problem...

--ERROR-----------------------------------------------------
SQL ERROR: Mon, Sep 08 2003 00:10:22 -0500 Database error only visible to forum administrators

Warning: Cannot modify header information - headers already sent by (output started at /home/tomh68/public_html/ubbthreads/mysql.inc.php:236) in /home/tomh68/public_html/ubbthreads/ubbt.inc.php on line 239
--END ERROR-------------------------------------------------

This happens on new user sign-up - feel free to check it out for yourself...www.udtsealboard.com.

Also - There is no option for checking mail in the users "My Home". I would assume that there's supposed to be but I have none??

Went through the mod twice checking everything and can't seem to find any differences.

Any ideas?

Tom [/]Tom could you go at the end of ubbt.inc and switch on the option to show mysql errors to all users? then go back and tell me what the error is.

Right now there is no way to check email in your my home page, all you will get is a flashing icon telling you you gave mail that will take you to your email login.
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 3:28 PM
[]
Right now there is no way to check email in your my home page, all you will get is a flashing icon telling you you gave mail that will take you to your email login. [/]

The other site I looked at had an "email" link in the navigation bar above the user info in "My Home" - so that's a custom link? Which file would I go to to add this link?

Also - hate to sound like an idiot - but I can't see how to turn on SQL errors to all users in ubbt.inc.php??? I'll keep looking and post when I find it.

Tom
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 3:35 PM
Found my mySQL error log:

--ERROR-----------------------------------------------------
[ERROR][Mon, Sep 08 2003 00:10:22 -0500] [/ubbthreads/adduser.php] [xxx.xxx.128.126] Unable to do_query:
UPDATE .Users
SET hiveuserid = 4
WHERE U_number = 25
- Table 'tomh68_ubb.Users' doesn't exist
[ERROR][Mon, Sep 08 2003 00:39:30 -0500] [/ubbthreads/adduser.php] [xxx.xxx.128.126] Unable to do_query:
UPDATE .Users
SET hiveuserid = 5
WHERE U_number = 28
- Table 'tomh68_ubb.Users' doesn't exist
[ERROR][Mon, Sep 08 2003 00:59:05 -0500] [/ubbthreads/adduser.php] [xxx.xxx.128.126] Unable to do_query:
UPDATE .Users
SET hiveuserid = 6
WHERE U_number = 29
- Table 'tomh68_ubb.Users' doesn't exist
[ERROR][Mon, Sep 08 2003 08:16:13 -0500] [/ubbthreads/adduser.php] [xxx.xxx.128.126] Unable to do_query:
UPDATE .Users
SET hiveuserid = 7
WHERE U_number = 30
- Table 'tomh68_ubb.Users' doesn't exist
--END ERROR-------------------------------------------------

Doesn't look too good - I added all the SQL queries from the hack and got positive feedback from the cPanel.

I'll keep looking for the "switch" to show errors to all users.

Tom
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 5:07 PM
my fault I did a bug

*edit*
to all of you please download the zip and replace the ubbt_plugin file in your hive mail folder.

this should fix all the bugs, I had forgotten to add $options in all functions requires so I could not work
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 5:15 PM
Don Julio, please email me the modified ubbt plugin file you use. It should be the same than the one in the zip, appart for the fix I just did but I would like to double check.

thanks
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 5:16 PM
[]Tom_H said:
You need to modify the mySQL file in the zip - add this line:
-------------------------------------------------
ALTER TABLE w3t_Users ADD hm_emails int(10) unsigned NOT NULL default "0";
-------------------------------------------------

No more SQL errors - CAN access my board again - still no hivemail integration..... [/]

this query was added to the zip file, sorry I thought this had been corrected.
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 5:21 PM
I'm still getting the error - double checked the change and the "$options" is in there but still....

--ERROR-----------------------------------------------------
SQL ERROR: Mon, Sep 08 2003 10:17:55 -0500 Database error only visible to forum administrators

Warning: Cannot modify header information - headers already sent by (output started at /home/tomh68/public_html/ubbthreads/mysql.inc.php:236) in /home/tomh68/public_html/ubbthreads/ubbt.inc.php on line 239
--END ERROR-------------------------------------------------
--FROM SQL LOG----------------------------------------------
- Table 'tomh68_ubb.Users' doesn't exist
[ERROR][Mon, Sep 08 2003 10:17:55 -0500] [/ubbthreads/adduser.php] [xxx.xxx.128.126] Unable to do_query:
UPDATE .Users
SET hiveuserid = 8
WHERE U_number = 32
--END ERROR-------------------------------------------------
???

FYI - Found the file to add the email link to the navigation header - ubbt_registerednav.tmpl

Tom
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 5:36 PM
download the zip again
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 5:44 PM
The whole thing and reinstall?
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 5:48 PM
no just replace ubbt plugin
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 5:51 PM
Now I'm getting the "Parse Error"...
--ERROR-----------------------------------------------------
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/tomh68/public_html/hivemail/includes/ubbthreads_plugin.php on line 147

Fatal error: Call to undefined function: update_newmail() in /home/tomh68/public_html/ubbthreads/ubbthreads.php on line 25
--END ERROR-------------------------------------------------

You have to add the curly braces as in dimopoulos' earlier post...

Let me find it....

Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 5:52 PM
Here it is....

[]

I had the same problem. Change all the instances of

$options['database'].

to

{$options['database']}.

You will also see that there is also a $options['dbserver']

A couple more variables also need to be treated this way.

[/]
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 5:57 PM
Check that - line 147 must be:
--EDIT------------------------------------------------------
$sth = $dbh -> do_query("SELECT hm_userid FROM {$config['dbserver']}.{$config['tbprefix']}Users WHERE U_Number = $Uid");
--END EDIT--------------------------------------------------

Note curly braces around "$config['dbserver']"

Tom
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 5:59 PM
And still getting SQL error on new member register.
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 6:25 PM
the same sql error?

Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 6:34 PM
Exact.

If you want, I'll set up an admin acct for you to see.

He|| for that matter I could set up an ftp acct for you too.

??
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 6:35 PM
please send the ftp account to me by PM
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 6:46 PM
Check your pm box - it didn't show up in my sent box so I don't know if you received it.

Tom
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 6:47 PM
got it but getting access denied for the ftp, please check l/p
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 6:52 PM
Check PM
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 7:06 PM
SQL ERROR: Mon, Sep 08 2003 12:00:35 -0500 Unable to do_query: UPDATE localhost.w3t_Users SET hiveuserid = 10 WHERE U_number = 35
update command denied to user: 'tomh68_tom@localhost' for table 'w3t_Users'

are both scripts installed in the same database?
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 7:11 PM
YES!

From the posts that seemed like the way to do this.
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 8:23 PM
ok, strange then that he says you do not have access to this database, it might come from the way it is configured.

I would try removing all database vars then in the plugin file this might be the problem
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 8:27 PM
Did you get a look at the modded files? - All ok?

If I removed all database variables wouldn't that render the functions that use the variables useless??

Do you mean all refrences to "$options[database]"?

Tom
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 8:48 PM
yes the whole thing. you should have 2 database and dbserver
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 9:01 PM
Well, we got new errors...
--ERROR-----------------------------------------------------
SQL ERROR: Mon, Sep 08 2003 13:59:55 -0500 Unable to do_query: UPDATE w3t_Users SET hiveuserid = 13 WHERE U_number = 38
Unknown column 'hiveuserid' in 'field list'
Warning: Cannot modify header information - headers already sent by (output started at /home/tomh68/public_html/ubbthreads/mysql.inc.php:236) in /home/tomh68/public_html/ubbthreads/ubbt.inc.php on line 239
--END ERROR-------------------------------------------------

I also deleted the "." from the variables - should I not have done that?

Tom
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 9:21 PM
If I do a clean install - how should the db's be setup?

Tom
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 9:25 PM
Just so you know, I've got everything about this hack working except the PM style notifications for emails. When I used your ubbthreads_plugin.php file I got (and still do get) this error:
[] Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/laondal/public_html/correo/includes/ubbthreads_plugin.php on line 147

Fatal error: Call to undefined function: update_newmail() in /home/laondal/public_html/foros/ubbt.inc.php on line 1491 [/]
So it seems the update_newemail routine isn't working, which is why I don't get the PM syle notification. Using Nikos' modification of the file, I don't get that error, but I don't get the PM style noficiation either You say you've updated the zip, so I'll give yours a try again (the new one ). BTW, what is your email address (so that I can send you the ubbthreads_plugin.php that I'm using)?

*************EDIT****************
I just tried using your new version of the ubbthreads_plugin.php file and I got the same error. So for me, this is almost out of beta, but not quite there yet. The only problem is the update_newemail function, which is an error either in the ubbthreads_plugin.php file of the ubbt.inc.php file.
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 9:33 PM
DonJulio -

Here's the mod to the file to fix that error:

[]Tom_H said:
Check that - line 147 must be:
--EDIT------------------------------------------------------
$sth = $dbh -> do_query("SELECT hm_userid FROM {$config['dbserver']}.{$config['tbprefix']}Users WHERE U_Number = $Uid");
--END EDIT--------------------------------------------------

Note curly braces around "$config['dbserver']"

Tom [/]
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 9:35 PM
donjulio - are you using a combined DB or are your DB's separated (one for Threads, and one for Hivemail)?
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 9:41 PM
I'm using a combined database. Thanks for the fix. I'll give it a try!
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 9:46 PM
Thanks! That fixed the error w/ the stock ubbthreads_plugin.php file. Hopefully the zip will get updated for that. Now I'll check to see if the update_newemails routine is working so I can get those PM style notifications
[]Tom_H said:
DonJulio -

Here's the mod to the file to fix that error:

[]Tom_H said:
Check that - line 147 must be:
--EDIT------------------------------------------------------
$sth = $dbh -> do_query("SELECT hm_userid FROM {$config['dbserver']}.{$config['tbprefix']}Users WHERE U_Number = $Uid");
--END EDIT--------------------------------------------------

Note curly braces around "$config['dbserver']"

Tom [/] [/]
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 9:52 PM
OK. The update_newemails routine still isn't working. I tried sending myself a test email and it the newem.gif indicator didn't appear in the header....
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 9:54 PM
Sorry -

I think I'm going to restore my DB and start over from sctratch.

~~~Frustrated~~~
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 10:04 PM
Can't restore database - I'm hosed - starting over from scratch...
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 11:13 PM
when you send an email, the email indicator will get updated only when you visit front page and my home not on any other page
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 11:20 PM
Charles -

Were you able to update the SQL query file and the ubbthreads_plugin.php file?

Tom
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 11:20 PM
actually I had fixed that, just forgot to upload the zip

tom if you start from scratches try using require_once instead of require
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 11:21 PM
In the plugin file?
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 11:24 PM
I'll be reloading everything so it'll be a while before I am able to attempt this again.
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 11:31 PM
no in all the instance of require the plugin file in all thread files
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 11:41 PM
I'll give it a shot. It'll be a while though.

Meanwhile, could you hack some code which will allow me to use the users "User Name" as their email account name and not give them the option of filling in the box for an email name? Maybe a display that shows the actual email address using username vice the fill-in box at the bottom.

Thanks - and if you don't have time...don't worry about it.

Tom
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/08/2003 11:54 PM
I am headed for bed now but promised first thing tomorrow I will do this.

it should only be a few lines to change

you can only show them what the email adress would be like in the profile since during registration we do not know the login name
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/09/2003 12:08 AM
Awesome - thanks
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/09/2003 1:27 AM
I've visited My Home after sending myself the test email and it still doesn't work . I've also visitied the ubbthreads.php page (even though Categories is my front page) and nothing. Could you test it out on my site Charles?
http://www.laondalatina.com//foros/newuser.php?Cat=
Thanks!
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/09/2003 2:28 AM
Charles -

I don't know if this is a problem or not but I have a question about the final instruction for Hivemail files:

--COPY PASTE------------------------------------------------

login-Template:
---------------

Replace all "vb_" parts with "ubbt_"

--END COPY PASTE--------------------------------------------

When I execute this query on my database it displays "0 (as in zero) rows modified....

So I executed the query on just that table - "login_template" - and got the same thing "zero changes"

What do you make of this?

Tom
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/09/2003 6:17 AM
donjulio -

The starting point for trackig down that problem lies in the "ubbt.inc.php" file @ line 334. That's where the call for the icon is.

Tom
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/09/2003 6:30 AM
Thanks for your concern, but that's not it. I can manually change hm_emails from 0 to any other number and the icon appears. The problem is that the field hm_emails is always 0. I imagine it's supposed to go up when you get new emails, but it doesn't. That's the problem.
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/09/2003 8:40 AM
not sure tom, could I access your db?

*edit* did you delete both databases when you reinstalled? if not then it was already hacked.
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/09/2003 8:43 AM
don julio, I created an account and got

SQL ERROR: Database error only visible to forum administrators

could you look through your log and tell me what the error is?
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/09/2003 8:54 AM
fixed the ubbt_plugin with what don julio sent me, I did mess up with dbname variable in some place :/

so you can download it and use this one
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/09/2003 9:23 AM
ok in the plugin use this block

Code
<br />// ----------------------------------------------------------------------<br />// If we are allowing the user to create an email account then we give<br />// them a form<br /><br />//We do not want our users to choose their email so lets use the login<br />//first we check if we are on reg or my home screen<br />if (isset($Username)) { $hive_username = $Username; } else { $hive_username = {$ubbt_lang['USERNAME_TEXT']};}<br />	if ($_options['regopen']) {<br />		$choosehmname = "<br />			</td><br />			</tr><br />			<tr><br />			<td class=\"darktable\"><br />			{$ubbt_lang['HM_SIGNUP']}<br />		    <br /><br />			<input type=\"radio\" name=\"hive_signup\" value=\"yes\"> {$ubbt_lang['TEXT_YES']}<br />			<input type=\"radio\" name=\"hive_signup\" value=\"no\" checked> {$ubbt_lang['TEXT_NO']}<br /><br />		    <br /><br />			{$ubbt_lang['HM_SIGNUP2']}<br />			<b>$hive_username</b>&nbsp;&nbsp;<br />			<select name=\"hive_userdomain\">$hive_domainname_options</select><br />			</tr><br />			<tr><br />			<td class=\"lighttable\"><br />			<br /><br />		";<br />	}<br />


in adduser.php

change:

$hive_username = get_input("hive_username","post");

to

$hive_username = get_input("Loginname","post");

in changebasic.php

change

$hive_username = get_input("hive_username","post");

to

$hive_username = get_input("Username","post");

done

it not tested but it should work

let me know how it goes
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/09/2003 3:30 PM
Charles -

I hacked the site to pieces trying different things. After no luck in fixing, I tried reloading the DB but it only partially reloaded so now I can't even get into Threads admin. I'll have to delete the DB and Threads AND Hivemail - literally starting from scratch. It's going to take a few days to get it up - It's exam week for me so maybe by the weekend. If you still want to check it out let me know and we'll work on details.

---EDIT---
re: DB delete:
No I didn't delete the DB before trying to restoring it - I think that's part of the problem - maybe I'll try doing that.

---EDIT 2---
Are the fixes just for donjulio or is that going to be integrated into the zip?

Tom
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/09/2003 3:32 PM
if you have a db backup use phpmyadmin to load it back
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/09/2003 3:37 PM
Yeah, I have phpmyadmin but my DB was backed up before HiveMail install so I'll have to delete the current DB (read remove HiveMail) and restore the Threads DB - still would take a day to get it done - I have an exam this afternoon and don't know if I can get it done by your AM.
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/09/2003 3:39 PM
k, just let me know how it goes
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/09/2003 3:49 PM
Didn't work - reinstalling all.
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/09/2003 3:52 PM
Charles -

Thanks for the code!

Just noticed - I'm s-l-o-w.
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/09/2003 7:47 PM
[]Charles said:
don julio, I created an account and got

SQL ERROR: Database error only visible to forum administrators

could you look through your log and tell me what the error is? [/]
That had never happened before. Strange. But I fixed it. I had replaced the ubbthreads_plugin.php file w/ the one that was in the zip yesterday morning and it didn't work. But I made a change based on what Tom said (adding curly brackets around $config on line 174 (or 147) ) and it seemed to be working. Not as well as I thought because of that error you got when registering. I went back to the version of ubbthreads_plugin.php made by Nikos (the one I emailed you) and I didn't get that error any more when I registered another test user. Weird.

Anyhow, here is a copy of the SQL error that happened when you tried to register:
[] Unable to do_query: UPDATE localhost.w3t_Users SET hiveuserid = 27 WHERE U_number = 101 - update command denied to user: 'laondal_admin@localhost' for table 'w3t_Users' [/]
I hope this helps

**********EDIT*************
Please try registering again, because that problem is gone w/ the Nikos version of ubbthreads_plugin.php. Then try sending yourself email to see if it updates as it should.
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/09/2003 8:43 PM
could you try again the file in the zip and tell me how it goes?
Posted By: dimopoulos Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/10/2003 11:21 AM
One thing that I noticed was that the query:

Unable to do_query: UPDATE localhost.w3t_Users SET hiveuserid = 27 WHERE U_number = 101 - update command denied to user: 'laondal_admin@localhost' for table 'w3t_Users'

is wrong because it refers to the host and not the database. You will need to change the

$sth = $dbh -> do_query("SELECT hm_userid FROM {$config['dbserver']}.{$config['tbprefix']}Users WHERE U_Number = $Uid");

into

$sth = $dbh -> do_query("SELECT hm_userid FROM {$config['dbname']}.{$config['tbprefix']}Users WHERE U_Number = $Uid");

and that should do it. This is what I had done in the plugin file.
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/10/2003 11:38 AM
this should have been fixed in the latest zip which is why I asked if you could give it a try;
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/11/2003 9:36 AM
I'm back up with Threads and Hivemail fresh. I'm probably going to try the integration again this Friday.

Any suggestions or "keys" to success before I hose my crap up a second time?

Tom
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/12/2003 1:44 PM
nope not really just follow the instructions you might want to install this on an unhacked board just to be sure.
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/12/2003 8:10 PM
[]Charles said:
could you try again the file in the zip and tell me how it goes? [/]

Sorry for not getting back to you on this. I tried it and then began having some database problems. I'm not sure if this caused it or not. I re-installed the database from a back-up and am currently using Nikos version of the plugin, but when I get a chance I'll give the one in the zip a try again Just remind me to do another back-up
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/12/2003 8:17 PM
I should have integrated nikos modifications so it SHOULD work.

please let me know if you got any errors with the DB problems
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/13/2003 7:34 AM
Ok. I'm glad I waited. It wasn't the ubbthreads_plugin.php file that caused the problem (as far as I can tell). I've installed the new one from the zip file and it's working the same as Nikos' version. But still now PM style notification for new emails. Has anyone got this working yet? Otherwise, everything is working well.
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/13/2003 8:32 AM
don julio could you give me FTP access?
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/13/2003 8:47 AM
Charles -
I didn't install the hack today as planned because I got to thinking...

Besides the new mail notification, what does the hack do that a link to HiveMail will not do?? It seems like a lot of code yet you still need to reskin (I'm guessing) HiveMail to match Threads, you still need to go to the HiveMail front end, you still need to log-in to HiveMail. I don't mean to insult you or your work - indeed you wrote a lot of code, I just don't want to have to reinstall all again if a link will be sufficient.

Thank you,

Tom
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/13/2003 8:54 AM
np well we did some thinking on what was required without having to rewrite Hivemail and this is what came out.

- Users can create an account directly from threads.

- same password for both accounts, modifiying pass in threads will change it in hivemail too. Clicking on change passwd in HM will take you to my home in threads.

- PM style notifier when you have new mail.

in the work, auto login

as for the lot of code bit, I tried to put as much as possible in the library but you still do need to include it in the files
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/13/2003 9:03 AM
Just PM'ed you. BTW, the site is: laondalatina.com
Can't believe I forgot to mention that
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/13/2003 9:08 AM
the access works but I get to an empty dir what i need is to be able to access the files so I can try to run a test or two
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/13/2003 9:15 AM
tom some stuff I forgot.

If you use the reg queue then user will also be in the queue in HM once you approve him his account is activated.

If you delete a user, his email gets deleted too if he has one.
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/13/2003 10:03 AM
ok fixed added the newmail call code to your cat page too and fixed the double // in your url
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/13/2003 10:12 AM
[]Charles said:
ok fixed added the newmail call code to your cat page too and fixed the double // in your url [/]
Thanks! It's working now! Now I gotta get some sleep
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/13/2003 10:15 AM
I need to add the mofification to categorie.php in the zip, since i never use it I forgot to add it in the first place
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/13/2003 5:49 PM
What was causing the double "//". Was in in the config.inc.php file? What would I need to change?

BTW: I think after you add the call to the categories.php file, this mod will be out of BETA

I have suggestions for the next version:
Automatic log in to both forums and email from the forums login.php page. That way you can add a link to Email to the navigation bar and throw out the hivemail index.php page (or at least replace it w/ the Threads login page).

Another suggestion is to make it so when update emails routine runs, that it only counts unread emails in the inbox, and not the trash can. I delete spam w/o opening them and I have to wait x number of days for them to expire (at least one) or log out for the trash can to be emptied. Having to log in and out to get the newem.gif to go away is annoying. Since they don't have an instant delete option in hivemail, a way to differentiate the two would be nice. I've suggested the instant delete idea over at the hivemail forums.

Great work Charles & Stefan & Nikos!
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/13/2003 7:52 PM
[]donJulio said:
What was causing the double "//". Was in in the config.inc.php file? What would I need to change?
[/]
yes it was in the URL in the config file

[]
Another suggestion is to make it so when update emails routine runs, that it only counts unread emails in the inbox, and not the trash can. I delete spam w/o opening them and I have to wait x number of days for them to expire (at least one) or log out for the trash can to be emptied. Having to log in and out to get the newem.gif to go away is annoying. Since they don't have an instant delete option in hivemail, a way to differentiate the two would be nice. I've suggested the instant delete idea over at the hivemail forums.[/]

fixed

in the plugin file find:

$query = "SELECT userid FROM {$options['database']}.hive_message WHERE userid = $hiveid AND status = 0";

replace by:

$query = "SELECT userid FROM {$options['database']}.hive_message WHERE userid = $hiveid AND status = 0 AND folderid != -2 AND folderid != -3 AND folderid != -4";

-2 -3 -4 folders are sent, trash and junk so any unread emails in there will not be counted

zip file updated too
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/14/2003 3:47 AM
Charles -

The code to use the login name as the hivemail username did not work - or atleast I suspected it was causing the error so I removed all the code and went back to the original hack. Well, that wasn't the problem.

First - I can't see the "UBBThreads integration" plug-in in the HiveMail admin panel.

Second - I can't get into UBBThreads, I get this...

--ERRORS-----------------------------------------

Fatal error: Cannot redeclare hivemail_check_name() (previously declared in /home/tomh68/public_html/hivemail/includes/ubbthreads_plugin.php:76) in /home/tomh68/public_html/hivemail/includes/ubbthreads_plugin.php on line 74

--END ERROR--------------------------------------

If you would like to take a crack at it let me know and I will give you my admin info - otherwise I think that I am going to abandon this hack.

Tom
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/14/2003 9:56 AM
actually the code I gave you will most probably give an error I didn't test it.

otherwise try using require_once instead of require.

but from the error it seems you copied the code twice no ?

for the ubbt plugin in hivemail you have to add the data first to the hive database.
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/14/2003 4:40 PM
What data in the Hive database are you refering to?
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/14/2003 4:46 PM
well we do add some stuf in the cp table to support the hack
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/14/2003 4:52 PM
Just the queries - they are done.

I did have a duplicate line however I am getting SQL errors at the top of threads again...
--ERROR------------------------------------
SQL ERROR: Sun, Sep 14 2003 09:40:40 -0500 Database error only visible to forum administrators

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/tomh68/public_html/ubbthreads/mysql.inc.php on line 131
--END ERROR--------------------------------
Posted By: msula Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/14/2003 4:54 PM
has anyone gotten this to work with seperate databses? My threads DB is already about 400MB, and I really don't want to start adding email to that as well.
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/14/2003 4:57 PM
SQL Log error messages--------------------------------

[ERROR][Sun, Sep 14 2003 09:40:40 -0500] [/ubbthreads/ubbthreads.php] [xxx.xxx.83.196] Unable to do_query: SELECT U_FrontPage, U_Groups, U_TimeOffset,U_Display,U_Favorites,U_WhichForums,U_Categories,U_Username,U_Password,U_SessionId, U_StyleSheet, U_Status, U_Privates, U_FrontPage, U_Number, U_Banned, hm_emails FROM w3t_Users WHERE U_Number = '' - Unknown column 'hm_emails' in 'field list'
[ERROR][Sun, Sep 14 2003 09:50:58 -0500] [/ubbthreads/ubbthreads.php] [xxx.xxx.43.196] Unable to do_query: SELECT U_FrontPage, U_Groups, U_TimeOffset,U_Display,U_Favorites,U_WhichForums,U_Categories,U_Username,U_Password,U_SessionId, U_StyleSheet, U_Status, U_Privates, U_FrontPage, U_Number, U_Banned, hm_emails FROM w3t_Users WHERE U_Number = '' - Unknown column 'hm_emails' in 'field list'
END SQL Log error messages-----------------------------

I installed the queries??????????????
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/14/2003 4:57 PM
I did but it was not in a production environment.

all I can say is give it a shot, the last zip has proven to be working well (read the lib file)
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/14/2003 4:57 PM
and what is line 131 ?
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/14/2003 4:59 PM
Jeremy -

You may want to wait on this one - I had to reinstall Threads and Hivemail - luckily I had not deployed. I still have many issues in my current attempt.

$.02
Tom
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/14/2003 5:02 PM
--Line 131 "mysql.inc.php" --------------------------

$this->row = mysql_fetch_array($sth);

--END -----------------------------------------------
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/14/2003 5:02 PM
tom if you can't install it I can do it for you if you want
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/14/2003 5:03 PM
Still not getting the UBBT options in HiveMail admin?
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/14/2003 5:07 PM
RE: install -

I believe that I have done everything correctly and would like to understand the issues plaguing my install but FrUsTrAtIoN grips me once again.

Let me do one thing first - I have already double checked the Threads changes but I need to double check the Hive changes....

Give me about 3 min...

Tom
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/14/2003 5:12 PM
All changes to Hive check out.

I am at a loss as to what the problems are.

If you would like my admin info PM me and I'll send them. Don't worry about messing up the accounts - I have not yet deployed and can reinstall clean again with no loss and no hard feelings.

Tom
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/14/2003 5:14 PM
ok please do so. Do you have PHPmyadmin installed?
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/14/2003 5:21 PM
Yes
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/14/2003 5:23 PM
ok then send me an access to the files and PHPmyadmin
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/14/2003 5:39 PM
so ?
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/14/2003 5:42 PM
You have a PM
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/14/2003 5:47 PM
Let me know if you need anything more.
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/14/2003 5:53 PM
ok, you hadn't run any of the SQL queries smirk so you didn't create the hivemail CP settings or the additional fields in threads.

now you don't get the errors any longer.

I updated the ubbt_plugin just in case.

now you need to configure hivmail and activate the plugin.

then let me know how it goes
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/14/2003 6:12 PM
Thank you for looking.

The FIRST thing that I did was run the SQL queries to set up the database - from phpmyadmin. Don't know how or why they didn't take? Maybe that should be the last step???

I'll configure the plug-in and test.

I have to run some errands now but will update on the thread - so have a good night and I'll let you know how it goes.

Tom
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/14/2003 6:32 PM
the order to add the data to the sql database is not important.

you did run the 2 sql commands for the templates so you probably forgot to run the ones in the zip.
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/14/2003 8:35 PM
[]Charles said:
[]donJulio said:
What was causing the double "//". Was in in the config.inc.php file? What would I need to change?
[/]
yes it was in the URL in the config file

[]
Another suggestion is to make it so when update emails routine runs, that it only counts unread emails in the inbox, and not the trash can. I delete spam w/o opening them and I have to wait x number of days for them to expire (at least one) or log out for the trash can to be emptied. Having to log in and out to get the newem.gif to go away is annoying. Since they don't have an instant delete option in hivemail, a way to differentiate the two would be nice. I've suggested the instant delete idea over at the hivemail forums.[/]

fixed

in the plugin file find:

$query = "SELECT userid FROM {$options['database']}.hive_message WHERE userid = $hiveid AND status = 0";

replace by:

$query = "SELECT userid FROM {$options['database']}.hive_message WHERE userid = $hiveid AND status = 0 AND folderid != -2 AND folderid != -3 AND folderid != -4";

-2 -3 -4 folders are sent, trash and junk so any unread emails in there will not be counted

zip file updated too [/]

Thanks Charles! It's working like a charm!
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/14/2003 8:39 PM
[]
$query = "SELECT userid FROM {$options['database']}.hive_message WHERE userid = $hiveid AND status = 0 AND folderid != -2 AND folderid != -3 AND folderid != -4"; [/]
Does this add more queries?
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/14/2003 8:52 PM
no it just makes the existing one more precise by excluding more messages
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/14/2003 9:27 PM
Sounds like this mod is final to me
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/14/2003 9:29 PM
still need to work on the auto login hadn't had time to really look into it
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/15/2003 12:42 AM
--Errors----------------------------------------
admin/doapproveusers.php:
should have curly braces "{}" around variables in lines 95 and 114.

AND -------------------------

Fatal error: Cannot redeclare hivemail_check_name() (previously declared in /home/tomh68/public_html/hivemail/includes/ubbthreads_plugin.php:76) in /home/tomh68/public_html/hivemail/includes/ubbthreads_plugin.php on line 74

-----------------------------------------------------

I have not looked into this last error yet - will update if I find the problem.

Tom
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/15/2003 8:52 AM
ok for the last error, you need to use require_once instead of require in the file that gave you the error if it still happens modify ubbt.inc too

*edit* ok the zip was updated regarding the first error.

don Julio you will need to add {} around the database call.
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/15/2003 4:04 PM
Charles - so far all bugs and errors fixed. Still testing and will update as needed. I am going to modify the code to use the Threads login name for the Hivemail address. I have one question about your code suggestion....

[]Charles said:
ok in the plugin use this block

in adduser.php

change:

$hive_username = get_input("hive_username","post");

to

$hive_username = get_input("Loginname","post");

in changebasic.php

change

$hive_username = get_input("hive_username","post");

to

$hive_username = get_input("Username","post");

done

it not tested but it should work

let me know how it goes [/]


Shouldn't the second line change be...

$hive_username = get_input(" [:"red"] Loginname [/] ","post");

... It seems that the prog was getting confused as to which var to use?

Tom
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/15/2003 4:49 PM
no this is correct as both files do not have the same var name.

I did an error in the if statement but haven't found what yet.

*edit* found my error in the code I gave you remove the {} around the wordlet in the if statement

// ----------------------------------------------------------------------
// If we are allowing the user to create an email account then we give
// them a form

//We do not want our users to choose their email so lets use the login
//first we check if we are on reg or my home screen
if (isset($Username)) { $hive_username = $Username; } else { $hive_username = $ubbt_lang['USERNAME_TEXT'];}
if ($_options['regopen']) {
$choosehmname = "
</td>
</tr>
<tr>
<td class="darktable">
{$ubbt_lang['HM_SIGNUP']}
<br />
<input type="radio" name="hive_signup" value="yes"> {$ubbt_lang['TEXT_YES']}
<input type="radio" name="hive_signup" value="no" checked> {$ubbt_lang['TEXT_NO']}<br />
<br />
{$ubbt_lang['HM_SIGNUP2']}
$hive_username 
<select name="hive_userdomain">$hive_domainname_options</select>
<br />
{$ubbt_lang['HM_SIGNUP3']}
</td>
</tr>
<tr>
<td class="lighttable">
<br />
";
}

please use this as I also fixed som HTML problems

Also the wordlet have been modified too.

$ubbt_lang['HM_USER_EXISTS'] = "HiveMail UserName already taken";
$ubbt_lang['HM_USER_WRONG'] = "HiveMail UserName can only contain letters, numbers, - _ characters";
$ubbt_lang['HM_SIGNUP'] = "<b>Sign Up for an Email Account</b><br /><smallfont>This section is optional.<smallfont/><br /><br /><b>Get your own $hive_domainname email account?</b><br /><smallfont>If you select yes please choose an account name below.</smallfont>";
$ubbt_lang['HM_SIGNUP2'] = "<b>Account name:</b>";
$ubbt_lang['HM_SIGNUP3'] = "Note: The password for your email account will be the same as your forum account.";

the zip file was updated with the corrected wordlets and fixed HTML in the plugin file.
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/15/2003 5:48 PM
Great - thanks.

I'll give it a try this afternoon.

Tom
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/15/2003 6:04 PM
just for info: HiveMail 1.2.2 has been released today, it is a bugfix version for 1.2.1
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/15/2003 6:12 PM
[] don Julio you will need to add {} around the database call. [/]
Why? Everything seems to be working fine for me now. What file would I do this in anyways?
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/15/2003 6:19 PM
in doapproveuser.php because otherwise you will get an error when deleting a user in the queue.

This makes me think I forgot to put in the zip the instruction for dodeleteuser.php for deleting the email account when you delete a user.
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/15/2003 7:10 PM
[]Charles said:
in doapproveuser.php because otherwise you will get an error when deleting a user in the queue.

This makes me think I forgot to put in the zip the instruction for dodeleteuser.php for deleting the email account when you delete a user. [/]

I believe you're right about hte dodeleteuser.php, because when I deleted test users I set up, they still had their email accounts.
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/15/2003 9:59 PM
Just finished looking over the HiveMail 1.2.2 upgrade and line comparing the 3 change files in the integration hack. There does not seem to be any changes in the three 1.2.1 unhacked files and the 1.2.2 unhacked files.

- conclusion -

Hacks to those files should not harm the upgrade and, for that matter - it appears that you can copy your hacked files and replace the 1.2.2 upgrade files.

When my upgrade to 1.2.2 is complete I will post any complications with the hack and 1.2.2 - if in fact there are any.

I do anticipate having to run the SQL command at the bottom of the hack instructions to change the prefix...
"Replace all "vb_" parts with "ubbt_"" ... as the upgrade states that there are mySQL changes.

Tom
Post deleted by Tom_H
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/15/2003 11:24 PM
Charles -

Great work on the "login name" as "email address name". It works great and is exactly what I needed to make this complete for my site.

Kudos and Thank You for all your help.

Tom
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/16/2003 12:18 AM
There is a problem in the SQL part of the hack as combined with upgrade to 1.2.2....

Here is a sample of the SQL error given in HiveMail when checking new messages:

---ERROR---------------------------------------------------

MySQL error: You have an error in your SQL syntax near 'SET hm_emails = hm_emails - 1
WHERE hm_userid = 7
' at line 2
MySQL error number: 1064
Script: /hivemail/read.email.php?hivesession=6b3cbc5cf552b93379b15d3b50c41f8b&messageid=58&hivesession=6b3cbc5cf552b93379b15d3b50c41f8b
Date: September 15, 2003, 5:14 pm

Invalid query: UPDATE
SET hm_emails = hm_emails - 1
WHERE hm_userid = 7

---ERROR---------------------------------------------------

Tom
Post deleted by Tom_H
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/16/2003 2:48 AM
OK - I found it...

MySQL error 1064 is a parse error and since there wasn't anything blatantly wrong in the "read.email.php" hack I decided to replace the integer '1' with a variable set equal to one. It worked and now no errors. Charles please update the zip with this change as it will not affect HiveMail 1.2.1.

Here's what you need to do...

---CHANGES--------------------------------------------------

In read.email.php
Code
 <br /> ---add as the first line of actual code below the comments--- <br /> <br />$digit = 1; <br /> <br />--------------------------- <br /> <br />---then change this-------- <br /> <br />$DB_site->query("UPDATE $threadsusertable <br />	SET hm_emails = hm_emails - 1 <br />	WHERE hm_userid = $hiveuser[userid] <br />		"); <br />	} <br /> <br />---to this----------------- <br /> <br />$DB_site->query("UPDATE $threadsusertable <br />	SET hm_emails = hm_emails - $digit <br />	WHERE hm_userid = $hiveuser[userid] <br />		"); <br />	}// added var $digit <br /> <br />


---END CHANGES----------------------------------------------

With this change everything seems to be working perfectly. If I come across any more errors I will post them and hopefully post the corrections.

Tom
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/16/2003 10:12 PM
[]Charles said:
just for info: HiveMail 1.2.2 has been released today, it is a bugfix version for 1.2.1 [/]

Are there going to be any problems using this same hack w/ version 1.2.2 of Hivemail? I would hope not. I seem to have everything working correctly now and am almost afraid to tinker with any of it.
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/16/2003 10:22 PM
now since it only fixes some bugs and doesn't intervene in hacked part you should have no problems.
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/16/2003 10:28 PM
[]Charles said:
now since it only fixes some bugs and doesn't intervene in hacked part you should have no problems. [/]
Thanks! I wish Hivemail was a little more forthcoming about what's going into future version similar to the changelog for threads that Infopop maintains, as well as letting us know what bugs were fixed w/ the new version.
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/16/2003 11:23 PM
When editing and updating my profile I encountered this...

--ERROR----------------------------------------------------
Fatal error: Cannot redeclare hivemail_check_name() (previously declared in /home/tomh68/public_html/hivemail/includes/ubbthreads_plugin.php:113) in /home/tomh68/public_html/hivemail/includes/ubbthreads_plugin.php on line 111
--END ERROR------------------------------------------------

I have changed "require" to "require_once" in changebasic.php and editbasic.php yet still get the error.
Any suggestions?


--EDIT-----------------------------------

Happens on all users when I try to
upgrade personal settings.

--END EDIT-------------------------------

Tom
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/16/2003 11:57 PM
ok tom will look into it
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/17/2003 12:08 AM
The only call to hivemail_check_name() in the hacked files occurs in adduser.php line 230.
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/17/2003 12:12 AM
try using require once in ubbt.inc.php
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/17/2003 12:28 AM
BINGO!

Nice work Charles - It is nice to know that I was on the right track.

Should I change the other files back to 'require' or leave them 'require_once'?

Tom
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/17/2003 4:46 AM
I've upgraded hivemail to version 1.2.2 and it's still working like a charm Just remember that you have to replace vb_ with ubbt_ in the login template because the upgrade script reverts it back to the original version.
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/17/2003 5:56 AM
donjulio -

Did you need to make the variable change in read.email.php - or did yours work without the change?

Mine needed the fix because I was getting and error when attempting to read new emails - just wondering if yours did the same?

Tom
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/17/2003 6:38 AM
Hola Tom,
I didn't have to make any changes to any of the variables. For me everything is working fine
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/17/2003 6:43 AM
And you've checked new emails?

Man - I must have done something wrong. It's working great now though.

Tom
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/17/2003 7:33 AM
[]Tom_H said:
BINGO!

Nice work Charles - It is nice to know that I was on the right track.

Should I change the other files back to 'require' or leave them 'require_once'?

Tom [/]Tom, it does not make a difference you can leave require once
OK, is this integration good to go now? Has the zip been updated to reflect all the changes that have been made over the last few days?

Thanks and I am really looking forward to this!!
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/17/2003 7:35 PM
[]BWilliams said:
OK, is this integration good to go now? Has the zip been updated to reflect all the changes that have been made over the last few days?

Thanks and I am really looking forward to this!! [/]

Yes! The ubbthreads_plugin.php file works perfectly, and even has been updated to only check the inbox for new email. The ubbthreads.sql is now correct. The only thing is to replace vb_ w/ ubbt_ in the login template, because upgrading to 1.2.2 resets the templets to default.
Posted By: msula Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/17/2003 9:24 PM
Since the bugs are looking to be finally squeezed out... does this work with seperate databases? Or is that going to require more hacking?
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/17/2003 10:24 PM
Jeremy -

My DB('s) are/is combined - I deployed that way so I don't know if you're going to run into problems or not. If I'm not mistaken so is donjulio's. Sorry I can't be of any more help.

Tom
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/17/2003 11:33 PM
It should work as long as you have the same name/pass for both.

I did some testing on my server but never on a live site.
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/18/2003 10:59 PM
A new error Charles:

Ok. Everything seemed to be working well (and you can argue it still is). I went into my profile (editbasic.php) to change my avatar and after clicking on the button at the bottom (I think it said "Continue") I got this error on the next page (changebasic.php):
[] Fatal error: Cannot redeclare hivemail_check_name() (previously declared in /home/laondal/public_html/correo/includes/ubbthreads_plugin.php:79) in /home/laondal/public_html/correo/includes/ubbthreads_plugin.php on line 77 [/]
I don't know what this means, but it can't be good. The strange thing is that the avatar was changed. I don't know what the problem is. The option to sign up for email doesn't even appear in the editbasic.php page because I already have a Hivemail account. Any ideas?
Posted By: Tom_H Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/18/2003 11:37 PM
BTDT

[]Charles said:
try using require_once in ubbt.inc.php [/]

As opposed to "require" - just use "find and replace"

If that doesn't work do the same to editbasic.php and changebasic.php

Tom
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/22/2003 11:06 PM
[]Tom_H said:
BTDT

[]Charles said:
try using require_once in ubbt.inc.php [/]

As opposed to "require" - just use "find and replace"

If that doesn't work do the same to editbasic.php and changebasic.php

Tom [/]

That did the trick! Thanks!
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/25/2003 11:00 PM
I would like the opinion of those of you that have Threads and Hivemail:

Do you like having the Hivemail templates in the database, or do you think they would be better off with the templates outside the database, similar to threads? Or does it not make a difference to you?

I personally wish they weren't in the database. I think editing them would be simpler if they weren't, plus if any of us were to create new template sets to have hivemail match threads, it would be easier to share if they were in a folder in the hivemail folder, instead of in the database. What do you think?
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 09/25/2003 11:26 PM
well you can always export all templates to a file in order to edit them.

note it will be hard to have it fully integrated to threads without rewriting most of it since you would need to make it use threads HTML building capabilities.

so to integrate ...

Use the same header/footer
use the same css colors
Posted By: Tom_H Integration Update ---------------- - 10/18/2003 8:07 AM
Just wanted to let everyone know my integration has been doing great.

I added a mail link to the Threads nav bar and a Threads link to the Hivemail nav - once logged on, my users can flip back and forth as they need/want to. Still working on styling Hivemail to look like my Threads, but the mechanics are fine.

Anyone looking to do this mod should read through the thread. I believe that Charles has kept on top of the zip and all should be ready to go.

Good Luck - it's worth it.

$.02

Tom
Posted By: omegatron Re: Beta-[6.3] HiveMail - Integration 1.0 - 10/21/2003 8:44 PM
Just a couple of notes on this hack.

This hack is for only experienced hackers.

This hack still has problems if the threads and hivemail table's are not in the same database.

The PM icon does not work on the threads end.

Even though as I read through Charles's replies and he is sure everything is right the PM does not work on threads end.
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 10/21/2003 9:17 PM
huh this is correct since we DO NOT send a PM so you can't possibly get one ... But you should have a second image just for mails.

now did you download one of the latest version? I think the hack was quite updated since you installed it and I did fix a number of bugs.

the only thing that needs to be added to the actual zip is the require_once in ubbt.inc

multiple databases was only a test but it worked for me when I used same login password for both.
Posted By: omegatron Re: Beta-[6.3] HiveMail - Integration 1.0 - 10/21/2003 11:40 PM
Charles,

I got it working. The hack does not work right when there are separate databases. This is still an issue. However I got the icon working. Was a minor error. When I signed up for the account as a test it was still on two databases and it actually inserted me into the hive databases twice However I deleted one. The hm_userid was set to the last one not the true one. Once I corrected that it worked fine.

No problems since combinding the databases.
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 10/23/2003 10:04 PM
Another suggestion I have for the next version of this modification (other than automatic login to Hivemail from Threads ) is this:

When a person changes their password in their profile in threads, and they have a Hivemail account, then the password for both services should be changed. Of course w/ automatic login, this wouldn't be useful. But you never know, someone may want to read email only w/o going through threads. It's probably also easier to code than automatic login
Posted By: Charles Re: Beta-[6.3] HiveMail - Integration 1.0 - 10/24/2003 1:28 PM
this is the designed behaviour already, updating your threads pass should also update the hivemail one
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 10/24/2003 5:40 PM
Ok. I didn't know that. Thanks
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 10/24/2003 7:33 PM
One nice new feature, which probably wouldn't be easy to implement, is to make Hivemail use threads usergroups, like Photopost
Posted By: msula Re: Beta-[6.3] HiveMail - Integration 1.0 - 10/25/2003 4:05 AM
[]donJulio said:
One nice new feature, which probably wouldn't be easy to implement, is to make Hivemail use threads usergroups, like Photopost [/]

That is the main thing I'm waiting for.. that and being able to use seperate databases. There is just no way I am going to combine the two databases, the threads one is huge enough as it is

But I base everything on groups, so that is a key feature.
Posted By: donJulio Re: Beta-[6.3] HiveMail - Integration 1.0 - 11/17/2003 10:55 PM
Another couple of suggestions of thought of, in addition to having Hivemail use .threads user groups and auto-login:
Instead of clicking on the flashing newem.gif and going to the hivemail login page, have it take the user to My Home, just like clicking on a newpm.gif indicator.

In the table that called: Message Box, add more rows for email info. Have a new tdheader classed row called "Email" and beneath it a row just like the PM rows with:
Send an Email
Emails in Inbox (read/unread)
Sent emails

Then clicking on the varous links, they would go to appropriate page within Hivemail. Obviously this depends on auto-login as well. If we could add other rows for emails in the user created hivemail folders, that would also be nice
Posted By: omegatron Re: Beta-[6.3] HiveMail - Integration 1.0 - 11/18/2003 12:10 AM
Remember clicking on a private message takes you to the private message system the same as clicking on email takes you to hivemail

Now it should not be that hard to locate the code for PM and replicate what is needed to allow us to see how many emails we have read and not in there like PM's
Posted By: donJulio UPGRADED TO Threads 6.4, have an error - 12/24/2003 10:04 AM
I get this error when edit my basic profile, on the changebasic.php page:
[] Fatal error: Cannot redeclare hivemail_check_name() (previously declared in /home/laondal/public_html/correo/includes/ubbthreads_plugin.php:79) in /home/laondal/public_html/correo/includes/ubbthreads_plugin.php on line 77 [/]

Any ideas? Also, I've noticed a change in the pm-style notification for emails. Before, hovering over the icon would make this pop up: You have x unread emails
Now it just says: You have x

BTW, the instructions for this mod will need to be updated a little bit now that 6.4 is out.
Posted By: Tom_H Re: UPGRADED TO Threads 6.4, have an error - 01/08/2004 6:43 AM
My code is modified so that the user name is the hivemail add name so my line 77 is different from yours but the error indicates a redeclaration, therefore, try changing "require" to "require_once".

Tom
Posted By: donJulio Re: UPGRADED TO Threads 6.4, have an error - 01/08/2004 8:00 AM
What file do I need to do that in? I really have no idea
Posted By: Tom_H Re: UPGRADED TO Threads 6.4, have an error - 01/08/2004 6:28 PM
Do a "find and replace" using find = "require" and replace = "require_once" on the

/home/laondal/public_html/correo/includes/ [:"red"] ubbthreads_plugin.php[/]

file.

Save, upload, test.

Tom
Posted By: donJulio Re: UPGRADED TO Threads 6.4, have an error - 01/08/2004 8:58 PM
That wasn't it, but you did light a lightbulb in my head. I remeber there being a thing about changin require to require_once in ubbt.inc.php and I found it. I changed it and now there aren't any problmes. Thanks!
Posted By: Charles Re: UPGRADED TO Threads 6.4, have an error - 01/10/2004 4:11 PM
sorry folks, wanted to upgrade the zip for the last six month with the fix in ubbt.inc and never gone fown to actually doing it it is now updated so i think there is no bugs left.
Posted By: scroungr Re: UPGRADED TO Threads 6.4, have an error - 01/10/2004 11:25 PM
cool thanx Charles
Posted By: Tom_H Re: UPGRADED TO Threads 6.4, have an error - 02/29/2004 3:51 AM
Anyone with this hack (+ many others) try the upgrade to threads 6-4?

Just wondering how big a PITA it is.

Tom
Posted By: donJulio Re: UPGRADED TO Threads 6.4, have an error - 03/01/2004 9:13 PM
I've got it going w/ 6.4. Sometimes when you're copying text to find from the instructions and you use the find function of your text editor, sometimes it won't find the text block. What I did in a couple of those instances is just do a search for the first few words of a block of text instead of the whole thing and I got it to work that way.
Posted By: Tom_H Re: UPGRADED TO Threads 6.4, have an error - 04/08/2004 10:15 PM
So you didn't do the "Upgrade" you went through file by file comparing differences?
Posted By: Tom_H Re: UPGRADED TO Threads 6.4, have an error - 05/24/2004 5:00 PM
Since my PHP is less than good I thought I'd throw this up on this thread...

If I can transfer the username and login or the session variables between Hive and Threads; wouldn't it be possible to integrate Threads and Hivemail with my users only having to log in once to Threads and bypass Hivemail login(currently my site is set up so that my users usernames and passwords are the same for both)?

Basically just log into Threads and use Threads as the portal to Hivemail?

Or, another possibility - since my users usernames and passwords are the same for both - have it so that when my users log into Threads have a PHP include that automatically logs them into Hivemail essentially bypassing the "Login" dialog?

The way I'm set up now is my users log into Threads, and once logged in there is a link to "E-Mail" which brings them to the Hivemail login screen where they again enter the user and pass that they just entered for Threads. The concept sounds fairly straight forward (?) with the goal being to have the link to "E-Mail" bring them right into their in box.

Any suggestions as to where I should start?

Thanks in advance.

Tom
Posted By: scroungr Re: UPGRADED TO Threads 6.4, have an error - 05/24/2004 5:03 PM
I would start with looking at two things.. the hivemail members database especially the members table and especially the members login and password fields and names.. then look at the threads database users table U_Login and U_Password fields and see just how easily you can match it up with a little script.
Posted By: Tom_H Re: UPGRADED TO Threads 6.4, have an error - 05/25/2004 6:55 AM
In my current setup the Threads username is the Hive username and the pass is the same for both as well. The way I see it there are 2 issues...

1. My users at registration, can opt out of an email address and therefore would not be in the Hive database. Not a real big deal, just an if else.

2. Catching the username and pass before it is encrypted and compared to the MySQL U_Login and U_Password fields and passing the unencrypted vars to Hivemail.

Am I correct in assuming that these are the only true issues or am I over simplifying the problem?

---[edit]-----------------------------------
I was just going through Hive files and in 'include/sessions.php' lines 79 and 80 will attempt to login a user who may not have 'loggedin' but provides a username and pass... If I 'require_once' 'hive/include/sessions.php' in the Threads 'login.php' and assign the user and pass from the Threads to the var names in the Hive 'include/sessions.php' will this enable me to start a session in Hive and allow me to do what I am trying to do or am I again oversimplifying the issue?

***** Nope ~ didn't work - figures, sounded way too easy.

---[/edit]---------------------------------

Thanks,
Tom
Posted By: donJulio Error w/ Hivemail 1.3.1 - 09/08/2004 6:25 AM
So far I have this mod updating email correctly, but now I can't get new users signed up after upgrading Hivemail to version 1.3.1.

I get this MySQL error in the error log while trying to add an email address for a test user:

[] Unable to do_query: INSERT INTO .hive_user (userid, username, password, usergroupid, skinid, realname, regdate, lastvisit, cols, birthday, options, replyto, font, timezone, soundid, domain, vbuserid, altemail, aliases) VALUES (NULL, 'alfa164', '81dc9bdb52d04dc20036dbd8313ed055', 2, 1, '', 1094549124, 1094549124, 'a:6:{i:0;s:8:"priority";i:1;s:6:"attach";i:2;s:4:"from";i:3;s:7:"subject";i:4;s:8:"datetime";i:5;s:4:"size";}', '', USER_DEFAULTBITS, '[email protected]', 'Verdana|10|Regular|Black|None', '', 26, '@laondalatina.com', 3573, '', 'alfa164') - Unknown column 'vbuserid' in 'field list' [/]

Now I've looked into the .hive_user table in the database and vbuserid field is no longer there. There IS a field called forumuserid. If anyone has any suggestions I would appreciate it. I'm sure it's a very simple fix to make this work with version 1.3.1 of Hivemail, but I can't figure this out. BTW, this error is in the adduser.php script.

****EDIT****
I've solved this by removing vbuserid and replacing it with forumuserid in the ubbthreads_plugin.php file in the hivemail includes folder. I do have a couple other MySQL errors. I'll keep working on this and post the changes that I made for everyone else.
Posted By: Charles Re: Error w/ Hivemail 1.3.1 - 09/08/2004 10:50 AM
yes that was what you were supposed to do in order to fix the error the hivemail team have changed a number of parameters in order to be more open to forum integration and not just vb.
Posted By: donJulio Re: Error w/ Hivemail 1.3.1 - 09/08/2004 4:07 PM
[]Charles said:
yes that was what you were supposed to do in order to fix the error the hivemail team have changed a number of parameters in order to be more open to forum integration and not just vb. [/]

Maybe you can provide some insight into this error:

[] Unable to do_query: INSERT INTO .hive_user (userid, username, password, usergroupid, skinid, realname, regdate, lastvisit, cols, birthday, options, replyto, font, timezone, soundid, domain, forumuserid, altemail, aliases) VALUES (NULL, 'test82', '', 2, 1, '', 1094619793, 1094619793, 'a:6:{i:0;s:8:"priority";i:1;s:6:"attach";i:2;s:4:"from";i:3;s:7:"subject";i:4;s:8:"datetime";i:5;s:4:"size";}', '', USER_DEFAULTBITS, '[email protected]', 'Verdana|10|Regular|Black|None', '', 21, '@laondalatina.com', 3589, '', 'test82') - Unknown column 'USER_DEFAULTBITS' in 'field list' [/]

What is USER_DEFAULTBITS? That is the only error keeping users from being able to register at the moment
© UBB.Developers