Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

Gossamer Mail + VBulletin

Quote Reply
Gossamer Mail + VBulletin
Hello All,

I would like to be able to show New E-mails in Gossamer Mail in the User Contorl Pannel of VBulletin. This way users can see their VBulletin PMs along with their Gossamer Mail E-mails!

Any ideas?

Thanks in advance,
PCMANIA

Quote Reply
Re: Gossamer Mail + VBulletin In reply to
Hi,

The SQL to do this would be:

Code:
SELECT COUNT(*)
FROM msgtrack, auth_vb
WHERE gmail_userid = msgtrack_userid AND
msgtrack_status = 'New' AND
msgtrack_fid = 1 AND
vb_user = 'YOURVBUSERNAME'
This would return the number of new messages for a given vb user. It's just a matter of putting this query into the PHP and displaying the output. Maybe the guys a vbulletin can help there? The only thing to be careful of is you need to prefix the table names in the FROM line if you are using a prefix.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: Gossamer Mail + VBulletin In reply to
Oh, whoops. To actually get the messages, you would want:

Code:
SELECT *
FROM msgtrack, msgs, auth_vb
WHERE gmail_userid = msgtrack_userid AND
msgtrack_mid = msgs_mid AND
msgtrack_status = 'New' AND
msgtrack_fid = 1 AND
vb_user = 'YOURVBUSERNAME'
This would give you all the new messages in the users inbox.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: Gossamer Mail + VBulletin In reply to
Hi Alex,

and thanks for the reply however I don't know that much about SQL and PHP etc. Can you walk me through this or is this too much to ask?

Thanks in advance,

PCMANIA

Quote Reply
Re: Gossamer Mail + VBulletin In reply to
Hi,

I haven't really looked into vbulletin enough, and am not sure if they have a standard way of running sql queries. Your best bet would be to post the SQL statement on the vbulletin code hacks forum, and ask someone there how to run that, and output the results. Should be very straight forward.

Cheers,

Alex

--
Gossamer Threads Inc.