Top Left Text cha

Website Development Services

Non-SEF: [cb:config param="live_site" /]/index.php?option=com_comprofiler&task=userprofile&user=[user_id] SEF: [cb:config param="live_site" /]/comprofiler/userprofile/[username] The SEF link can be customized further if you've a menu item, which would be as follows. SEF with Menu Item: [cb:config param="live_site" /]/MENU_ALIAS/userprofile/[username]
Comment (0) Hits: 84
This is what I did to solve a few issues with Community Builder Gallery Plugin.  Actually, they're just imperfections in the new build...

When uploading an image, there is a textarea to enter comments about the image into.  If you upload more than one image, it doesn't show the text.  This is basically a bug but who knows if it will be fixed.  So I just hid the textarea via CSS.

Also, just after uploading an image, you're presented with the image, a textarea (just mentioned above), a delete button, a save button, and a done button.  Really?  There should only be ONE button unless your website is called ButtonLand.

Since, after hiding the textarea, there is no reason for the save button (it only saved text, which didn't display sometimes).  So removing the panel that holds the save and delete buttons does the trick here.  Below is the simple CSS item...

.galleryShareEdit.galleryItemsNewEdit textarea#description, .galleryShareEdit.galleryItemsNewEdit .row.panel-footer {
display:none;
}
Also, they javascript alert that pops up warning that all changes will be lost is completely pointless.  I didn't want to alter anything that would get overwritten with updates so I used jQuery to click the confirm button instantly and put this in a module that's displayed only on that page...

<script type="text/javascript">
jQuery(".galleryButtonDone").click(function() {
jQuery(".cbTooltipButtonYes").click();
});
</script>
Comment (0) Hits: 157
I can't believe this bug has been in CB Activity plugin for years and was never fixed.   Anyway, this issue arises  if someone connects to you and someone else also connects to you (when you have 2 new connections).  In the timeline, it shows you are now connected with those people.  If you reply to one of the connections, for example, "Thanks, Sarah for connecting"... that reply will show on the other person's connection also.  The only way to get rid of this issue is to remove the ability to reply to a connection notification in the timeline.  Luckily, that can be easily done with CSS...

.activityContainerProfileConnection .commentContainer {
display:none;
}
Comment (0) Hits: 176
Field Type: Integer (Extreme VM Usage)

I was creating a field of type integer, and when I published it, I got a 500 internal server error. And got some 'could not connect to SQL' errors, etc. Called hosting company to verify it was definitely coming from the site I am working on. It was. Looked over server logs and they said virtual memory usage spikes caused it. Looked at the logs while testing and it was obvious that the field type integer was the culprit. Published/unpublished that field at 11:10 and 11:26. I attached a snapshot of the VM usage highlighting the spikes (215MB & 512MB). I also published/unpublished a couple other types of fields around that time and they did not cause any spikes at all (0 MB showing).

For this reason, I highly recommend not using the integer field until the bug is resolved.  It has been reported to Joomlapolis.
Comment (0) Hits: 195
I'm surprised I didn't notice this before, but all the tables in all the websites I've created are utf8_general_ci collation. Except every community builder (comprofiler) associated table is latin1_swedish_ci collation.

I know the CB team is aware of this because I've seen posts as old as 9 years regarding this. But I couldn't really find anything that says it's an issue. I did find other posts on other websites saying that you shouldn't mix collations and that it should be fixed.

Reported to Joomlapolis.  Awaiting response...
Comment (0) Hits: 492
Simple code to get the user that's visiting a profile and also to get the user that owns the profile that you're viewing...

Getting Displayed User's Profile ID

global $_CB_framework;
$displayedUser = CBuser::getUserDataInstance( $_CB_framework->displayedUser() );
$displayedUserId = $displayedUser->get( 'id' );

Getting Viewing User's Profile ID

global $_CB_framework;
$viewingUser = CBuser::getMyUserDataInstance();
$viewingUserId = $viewingUser->get( 'id' );


By the way, there's no need to use 'global $_CB_framework;' twice if you're getting both the displayed and viewing user IDs.  You only need it once per instance.


 
Comment (0) Hits: 476
If you can't logout of Community Builder (2.x) with Joomla (3.x), you might have looked at the 20+ page in the CB forums without finding the answer.  Most of those posts are for old versions of CB and Joomla and are related to 3rd party plugins. 

Anyway, here's how I fixed it.

I thought it might be one of the CB modules.  Disabling the CB Content module in the main extensions>manager area of Joomla completely fixes the issue.  But I needed a couple CB modules so I enabled one, but disabled it using Advanced Module Manager to make it so it doesn't show on /logout.  

That worked still!  But here's the thing...

