Flag This Hub

Community Builder Short and Nice Profile Url

By


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

Community Builder By Joomlapolis
Community Builder By Joomlapolis

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. InCommunity Builder configuration choose these parameter:

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

Then go to Advanced tab, find option: Rewriting mode, choose: with .htaccess (mod_rewrite).  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).


Comments

nadjib1991 2 years ago

hey EL NINO i've just read ur topic and i think it's very helpful . i followed the steps and nothing seems to work in mysite . i guess u haven't include the complete steps, bcause some others like me are Newbies, so could you mention the use of .HTACCESS file( it should be renamed as from "htaccess.txt ---> .htaccess " or not ?and how to set it up

and when the "rewrite mode" is : with .htaccess ( should the basic config option "enabled" set to yes ? )

and the " $title[] = ‘profile/’; " tag, should it be copied as it is after line 182 (i mean no changes must be typed in ?)

really i'm stuck man, and ur help is absefreakenlotely appreciated .

El Nino 2 years ago

Hello Nadjib, thank you for your attend in my Hub.

1. By default Joomla came with htaccess.txt, then if you using SH404SF, and you choosing Rewriting mode, with .htaccess (mod_rewrite) in advanced mode of SH404SEF, so you will need to renamed htaccess.txt into .htaccess.

Also in .htaccess dont forget to commented any command after these line:

########## Begin – Joomla! core SEF Section #

and uncomment any command after these line:

########## Begin – 3rd Party SEF Section############# Use this section if you are using a 3rd party (Non Joomla! core) SEF extension – e.g. OpenSEF, 404_SEF, 404SEFx, SEF Advance, etc

That instruction is available too in SH404SEF installation notes. or visit the developer:

http://extensions.siliana.com/en/sh404SEF-and-url-

 

2.  $title[] = ‘profile/  must be put in line 182 (not after)and before these statement:

‘ $title[] = empty($result)? // no name available ‘

so the completed line after change is:

$title[] = ‘profile/ ‘ $title[] = empty($result)? // no name available ‘

Let me know if my explanation still confusing you.

2 years ago

Not seeing this in the latest sh404sef release,

DO i still need these settings?

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

2 years ago

renamed com also

com_sh404sef

hj 2 years ago

I'm confused,

does this work anymore, cause I cant see this

error 2 years ago

Parse error: syntax error, unexpected T_VARIABLE in /home/content/88/4780288/html/components/com_sh404sef/sef_ext/com_comprofiler.php on line 126

Lucky 2 years ago

Hi thanks for your help,

I keep getting, PAGE NOT FOUND

help please 2 years ago

At line 84, cut variable:

$title[] = ‘profile/’;

I dont see this??

El Nino 2 years ago

@ X,

Short URL to user profile -> set to Yes

and others will only shown if you on SH404SEF Extended Display, just click:

"Click here to switch to extended display (with all available parameters)"

on the right side and the options will shown.

@All:

If you confused about changing file source, you can download it here (it has been modified by me, you only need to upload and replacement the old ones):

http://ninoholic.com/downloads

Please make backup before you make any change / replacement.

sweet! 2 years ago

y=u r tda shiz nit

danka!

sweet! 2 years ago

y=u r tda shiz nit

danka!

itchibahn 2 years ago

I believe this instruction is for joomla 1.0.* not 1.5.*. Anyone got it to work on 1.5.*? Only if I can finish pcshare.com.

Submit a Comment
Members and Guests

Sign in or sign up and post using a hubpages account.



    Like this Hub?
    Please wait working