noizeburger
Forum Replies Created
-
Ok, so this thread is really resolved: the solution for hide the fields from the edit-screen can be found here: BuddyDev.com
I think, I put this code snippets together on buddypress.org
Maybe they will save hours of search for others.Really thank you, donmik!
HI again,
good news! no I’ve got it: I left away the default part (role 3) and I wrote the roles in small letters:
function custom_bp_core_signup_user($user_id) { $user_role = strtolower(xprofile_get_field_data('Profilauswahl', $user_id)); switch($user_role) { case "role 1": $new_role = 'band'; break; case "role 2": $new_role = 'fan'; break; } wp_update_user(array( 'ID' => $user_id, 'role' => $new_role )); }
So, in my case now this seems to work.
Now, I have to find a way to hide the part, where the users can edit their role as I don’t want them to change it after registration.Maybe one more hint, donmik?
Thanks a lot!Hi donmik,
I’ve tried your hint, but it still doesn’t work as expected: what has changed is the fact, that – with your addition above – the chosen role is displayed, but the new users are all added to the default wordpress role.
On my site, there I don’t use wordpress default roles but 2 custom roles called “Band” and “Fan”. During the process of registration they will be shown, but after login the role is always “none”.If you want, I can give you administrator-access.
Hi,
Yes, I followed your instructions.Hi donmik,
first of all – thank you for the reply.
I’ve tried to implement this function in two ways: in my functions.php and in my bp-custom.php
It does not seem to work as there’s no role passed over to wordpress.Hi donmik,
I understand the logic behind your solution, but I’m not a programmer or coder. Maybe I should ask again in the buddypress forums or wait, until you have more time.
Thanksdonmik, I really love your plugin.
I also want to play with user role and Xprofile ACL. At the moment I use an older plugin – WP Roles at Registration – to make my users choose their prefered role.
In your previous answer above you talked about mapping user roles with a custom xprofile field. Can you give some more instructions? I would really like to get an idea on how to “connect” the chosen user role with a hidden custom profile field. That would make it much more easier to work with this field.
Any ideas?The body class for the homepage is “home blog logged-in”
The body class for pages should be “page page-id-2 page-template-default logged-in” for example.
I need a way to switch between these classes and thought, there would be an option in the settings of your plugin.Do you understand, what I mean?
Thanks again!
btw: this is how the pages should look like:
screenshotHy Dean,
meanwhile I had changed the theme, but now I’ve tried again.
The error you’ve mentioned is not there for me. I’ve updated the plugin.As I told you, the homepage has its own body class. If you navigate through the site, the content has no white background and if you go back to home, the top margin is wrong.
Would be nice, if you could take a look at it again.
Thanks,
noizeburgerI’m also looking for a solution to ue mp3-jplayer. At the moment I put the player into the header of my theme…
I think, this should be the code to work on/change (line 699):
public function userIsAdmin($userId) { $role = $this->_getUserRole($userId); if ($role == 'administrator' || is_super_admin($userId) ) { return true; } return false; }
Forum: Plugins
In reply to: [Social Web Links] Use Social Web Links Plugin with Shortcode or Template TagYou nearly had it – this one works for me to output a horizontal list of links (found it in social-web-links-functions.php):
<?php echo get_horizontal_social_web_links(); ?>
for vertical output, maybe this works:
<?php echo get_vertical_social_web_links(1); ?>
– seems that you have to try to replace the (1) witch (2) or leave it empty.
Looks like you’ve solved the problem, as this post is 4 weeks old.Maybe someone needs this, like me.
I made this plugin work again with your hint (changing the hook bn_auto_group_join to bp_core_activated_user). Would be interested in the other things you added. Can you send me a copy of your file?
Thank you
Hy Harry!
Would be great to see or receive your code. I kept this plugin working up to wp 3.0.5, but it broke with 3.1.
Thanks in advance,
Harry (that’s my name)