Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Oct 2001
Posts: 139
Journeyman
Journeyman
Joined: Oct 2001
Posts: 139
I run version 2.6 of Photopost classifieds integrated with my Threads7. However, one issue I found is that they pull user info from the threads USER table. So, when someone clicks on Contact Seller on an ad in PP-Classifieds (or a photo is uploaded to a category someone is subscribed to in Photopost), it pulls USER_REGISTRATION_EMAIL from the USER Table. This is fine as long as the person NEVER changes their email address after they register on your forum. But many times, a member will change their "USER_REAL_EMAIL" but Photopost and Classifieds will still use their old email they registered with. SOLUTION: Until the folks at Photopost fix this, here is what you can do (same for both programs):

1. In the file Threads7.php (in the forums directory in your photopost and classifieds installs) Look for the function:


PHP Code

function get_userinfo( $authuser, $userid=0 )



Then find this query:
PHP Code

if ( $userid != 0 ) $query = "SELECT u.USER_ID,u.USER_DISPLAY_NAME,u.USER_REGISTRATION_EMAIL,u.USER_PASSWORD, u.USER_SESSION_ID,u.USER_LOGIN_NAME,p.USER_STYLE,p.USER_TIME_OFFSET,p.USER_TEMPORARY_PASSWORD
FROM
{$Globals['dprefix']}USERS u LEFT JOIN {$Globals['dprefix']}USER_PROFILE p ON p.USER_ID=u.USER_ID
WHERE u.USER_ID=
$userid";


Change u.USER_REGISTRATION_EMAIL to p.USER_REAL_EMAIL


Then also, find this query:
PHP Code

else {
$tuser = addslashes( $authuser );
$query = "SELECT u.USER_ID,u.USER_DISPLAY_NAME,u.USER_REGISTRATION_EMAIL,u.USER_PASSWORD,
u.USER_SESSION_ID,u.USER_LOGIN_NAME,p.USER_STYLE,p.USER_TIME_OFFSET,p.USER_TEMPORARY_PASSWORD FROM
{$Globals['dprefix']}USERS u
LEFT JOIN
{$Globals['dprefix']}USER_PROFILE p ON p.USER_ID=u.USER_ID
WHERE u.USER_LOGIN_NAME='
$tuser'";
}


Again, change u.USER_REGISTRATION_EMAIL to p.USER_REAL_EMAIL

One last thing. Just below these queries, find:

PHP Code

$queryv
= ppmysql_query($query,$db_link);
$results = mysql_fetch_array($queryv);

$username[0] = $results['USER_ID']; // userid
$username[1] = $results['USER_DISPLAY_NAME']; // username
$username[2] = $results['USER_REGISTRATION_EMAIL']; // set email


and set
PHP Code

$username
[2] = $results['USER_REAL_EMAIL'];


That's it. Now, when a member clicks the Contact Seller link in an ad (or Phphoto notifies some one of an upload to a subscribed category), two things will happen: First, their "real" email address will fill into the "From field" and then when they send their email it will go to the seller's current "REAL" email address and not the email they registered with (in case thay have changed it)

Hope you find this useful,

Basil

Sponsored Links
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Thanks for sharing basil smile Sounds like a bug in ppclassifieds. wink


- Allen wavey
- What Drives You?

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)