-->

Community Builder Short and Nice Profile Url

If you have Community Builder installed on your Joomla site, your member will got their own profile url. Usually formatted like this: /component/option,com_comprofiler/task,userProfile/Itemid,39/ This is so long names url, but this time, i want to share how to make shorter Community Builder profile url, in example like this:
yourdomain/profile/username.html or yourdomain/member/username.html

Artisteer - Joomla Theme Generator

Using SH404SEF

SH404SEF is Search Engine Friendly and url rewriting component for Joomla. It can turn our long url that came with Joomla into an pretty short url. SH404SEF also supported and integrated with Community Builder as plugins. For setting up Community Builder plugins:

  1. Login to Joomla administrator (usually in: yourdomain/administrator/)
  2. Select Components then sh404SEF
  3. In sh404SEF panel control, click on sh404SEF Cnnfiguration
  4. In Main tab make sure that Enabled option in Basic Configuration is checked.
  5. Then go to Plugins tab, scroll down and find Community Builder configuration.
  6. In Community Builder configuration choose these parameter:
  7. Insert Community Builder name -> set to No

    Insert user name -> set to No
    Insert user ID -> set to Yes
    Insert user pseudo -> set to Yes
    Short URL to user profile -> set to Yes

  8. Then go to Advanced tab, find option: Rewriting mode, choose: with .htaccess (mod_rewrite). (make sure that you change .htaccess commenting from Joomla Core SEF into 3rd Party (look at spoiler to see what should to change)
    +[show]
  • Finish.. save sh404SEF configuration, if you got prompt message about clear cache url, just click on Yes
  • After that, now we got Joomla url frienly and short url our Community Builder member. But this is not finished at all ! Read the next step below.

    Modification Of com_sef file

    With all step above, we already have short url profile like this:
    yourdomain/username.html
    but thats too short, and can cause conflicting if there is same name beetween username and title of our Joomla article.

    So we must made change profile url into something like this:
    yourdomain/profile/username.html
    or
    yourdomain/members/username.html

    Follow these step to make that change:

    1. Open file: com_comprofiler.php
      it should be in:
      /components/com_sef/sef_ext/com_comprofiler.php
    2. At line 84, cut variable:
      $title[] = ‘profile/’;

      the string ‘profile’ you can change to other name so it will suitable your needed. this is will be the lead name before member username (profile/username.html)

    3. Then paste into line 182 after:
      ‘else $result = $database->loadResult();’

      or before:

      ‘ $title[] = empty($result)? // no name available ‘
    4. Save the file, then purge / clear url cache of sh404SEF

    Now thats all done, your member will have profile url like this:
    yourdomain/profile/username.html (where lead name ‘profile’ can you change with any name that you wanted).


    Related posts:

    1. Joomla Community Builder Author Access Level Automatically For Newly Registered Members
    2. Community Builder Joomla Social Networking Component
    3. Hide Your Affiliate Url
    4. Problem Solving: Images Not Showing In Virtuemart
    5. PHP Simple Logout Script


    Share To Facebook | Tweet! This | Watch The Video


     
    2 Comments. Leave Comment Or Trackback.
    1. #1 • Date 30 June 2009, Ronny Ko said:
       

      My community builder now builds a url that has

      http://www.bityard.com/Community

      when i go into my profile, which is different from what you have in your article. was there an update that we don’t know about?

      Would you kindly let me know via email?

      Ronny

      ReplyReply
    2. #2 • Date 30 June 2009, El Nino said:
       

      I see that your profil url is:
      http://www.bityard.com/okynnor1/
      and seems you not using SH404SEF components? do you using default Joomla SEF instead SH404SEF?
      I cant see your sef_ext folder:
      components/com_sef/sef_ext/

      If yes, so you must using SH404SEF,

      http://joomlacode.org/gf/download/frsrelease/10417/40680/com_sh404SEF-15_1.0.20_Beta_build_237.joomla1.5.x.zip

      because i havent tested this method on default Joomla SEF.

      I will test on default Joomla SEF later.

      ReplyReply

     

    Comment With Facebook?

    Comment:

    CAPTCHA Image Audio Version
    Reload Image
     
     
    -->