Search Results for 'wordpress'
-
Search Results
-
Hi there,
I’ve released the initial version of my activity notification plugin. You can find a description at the link below:
http://wordpress.org/extend/plugins/buddypress-group-activity-stream-subscription/
Please let me know how you get on with it and let me know of any issues. As this is the first release, I recommend against installing it on production sites.
Please post here or on http://namoo.co.uk with feedback/questions.
I’m using buddypress version 1.2 beta in the latest version of WordPress 2.9.1
If you visit my site http://www.tonsil-help.com, you’ll see I’ve created my own theme that I’ve integrated into buddypress.
The only thing that I can’t get working are all of my links, EX: under “My Account” in the admin bar, all of these point to siteurl/members/Josh Katherman which is my full name.
If I type in “admin” instead of “Josh Katherman”, everything works fine, as admin is technically my user name on this site. Everyone else’s account information and profiles/links work fine except mine.
So I guess I’m not understanding why it’s using my actual name instead of my username, as this is why none of my links works.
Any help would be awesome! – Josh
edit:
for an example link go to http://www.tonsil-help.com/author/Josh%20Katherman/ as you can see, that’s the link to my author page, and all my pages under “my account” use “Josh Katherman” which seems to be the reason why they aren’t working.
FYI: “The other day I talked about micro-blogging and mega-blogging and shared my view that new forms of social media, including micro-blogging, are complementary to blogging. We’ve seen ongoing growth at WordPress.com as people started using Twitter, and we expect that to continue..”
We’ve enabled posting to and reading of WordPress.com blogs via the Twitter API.
http://en.blog.wordpress.com/2009/12/12/twitter-api
Maybe Andy can shed some light on this to work for BP ?
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
Thank you.