, a few years ago you made a snippet for posting CPFs as bbcode. And posted it on phpbb.com. I stubled across it while searching on google.
I need it to insert the posters CPF instead of the readers. Is that something you can fix, and is willing to?
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 bbcodeQuote:
bbcode
Code:
[customer_id][/customer_id]
replacement
Code:
<a href="http://www.xyz.com/support?{L_CUSTOMER_ID}">www.xyz.com/support?{L_CUSTOMER_ID}</a>
openlanguage/en/viewtopic.php
findCode:
$lang = array_merge($lang, array(
replace withCode:
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;
$lang = array_merge($lang, array(
'CUSTOMER_ID' => ($customer_id) ? $customer_id : 0,
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