Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
Reply with quote Download Post 
Post PROFILE - How To Create Custom Profile Fields 
 
[DOC] How To Create Custom Profile Fields

Icy Phoenix already comes with Custom Profile Fields (ACP -> Users -> Add Custom Profile Fields), but what if you wanted to create a deeper, richer Custom Profile Field?  This guide will help get you started down the right path.

In this DOC, I will be explaining how to add a new Custom Profile Field for Xbox LIVE Gamercards.

What is an Xbox LIVE Gamercard?  A Gamercard shows your accumulated points earned by playing games, reputation, last five games played, etc.  It's basically a way for everyone to see what you play and your Xbox LIVE Gamertag.  Users are also able to click your Gamercard and add you to their Xbox LIVE Friends List.  For more information about this, visit Xbox.com

First, you want to create your Custom Profile Field via your ACP: ACP -> Users -> Add Custom Profile Fields

 gamertag1

In this case, make sure the field is as seen in the picture: "xbox".  We want to make the Xbox LIVE Gamercard viewable on viewtopic_body.tpl.

Next, open: viewtopic.php

FIND:

Code: [Download] [Hide] [Select]
$poster_from = ($postrow[$i]['user_from'] && $postrow[$i]['user_id'] != ANONYMOUS) ? $lang['Location'] . ': ' . $postrow[$i]['user_from'] : '';


AFTER, ADD:

Code: [Download] [Hide] [Select]
$poster_xbox = ($postrow[$i]['xbox'] && $postrow[$i]['user_id'] != ANONYMOUS) ? ('<a href="http://profile.mygamercard.net/' . urlencode($postrow[$i]['xbox']) . '"><img src="http://card.mygamercard.net/' . urlencode($postrow[$i]['xbox']) . '.png" /></a>') : '';


Now we need to add the variable.

FIND:

Code: [Download] [Hide] [Select]
'POSTER_FROM' => $poster_from,


AFTER, ADD:

Code: [Download] [Hide] [Select]
'POSTER_XBOX' => $poster_xbox,


Now we need to make the Gamercard viewable on viewtopic.

OPEN: viewtopic_body.tpl

FIND:

Code: [Download] [Hide] [Select]
<!-- END author_profile -->


AFTER, ADD:

Code: [Download] [Hide] [Select]
{postrow.POSTER_XBOX}<br />


Now let's add the language variable for the Custom Profile Field.

OPEN: lang_profile_fields.php

ADD:

Code: [Download] [Hide] [Select]
$lang['1_xbox'] = 'XBox ID';
$lang['1_Description'] = 'Insert your xbox gamers ID';


(CHANGE THE NUMBER TO YOUR CUSTOM PROFILE FIELD ID)  (THIS CAN BE FOUND IN ACP -> USERS -> EDIT CUSTOM PROFILE FIELDS.)

Change the number "1" to whatever your Custom Profile Field is numbered.  You may also change the text in this file to whatever you wish.  The end result is this:

 mysite


You are able to do anything with the Custom Profile Fields and this is just one of the many different things you can use it for.

Thanks to Luca for guidance!
 




____________
| Icy Phoenix ColorizeIt! |
Bipolar Disorder - Not good for you and definitely not good for everyone else.
 
ChaoticSend private messageVisit poster's website  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Re: [DOC] How To Create Custom Profile Fields 
 
Great Doc again Chaotic... number one in the docs department..

   
 




____________
Mods and themes for Icy Phoenix 1.3

IcyPhoenix UK is off-line permanently due to lack of time to update mods.
if anyone is interested in my templates I will upgrade them to Icy 2.0.
 
DWhoSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: [DOC] How To Create Custom Profile Fields 
 
Very nice DOC Chaotic.

I just needed some explanacions of how to implement these thing´s .

You´re the Best
 




____________
Out of Order
 
spydieSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: PROFILE - How To Create Custom Profile Fields 
 
Like Facebook?  Want to add a button to your posts that links users straight to your Facebook page so they can add you as a friend?

Enter your ACP -> USERS -> Add Custom Profile Field.

Field Name: facebook
Field Description: facebook

Just enter those two fields and click SUBMIT.

OPEN: viewtopic.php

FIND:

Code: [Download] [Hide] [Select]
        $poster_from = ($postrow[$i]['user_from'] && $postrow[$i]['user_id'] != ANONYMOUS) ? $lang['Location'] . ': ' . $postrow[$i]['user_from'] : '';


AFTER, ADD:

Code: [Download] [Hide] [Select]
        $poster_facebook = ( $postrow[$i]['facebook'] && $postrow[$i]['user_id'] != ANONYMOUS ) ? '<a href="http://www.facebook.com/profile.php?ref=name&id=' . urlencode($postrow[$i]['facebook']) . '" target="_blank"><img src="images/facebook-icon.gif" alt="'. $lang['facebook'] .'" title="'. $lang['facebook'] .'" border="0" /></a>' : '';


FIND:

Code: [Download] [Hide] [Select]
            'POSTER_FROM_FLAG' => $poster_from_flag,


BEFORE, ADD:

Code: [Download] [Hide] [Select]
            'POSTER_FACEBOOK' => $poster_facebook,


OPEN: viewtopic_body.tpl

FIND:

Code: [Download] [Hide] [Select]
{postrow.POSTER_POSTS}


AFTER, ADD:

Code: [Download] [Hide] [Select]
{postrow.POSTER_FACEBOOK}<br />


OPEN: lang_profile_fields.php

FIND:

Code: [Download] [Hide] [Select]
/*
//An Australian Example for Profile Fields
$lang['1_Phone'] = 'Phone';
$lang['1_Description'] = 'Phone Number';
$lang['2_Team'] = 'Team';
$lang['2_Description'] = 'Australian Team';
$lang['2_Juve'] = 'Wallabies';
$lang['2_Milan'] = 'Kangaroos';
$lang['2_Altro'] = 'Other';
*/


AFTER, ADD:

Code: [Download] [Hide] [Select]
$lang['10_facebook'] = 'Facebook';
$lang['10_Description'] = 'Insert your Facebook ID number here.  To find your Facebook ID number, log into your Facebook account and click your name next to SETTINGS at the top of the page.  Look at the link in your browser and copy the number following "ref=name&id=".  Your ID number will be a series of only numbers.';


In the above lines, ($lang['10_facebook']), please replace the number 10 with your custom profile field ID.  To find your custom profile field ID, ACP -> Users -> Edit Custom Profile Fields.  Look for your custom profile field and note the number to the left of the field you created.  You should change the number in the above code to YOUR custom profile field ID.

 facebook
 




____________
| Icy Phoenix ColorizeIt! |
Bipolar Disorder - Not good for you and definitely not good for everyone else.
 
ChaoticSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: PROFILE - How To Create Custom Profile Fields 
 
Nice word chaotic, but i dont understand how to add custom profiles without external references... for example...

I want add a custom field called "My Points", this field only could be modified for administrators (that option is in the ACP) and i'd like that field appear only in the user profile and/or any part my posts...

I dont know if you understand me. I'd like add custom fields that can be modified and set by admins...

how i could put that?

I hope you can help me =)

and nice tutorial =D
 



 
paramine-gxSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: PROFILE - How To Create Custom Profile Fields 
 
How i put the logo?
 



 
odelotSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: PROFILE - How To Create Custom Profile Fields 
 
Can you please ask your question in "General Support"
and can you please explain a little bit more your question, because I don't understand what you mean.
 




____________
TheSteffen
Often SEARCH is the quickest way to get support.
IcyPhoenix German Support
 
TheSteffenSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: PROFILE - How To Create Custom Profile Fields 
 
Se puede poner algo como el id de play station osea algo asi¿?¿?

elvamo

pero con la información del centro de los juegos y eso...
 




____________
Datos de Soporte:
- URL de tu web: TodoScene.net
- Hosting: 4sql.net (Pago)
- mods Instalados: HIDE MOD, Estadísticas Mod, anti doble post mod,mostrar bbcodes en respuesta rápida, y mp.
- Sistema y version: Icy Phoenix v1.3.0.53b
 
elvamoSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: PROFILE - How To Create Custom Profile Fields 
 
English please Elvamo Inglés, por favor
 




____________
www.DutchaGoGo.com (development/under construction ...Forever?¿?)
 
Joshua203Send private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: PROFILE - How To Create Custom Profile Fields 
 
This is great! Thanks! Ur one BIG help! Keep it up!
 



 
jeff909Send private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: PROFILE - How To Create Custom Profile Fields 
 
Very nice DOC Chaotic.

keep it up.
you are awesome.  
 



 
Edited by Joshua203, Fri 13 Jul, 2012 10:44: In profile..sig- and www button -info removed (user banned)
Edited by Joshua203, Fri 13 Jul, 2012 10:45: btw he was selling headphones :D
kerwinSend private message  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events


  

 

  cron