Both modules have the exact same settings (do not display on the logout page).  But, with 'module a' enabled and 'module b' enabled, you have to hit logout a second time (still shows the sessions error the first time).  Also does it with 'module a' enabled and 'module b' disabled.  But doesn't do it with 'modules a' disabled and 'modules b' enabled.  With the exact same settings.  Makes no sense.

But this might be a resolution if you're only using one CB Content Module.
Comment (0) Hits: 703

This is for Community Builder 2.x

First, download the appropriate language plugin and unzip it.

Edit language.php for front end strings and/or admin_language.php for back end strings.

Re-package the folder (zip it up).

Install it via the Community Builder Plugin Installer.

I wrote this because the instructions for doing this are very lengthy as they're directed at people that want to edit the strings in a language other than English.

UPDATE:
By the way... don't change the name of the file, etc.  I changed the file name so it was, more appropriately, EN-US (instead of GB).  And changed other associated strings in the XML file.  It doesn't work.  You have to leave it GB.

Comment (1) Hits: 674
I had a lot of trouble trying to find this info and it also wasn't explained very well, so I decided to document it here.  There are 2 parts.  The profile template and the user list template.

Profile Template

This one is simple, but the documentation is lacking and has been for 6 years it looks like after reading other people's complaints about it in the forums.

The name of this template will be 'example' for this example.

  1. Make a copy of the default template at /components/com_comprofiler/plugin/templates/default/ and name the folder 'example'
  2. Then go into /components/com_comprofiler/plugin/templates/example.
  3. Change the name of the file, default.xml to example.xml.
  4. Change the first element in example.xml, <name>default</name> to <name>example</name>.
  5. Also, in example.xml, you'll need to change <filename plugin="default">default.php</filename> to <filename plugin="example">default.php</filename>.
  6. Create a new file, overrides.css in the example folder.
  7. Zip up the example folder.
  8. Go into the plugins in Community Builder admin, click 'install CB plugin', upload the zipped example folder, and publish it.


Comment (0) Hits: 1206
<div class="sectiontableentry1 cbft_file cbtt_input form-group cb_form_line clearfix" id="cbfr_63"
     style="display: block;">
    <label for="cb_ind_upload_certification" id="cblabcb_ind_upload_certification"
                                    class="control-label col-sm-3">Upload FAA Certification or your FAA
        Authorization</label>
    <div class="cb_field col-sm-9">
        <div id="cbfv_63"><input type="hidden" name="cb_ind_upload_certification__choice" value="" class="">

            <div id="cbfile_upload_cb_ind_upload_certification" class="form-group cb_form_line clearfix">
                <div class="help-block">Your file must be of pdf type. Your file should not exceed 2 MBs.</div>
                <div>Select file <input type="file" name="cb_ind_upload_certification__file" value=""
                                        class="form-control required" data-rule-extension="pdf"
                                        data-rule-filesize="[&quot;0&quot;,&quot;2048&quot;,&quot;KB&quot;]"
                                        aria-required="true"></div>
                <div class="help-block">By uploading, you certify that you have the right to distribute this file.</div>
            </div>
        </div>
    </div>
</div>

 

Comment (0) Hits: 790

Using Substitutions throughout CB (refrerence from: Joomlapolis)

Community Builder supports substitutions in many locations such as delimiter fields, field titles, cb content module, and more. There are substitutions for simple to advanced and complex capabilities for displaying fields or even tabs. The following will demonstrate how to use CB Substitutions properly and to their fullest extend as well as examples of these usage scenarios.


Simple Raw Field Value - display field with all HTML removed
[FIELD_NAME]

The user [username] lives in [cb_citystate] and his name is: [name].
The user BobTBurns lives in Springfield, OH and his name is: Bob.

Raw Field Value - display field with all HTML removed (similar to above, but supports parameters)
[cb:userdata field="FIELD_NAME" /]

The user [cb:userdata field="username" /] lives in [cb:userdata field="cb_citystate" /] and his name is: [cb:userdata field="name" /].
The user BobTBurns lives in Springfield, OH and his name is: Bob.

Original Field Value - display a field with all HTML rendered
[cb:userfield field="FIELD_NAME" /]

The user [cb:userfield field="username" /] lives in [cb:userfield field="cb_citystate" /] and his name is: [cb:userfield field="name" /].
The user BobTBurns lives in Springfield, OH and his name is: Bob.

In addition to being able to display fields with the new substitutions method you have a multitude of parameters that can be added to extend the substitution requirements. These additionally parameters are required to provide usage of the IF substitution.
user - userid, #me, #displayed, #displayedOrMe
usertype
user_id - myid, ##
username

