Search Results for 'buddypress'
-
Search Results
-
Topic: No user assigned to new blog
Hi,
I’m new to BubbyPress and WPMu and installed wpmu 2.9.1 and bb 1.1.3
Now i’m adjusting the theme and ran into a bug.
When i login as a user, i’m not able to create new blogs.
After filling out the form in create-a-blog and submitting, the user is send back to the same form which crashes after the
<h2><?php _e( ‘Create a Blog’, ‘buddypress’ ) ?></h2>
When i check as admin the blog is created but no user is assigned.
Did i mess up the code somehow?
Rian
How can I embed photos on the forums ?! Thanks!
Hey, I just wanted to post the solution that I used in a fresh topic so that I could post it on http://buddypress.org/forums/topic/faq-how-to-code-snippets-and-solutions.
(this is the solution to http://buddypress.org/forums/topic/email-login-random-member-urls)
Before I start I want to thank Peterverkooijen for helping me with this.
So this takes a few steps, but I would think others would be interested in this.
1. Download and install the wp-email-login plugin.
-this allows users to login with their emails
2. Save the following code in a file called usernameGen.js somewhere where you can direct to.
function copyinput(){
var tmp = document.getElementById('signup_email').value;
tmp = tmp.toLowerCase();
tmp = tmp.replace(/[^a-z0-9-]+/g, "").replace(/[-]+/g, "-").replace(/^-+|-+$/g, "");
var chars = tmp;
var string_length = 20;
var scramble_string = '';
for (var i=0; i<string_length; i++) {
var rnum = Math.floor(Math.random() * chars.length);
scramble_string += chars.substring(rnum,rnum+1);
}
var number_chars = "0123456789";
var number_length = 5;
var scramble_number = '';
for (var i=0; i<number_length; i++) {
var rnum = Math.floor(Math.random() * number_chars.length);
scramble_number += number_chars.substring(rnum,rnum+1);
}
document.getElementById('signup_username').value = "mem"+scramble_number+scramble_string;
}-I got the base for my code from this post
-This code takes the email a user types in on the registration page and scrambles the characters of the email into a 20 character string. It generates a randomized 5 digit number and it puts “mem” for member at the start of your URL.
3. In your header.php within the head tag put in:
<script type="text/javascript" src="usernameGen.js"></script>-but you will need to change (src=”usernameGen.js”) to the directory you saved your js file in.
4. In register.php change
<label for="signup_username"><?php _e( 'Username', 'buddypress' ) ?> <?php _e( '(required)', 'buddypress' ) ?></label>
<?php do_action( 'bp_signup_username_errors' ) ?>
<input type="hidden" name="signup_username" id="signup_username" value="<?php bp_signup_username_value() ?>" />
<label for="signup_email"><?php _e( 'Email Address', 'buddypress' ) ?> <?php _e( '(required)', 'buddypress' ) ?></label>
<?php do_action( 'bp_signup_email_errors' ) ?>
<input type="text" name="signup_email" id="signup_email" value="<?php bp_signup_email_value() ?>" />to
<input type="hidden" name="signup_username" id="signup_username" value="<?php bp_signup_username_value() ?>" />
<label for="signup_email"><?php _e( 'Email Address', 'buddypress' ) ?> <?php _e( '(required)', 'buddypress' ) ?></label>
<?php do_action( 'bp_signup_email_errors' ) ?>
<input type="text" name="signup_email" id="signup_email" value="<?php bp_signup_email_value() ?>" onkeyup="copyinput()" />-I removed the “Username (required)” and the “bp_signup_username_errors”
-and I also added onkeyup=”copyinput()” to the email input so that while a user types in this field, it calls upon our “copyinput” function within our js file.
And that’s it, no core files were edited!
I know it’s a little complicated but if you follow the instructions closely than it should work for you.
So here is what it does, and what it did.
What it USED TO DO
When a user goes to register, they would type in a username, an email and a password.
Their username becomes their URL and that’s the name they used to login.
So JoeSmith’s URL is
http://www.yoursite.com/members/joesmith
What it DOES NOW
When a user goes to register, they get to type in an email and a password.
Their ‘username’ field is hidden.
The code will randomly generate a URL for the person like below:
mem12345abcdefghijklmnopqrst
so their URL would be
http://www.yoursite.com/members/mem12345abcdefghijklmnopqrst
Freeing up the good names like John and Smith to be created manually by an administrator.
There is a small small small chance that it will randomize the code to EXACTLY what someone’s URL already is, BUT then if that happens:
normally a message would pop up and say “this username is taken”, but because I’ve hidden the username error box nothing pops up. However the page is refreshed, allowing the user to retype something into the email section, re-randomizing the URL.
If you have any questions or you have a better way of doing this, let me know.
I felt like it was my turn to give something back to buddypress, this forum has done so much for me.
Thanks
Nick
Topic: Firebug
Hi
I want to remove some things from my buddypress front page.
I used firebug to indicate where each element is.
Now my question is :if you want to remove things of your front page is it as simple as creating a child theme and just deleting these lines out?
Example: on my front page there is a tab called “blog” and blogs”. So I would just delete the line that refers to “blogs” to remove it?
As you can see I don’t have much knowledge on the subject and just want to make sure before I delete things at random.
Thanks a lot for the help!
Hey, I’ve got 2 questions about the way users signup/register for buddypress websites.
On the default sign up page, there are:
Username
Email
Password
Confirm Password
Is there anyway that I can get rid of the Username field. Basically I want my users to log in with their emails, and not a username (like Facebook does it).
And I know it might seem odd to some people that I would want my users to have a random profile url, but basically I want to leave the names free for users that I choose.
I basically just want to leave the specific URLS free for users that I choose.
So my 2 questions:
1. Is there a way to create Email Login instead of Username Login
2. How can I randomize the member URLS so they aren’t http://site.com/members/joe
(I would prefer a URL like http://site.com/members/q23ks2lafd=2+)
Thanks
Nick
In my non-ending quest to ‘mu’ buddypress so that each of my blogs can have their ‘own’ buddypress, I’ve come to a roadblock.
Basically my premise is simple.
1. I have buddypress multiblog set to true, so that each blog on my mu install can have bp enabled in their site itself.
2. I use the wpdev plugin so that members can register on a subdomain blog in mu without ever leaving the subdomain. That way they show up as a user of the blog as well as my blog id#1 default one.
3. The key is I only want bp information such as activity/members lists/groups/forums/etc. that were created by users of the blog in question to be displayed. (think ning)
So after days of reading through the wp codex, I think I found the function that will work:
$blogusers = get_users_of_blog();
It seems that is the function used by mu to display the users of a blog in the admin panel when viewing the blogs on my mu network.
Where I am stuck:
I’m guessing that the best approach is to filter all the bp functions for grabbing information via the get_users_of_blog so that only posts/members/groups/forums/etc that were generated by the users of the blog is displayed.
I’m curious if it’s possible to have a general ‘overall’ function that would filter everything in bp through the users of blog function. (what a dream that would be)
Or if I need to manually create a filter for all the bp functions independently, that would suck lol.
Does this look like a good approach to use to ‘mu’ buddypress, or is there an easier way to do this?
If I do indeed have to filter all the functions independently, I’m guessing that there are only a few that I actually need to deal with in order to filter the ouput. Is there a list of those functions that would need to be filtered, or am I on my own to read through all the bp code and figure out which to filter and which not to…
Topic: Buddypress + LDAP = errors?
Hi,
I’m running an MU site (version 2.9.1.1), and there seems to be a conflict when the Buddypress bar (default theme 1.1.3) and the LDAP plugin (version 2.9 from http://wpmuldap.frozenpc.net) are active at the same time:
Warning: Cannot modify header information – headers already sent by (output started at
/var/www/wordpress-mu/wp-content/themes/bp-sn-parent/header.php:3) in /var/www/wordpress-mu/wp-
includes/pluggable.php on line 868
I will also check in with the LDAP plugin folks, but I was wondering if you had ever run into this, and/or could point me in the right direction. Thanks!