I need it to insert the posters CPF instead of the readers. Is that something you can fix, and is willing to?

Here is the post: https://www.phpbb.com/community/viewtop ... &t=2122964
4_seven wrote:Example: Here you can see, what a viewer set in his CPF "Car"
http://4seven.kilu.de/phpbb3/viewtopic. ... 1845#p1845
- un: utest / pw: testtest
- change the CPF "Car" in UCP.
Guests see: "You have no car"
---------------------
make a bbcodebbcode
- Code: Select all
[customer_id][/customer_id]
replacement
- Code: Select all
<a href="http://www.xyz.com/support?{L_CUSTOMER_ID}">www.xyz.com/support?{L_CUSTOMER_ID}</a>
open
language/en/viewtopic.php
find
- Code: Select all
$lang = array_merge($lang, array(
replace with
- Code: Select all
// Display CPF Value of Topic-Viewer via BBCode / 4seven / 2011
global $db, $user;
$sql = 'SELECT pf_customer_id
FROM ' . PROFILE_FIELDS_DATA_TABLE . '
WHERE user_id = ' . (int) $user->data['user_id'];
$result = $db->sql_query($sql, 3600);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$customer_id = (isset($row['pf_customer_id'])) ? $row['pf_customer_id'] : false;
// Display CPF Value of Topic-Viewer via BBCode / 4seven / 2011
$lang = array_merge($lang, array(
// Display CPF Value of Topic-Viewer via BBCode / 4seven / 2011
'CUSTOMER_ID' => ($customer_id) ? $customer_id : 0,
// Display CPF Value of Topic-Viewer via BBCode / 4seven / 2011
change all instances of pf_customer_id to your tablefield name
-------------------------------------
note:
- if you want to have a preview in posting-box, make the same change to language/en/posting.php
- if you have more languages, make this change to all relevant language files