Parameters
user
default - fields only
output - fields and tabs only ('html', 'xml', 'json', 'php', 'csvheader', 'csv', 'rss', 'fieldslist', 'htmledit')
formatting - fields and tabs only ('tr', 'td', 'div' (fields only), 'divs' (tabs only), 'span', 'none', 'table')
reason - fields and tabs only ('profile', 'register', 'list', 'edit', 'search')
list - userlist URL only

[cb:userdata field="FIELD_NAME" user="REPLACEMENT" /]

The user [cb:userdata field="username" user="#me" /] lives in [cb:userdata field="cb_citystate" user="62" /] and his name is: [cb:userdata field="name" user="#me" /].
The user BobTBurns lives in Branson, MO and his name is: Bob.

Parameters are also affected by operators which can change the way the the data is displayed or if it's even displayed at all.

Note: All parameters must come after the field (e.g. [cb:userdata field="FIELD_NAME" user="REPLACEMENT" /]) as anything otherwise (e.g. [cb:userdata user="REPLACEMENT" field="FIELD_NAME" /]) will not work.

Operators
and
or
= (equal)
>= (greater than or equal)
<= (less than or equal)
!= (not equal)
=~ (is regex)
!~ (is not regex)
&& (and)
|| (or)
includes (must have leading and trailing space)
!includes (must have leading and trialing space)


Tab - display a CB rendered tab
[cb:usertab tab="TAB_ID" user="REPLACEMENT" /]

[cb:usertab tab="17" user="#displayedOrMe" /] will display CBs Menu tab for example.

Position- display a CB rendered tab position and all its tabs
[cb:userposition position="POSITION" /]

[cb:userposition position="cb_tabmain" /] will display CB tabs in the Main position for example.

Positions
canvas_menu = Canvas Menu
canvas_background = Canvas Background
canvas_stats_top = Canvas Stats Top
canvas_stats_middle = Canvas Stats Middle
canvas_stats_bottom = Canvas Stats Bottom
canvas_photo = Canvas Photo
canvas_title_top = Canvas Title Top
canvas_title_middle = Canvas Title Middle
canvas_title_bottom = Canvas Title Bottom
canvas_main_left = Canvas Main Left
canvas_main_left_static = Canvas Main Left Static
canvas_main_middle = Canvas Main Middle
canvas_main_right = Canvas Main Right
canvas_main_right_static = Canvas Main Right Static
cb_head = Header (above left/middle/right)
cb_left = Left side (of middle area)
cb_middle = Middle area
cb_right = Right side (of middle area)
cb_tabmain = Main area (below left/middle/right)
cb_underall = Bottom area (below main area)
L1C1 = Line 1 Column 1
L1C2 = Line 1 Column 2
L1C3 = Line 1 Column 3
L1C4 = Line 1 Column 4
L1C5 = Line 1 Column 5
L1C6 = Line 1 Column 6
L1C7 = Line 1 Column 7
L1C8 = Line 1 Column 8
L1C9 = Line 1 Column 9
L2C1 = Line 2 Column 1
L2C2 = Line 2 Column 2
L2C3 = Line 2 Column 3
L2C4 = Line 2 Column 4
L2C5 = Line 2 Column 5
L2C6 = Line 2 Column 6
L2C7 = Line 2 Column 7
L2C8 = Line 2 Column 8
L2C9 = Line 2 Column 9
L3C1 = Line 3 Column 1
L3C2 = Line 3 Column 2
L3C3 = Line 3 Column 3
L3C4 = Line 3 Column 4
L3C5 = Line 3 Column 5
L3C6 = Line 3 Column 6
L3C7 = Line 3 Column 7
L3C8 = Line 3 Column 8
L3C9 = Line 3 Column 9
L4C1 = Line 4 Column 1
L4C2 = Line 4 Column 2
L4C3 = Line 4 Column 3
L4C4 = Line 4 Column 4
L4C5 = Line 4 Column 5
L4C6 = Line 4 Column 6
L4C7 = Line 4 Column 7
L4C8 = Line 4 Column 8
L4C9 = Line 4 Column 9
L5C1 = Line 5 Column 1
L5C2 = Line 5 Column 2
L5C3 = Line 5 Column 3
L5C4 = Line 5 Column 4
L5C5 = Line 5 Column 5
L5C6 = Line 5 Column 6
L5C7 = Line 5 Column 7
L5C8 = Line 5 Column 8
L5C9 = Line 5 Column 9
L6C1 = Line 6 Column 1
L6C2 = Line 6 Column 2
L6C3 = Line 6 Column 3
L6C4 = Line 6 Column 4
L6C5 = Line 6 Column 5
L6C6 = Line 6 Column 6
L6C7 = Line 6 Column 7
L6C8 = Line 6 Column 8
L6C9 = Line 6 Column 9
L7C1 = Line 7 Column 1
L7C2 = Line 7 Column 2
L7C3 = Line 7 Column 3
L7C4 = Line 7 Column 4
L7C5 = Line 7 Column 5
L7C6 = Line 7 Column 6
L7C7 = Line 7 Column 7
L7C8 = Line 7 Column 8
L7C9 = Line 7 Column 9
L8C1 = Line 8 Column 1
L8C2 = Line 8 Column 2
L8C3 = Line 8 Column 3
L8C4 = Line 8 Column 4
L8C5 = Line 8 Column 5
L8C6 = Line 8 Column 6
L8C7 = Line 8 Column 7
L8C8 = Line 8 Column 8
L8C9 = Line 8 Column 9
L9C1 = Line 9 Column 1
L9C2 = Line 9 Column 2
L9C3 = Line 9 Column 3
L9C4 = Line 9 Column 4
L9C5 = Line 9 Column 5
L9C6 = Line 9 Column 6
L9C7 = Line 9 Column 7
L9C8 = Line 9 Column 8
L9C9 = Line 9 Column 9
not_on_profile_1 = Not displayed on profile 1
not_on_profile_2 = Not displayed on profile 2
not_on_profile_3 = Not displayed on profile 3
not_on_profile_4 = Not displayed on profile 4
not_on_profile_5 = Not displayed on profile 5
not_on_profile_6 = Not displayed on profile 6
not_on_profile_7 = Not displayed on profile 7
not_on_profile_8 = Not displayed on profile 8
not_on_profile_9 = Not displayed on profile 9
Date - display a preformated date based off current date and time
[cb:date format="PHP_DATE()_FORMAT" /]

