I'm afraid it didn't help at all; I still see {VALUE} instead of an actual value, even after rebuilding cache, saving a profile field and editing a user's profile. :/ Do You want me to give you some more details?
RateU, I am using the plugin from
this post and it seems very cool, thank you - but I have a question.
When the user hits the update profile button, I would like them to be redirected to the profile. Do you know how to make it redirect like that?
Thank you.
(12-31-2012 02:45 AM)Schocker Wrote: [ -> ]I'm afraid it didn't help at all; I still see {VALUE} instead of an actual value, even after rebuilding cache, saving a profile field and editing a user's profile. :/ Do You want me to give you some more details?
Could you post your profile field setting and the value supplied in your edit profile, so maybe I can reproduce it?
(12-31-2012 07:47 PM)leefish Wrote: [ -> ]When the user hits the update profile button, I would like them to be redirected to the profile. Do you know how to make it redirect like that?
You can edit the redirect in the plugin file (around line #67):
PHP Code:
redirect('usercp.php',$lang->xt_proffields_updated);
|
to something like:
PHP Code:
redirect(get_profile_link($mybb->user['uid']),$lang->xt_proffields_updated);
|
Yeah, I think it's better if we use a 'single' usercp page, we redirect it to the profile page.
Perfect !! Thank you very much.
(06-19-2012 08:20 AM)RateU Wrote: [ -> ][*]Facebook custom profile field (fid4) - {$xtpf_minp['fid4']}:
- Regular Expression:
- Custom Input:
HTML Code
<tr>
<td style="width:1px">
<img src="images/facebook.png" alt="" title="<func htmlspecialchars_uni>{$xtpf_data['description']}</func>" />
</td>
<td>{INPUT}</td>
</tr>
|
- Display Format:
HTML Code
<a href="http://facebook.com/{VALUE}" target="_blank"><img src="images/facebook_button.png" alt="" /></a>
|
[*]Twitter custom profile field (fid5) - {$xtpf_minp['fid5']}:
- Regular Expression:
- Custom Input:
HTML Code
<tr>
<td style="width:1px">
<img src="images/twitter.png" alt="" title="<func htmlspecialchars_uni>{$xtpf_data['description']}</func>" />
</td>
<td>{INPUT}</td>
</tr>
|
- Display Format:
HTML Code
<a href="http://twitter.com/{VALUE}" target="_blank"><img src="images/twitter_button.png" alt="" /></a>
|
[/list]
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.
Hi RateU, I am now using the plugin from
this page and I am attempting to add the hide email option; I added it to the one page usercp but the "check" in the checkbox is not holding. Do I need to edit the plugin file or can the check be done via templates?
I figured it out - plugin edit.
(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.
(01-03-2013 07:45 PM)leefish Wrote: [ -> ]I figured it out - plugin edit.
Just an additional info (if we use a single usercp page - please make sure to block them for accessing the Edit Options and the Edit Profile page), we can force a value of a field by adding it to
$userxtpf array inside the plugin (no matter whether the settings is displayed or not).
For example, add this code in the
$userxtpf['options'] array will force (hopefully) the user to use the classic postbit layout when they update their profile:
PHP Code:
$userxtpf['options']['classicpostbit'] = 1;
|
Hi RateU - yes, I did notice that accessing the edit profile page with a single usercp did cause settings to get "damaged" - I shall make that edit.
I had made it so all the fields were hidden, with the "correct" values hardcoded. Perhaps it is an idea to have a redirect back from the Edit profile and edit options pages back to usercp? Not that I know how to do that.
(01-04-2013 03:02 AM)leefish Wrote: [ -> ]Perhaps it is an idea to have a redirect back from the Edit profile and edit options pages back to usercp?
There are some options to do that (by editing the
xt_ucp_main.php file):
After:
PHP Code:
if($GLOBALS['mybb']->settings['xt_proffields_ucp'] != 0){
|
try adding this code:
PHP Code:
if(in_array($GLOBALS['mybb']->input['action'],array('profile','do_profile','options','do_options'))){
redirect('usercp.php','The Administrator has been disabled this page. You\'ll be redirected to the page where you can edit your profile');
}
|
or this code:
PHP Code:
global $plugins;
$plugins->add_hook('usercp_profile_start','xt_ucp_main_usercp_block');
$plugins->add_hook('usercp_do_profile_start','xt_ucp_main_usercp_block');
$plugins->add_hook('usercp_options_start','xt_ucp_main_usercp_block');
$plugins->add_hook('usercp_do_options_start','xt_ucp_main_usercp_block');
function xt_ucp_main_usercp_block(){
redirect('usercp.php','The Administrator has been disabled this page. You\'ll be redirected to the page where you can edit your profile');
}
|
Great - I shall try this on local host.
Do you think there will be any interest in the hideemail edit I did? Should I post the changes?