Additional Settings For Custom Profile Fields [1.2]
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #131
RE: Additional Settings For Custom Profile Fields
(01-04-2013 04:34 AM)leefish Wrote:  Do you think there will be any interest in the hideemail edit I did? Should I post the changes?

For me (only my personal opinion), if I use a single usercp page, maybe I will add the setting on the page. I always set it to hide my email address on my profile (don't ask me why) Biggrin

01-04-2013 04:57 AM
Find all posts by this user Quote this message in a reply
nier3 Offline
Member
***
Posts: 125
Joined: Jul 2012
Post: #132
RE: Additional Settings For Custom Profile Fields
(01-04-2013 02:24 AM)RateU Wrote:  
(01-03-2013 11:10 AM)nier3 Wrote:  I have a problem with social things: I add my facebook page / twitter link / site web url in my usercp, then I save the page, I go on my member profile or my usercp again and social urls are disappeared. Why happen this?

In member profile I have added {$xtpf['fidX']} for facebook / twitter / site web urls.

Do you mean by the 'usercp' is the usercp_profile template (User CP Edit Profile page) or the usercp template (main User CP page)?
Maybe it is better if you post the profile field settings and your template.

Hi, I mean in http://mysite/forum/usercp.php and http://mysite/forum/member.php?action=profile

Settings in custom profile field:

Facebook:
ID: 9
Title and Short Description: Facebook
Field Type: text field
Maximum Length: 50
Length field: 0
Selectable option? /
Display Order: 2
Required: no
Editable by users: Yes
Hidden on Profile: No
Check number of minimum messages? 0
Display or registration page/allow html/mycode/smilies/filter badwords: no
Regular Expression: ^[A-Za-z0-9]{5,}$
Custom Input:

Code:
1
2
3
4
5
6
<tr>
	<td style="width:1px">
		<img src="{$mybb->settings['bburl']}/images/facebook_icon.png" alt="" title="<func htmlspecialchars_uni>{$xtpf_data['description']}</func>" />
	</td>
	<td>{INPUT}</td>
</tr>

Blank Replacement Value: /
Display Format:

Code:
<a href="http://facebook.com/{VALUE}" target="_blank"><img src="{$mybb->settings['bburl']}/images/facebook_icon.png" alt="" /></a>

Viewable By Usergroup and Editable By Usergroup: /

For Twitter and Your site web is the same, more or less.

Template usercp:

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<html>
<head>
<title>{$lang->user_cp}</title>
{$headerinclude}
</head>
<body>
{$header}
<form action="usercp.php" method="post">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />

<table style="background:#E5EEF7;padding:12px;" width="100%">
<tr>
<td>
<div style="float:left;font-size: 14px; font-weight: bold; color: #0A66A3;">Il tuo Profilo Utente</a></div><div style="float:right;font-size: 14px; font-weight: bold; color: #0A66A3;"><a href="{$mybb->settings['bburl']}/member.php?action=profile">Guarda il tuo profilo</a></div>

<table style="background: #F7FAFC; border: 1px solid #BBCDDA;" width="100%">
<tr>
<td align="center" valign="top" width="20%">
<div style="border: 2px solid #CCC;padding: 15px;background: white;margin:10px;">{$avatar}</div>
<a href="{$mybb->settings['bburl']}/usercp.php?action=avatar"><span style="color:#0D6DAC;font-weight:bold;"><em>Cambia il tuo avatar</em></span></a>
</td>
<td valign="top" width="80%">
<table class="profiletabs_hero">
<tr><td>
<div style="float:left">
<ul style="list-style-type: none;line-height:3.3">
<li><a href="{$mybb->settings['bburl']}/usercp.php?action=avatar"><img src="{$mybb->settings['bburl']}/images/usercp/avatarus.gif" width="40px" height="40px" />  <span style="color:#0D6DAC;font-weight:bold;"><em>Cambia il tuo avatar</em></span></a></li>
<li><a href="{$mybb->settings['bburl']}/private.php"><img src="{$mybb->settings['bburl']}/images/usercp/e_mail.jpg" width="40px" height="40px" />  <span style="color:#0D6DAC;font-weight:bold;"><em>I tuoi messaggi privati</em></span></a></li>
<li><a href="{$mybb->settings['bburl']}/usercp.php?action=options"><img src="{$mybb->settings['bburl']}/images/usercp/applications_system.jpg" width="40px" height="40px" />  <span style="color:#0D6DAC;font-weight:bold;"><em>Cambia le tue opzioni</em></span></a></li>
<li><a href="{$mybb->settings['bburl']}/usercp.php?action=editsig"><img src="{$mybb->settings['bburl']}/images/usercp/signature.jpg" width="40px" height="40px" /><span style="color:#0D6DAC;font-weight:bold;"><em>Cambia la tua firma</em></span></a></li>
</ul>
</div>

<div style="float:left">
<ul style="list-style-type: none;line-height:3.3"> 
<li><a href="{$mybb->settings['bburl']}/usercp.php?action=email"><img src="{$mybb->settings['bburl']}/images/usercp/email.jpg" width="40px" height="40px" /><span style="color:#0D6DAC;font-weight:bold;"><em>Cambia la tua e-mail</em></span></a></li>
<li><a href="{$mybb->settings['bburl']}/usercp.php?action=password"><img src="{$mybb->settings['bburl']}/images/usercp/preferences_desktop_cryptography.jpg" width="40px" height="40px" /><span style="color:#0D6DAC;font-weight:bold;"><em>Cambia la tua password</em></span></a></li>
<li><a href="{$mybb->settings['bburl']}/usercp.php?action=attachments"><img src="{$mybb->settings['bburl']}/images/usercp/attachment.jpg" width="40px" height="40px" /><span style="color:#0D6DAC;font-weight:bold;"><em>Le tue immagini</em></span></a></li>
<li><a href="{$mybb->settings['bburl']}/usercp.php?action=usergroups"><img src="{$mybb->settings['bburl']}/images/usercp/Actions-contact-new-icon.jpg" width="40px" height="40px" /><span style="color:#0D6DAC;font-weight:bold;"><em>Gruppi utente</em></span></a></li>
</ul>
</div>
<div style="float:left">
<ul style="list-style-type: none;line-height:3.3"> 
<li><a href="{$mybb->settings['bburl']}/usercp.php?action=editlists"><img src="{$mybb->settings['bburl']}/images/usercp/Accept-Male-User-icon.jpg" width="40px" height="40px" /><span style="color:#0D6DAC;font-weight:bold;"><em>Lista amici</em></span></a></li>
<li><a href="{$mybb->settings['bburl']}/usercp.php?action=subscriptions"><img src="{$mybb->settings['bburl']}/images/usercp/Actions-news-subscribe-icon.jpg" width="40px" height="40px" /><span style="color:#0D6DAC;font-weight:bold;"><em>Discussioni</em></span></a></li>
<li><a href="{$mybb->settings['bburl']}/usercp.php?action=drafts"><img src="{$mybb->settings['bburl']}/images/usercp/draft.jpg" width="40px" height="40px" /><span style="color:#0D6DAC;font-weight:bold;"><em>Tue bozze</em></span></a></li>
<li><a href="{$mybb->settings['bburl']}/registration.php" target="_blank"><img src="{$mybb->settings['bburl']}/images/usercp/faqs.jpg" width="40px" height="40px" /><span style="color:#0D6DAC;font-weight:bold;"><em>Guida al sito!</em></span></a></li>
</ul>
</div>
</td></tr></table>

<table class="profiletabs_hero">
<tr><td>
{$xtpf_minp['fid2']}
</td>
</tr>
<tr><td align="center">Scrivi qui la tua biografia, sarĂ  visibile sul tuo profilo utente</td></tr>
</table>

<table class="profiletabs_hero">
	<tr>
		<td colspan="2">
			<div class="thead"><strong>Alcune tue informazioni</strong></div>
			<div class="smalltext" align="center">Queste info saranno visibili sul tuo profilo pubblico.</div><br />
		</td>
	</tr>
{$xtpf_minp['fid1']}
	<tr>
		<td class="bday" width = "150px">{$lang->birthday}</td>
		<td class="bday">{$birth_day}</td>
	</tr>
	<tr>
		<td class="bday">{$lang->birthdayprivacy}</td>
		<td>{$bdprivacy}</td>
	</tr>
{$xtpf_minp['fid3']}
	<tr>
		<td>Time Zone:</td>
		<td>{$tzselect}</td>
	</tr>
{$xtpf_minp['fid13']}
</table>

<table class="profiletabs_hero">
	<tr>
		<td colspan="2">
			<div class="thead"><strong>Social Network</strong></div>
			<div class="smalltext" align="center">Aggiungi i tuoi account</div>
<div class="smalltext" align="center">N.B. Per aggiungere un link <strong>NON mettere "http://" davanti</strong>.</div>
		</td>
	</tr>
{$xtpf_minp['fid9']}{$xtpf_minp['fid12']}{$xtpf_minp['fid14']}
</table>

<table class="profiletabs_hero"> 
<tr>
	<td colspan="2">
		<div class="thead"><strong>Opzioni</strong></div>
		<div class="smalltext" align="center">Configura le tue opzioni sul sito</div><br />
	</td>
</tr>
<tr>
	<td colspan="2">
					<div>{$showsig}</div>
					<div>{$showavatar}</div>
				</td>
			</tr>
			<tr>
				<td colspan="2">
					<div>{$allownotices}</div>
					<div>{$receivepms}</div>
					<div>{$pmnotice}</div>
					<div>{$pmnotify}</div>
				</td>
			</tr>
</table>
	<div class="clear" style="text-align:center">
		<input type="hidden" name="action" value="do_update_xt_proffields" />
		<input type="submit" class="button" value="Aggiorna il tuo profilo" />
	</div>
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>
{$footer}
</body>
</html>


In member_profile I added:

Code:
1
2
3
4
5
6
7
8
9
10
11
<div class="max-postbit-details" style="text-align:left;">
		<ul style="list-style-type: none;padding-left:0;margin-top:0px;margin-bottom:10px">
			<li class="theadpost" style="font-size:14px;font-weight:bold;">Contatta l'utente
				<li>Msg Privato: <a href="private.php?action=send&amp;uid={$memprofile['uid']}"><img src="/forum/images/mail.png" alt="{$lang->postbit_pm}" title="{$lang->postbit_pm}" /></a></li>
<li>E-mail: {$sendemail}</li>
<li>Profilo Facebook: {$xtpf['fid9']}</li>
<li>Profilo Twitter: {$xtpf['fid12']}</li>
<li>Sito/blog/forum: {$xtpf['fid14']}</li>
</li>
</ul>
</div>


I hope it is all ok, thank you in advance

(This post was last modified: 01-04-2013 06:55 PM by nier3.)
01-04-2013 06:52 PM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #133
RE: Additional Settings For Custom Profile Fields
(01-04-2013 06:52 PM)nier3 Wrote:  Hi, I mean in http://mysite/forum/usercp.php and http://mysite/forum/member.php?action=profile

Use one of them only.

If you decide to use the main usercp only, you need to use the plugin attached to this post (and please make sure to block the access to the Edit Options and the Edit Profile page):
http://mybbhacks.zingaburga.com/showthre...http://mybbhacks.zingaburga.com/showthread.php?tid=1271&pid=1140

If you decide to use the usercp edit profile and usercp edit options page only, you don't need that plugin.

01-05-2013 02:13 AM
Find all posts by this user Quote this message in a reply
nier3 Offline
Member
***
Posts: 125
Joined: Jul 2012
Post: #134
RE: Additional Settings For Custom Profile Fields
Thank you RateU!!

For facebook etc I used this code:

Code:
<tr><td><img src="images/facebook_icon.png" alt="" />      <strong>{$xtpf_data['name']}</strong></td>
<td>{INPUT}</td></tr>


and it seems to work very good Biggrin also on member profile

01-05-2013 11:23 PM
Find all posts by this user Quote this message in a reply
Gstone Offline
Member
***
Posts: 55
Joined: May 2012
Post: #135
RE: Additional Settings For Custom Profile Fields
i've encountered something strange. i have the custom profile fields (about me, location, etc) in the User CP template via these plugins. What is weird is that these fields will be cleared after saving the changes.

example: i enter USA inside of the Location field, scroll down and save my settings. USA will then indeed be reflected in my user profile, but when going back into the User CP, it is blank. So the settings save, but going back in to edit them shows them all blank again. The only exception is the Website field. Every other field will be blank (location, about me, gender, etc).

Though I'm unsure if you can help with this, i thought I'd post here just in case. it seems to only blank the fields for Moderators/Admins, but even when i move my test account to Moderator, the fields all save correctly. so it's confusing, as i cannot point out exactly what the cause of this is.

if you have any ideas, thank you. if not, no worries as i feel this might be limited to something i've done personally.
02-12-2013 03:33 PM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #136
RE: Additional Settings For Custom Profile Fields
Are you using {$xtpf_minp['fidX']} variables for displaying the custom profile field inputs in your usercp template?

02-13-2013 02:24 AM
Find all posts by this user Quote this message in a reply
Gstone Offline
Member
***
Posts: 55
Joined: May 2012
Post: #137
RE: Additional Settings For Custom Profile Fields
i am, yup.
02-13-2013 04:17 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #138
RE: Additional Settings For Custom Profile Fields
Do you have any plugin that change the $user variable (globally or in usercp)?

02-13-2013 05:51 AM
Find all posts by this user Quote this message in a reply
Gstone Offline
Member
***
Posts: 55
Joined: May 2012
Post: #139
RE: Additional Settings For Custom Profile Fields
just checked and I think Yaldarams profile report does: http://mods.mybb.com/view/prfile-report

I will try uninstalling it and see if thats the problem.

EDIT: uninstalling didn't fix it. I'll look at the other plugins.

the only other plugins that have been installed since this started happening are View Groups by Pirata and Profile Buddies by querschlaeger. though i'm unsure if those change the $user variable.
(This post was last modified: 02-13-2013 03:24 PM by Gstone.)
02-13-2013 12:10 PM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #140
RE: Additional Settings For Custom Profile Fields
Could you try this?
Just replacing the old one with this one (attached).


Attached File(s)
.php  xt_ucp_main.php (Size: 9.98 KB / Downloads: 403)

02-14-2013 03:14 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: