MyBB Source


Learn About Our New Profiles!

Latest Releases: Ban Appeal - Buy Points - Auto Open/Close Your Board

 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Reference a particular profile field in the profile template?
Author Message
euantor
MyCode Coder


Posts: 205
Joined: Jun 2009
Reputation: 0
Post: #1
Reference a particular profile field in the profile template?
I'm trying to reference one of my custom profile fields in my profile template so user cans et a custom picture to show int heir profile. However, I can't find the correct code to do this. Any help please?

12-20-2009 02:05 AM


jeyci
Member


Posts: 87
Joined: Aug 2009
Reputation: 0
Post: #2
RE: Reference a particular profile field in the profile template?
In addition I've found out the the {$customfieldval} refers to Custom Field ID 2.
12-20-2009 02:09 AM
euantor
MyCode Coder


Posts: 205
Joined: Jun 2009
Reputation: 0
Post: #3
RE: Reference a particular profile field in the profile template?
I have tried using {$customfieldval} on my test forum and it doesn't work there...

12-20-2009 02:11 AM
ByteHunter
Community builder


Posts: 1,098
Joined: Dec 2008
Reputation: 14
Post: #4
RE: Reference a particular profile field in the profile template?
Try this:
$mybb->user['fidX']

MyBBSource Team
runBB - Free myBB forum hosting

[Image: iByteHunter.png]
12-20-2009 02:17 AM
jeyci
Member


Posts: 87
Joined: Aug 2009
Reputation: 0
Post: #5
RE: Reference a particular profile field in the profile template?
http://forum.philker.net/JeyCi (for others reference).
Hoping experts will see our prob .
Thanks ByteHunter, will try that.

reminder: Sir were doing template edits only sir


Edit, wow that worked. Thank you sir.

How can I do this?:

If user['fid2'] = blank
then display= no profile images

Another edit:

All profiles have the same images.
(This post was last modified: 12-20-2009 02:26 AM by jeyci.)
12-20-2009 02:18 AM
euantor
MyCode Coder


Posts: 205
Joined: Jun 2009
Reputation: 0
Post: #6
RE: Reference a particular profile field in the profile template?
@Byte Hnter: Surely that'll just show the user the contents of their profile field? I want it so it's profile specific Dx
Ok, found the correct code ;D

{$memprofile['fidX']}

;D

(This post was last modified: 12-20-2009 03:12 AM by euantor.)
12-20-2009 02:37 AM
ByteHunter
Community builder


Posts: 1,098
Joined: Dec 2008
Reputation: 14
Post: #7
RE: Reference a particular profile field in the profile template?
(12-20-2009 02:18 AM)jeyci Wrote:  http://forum.philker.net/JeyCi (for others reference).
Hoping experts will see our prob .
Thanks ByteHunter, will try that.

reminder: Sir were doing template edits only sir


Edit, wow that worked. Thank you sir.

How can I do this?:

If user['fid2'] = blank
then display= no profile images

Another edit:

All profiles have the same images.
You`re welcome. Glad to help you. Sorry I have copy/pasted the code from one of my files.
You can`t do this via a template edits, you`ill need to edit the .php file.
PHP Code:
if ( !isset($user['fid2'])  ) {
   echo 
'<img src="image_url">';
    } 

(12-20-2009 02:37 AM)euantor Wrote:  @ByteHunter: Surely that'll just show the user the contents of their profile field? I want it so it's profile specific Dx
Ok, found the correct code ;D

{$memprofile['fidX']}

;D
My code didn`t worked?

MyBBSource Team
runBB - Free myBB forum hosting

[Image: iByteHunter.png]
12-20-2009 05:10 AM
euantor
MyCode Coder


Posts: 205
Joined: Jun 2009
Reputation: 0
Post: #8
RE: Reference a particular profile field in the profile template?
It worked, but it just showed what each user had in their own profile field. Say I had entered the URL http://www.bleeeh.com, that is all that I would see on everybody's profile. {$memprofile['fidX']} is profile dependent and so does exactly what I need to do ;D Plus, you can just put it straight into a template and it works ^^

12-20-2009 05:32 AM
halohub
Junior Member


Posts: 22
Joined: Dec 2009
Reputation: 0
Post: #9
RE: Reference a particular profile field in the profile template?
i need help to...
Sorry i did it now
(This post was last modified: 12-20-2009 06:09 AM by halohub.)
12-20-2009 06:09 AM
jeyci
Member


Posts: 87
Joined: Aug 2009
Reputation: 0
Post: #10
RE: Reference a particular profile field in the profile template?
Thanks for that bytehunter
Will that also do on what is euantor is pointing out?
Like 1 user = 1 unique $user fid
12-20-2009 07:17 AM
 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Profile comments halohub 1 28 12-21-2009 03:32 PM
Last Post: jeyci
  How to Pup Up the user profile? kevin-1372 5 134 12-21-2009 01:24 AM
Last Post: halohub
  Submitting profile fields from a different page? PK8 7 142 12-21-2009 01:23 AM
Last Post: halohub
  Profile Tube Problem cam2301 7 284 12-21-2009 01:22 AM
Last Post: halohub
  Profile setup -_- 3 75 12-06-2009 07:33 AM
Last Post: Polarbear541
  Template help needed luigi789 4 81 09-26-2009 05:38 AM
Last Post: euantor
  Profile Editor in Mod CP question b.h. 7 233 09-12-2009 07:18 AM
Last Post: Killswitch
  Profile tab plugin for MyBB. ShadowDeeps 10 525 09-10-2009 05:32 AM
Last Post: euantor
  How to do profile like vb? LadyNor 62 1,996 07-22-2009 11:58 PM
Last Post: euantor
  3 Coloumns Template? m@m 6 292 01-14-2009 08:31 AM
Last Post: EquippedMind