Area51 @ 4seven.de

Mod Base and Testarea
It is currently 23 Feb 2025, 19:52

All times are UTC + 1 hour




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: 01 Feb 2013, 14:12 
Offline
Tiptop
Tiptop

Joined: 12 Jul 2012, 18:46
Posts: 13
4seven, 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? :)

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 bbcode

Quote:
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>


open

language/en/viewtopic.php

find

Code:
$lang = array_merge($lang, array(


replace with

Code:
// 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


Top
 Profile  
Reply with quote  
PostPosted: 03 Feb 2013, 01:43 
Offline
Tiptop
Tiptop
User avatar

Joined: 20 Jun 2012, 16:55
Posts: 318
    May a prototype

  • Go to your profile, fill out the CPF "Test".
  • Make a testpost here: viewtopic.php?f=14&t=265
    (Use the BBCode button >> [custom]).
  • Use the normal [Preview] Button, not the new jQ Preview Engine*
    *because jQ Preview needs a customizing for that

_________________
Current Mods | Mod Base | php(BB) programming | No help via PM


Top
 Profile  
Reply with quote  
PostPosted: 04 Feb 2013, 20:12 
Offline
Tiptop
Tiptop
User avatar

Joined: 20 Jun 2012, 16:55
Posts: 318
The CPF "Test" you find here

Attachment:
cpf_test.png
cpf_test.png [ 37.04 KiB | Viewed 4178 times ]

_________________
Current Mods | Mod Base | php(BB) programming | No help via PM


Top
 Profile  
Reply with quote  
PostPosted: 06 Feb 2013, 00:45 
Offline
Tiptop
Tiptop

Joined: 12 Jul 2012, 18:46
Posts: 13
CPF not visible to me. :(


Top
 Profile  
Reply with quote  
PostPosted: 06 Feb 2013, 02:07 
Offline
Tiptop
Tiptop
User avatar

Joined: 20 Jun 2012, 16:55
Posts: 318
I dont noticed that, because as mod/admin i saw all fields

Code:
ACP > CPF > Visibility options >
Display in user control panel
The user is able to change this profile field within the user control panel [x]

Now you should see it.

_________________
Current Mods | Mod Base | php(BB) programming | No help via PM


Top
 Profile  
Reply with quote  
PostPosted: 06 Feb 2013, 14:53 
Offline
Tiptop
Tiptop

Joined: 12 Jul 2012, 18:46
Posts: 13
Works! :D


Top
 Profile  
Reply with quote  
PostPosted: 25 Feb 2013, 12:33 
Offline
Tiptop
Tiptop

Joined: 12 Jul 2012, 18:46
Posts: 13
Crossing my fingers this will get released. :)


Top
 Profile  
Reply with quote  
PostPosted: 25 Feb 2013, 15:05 
Offline
Tiptop
Tiptop
User avatar

Joined: 20 Jun 2012, 16:55
Posts: 318
You ask, if this is possible and not, if i can build a mod for you. So its currently a proof of concept.

_________________
Current Mods | Mod Base | php(BB) programming | No help via PM


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
[ Time : 0.012s | 26 Queries | GZIP : Off ]