[Released] Use Custom Profile Fields anywhere

MODs and Styles for phpBB3.

To post your MOD or style, go to the STG MOD Manager
Forum rules
Go to http://startrekguide.com/mods to submit your MOD or style

Re: [Released] Use Custom Profile Fields anywhere

Postby jdrechsler » 04 Aug 2011, 04:05

See when i copied the code from above, it didn't work. as my forum doesn't just use phpbb_
That is why I brought up using the way to use the table name the same way the rest of the forum does it.
jdrechsler
Ensign
Ensign
 
Posts: 61
Joined: 27 Jun 2009, 15:42
Gender: Male
phpBB Knowledge: 4


Re: [Released] Use Custom Profile Fields anywhere

Postby Sniper_E » 04 Aug 2011, 10:58

jdrechsler wrote:See when i copied the code from above, it didn't work. as my forum doesn't just use phpbb_

If you open your ./config.php file you can look for this line:
Code: Select all
$table_prefix = 'phpbb_';

As it explains, that is the table prefix that your phpBB3 database uses for all of it's tables.
If yours is different, and your forum doesn't just use phpbb_
all you need to do is change the lines in the codes on the first post to match your table prefix.

Then you can use CPF on any page. Nice work King Rhyono! :good:
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
User avatar
Sniper_E    
STG Jedi Master
STG Jedi Master
 
Posts: 7003
Joined: 31 May 2006, 06:29
Location: Shreveport, LA
Favorite Team: The STG Team
Gender: Male
phpBB Knowledge: 6

Re: [Released] Use Custom Profile Fields anywhere

Postby jdrechsler » 05 Aug 2011, 04:39

Yeah Sniper_E thats why I brought it up ;)
I have 5 or 6 phpbb installs going and its kinda hard to keep them straight haha.
jdrechsler
Ensign
Ensign
 
Posts: 61
Joined: 27 Jun 2009, 15:42
Gender: Male
phpBB Knowledge: 4

Re: [Released] Use Custom Profile Fields anywhere

Postby raalst » 11 Dec 2011, 09:28

Hi,

I'm a sort-of newbie, blundering along...hope you are willing to help yet another time

I need to call up a CPF in a separate page (the donate page of the paypal mod) in order to pass along the user's membership number
which is a cpf in my forum, called "member_nr".
I managed to let the cpf's show up in e.g. the membership list of my test-install.

I was hoping that this mod could give my access to the cfp's values but alas : not enough brains on board :D .
is there a way to dump all cpf's for the (logged-in) user on the screen of my test-installation ?

I currently inserted the code between the h2's into the /styles/prosilver/template/donate/index_body.html in the hope to be able to verify correct access to that member number. no luck so far. I tried to add an include for function.php inside /donate/index.php, but that complained about re-defining vars, so I guess functions.php is already included...

Code: Select all
   <fieldset class="fields2">
   <p>{DONATE_TO_SITENAME_EXPLAIN}</p>

<h2> TEST TEST </h2>
<!-- BEGIN custom_fields -->{CUSTOM.MEMBER_NR_NAME}:{CUSTOM.MEMBER_NR_VALUE}<br/><!-- END custom_fields -->
<h2> TEST TEST </h2>

   <!-- IF .update -->
   <dl class="faq">

thanks in advance for any assistance/help/education offered.
raalst
Crewman
Crewman
 
Posts: 1
Joined: 11 Dec 2011, 08:58
Gender: Male

Re: [Released] Use Custom Profile Fields anywhere

Postby King Rhyono » 11 Dec 2011, 16:17

raalst wrote:
Code: Select all
   <fieldset class="fields2">
   <p>{DONATE_TO_SITENAME_EXPLAIN}</p>

<h2> TEST TEST </h2>
<!-- BEGIN custom_fields -->{CUSTOM.MEMBER_NR_NAME}:{CUSTOM.MEMBER_NR_VALUE}<br/><!-- END custom_fields -->
<h2> TEST TEST </h2>

   <!-- IF .update -->
   <dl class="faq">


You used custom. but you need to use custom_
See if that solves the problem.
King Rhyono
MOD Author
MOD Author
 
Posts: 174
Joined: 01 Aug 2007, 11:20
Gender: Male

Re: [Released] Use Custom Profile Fields anywhere

Postby neuropass » 18 Apr 2013, 21:07

how can use this on a custom page ?


Code: Select all
<!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "Operative System" -->
         <dd><strong>Main OS:</strong><img src="{ROOT_PATH}images/os/{postrow.custom_fields.PROFILE_FIELD_VALUE}.png" class="os-img" alt="{postrow.custom_fields.PROFILE_FIELD_VALUE}" title="{postrow.custom_fields.PROFILE_FIELD_VALUE}" /></dd>
      <!-- ENDIF -->
User avatar
neuropass
Supporter
Supporter
 
Posts: 36
Joined: 27 Nov 2009, 07:38
Gender: Male
phpBB Knowledge: 2

Previous

Return to phpBB3 Customizations

Who is online

Users browsing this forum: Exabot [Bot], Google Adsense [Bot] and 10 guests

cron