SOLUTION How to go directly to another profile

13 years 11 months ago #132323 by wintercorn
For a client site I didn't want users to search due to privacy concerns but there needed to be a way of connecting with their friends.

So I came up with this little bit of code to share with you.

It needs a custom code module. I used the one from Joomlaspan.com called mod_customcode.

Assuming your SEF url to the profile is:

www.domain.com/my-profile/username

Place the following code in the module:

[code:1]<form id="form1" name="openlocation" action="www.domain.com/my-profile/" method="post" onSubmit="document.openlocation.action='www.domain.com/my-profile/'+ document.openlocation.href.value;" >
<p>
<input type="text" id="edit2" name="href" size="20" width="100px;" value="">
<input type="submit" id="butn1" name="button" value="Find" ></p>
</form>[/code:1]
When a username is entered it will direct the user to the profile without searching.

Post edited by: wintercorn, at: 2010/05/05 23:12

Please Log in to join the conversation.

13 years 11 months ago #132356 by nant
First of all, thanks for sharing ;)

Why are you posting this in the CB 1.2.1 area?

You can most likely use the same method in a delimiter field to accomplish the same thing.

What happens if they put in a non existing username?

Please Log in to join the conversation.

13 years 11 months ago #132364 by wintercorn
Replied by wintercorn on topic Re:SOLUTION How to go directly to another profile
It wouldn't allow me to post a new thread in any other area. So I put it here before I forgot all about it ;)

If you want to move, it would be most appreciated.

If they put in a username which doesn't exist, it shows the normal CB screen with the message:

"This profile does not exist or is no longer available "

Post edited by: wintercorn, at: 2010/05/06 10:50

Please Log in to join the conversation.

13 years 11 months ago #132400 by krileon
I don't understand the necessity; if the SEF URL is www.invalid.com/my-profile/username already then what is the need to capture this and post to www.invalid.com/my-profile/username ? Am confused of its usage or does it redirect from www.invalid.com/username to www.invalid.com/my-profile/username ? Care to explain further? :P

Post edited by: krileon, at: 2010/05/06 19:03


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

13 years 11 months ago #132422 by wintercorn
Replied by wintercorn on topic Re:SOLUTION How to go directly to another profile
If you want users to be able to connect but don't want them to be able to free text search, then you have a problem.

There's no way to connect to someone without knowing their username and navigating directly to their profile.

This code allows you to place an input box which when configured will allow a user to enter a username and then be directed to a profile without searching.

It prevents users from searching for other users but allows profile viewing and connecting for friends.

The actual SEF URL is not important, just whatever is set up on your system.

It's a solution to a very specific problem.

Please Log in to join the conversation.

13 years 11 months ago #132427 by nant
Once again thank for sharing your solution.

However, CB connection feature can be configured to need each party to accept invitation before connection is actually established.

And CB Privacy plugin can be used to hide tabs and/or fields that will be shown only to connected members.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.216 seconds

Facebook Twitter LinkedIn