Forum Replies Created
-
bah, problem occurred. Usernames must contain a letter.. I’m workin on it.
Excellent, I’ve got it working in a way that I like.
I’ll post a link here when I upload the code for anyone else that would like to use Email drivin logins.
ooookay, progress progress and it will work, but is there a more efficient way to do this?
tmp = tmp.replace(/[a]+/g,"1").replace(/+/g,"2").replace(/+/g,"3")... etc...So basically what I’m doing is I’m replacing every letter with a corresponding number.
It works perfectly because when you think about it, no one can sign up with the same email, and if the ‘username’ is taken from the email then it’s perfect!
It works excellent! And no function was needed to be created.
In the header I just put in the javascript:
<script type = "text/javascript">
function copyinput(){
var tmp = document.getElementById('signup_email').value;
tmp = tmp.toLowerCase().replace(/^s+|s+$/g, "").replace(/[_|s]+/g, "");
tmp = tmp.replace(/[^a-z0-9-]+/g, "").replace(/[-]+/g, "-").replace(/^-+|-+$/g, "");
document.getElementById('signup_username').value = tmp;
}
</script>And then within the register.php file I put:
onkeyup=”copyinput()” within:
<input type="text" name="signup_email" id="signup_email" value="<?php bp_signup_email_value() ?>" onkeyup="copyinput()" />However, obviously with the code I have currently all it’s doing is stealing the email and plugging it into the username slot without the “@” symbol and the “.”
So how can I randomize it so that it’s not necisarily the email, but just some random number? (but I’d have to ensure that there would be no duplicates, otherwise it wouldn’t work)
Thanks
Sounds perfect! Thanks a lot.
And how come every time I searched email login I couldn’t find it, but now out of the blue it’s there!
Thanks a lot!
I won’t close it yet until I see if the trick works.
I can’t see why it wouldn’t.
I did see that, but how can I do that with the way buddypress is set up? What files do I need to edit basically?
You’ve been a huge help. I can’t thank you enough.
Hmm, not a huge issue.
But how could I get this to work with.. checkboxes.
Right now when someone selects Red, it will show up with a red picture, but if they also select green, then nothing shows up (because the value is no longer just “Red”)
Just curious, this isn’t a huge issue
YES! Thank you very much. This has been a painful process for you I’m sure.
Thanks!
Yeah it’s the original profile-loop.php file.
Thanks for all the help.
By the way, I have no idea why there are all those breaks. Ignore all the breaks in the code:
this is the real code
<?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>
<?php if ( bp_get_the_profile_field_name() == 'Gender' ) {
if ( bp_get_the_profile_field_value() == 'Male' )
echo '<img src="male.jpg" alt="male" title="Male" />';
}
?>
etc etc etc
rest of the codeI trust your code works, but I think I just have no idea what I’m doing.
This is what my code looks like:
<br />
<?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?><br />
<?php if ( bp_get_the_profile_field_name() == 'Gender' ) {<br />
if ( bp_get_the_profile_field_value() == 'Male' )<br />
echo '<img src="male.jpg" alt="male" title="Male" />';<br />
}<br />
?><br />
etc etc etc<br />
rest of the code<br />(I’ve tried with both lowercase and uppercase fields)
I’m just using the Gender one to test this out, I’ve tested it with all these other ones but none of them are working.
What am I doing wrong.
bp_the_profile_field_value displays ALL of the values of the fields within the group, and
bp_the_profile_field_name displays ALL of the names of the fields within the group.
I tried what you said with the <?php if ( bp_the_profile_field_name() == ‘color’ ) {
but that still just continues to display ALL of the fields. (And yes I changed the ‘color’ to the proper field name)
Anyone have ideas on how to get a profile fields output to display a picture instead of the text?
Oh yeah, I changed the image, fieldnames and values, and I added the parenthesis on the end of the ‘green’ line, but it still doesn’t seem to do anything, is it because I’m using checkboxes?
Ahh, well that looks a lot nicer when I changed the css to block.
Thank you.
But maybe I’m doing something wrong with the code. Or maybe I’m entering the wrong field name or field value.
But nothing really seems to happen.
I think people are starting to get tired of me asking questions.
Anyway, to restate my major problem, without making a new topic altogether:
I’ve created a profile field (checkboxes) and in that there are 4 selections. User A comes on and selects Red and Green. On his profile I’d like a Red Badge, and a Green Badge to appear on his profile.
Is there a way I can do this?
Also, how can I get it so that when I make a checkbox profile field, it displays them in a list.
What it’s doing:
Red [ ] Blue [ ] Green [ ] Yellow [ ]
What I want:
Red [ ]
Blue [ ]
Green [ ]
Yellow [ ]
okay great, I’ll try that out.
Okay lets cover it maybe one at a time?
Can I have a custom layout on a group? Separate from other groups?
Oh yeah, I know that’s there, but that is only the Nickname thing from the wordpress.
I was wondering if there as anyway to edit the other fields (stored by wordpress) on the profile page.
I see people are hesitant to reply, maybe I can make it an easier question now.
I’ve done a temporary solution for the time being:
I’ve created a page, where I am manually going to put groups onto that will be the featured ones. So basically, I’ll create a normal group, and then just copy it’s info and past it on a “Featured Groups” page.
MY NEW QUESTION(S):
1. Is there an easy code I can do for inserting a groups info (just like on the groups directory page, maybe using the groups ID number?)
– I know you can do this for blog IDs but can you also do this for a group?
2. Is there a way to mark the groups on the normal groups page, maybe with a little star or something?
3. Can I change the layout of a groups page, without modifying every group?
Thanks
Found it, wow.. that was useful.
Wish I knew about that earlier.
Thanks to both of you!
Ohh, within the database okay. I do have access to it, but I’ve never really gone into the actual database to do anything.
Thanks, I’ll have a look.
Sorry, where do I find that?
Thanks, I do have bp-events, but there are still errors with the search and the avatars. But I can still use it for what I want I guess