[cb:date format="Y-m-d" /] will display 2011-02-14 for example. The timestamp used is always the current date and time.
URL - display a CB constructed URL (pre-defined)
[cb:url location="DESTINATION" /]

Destinations include: login, logout, registers, lostpassword, manageconnections, profile_view, profile_edit, list, itemid

[cb:url location="login" /] will display the login raw URL that can be included with HTML for example. For list usage you must specify the parameter list="LIST_ID"; without it you'll be given the default userlist URL.
Config - display system and user configuration (pre-defined)
[cb:config param="PARAMETER" /]

Parameters include: live_site, sitename, lang, lang_name, lang_tag

[cb:config param="lang_tag" /] will display en-GB for example. Only the predifined parameters will return a result. Other configuration parameters are not provided for security reasons.
Ifs
[cb:if PARAMETER="REPLACEMENT"]TEXT/CODE[/cb:if]

[cb:if username="demo"]This is Demo being displayed.[/cb:if]
[cb:if user_id="myid"]This is Me being displayed.[/cb:if]
[cb:if user="#displayed" username="test"]This is Test being displayed.[/cb:if]
[cb:if user="#me" username="demo"]This is Demo watching.[/cb:if]
[cb:if user="#me" usertype="Super Administrator"]User of type: Super Administrator[/cb:if]
[cb:if user="#displayedOrMe" user_id<="0"]I am A GUEST.[/cb:if]
[cb:if user="#displayedOrMe" user_id>"0"]I am NOT A GUEST.[/cb:if]
[cb:if user="#me" username!="admin"]This is NOT Admin watching.[/cb:if]
[cb:if viewaccesslevel includes "1"]I am Public[/cb:if]
[cb:if viewaccesslevel !includes "1"]I am NOT Public[/cb:if]
[cb:if gids includes "2"]I have Registered Usergroup[/cb:if]
[cb:if gids !includes "2"]I do NOT have Registered Usergroup[/cb:if]
[cb:if username="demo" or username="admin"]This is Demo or Admin being displayed.[/cb:if]
[cb:if username="demo" and cb_country="USA"]This is Demo being displayed from the USA.[/cb:if]

There are many more possibilities. It's just a matter of trial and error to see what works for you.
Comment (0) Hits: 1140

Showing specific fields for specific groups in Group Jive

I need to show only specific fields for each group in Group Jive.  

Here's my plan...

I haven't looked at the code before saying this, but... I'm going to find where the tabs are echoed in the templates and use the variable for the tab name in the class of the tab. So, for example, right now on of my tabs looks like this: <h2 class="tab"><a href="#">Movies</a></h2>

I will just alter the html & php so it looks like: <h2 class="Movies"><a href="#">Movies</a></h2>

Then I will add a php conditional to compare the group to the tab class and use CSS display:none or :inline on it. I don't know if I'll have to do a database query to get the database field I'm looking for here or if the variable's already available.  Either way, it will accomplish the task without using a bunch of CB Query Fields & Conditionals in the component.
Comment (0) Hits: 775
X