http://documentation.jomsocial.com/api.php?action=feedcontributions&user=Patricia+Schmidt&feedformat=atomJomSocial Documentation - User contributions [en]2024-03-19T09:19:58ZUser contributionsMediaWiki 1.23.1http://documentation.jomsocial.com/wiki/Updating_From_Very_Old_JomSocial_VersionsUpdating From Very Old JomSocial Versions2013-04-30T23:44:50Z<p>Patricia Schmidt: /* Tier Update */</p>
<hr />
<div>==Overview==<br />
The time for an update will come sooner or later for most of the users. Some of you may tolerate the older version for a longer period of time than others; some of you just don't want to update the JomSocial installation because your client hasn't wanted to pay for an update. Nevertheless, sooner or later, the time for it will come, and here is the proper way to do it.<br />
<br />
==Downloading the Older version==<br />
Provided that your subscription is still active, use the link, explained below, to download any version of JomSocial.<br />
<syntaxhighlight lang="php"><br />
http://www.jomsocial.com/component/account/?view=download&id=REFERENCENUMBER&email=YOUR@EMAIL.COM&ver=X.Y.Z<br />
</syntaxhighlight><br />
<br /><br />
Replace the <br />
#'''REFERENCENUMBER''' - with your valid reference number<br />
#'''YOUR@EMAIL.COM''' - with your valid purchase email<br />
#'''X.Y.Z''' - with actual version you want to download<br />
<br />
{{alert|'''Note:''' If you have the Dev license, please contact the support personnel to provide you with older version as we experiencing some troubles with downloading older versions for users with this type of license. Basically, the script will try to find the '''dev''' instance of required version, which simply isnt available before JomSocial 2.8, hence an error will be shown|alert-info}}<br />
<br />
==Tier Update==<br />
To properly update your JomSocial installation from older version, you are '''MUST''' make a tier upgrade.<br/><br />
This simply means you need to make a step by step update from one version to another, gradually increasing by the time of release.<br/><br />
It is needed to ensure the proper database update of JomSocial-related tables.<br />
<br />
For this example, we will asume that an individual has installed JomSocial '''1.0.128''' on Joomla! '''1.5'''<br/><br />
All versions of JomSocial up to 2.6 can be installed on this version of Joomla and, really, this is the preferred version of Joomla you should be using if your site is running JomSocial versions over 2.8<br/><br />
You can see the entire compatibility sheet [[Joomla Versions Compatibility|here]]<br/><br />
JomSocial '''1.0.128''' is one of our first really stable releases published at the end of 2008, so this tutorial will cover all the possible scenarios of the update.<br />
<br />
===Update Progress===<br />
For this practice, our test site is running Joomla 1.5 and this wont change till we reach JomSocial version 2.6. We have JomSocial 1.0.128 installed<br/><br />
First, we need to download JomSocial version '''1.1.145''' and '''uninstall''' version '''1.0.128'''. Once older version is uninstalled we can proceed installing the newer one.<br/><br />
Install the version '''1.1.145''' and go download version '''1.2.206'''<br/><br />
Uninstall version '''1.1.145''' and install version '''1.2.206'''. Go download version '''1.5.248'''<br/><br />
Uninstall version '''1.2.206''' and install version '''1.5.248'''. Go download version '''1.6.290'''.<br/><br />
Uninstall version '''1.5.248''' and install version '''1.6.290'''.<br/><br />
This is the moment when JomSocial version naming convention slightly change. With release of JomSocial 1.8, we switched to GPL and start following the [http://kernel.org kernel] version numbering where odd version number stand for alpha/beta/RC release, while even number stands for stable release. Therefore, JomSocial 1.7 was beta version of 1.8. JomSocial 1.9 was beta version of 2.0. JomSocial 2.9 will be beta version of JomSocial 3.0 and so on..<br/><br />
You however, do not have to install these beta versions in the tier upgrade process.<br/><br />
We are currently at JomSocial '''1.6.290''' and we can proceed with download of version '''1.8.11'''<br/><br />
Uninstall version '''1.6.290''' and install version '''1.8.11'''. Go download version '''2.0.6'''.<br/><br />
Uninstall version '''1.8.11''' and install version '''2.0.6'''. Go download version '''2.2.5'''.<br/><br />
Uninstall version '''2.0.6''' and install version '''2.2.5'''. Go download version '''2.4.3'''.<br/><br />
Uninstall version '''2.2.5''' and install version '''2.4.3'''. Go download version '''2.6.3'''.<br/><br />
Uninstall version '''2.4.3''' and install version '''2.6.3'''. <br/><br />
This is the moment where we must stop because [[Joomla 1.5 Migration With JomSocial 2.6|Joomla 1.5 migration to Joomla 2.5]] is required in order to install next versions of JomSocial.<br />
<br />
If Joomla migration went well, at this point of time you should have clean Joomla 2.5 installation with database transferred but no extensions installed.<br/><br />
Now install again JomSocial '''2.6.3''' just to make sure post-migration process went fine and your community is there<br/><br />
Go download JomSocial version '''2.8.4''', uninstall JomSocial '''2.6.3''', install the '''2.8.4''' and you're all set.<br/><br />
Your site should now be properly updated to latest version of jomSocial<br/><br />
{{alert|'''Important:''' The practice of tier upgrade will also be applied for all future JomSocial releases|alert}}</div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/Updating_From_Very_Old_JomSocial_VersionsUpdating From Very Old JomSocial Versions2013-04-30T23:40:11Z<p>Patricia Schmidt: /* Downloading the Older version */</p>
<hr />
<div>==Overview==<br />
The time for an update will come sooner or later for most of the users. Some of you may tolerate the older version for a longer period of time than others; some of you just don't want to update the JomSocial installation because your client hasn't wanted to pay for an update. Nevertheless, sooner or later, the time for it will come, and here is the proper way to do it.<br />
<br />
==Downloading the Older version==<br />
Provided that your subscription is still active, use the link, explained below, to download any version of JomSocial.<br />
<syntaxhighlight lang="php"><br />
http://www.jomsocial.com/component/account/?view=download&id=REFERENCENUMBER&email=YOUR@EMAIL.COM&ver=X.Y.Z<br />
</syntaxhighlight><br />
<br /><br />
Replace the <br />
#'''REFERENCENUMBER''' - with your valid reference number<br />
#'''YOUR@EMAIL.COM''' - with your valid purchase email<br />
#'''X.Y.Z''' - with actual version you want to download<br />
<br />
{{alert|'''Note:''' If you have the Dev license, please contact the support personnel to provide you with older version as we experiencing some troubles with downloading older versions for users with this type of license. Basically, the script will try to find the '''dev''' instance of required version, which simply isnt available before JomSocial 2.8, hence an error will be shown|alert-info}}<br />
<br />
==Tier Update==<br />
To properly update your JomSocial installation from older version, you are '''absolutely required''' to make a tier upgrade.<br/><br />
This simply means you need to make step by step update from one version to another gradually increasing by the time of release.<br/><br />
It is needed to ensure the proper database update of JomSocial related tables.<br />
<br />
For this example, we will asume that one have installed JomSocial '''1.0.128''' on Joomla! '''1.5'''<br/><br />
One can install all versions of JomSocial up to 2.6 on this version of Joomla and really, this is preferred version of Joomla you should be using if your site running JomSocial versions lover then 2.8<br/><br />
You can see entire compatibility sheet [[Joomla Versions Compatibility|here]]<br/><br />
JomSocial '''1.0.128''' is one of our first really stable release published at the down of the year 2008 so this tutorial will cover all the possible scenarios of update.<br />
<br />
===Update Progress===<br />
For this practice, our test site is running Joomla 1.5 and this wont change till we reach JomSocial version 2.6. We have JomSocial 1.0.128 installed<br/><br />
First, we need to download JomSocial version '''1.1.145''' and '''uninstall''' version '''1.0.128'''. Once older version is uninstalled we can proceed installing the newer one.<br/><br />
Install the version '''1.1.145''' and go download version '''1.2.206'''<br/><br />
Uninstall version '''1.1.145''' and install version '''1.2.206'''. Go download version '''1.5.248'''<br/><br />
Uninstall version '''1.2.206''' and install version '''1.5.248'''. Go download version '''1.6.290'''.<br/><br />
Uninstall version '''1.5.248''' and install version '''1.6.290'''.<br/><br />
This is the moment when JomSocial version naming convention slightly change. With release of JomSocial 1.8, we switched to GPL and start following the [http://kernel.org kernel] version numbering where odd version number stand for alpha/beta/RC release, while even number stands for stable release. Therefore, JomSocial 1.7 was beta version of 1.8. JomSocial 1.9 was beta version of 2.0. JomSocial 2.9 will be beta version of JomSocial 3.0 and so on..<br/><br />
You however, do not have to install these beta versions in the tier upgrade process.<br/><br />
We are currently at JomSocial '''1.6.290''' and we can proceed with download of version '''1.8.11'''<br/><br />
Uninstall version '''1.6.290''' and install version '''1.8.11'''. Go download version '''2.0.6'''.<br/><br />
Uninstall version '''1.8.11''' and install version '''2.0.6'''. Go download version '''2.2.5'''.<br/><br />
Uninstall version '''2.0.6''' and install version '''2.2.5'''. Go download version '''2.4.3'''.<br/><br />
Uninstall version '''2.2.5''' and install version '''2.4.3'''. Go download version '''2.6.3'''.<br/><br />
Uninstall version '''2.4.3''' and install version '''2.6.3'''. <br/><br />
This is the moment where we must stop because [[Joomla 1.5 Migration With JomSocial 2.6|Joomla 1.5 migration to Joomla 2.5]] is required in order to install next versions of JomSocial.<br />
<br />
If Joomla migration went well, at this point of time you should have clean Joomla 2.5 installation with database transferred but no extensions installed.<br/><br />
Now install again JomSocial '''2.6.3''' just to make sure post-migration process went fine and your community is there<br/><br />
Go download JomSocial version '''2.8.4''', uninstall JomSocial '''2.6.3''', install the '''2.8.4''' and you're all set.<br/><br />
Your site should now be properly updated to latest version of jomSocial<br/><br />
{{alert|'''Important:''' The practice of tier upgrade will also be applied for all future JomSocial releases|alert}}</div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/Updating_From_Very_Old_JomSocial_VersionsUpdating From Very Old JomSocial Versions2013-04-30T23:38:08Z<p>Patricia Schmidt: /* Overview */</p>
<hr />
<div>==Overview==<br />
The time for an update will come sooner or later for most of the users. Some of you may tolerate the older version for a longer period of time than others; some of you just don't want to update the JomSocial installation because your client hasn't wanted to pay for an update. Nevertheless, sooner or later, the time for it will come, and here is the proper way to do it.<br />
<br />
==Downloading the Older version==<br />
Provided that your subscription is still active. Using the explained link bellow you can download any version of JomSocial.<br />
<syntaxhighlight lang="php"><br />
http://www.jomsocial.com/component/account/?view=download&id=REFERENCENUMBER&email=YOUR@EMAIL.COM&ver=X.Y.Z<br />
</syntaxhighlight><br />
<br /><br />
Replace the <br />
#'''REFERENCENUMBER''' - with your valid reference number<br />
#'''YOUR@EMAIL.COM''' - with your valid purchase email<br />
#'''X.Y.Z''' - with actual version you want to download<br />
<br />
{{alert|'''Note:''' If you have the Dev license, please contact the support personnel to provide you with older version as we experiencing some troubles with downloading older versions for users with this type of license. Basically, the script will try to find the '''dev''' instance of required version, which simply isnt available before JomSocial 2.8, hence error will be shown|alert-info}}<br />
<br />
==Tier Update==<br />
To properly update your JomSocial installation from older version, you are '''absolutely required''' to make a tier upgrade.<br/><br />
This simply means you need to make step by step update from one version to another gradually increasing by the time of release.<br/><br />
It is needed to ensure the proper database update of JomSocial related tables.<br />
<br />
For this example, we will asume that one have installed JomSocial '''1.0.128''' on Joomla! '''1.5'''<br/><br />
One can install all versions of JomSocial up to 2.6 on this version of Joomla and really, this is preferred version of Joomla you should be using if your site running JomSocial versions lover then 2.8<br/><br />
You can see entire compatibility sheet [[Joomla Versions Compatibility|here]]<br/><br />
JomSocial '''1.0.128''' is one of our first really stable release published at the down of the year 2008 so this tutorial will cover all the possible scenarios of update.<br />
<br />
===Update Progress===<br />
For this practice, our test site is running Joomla 1.5 and this wont change till we reach JomSocial version 2.6. We have JomSocial 1.0.128 installed<br/><br />
First, we need to download JomSocial version '''1.1.145''' and '''uninstall''' version '''1.0.128'''. Once older version is uninstalled we can proceed installing the newer one.<br/><br />
Install the version '''1.1.145''' and go download version '''1.2.206'''<br/><br />
Uninstall version '''1.1.145''' and install version '''1.2.206'''. Go download version '''1.5.248'''<br/><br />
Uninstall version '''1.2.206''' and install version '''1.5.248'''. Go download version '''1.6.290'''.<br/><br />
Uninstall version '''1.5.248''' and install version '''1.6.290'''.<br/><br />
This is the moment when JomSocial version naming convention slightly change. With release of JomSocial 1.8, we switched to GPL and start following the [http://kernel.org kernel] version numbering where odd version number stand for alpha/beta/RC release, while even number stands for stable release. Therefore, JomSocial 1.7 was beta version of 1.8. JomSocial 1.9 was beta version of 2.0. JomSocial 2.9 will be beta version of JomSocial 3.0 and so on..<br/><br />
You however, do not have to install these beta versions in the tier upgrade process.<br/><br />
We are currently at JomSocial '''1.6.290''' and we can proceed with download of version '''1.8.11'''<br/><br />
Uninstall version '''1.6.290''' and install version '''1.8.11'''. Go download version '''2.0.6'''.<br/><br />
Uninstall version '''1.8.11''' and install version '''2.0.6'''. Go download version '''2.2.5'''.<br/><br />
Uninstall version '''2.0.6''' and install version '''2.2.5'''. Go download version '''2.4.3'''.<br/><br />
Uninstall version '''2.2.5''' and install version '''2.4.3'''. Go download version '''2.6.3'''.<br/><br />
Uninstall version '''2.4.3''' and install version '''2.6.3'''. <br/><br />
This is the moment where we must stop because [[Joomla 1.5 Migration With JomSocial 2.6|Joomla 1.5 migration to Joomla 2.5]] is required in order to install next versions of JomSocial.<br />
<br />
If Joomla migration went well, at this point of time you should have clean Joomla 2.5 installation with database transferred but no extensions installed.<br/><br />
Now install again JomSocial '''2.6.3''' just to make sure post-migration process went fine and your community is there<br/><br />
Go download JomSocial version '''2.8.4''', uninstall JomSocial '''2.6.3''', install the '''2.8.4''' and you're all set.<br/><br />
Your site should now be properly updated to latest version of jomSocial<br/><br />
{{alert|'''Important:''' The practice of tier upgrade will also be applied for all future JomSocial releases|alert}}</div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/Stream_API_v2Stream API v22013-04-21T02:19:56Z<p>Patricia Schmidt: /* Overview */</p>
<hr />
<div>{{alert|<center><strong>WARNING:</strong> API examples below apply to version 2.8. To read the full Activity Stream API for older versions, [[Stream API v1|click here]] </center>|alert-danger}}<br />
<br />
==Overview==<br />
JomSocial 2.8 brings the slight change in how activity streams are handled and introduces different templates for different types of streams. This allows easier customization of every individual's activity stream item; however, this feature will require third-party components to write in a stream with a plugin, unlike it was the case with JomSocial 2.6 and below. <br/><br />
You can still use the old API to create the activity streams, but you can't use the '''{multiple}'''...'''{/multiple}''' tags anymore as they are completely removed and will cause activity streams to break. (It will be created, but will not be shown on Front End)</div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/Sending_MessageSending Message2013-04-21T02:18:07Z<p>Patricia Schmidt: /* Sending From Inbox */</p>
<hr />
<div>Sending messages to other users in the community is pretty much a straightforward task. There are, however, several ways you can send a message to the user.<br />
<br />
==Sending From User Profile==<br />
The most common way to send the message to a user is to visit their respective profile page and locate the '''Send Message''' button:<br />
:::[[File:Sendmsg.png]]<br />
Once clicked, the button will call the popup for creating the private message:<br />
:::[[File:Writemsgpopup.png]]<br />
In the popup displayed above, you must write the message '''Title''' and the actual '''Message''' and just click on the '''Send''' button.<br />
<br />
==Sending From User Lists==<br />
In various JomSocial user lists, such as friend lists, group member list, event attendee's lists, etc., you can also find the '''Send Message''' button. It looks like this:<br />
:::[[File:Sendmsglists.png]]<br />
<br />
==Sending From Inbox==<br />
You can also send private messages directly from inbox. When you're in your inbox, navigate to the '''Write''' link:<br />
:::[[File:Privatemessageswrite.png]]<br />
In the following example, which is similar to the previous one, a popup window will appear, only this time, with one additional button allowing you to add recipients:<br />
:::[[File:Writemsgform.png]]<br />
You can send the same message to multiple recipients too.<br/><br />
{{alert|'''Note:''' Adding recipients is limited to friends only. You can not add the the user which is not your friend.|alert-info}}<br />
<br />
==See Also==<br />
* [[Private Messaging]]</div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/Sending_MessageSending Message2013-04-21T02:17:38Z<p>Patricia Schmidt: /* Sending From User Profile */</p>
<hr />
<div>Sending messages to other users in the community is pretty much a straightforward task. There are, however, several ways you can send a message to the user.<br />
<br />
==Sending From User Profile==<br />
The most common way to send the message to a user is to visit their respective profile page and locate the '''Send Message''' button:<br />
:::[[File:Sendmsg.png]]<br />
Once clicked, the button will call the popup for creating the private message:<br />
:::[[File:Writemsgpopup.png]]<br />
In the popup displayed above, you must write the message '''Title''' and the actual '''Message''' and just click on the '''Send''' button.<br />
<br />
==Sending From User Lists==<br />
In various JomSocial user lists, such as friend lists, group member list, event attendee's lists, etc., you can also find the '''Send Message''' button. It looks like this:<br />
:::[[File:Sendmsglists.png]]<br />
<br />
==Sending From Inbox==<br />
You can also send private messages directly from inbox.<br/><br />
When you're in your inbox, navigate to the '''Write''' link:<br />
:::[[File:Privatemessageswrite.png]]<br />
In the following example, which is similar to the previous one, a popup window will appear, only this time, with one additional button allowing you to add recipients:<br />
:::[[File:Writemsgform.png]]<br />
You can send the same message to multiple recipients too.<br/><br />
{{alert|'''Note:''' Adding recipients is limited to friends only. You can not add the the user which is not your friend.|alert-info}}<br />
<br />
==See Also==<br />
* [[Private Messaging]]</div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/Sending_MessageSending Message2013-04-21T02:17:19Z<p>Patricia Schmidt: </p>
<hr />
<div>Sending messages to other users in the community is pretty much a straightforward task. There are, however, several ways you can send a message to the user.<br />
<br />
==Sending From User Profile==<br />
The most common way to send the message to a user is to visit their respective profile page and locate the '''Send message''' button:<br />
:::[[File:Sendmsg.png]]<br />
Once clicked, the button will call the popup for creating the private message:<br />
:::[[File:Writemsgpopup.png]]<br />
In the popup displayed above, you must write the message '''Title''' and the actual '''Message''' and just click on the '''Send''' button.<br />
<br />
==Sending From User Lists==<br />
In various JomSocial user lists, such as friend lists, group member list, event attendee's lists, etc., you can also find the '''Send Message''' button. It looks like this:<br />
:::[[File:Sendmsglists.png]]<br />
<br />
==Sending From Inbox==<br />
You can also send private messages directly from inbox.<br/><br />
When you're in your inbox, navigate to the '''Write''' link:<br />
:::[[File:Privatemessageswrite.png]]<br />
In the following example, which is similar to the previous one, a popup window will appear, only this time, with one additional button allowing you to add recipients:<br />
:::[[File:Writemsgform.png]]<br />
You can send the same message to multiple recipients too.<br/><br />
{{alert|'''Note:''' Adding recipients is limited to friends only. You can not add the the user which is not your friend.|alert-info}}<br />
<br />
==See Also==<br />
* [[Private Messaging]]</div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/Update_With_Patch_FilesUpdate With Patch Files2013-04-21T01:58:51Z<p>Patricia Schmidt: </p>
<hr />
<div>{{alert|<center><strong>IMPORTANT!!!</strong> This page explains updating by using patch files. If you want to <strong>upgrade your installation to a newer version</strong>, please [[Upgrading|click here]] </center>|alert-error}}<br />
To apply a JomSocial upgrade patch, simply unzip the most appropriate package for your site, and upload them into Joomla's root directory. This will overwrite all JomSocial related files.<br />
It is advisable for you to make a backup of any customization done to core JomSocial files and templates.<br />
<br />
===Difference Between Updating and Upgrading?===<br />
By updating, we consider only moving from one version to another within the single branch.<br />
Updating will refer to applying patches that are provided for desired branch. For example, if you are currently using JomSocial 2.6.1 and want to '''update''' to 2.6.3, you can either use [[Upgrading|this method]] or follow the tutorial bellow. <br />
If however, you want to move from one branch to another and for example, '''upgrade''' from version 2.6 to 2.8, stop reading this now and use [[Upgrading|Upgrade method]]<br />
<br />
===Patch Files===<br />
Patch files can be retrieved in [http://www.jomsocial.com/forum JomSocial Forum]. Download for updates is available exclusively for active subscribers of JomSocial. Please login to be able to see the download link. [http://www.jomsocial.com/forum/bugfixes-and-upgrade-patches Patches forum]<br />
<br />
===Why no patch files are provided for upgrade?===<br />
The reason behind this is very simple. Every new version of JomSocial inevitably brings database changes, and these database changes can only be properly applied if the extension is installed through the Joomla installer.<br />
<br />
===Applying Patch===<br />
To apply these patches, please download the package most appropriate to you. If you are currently using JomSocial 2.6.2 and wish to upgrade to Jomsocial 2.6.3, select 'JomSocial_2.6.2_to_JomSocial_2.6.3' file.<br />
Follow the procedure as ilustrated on the images below:<br />
[[File:patch1.jpg]]<br />
[[File:patch2.jpg]]<br />
[[File:patch3.jpg]]<br />
[[File:patch4.jpg]]<br />
<br />
===Modules and Plugins===<br />
Modules and plugins are not packaged together with the patch file. To update your modules and plugins to the latest release, please find their installer in the respective Knowledgebase article and install individual modules and plugins using Joomla Extensions Manager.</div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/RSS_feedsRSS feeds2013-03-12T02:32:33Z<p>Patricia Schmidt: Undo revision 1868 by Patricia Schmidt (talk)</p>
<hr />
<div>{{alert|<center><strong>NOTE</strong> RSS Feeds have been disabled since JomSocial 2.8.2 until further development occurs.</center>|alert}}<br />
Need to view a particular page of your JomSocial site in RSS?<br /><br />
Try adding ?&format=feed to the end of that particular page's URL.<br />
<br />
For example,<br />
<br />
Recent activites rss feed:<br />
<br />
http://[yourjomsocialsite.com]/index.php?option=com_community&view=frontpage?&format=feed<br />
<br />
User's rss feed:<br />
<br />
http://[yourjomsocialsite.com]/index.php?option=com_community&view=profile&userid=<USERID>?&format=feed<br />
<br />
Viewing all photos:<br />
<br />
http://[yourjomsocialsite.com]/index.php?option=com_community&view=photos&task=display?&format=feed</div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/Setting_Up_Video_GalleriesSetting Up Video Galleries2013-03-12T02:32:03Z<p>Patricia Schmidt: Undo revision 1869 by Patricia Schmidt (talk)</p>
<hr />
<div>===Overview===<br />
<br />
The primary objective of this article is to explain how to enable and configure video galleries on your site. Please read it completely to understand all available options<br />
<br />
===Accessing Configuration Options===<br />
<br />
# Navigate to site Backend, and from the '''Components''' dropdown menu, select JomSocial > Configuration:<br />
#;:: [[File:jsconfigmenu.png]]<br />
# Locate the Photo Gallery settings and make sure that '''Video Galleries''' is enabled (it is enabled by default):<br />
#;:: [[File:Vidoes config.png]]<br />
<br />
===Other Options Explained===<br />
<br />
# '''Allow guest to perform search videos''' - Enable or disable video searching for guest visitors.<br />
# '''Enable profile videos''' - Allow users to select a video for their Profile Page.<br />
# '''Enable videos upload''' - Enable or disable the videos uploading feature in JomSocial.<br />
# '''Video creation limit''' - Set a limit for the number of videos created per user. 0 for unlimited.<br />
# '''Show Video Map''' - Show/Hide video map by default.<br />
# '''Delete original videos''' - If enabled, the original videos are deleted once the videos are converted to the appropriate formats.<br />
# '''Videos root folder''' - Set the path to where videos are stored.<br />
# '''Maximum upload size''' - Set the maximum uploaded video size allowed in Megabytes (MB).<br />
# '''Path to FFMPEG''' - Set the absolute path to FFMPEG binary. If the binary is not found, JomSocial will not be able to convert videos into .flv formats.<br />
# '''FLVTool2 Path''' - Set the absolute path to FLVTool2 binary to enable flash video metadata injections.<br />
# '''Video Quantizer Scale''' - Select the video quality from a scale of 1 (Excellent) to 31 (Worst). 5, 9 and 11 are recommended settings.<br />
# '''Videos Size''' - Set the video frame size in width X height format.<br />
# '''Custom Command''' - Specify additional commands for FFMPEG ( Advanced Users ).<br />
# '''Pseudo streaming''' - Allow users to skip to specific section of the video.<br />
# '''Video Debugging''' - Enable or disable video debugging mode.<br />
<br />
===Additional Video options===<br />
<br />
====Template Settings====<br />
<br />
Default JomSocial templates have the option to show the latest videos on Frontpage to public or registered members as well as hiding it completely. <br /><br />
<br />
# Navigate to Components > JomSocial > Templates and open the template that is currently in use.<br />
# Locate the option, '''Show recent videos''' - This option controls the visibility of the '''Recent Videos''' box on the Frontpage.<br />
<br />
====Layout Settings====<br />
<br />
# Navigate back to JomSocial Configuration and find the Frontpage options under '''Layout''' pane .<br />
# '''Frontpage Recent Videos''' - Option to determine how many recent videos will be shown in the Latest Videos box on Frontpage.<br />
<br />
{{alert|<strong>Note:</strong> This area only shows videos that are marked with the '''Public''' privacy option.|alert-info}}<br />
<br />
====Anti-Spam Settings====<br />
<br />
Under the '''Anti Spam''' pane in the JomSocial Configuration, you can set how many videos users can link or upload daily.</div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/Plugin_TutorialsPlugin Tutorials2013-03-12T02:31:22Z<p>Patricia Schmidt: Undo revision 1870 by Patricia Schmidt (talk)</p>
<hr />
<div>==Overview==<br />
Plugins allow developers the ability to extend JomSocial and provide new functionality or feature that is not already available in the core or to use the features that are available and extend them even more. A JomSocial plugin is essentially a normal Joomla plugin that can be installed, uninstalled, and managed just like every other Joomla plugin. JomSocial provides plenty of [[API Events|system hooks]] or trigger points which your plugin will use to add new functionality.<br/><br />
You can create any type of plugin, but the most common types are:<br />
* '''System Plugin'''<br />
* '''User Plugin<br />
* '''Community Plugin'''<br />
<br />
===Tutorials===<br />
If you already know how to [http://docs.joomla.org/Plugin_Development create Joomla Plugins] then creating a JomSocial plugin would be rather easy task. <br/><br />
At very least, you will need the following four (4) files:<br />
# '''example.php''' - Main Plugin File.<br />
# '''example.xml''' - Plugin XML File.<br />
# '''en-GB.plg_type_example.ini''' - Main Language File.<br />
# '''en-GB.plg_type_example.sys.ini''' - System Language File.<br />
<br />
===System Plugin===<br />
<br />
System plugin allows you to perform various system-wide tasks. In this tutorial, we are going to create a custom system plugin that will be triggered after [http://docs.joomla.org/Plugin/Events/System#onAfterRoute onAfterRoute Joomla system event]. In your main PHP file, you will need to<br />
# Include a JomSocial core file.<br />
# Declare a class with plgSystem[Plugin name] format. This class should extend the JPlugin class.<br />
<br />
====example.php====<br />
<syntaxhighlight lang="php"><br />
defined('_JEXEC') or die('Restricted access');<br />
if (! class_exists ( 'plgSystemExample' )) {<br />
class plgSystemExample extends JPlugin {<br />
/**<br />
* Method construct<br />
*/ <br />
function plgSystemExample($subject, $config) {<br />
parent::__construct($subject, $config);<br />
JPlugin::loadLanguage ( 'plg_system_example', JPATH_ADMINISTRATOR ); // only use if theres any language file<br />
include_once( JPATH_ROOT .'/components/com_community/libraries/core.php' ); // loading the core library now<br />
}<br />
<br />
/**<br />
* This event is triggered after the framework has loaded and the application initialise method has been called.<br />
*/<br />
public function onAfterRoute() {<br />
<br />
// Do something here :)<br />
<br />
}<br />
}<br />
}<br />
</syntaxhighlight><br />
<br /><br />
<br />
====example.xml====<br />
<syntaxhighlight lang="xml"><br />
<?xml version="1.0" encoding="utf-8"?><br />
<extension version="2.5" type="plugin" group="system" method="upgrade"><br />
<name>System - Example</name><br />
<author>Author Name</author><br />
<creationDate>February 2013</creationDate><br />
<copyright>Copyright 2013 - Your Company</copyright><br />
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license><br />
<authorEmail>author@email.com</authorEmail><br />
<authorUrl>http://www.site.name</authorUrl><br />
<version>x.y.z</version><br />
<br />
<description>PLG_EXAMPLE_DESCRIPTION</description><br />
<languages><br />
<language tag="en-GB">en-GB.plg_system_example.ini</language><br />
<language tag="en-GB">en-GB.plg_system_example.sys.ini</language><br />
</languages><br />
<files><br />
<file plugin="example">example.php</file><br />
</files><br />
</extension><br />
</syntaxhighlight><br />
<br /><br />
<br />
====en-GB.plg_system_example.ini====<br />
<syntaxhighlight lang="php"><br />
PLG_EXAMPLE_TITLE="Title of our plugin"<br />
</syntaxhighlight><br />
<br /><br />
<br />
====en-GB.plg_system_example.sys.ini====<br />
<syntaxhighlight lang="php"><br />
PLG_EXAMPLE_DESCRIPTION="Description of our plugin"<br />
</syntaxhighlight><br />
<br /><br />
<br />
==User Plugin==<br />
In this turtorial, we will create the user plugin that will utilize the Joomla [http://docs.joomla.org/Plugin/Events/User#onUserAfterSave onUserAfterSave] hook to make an action in the activity stream after a new user is created. As with the system plugin, you will need a minimum of four (4) files, and follow the same structure. As before, in your main php file you will need to:<br />
# Include the JomSocial core file.<br />
# Declare a class with plgUser[Plugin name] format. This class should extend the JPlugin class.<br />
<br />
====example.php====<br />
<syntaxhighlight lang="php"><br />
defined('_JEXEC') or die('Restricted access');<br />
jimport('joomla.plugin.plugin');<br />
<br />
class plgUserExample extends JPlugin {<br />
<br />
public function plgUserExample(& $subject, $config) {<br />
parent::__construct($subject, $config);<br />
}<br />
<br />
public function onUserAfterSave($user, $isnew, $success, $msg) {<br />
if ($isnew) {<br />
$this->addStream($user['id']);<br />
}<br />
}<br />
<br />
private function addStream($userid) {<br />
$lang = & JFactory::getLanguage();<br />
$lang->load('plg_user_example', JPATH_ADMINISTRATOR);<br />
<br />
require_once JPATH_ROOT .'/components/com_community/libraries/core.php';<br />
CFactory::load('libraries', 'activities');<br />
$my = & CFactory::getUser($userid);<br />
<br />
$act = new stdClass();<br />
$act->cmd = 'members.register';<br />
$act->actor = $my->id;<br />
$act->target = 0;<br />
$act->title = JText::_($this->params->get('activitymessage', 'PLG_EXAMPLE_NEW_USER_REGISTERED'));<br />
$act->content = '';<br />
$act->app = 'profile';<br />
$act->cid = 0;<br />
$act->params = '';<br />
<br />
CActivityStream::add($act);<br />
}<br />
<br />
}<br />
</syntaxhighlight><br />
<br /><br />
<br />
====example.xml====<br />
<syntaxhighlight lang="xml"><br />
<?xml version="1.0" encoding="utf-8"?><br />
<extension version="2.5" type="plugin" group="user" method="upgrade"><br />
<name>User - Example</name><br />
<author>Author Name</author><br />
<creationDate>Jan 2013</creationDate><br />
<copyright>Copyright 2013 - Your Company</copyright><br />
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license><br />
<authorEmail>author@email.com</authorEmail><br />
<authorUrl>http://www.site.name</authorUrl><br />
<version>x.y.z</version><br />
<br />
<description>PLG_EXAMPLE_DESCRIPTION</description><br />
<files><br />
<filename plugin="example">example.php</filename><br />
</files><br />
<br />
<languages><br />
<language tag="en-GB">en-GB.plg_user_example.ini</language><br />
<language tag="en-GB">en-GB.plg_user_example.sys.ini</language><br />
</languages><br />
<br />
<config><br />
<fields name="params"><br />
<fieldset name="basic"><br />
<field name="activitymessage" type="text" rows="3" cols="50" default="PLG_EXAMPLE_NEW_USER_REGISTERED" label="Activity message" description="Enter the message that you want to appear in the activity" /><br />
</fieldset><br />
</fields><br />
</config><br />
<br />
</extension><br />
</syntaxhighlight><br />
<br /><br />
<br />
====en-GB.plg_user_example.ini====<br />
<syntaxhighlight lang="php"><br />
PLG_EXAMPLE_TITLE="Name of our plugin"<br />
PLG_EXAMPLE_NEW_USER_REGISTERED = "became new member of site"<br />
</syntaxhighlight><br />
<br /><br />
<br />
====en-GB.plg_user_example.sys.ini====<br />
<syntaxhighlight lang="php"><br />
PLG_EXAMPLE_DESCRIPTION="Description of our plugin"<br />
</syntaxhighlight><br />
<br /><br />
<br />
===Sample Plugin===<br />
This plugin is freely available in [http://www.jomsocial.com/forum/extra-addons/2308-new-user-registration#12313 our forums]. Please note that you will need a valid subscription to see the forums and that the plugin code might differ.<br />
<br />
==Community Plugin==<br />
The Community, or Profile, plugin, also known as an application, is the most widely used type of plugin in JomSocial. When you create a '''Community plugin''', individual site members will be able to select your plugin to be displayed on their profile page. Your plugin will be able to pull information from the user profile page and will have access to user various parameters. Please note that in the XML file of the Community plugin, you must add some additional elements.<br />
# '''isapplication''' - If set to true, the application can be selected by user from the front-end.<br />
# '''Field coreapp''' - Within the fields section, please add a field named '''coreapp'''. This allows the Admin to force this application to appear on all user profiles.<br />
# '''Field position''' - Within the fields section, please add a field named '''position'''. This will allow Admin to select the default position if the plugin is set as a core.<br />
As with the system plugin, it will need a minimum of four (4) files for the community plugin to work; however, we recommend that you to create another folder named exactly the same as the plugin. In this folder, we will store the plugin favicon, thumbnail, and eventually the '''config.xml''' file which will be used for the Frontend configuration of plugin options, as explained later through these tutorials.<br/><br />
As before, in your main PHP file, you will need to:<br />
# Include JomSocial core file.<br />
# Declare a class with the format, plgCommunity[Plugin name]. Unlike the System and User plugins, this class should now extend CApplications class. <br />
<br />
====example.php====<br />
<syntaxhighlight lang="php"><br />
defined('_JEXEC') or die('Restricted access');<br />
require_once JPATH_ROOT .'/components/com_community/libraries/core.php';<br />
<br />
class plgCommunityExample extends CApplications<br />
{<br />
var $name = "Example";<br />
var $_name = 'example';<br />
<br />
function plgCommunityExample(& $subject, $config)<br />
{<br />
parent::__construct($subject, $config);<br />
}<br />
<br />
function onProfileDisplay()<br />
{<br />
ob_start();<br />
<br />
echo 'Hello World'; <br />
<br />
$content = ob_get_contents();<br />
ob_end_clean();<br />
<br />
return $content;<br />
}<br />
}<br />
</syntaxhighlight><br />
<br /><br />
<br />
====example.xml====<br />
<syntaxhighlight lang="xml"><br />
<?xml version="1.0" encoding="utf-8"?><br />
<extension version="2.5" type="plugin" group="community" method="upgrade"><br />
<name>Community - Example</name><br />
<author>Author Name</author><br />
<creationDate>Febraury 2013</creationDate><br />
<copyright>Copyright 2013 - Your Company</copyright><br />
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license><br />
<authorEmail>author@email.com</authorEmail><br />
<authorUrl>http://www.site.name</authorUrl><br />
<version>x.y.z</version><br />
<isapplication>true</isapplication><br />
<br />
<description>PLG_EXAMPLE_DESCRIPTION</description><br />
<br />
<languages><br />
<language tag="en-GB">en-GB.plg_community_example.ini</language><br />
<language tag="en-GB">en-GB.plg_community_example.sys.ini</language><br />
</languages><br />
<br />
<files><br />
<file plugin="example">example.php</file><br />
<folder>example</folder><br />
</files><br />
<br />
<config><br />
<fields name="params"><br />
<fieldset name="basic"><br />
<field name="coreapp" type="list" default="0" label="Core Application" description="Causes this application to not appearin the users applications list but it will allow this application to appear in the user profile automatically if selected."><br />
<option value="0">No</option><br />
<option value="1">Yes</option><br />
</field><br />
<field name="position" type="list" default="content" label="Avalaible Positions" description="Select one or more available positions from the list. You can use Ctrl-click to select more than one item."><br />
<option value="content">Content</option><br />
<option value="sidebar-top">Sidebar Top</option><br />
<option value="sidebar-bottom">Sidebar Bottom</option><br />
</field><br />
</fieldset><br />
</fields><br />
</config><br />
</extension><br />
</syntaxhighlight><br />
<br /><br />
<br />
====en-GB.plg_community_example.ini====<br />
<syntaxhighlight lang="php"><br />
PLG_EXAMPLE_TITLE="Name of our plugin"<br />
</syntaxhighlight><br />
<br /><br />
<br />
====en-GB.plg_community_example.sys.ini====<br />
<syntaxhighlight lang="php"><br />
PLG_EXAMPLE_DESCRIPTION="Description of the plugin'<br />
</syntaxhighlight><br />
<br /><br />
<br />
==Accessing Configuration Parameters==<br />
There are two (2) types of plugin parameters: the site plugin params and user params.<br />
<br />
===Default System Parameters===<br />
System parameters are settings that are specified by the server administrator. It cannot be changed by the user and the admin can only modify the setting from the Joomla Backend.<br />
The params are loaded automatically and can be accessed directly:<br />
<syntaxhighlight lang="php"><br />
$db_name = $this->params->get('db_name', '');<br />
</syntaxhighlight><br />
<br /><br />
<br />
===User Parameters===<br />
A '''User Parameter''' is params data that is specific to the current user. To define params, first create a file called '''config.xml''' inside the plugin folder.<br />
<syntaxhighlight lang="php"><br />
<?xml version="1.0" encoding="utf-8"?><br />
<extension version="2.5" type="plugin" group="community"><br />
<params><br />
<param name="someparam" type="text" default="5" size="3" label="Some Param" description="Some Param that user can set" /> <br />
</params><br />
</extension><br />
</syntaxhighlight><br />
<br /><br />
'''User-Specific''' parameter - load it by calling:<br />
<syntaxhighlight lang="php"><br />
$this->loadUserParams();<br />
// After loading, userparams object (JParameters) will be available to you<br />
$path = $this->userparams->get('path', '');<br />
</syntaxhighlight><br />
<br /><br />
<br />
==Caching Plugin Content==<br />
JomSocial, by default, does not cache the return values for plugins. If any plugin wants to use any caching system, you can deploy the standard Joomla caching system.<br/><br/><br />
<br />
'''example'''<br />
<syntaxhighlight lang="php"><br />
class plgCommunityExample extends CApplications<br />
{<br />
var $name = "Example";<br />
var $_name = 'example'; <br />
<br />
function onProfileDisplay()<br />
{<br />
$cache =& JFactory::getCache('community');<br />
$callback = array($this, '_getExampleHTML');<br />
<br />
$content = $cache->call($callback);<br />
return $content; <br />
}<br />
<br />
function _getExampleHTML() {<br />
ob_start();<br />
<br />
echo 'Hello World'; <br />
<br />
$content = ob_get_contents();<br />
ob_end_clean();<br />
<br />
return $content;<br />
}<br />
</syntaxhighlight><br />
<br /><br />
<br />
{{alert|<strong>Note:</strong><br />
*Get the cache object with '''community''' community.<br />
*The function that returns the final content should not try to get the '''user''' and '''my''' objects. Caller should instead pass this data to the function.<br />
*Any CSS/JS attachment should be attached outside the cached function.|alert-info}}</div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/ZenCoder_and_Amazon_S3_IntegrationZenCoder and Amazon S3 Integration2013-03-12T02:30:24Z<p>Patricia Schmidt: Undo revision 1874 by Patricia Schmidt (talk)</p>
<hr />
<div>{{alert|<center><strong>NOTE!!!</strong> This page contains images from sources that are outside of our scope. If they are not same as presented here, please refer to the original source documentation.</center>|alert}}<br />
<br />
===Introduction===<br />
<br />
ZenCoder makes it easy for a community that has no FFMPEG access on its server to upload and convert videos using a Third-Party video conversion service. Recently, there are some updates on Amazon's AWS service that would require you to setup a special "bucket policy" to allow an external service to add and retrieve files.<br />
<br />
After inputting ZenCoder credentials in JomSocial Configuration, you will need to configure Amazon S3 to allow file uploading and downloading from the S3 Bucket.<br />
<br />
===Setting It Up===<br />
<br />
# To get started, please login to the [http://aws.amazon.com/console/ Amazon AWS Console]:<br />
#;:: [[File:Amazon5.jpg]]<br />
# Once you have logged in, please select the '''correct bucket''' that you will use for ZenCoder video files:<br />
#;:: [[File:Amazon1.jpg]]<br />
# Then click '''Properties''':<br />
#;:: [[File:Amazon2.jpg]]<br />
# A bar will appear at the bottom; click '''Add bucket policy''':<br />
#;:: [[File:Amazon3.jpg]]<br />
# In the popup window, '''Copy and Paste this Policy''':<br />
<br />
<syntaxhighlight lang="php"><br />
{<br />
"Id": "ZencoderBucketPolicy",<br />
"Statement": [<br />
{<br />
"Sid": "Stmt1295042087538",<br />
"Effect": "Allow",<br />
"Principal": {<br />
"AWS": "arn:aws:iam::395540211253:root"<br />
},<br />
"Action": ["s3:PutObject", "s3:GetObject", "s3:PutObjectAcl", "s3:GetBucketLocation", "s3:ListBucketMultipartUploads", "s3:ListMultipartUploadParts"],<br />
"Resource": "arn:aws:s3:::MY-BUCKET/*"<br />
}<br />
]<br />
}<br />
</syntaxhighlight><br />
<br/><br/><br />
::: [[File:Amazon4.jpg]]<br/><br/><br />
<br />
You are '''''almost''''' ready, but '''first''', you will need to change the '''MY-BUCKET''' text in the above code.<br/><br />
<br />
# Replace 'MY-BUCKET' with your own bucket name.<br />
# Do not delete the /* that appears after the bucket name. This is important to ensure that all files within the bucket will have the preconfigured access privilege.<br />
<br />
<font color=cornflowerblue>Save and you are now ready to go!</font><br />
<br />
[https://app.zencoder.com/docs/guides/getting-started/working-with-s3 Reference]</div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/ZenCoder_and_Amazon_S3_IntegrationZenCoder and Amazon S3 Integration2013-03-12T02:29:33Z<p>Patricia Schmidt: Undo revision 1872 by Patricia Schmidt (talk)</p>
<hr />
<div>{{alert|<center><strong>NOTE!!!</strong> This page contains images from sorces that are beyond our reach. If they are not same as presented here, please refer to the original source documentation </center>|alert}}<br />
==Introduction==<br />
ZenCoder makes it easy for communities that have no FFMPEG access on their server to upload and convert videos using a third party video conversion service. Recently there are some updates on Amazon AWS service that would require you to setup special 'bucket policy' to allow external service to add and retrieve files.<br />
<br />
Upon setting up ZenCoder credentials in JomSocial Configuration, you will need to configure Amazon S3 to allow file upload and download from the S3 Bucket.<br />
<br />
===Setting it up===<br />
To get started, please login to the [http://aws.amazon.com/console/ Amazon AWS Console].<br />
<br />
[[File:Amazon5.jpg]]<br />
<br />
Once you have logged in, please select the correct bucket that you will use for ZenCoder video files.<br />
<br />
[[File:Amazon1.jpg]]<br />
<br />
Then click on Properties.<br />
<br />
[[File:Amazon2.jpg]]<br />
<br />
A bar will appear at the bottom, and then proceed to 'Add bucket policy'.<br />
<br />
[[File:Amazon3.jpg]]<br />
<br />
In the popup, Copy and Paste this Policy:<br />
<syntaxhighlight lang="php"><br />
{<br />
"Id": "ZencoderBucketPolicy",<br />
"Statement": [<br />
{<br />
"Sid": "Stmt1295042087538",<br />
"Effect": "Allow",<br />
"Principal": {<br />
"AWS": "arn:aws:iam::395540211253:root"<br />
},<br />
"Action": ["s3:PutObject", "s3:GetObject", "s3:PutObjectAcl", "s3:GetBucketLocation", "s3:ListBucketMultipartUploads", "s3:ListMultipartUploadParts"],<br />
"Resource": "arn:aws:s3:::MY-BUCKET/*"<br />
}<br />
]<br />
}<br />
</syntaxhighlight><br />
<br /><br />
[[File:Amazon4.jpg]]<br />
<br />
You are almost ready. '''But before that, you will need to change the 'MY-BUCKET' text in the above code'''<br />
<br />
Replace 'MY-BUCKET' with your own bucket name. Do not delete /* that appear after the bucket name. This is important to ensure all files within the bucket will have the preconfigured access privilege.<br />
<br />
Save and you are now ready to go!<br />
<br />
[https://app.zencoder.com/docs/guides/getting-started/working-with-s3 Reference]</div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/OnGroupJoinApprovedOnGroupJoinApproved2013-03-12T02:29:09Z<p>Patricia Schmidt: Undo revision 1867 by Patricia Schmidt (talk)</p>
<hr />
<div>===Description===<br />
This event is triggered when the group's admin approves a join request by a user.<br />
<br />
@since 1.1<br />
<br />
===Params===<br />
<br />
*'''Group''' - group object that is passed by reference, consist of the following data :<br />
<br />
#id, the id of the group<br />
#ownerid, the user id of the group owner<br />
#categoryid, the category type id.<br />
#name, name of the group.<br />
#description, the group description.<br />
#email, the group's email.<br />
#website, the group's website.<br />
#created, date when the group is created.<br />
#approvals, show whether the groups require approval or not when a user join (0 = no need aproval, 1 = requires approval).<br />
#avatar, the group's avatar location.<br />
#thumb, the group's thumbnail avatar location.<br />
#published, the publish status of the group (0 = unpublished, 1 = published).<br />
<br />
<syntaxhighlight lang="php"><br />
stdClass Object<br />
(<br />
[id] => 51<br />
[ownerid] => 66<br />
[categoryid] => 1<br />
[name] => test<br />
[description] => testing group<br />
[email] => test@test.com<br />
[website] => www.test.com<br />
[created] => 2009-02-10 04:14:11<br />
[approvals] => 0<br />
[avatar] => components/com_community/assets/group.jpg<br />
[thumb] => components/com_community/assets/group_thumb.jpg<br />
[published] => 1<br />
)<br />
</syntaxhighlight><br />
<br /><br />
*'''Member Id''' - int, User ID of the user approved by the group's admin.<br />
<br />
===Example===<br />
<syntaxhighlight lang="php"><br />
function onGroupJoinApproved( &$group, $memberid ) <br />
{<br />
/*<br />
perform your triggered action here.<br />
*/<br />
}<br />
</syntaxhighlight><br />
<br /></div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/ZenCoder_and_Amazon_S3_IntegrationZenCoder and Amazon S3 Integration2013-03-12T02:28:20Z<p>Patricia Schmidt: Undo revision 1871 by Patricia Schmidt (talk)</p>
<hr />
<div>{{alert|<center><strong>NOTE!!!</strong> This page contains images from sources that are outside of our scope. If they are not same as presented here, please refer to the original source documentation.</center>|alert}}<br />
<br />
===Introduction===<br />
<br />
ZenCoder makes it easy for a community that has no FFMPEG access on its server to upload and convert videos using a Third-Party video conversion service. Recently, there are some updates on Amazon's AWS service that would require you to setup a special "bucket policy" to allow an external service to add and retrieve files.<br />
<br />
After inputting ZenCoder credentials in JomSocial Configuration, you will need to configure Amazon S3 to allow file uploading and downloading from the S3 Bucket.<br />
<br />
===Setting It Up===<br />
<br />
# To get started, please login to the [http://aws.amazon.com/console/ Amazon AWS Console]:<br />
#;:: [[File:Amazon5.jpg]]<br />
# Once you have logged in, please select the '''correct bucket''' that you will use for ZenCoder video files:<br />
#;:: [[File:Amazon1.jpg]]<br />
# Then click '''Properties''':<br />
#;:: [[File:Amazon2.jpg]]<br />
# A bar will appear at the bottom; click '''Add bucket policy''':<br />
#;:: [[File:Amazon3.jpg]]<br />
# In the popup window, '''Copy and Paste this Policy''':<br />
<br />
<syntaxhighlight lang="php"><br />
{<br />
"Id": "ZencoderBucketPolicy",<br />
"Statement": [<br />
{<br />
"Sid": "Stmt1295042087538",<br />
"Effect": "Allow",<br />
"Principal": {<br />
"AWS": "arn:aws:iam::395540211253:root"<br />
},<br />
"Action": ["s3:PutObject", "s3:GetObject", "s3:PutObjectAcl", "s3:GetBucketLocation", "s3:ListBucketMultipartUploads", "s3:ListMultipartUploadParts"],<br />
"Resource": "arn:aws:s3:::MY-BUCKET/*"<br />
}<br />
]<br />
}<br />
</syntaxhighlight><br />
<br/><br/><br />
::: [[File:Amazon4.jpg]]<br/><br/><br />
<br />
You are '''''almost''''' ready, but '''first''', you will need to change the '''MY-BUCKET''' text in the above code.<br/><br />
<br />
# Replace 'MY-BUCKET' with your own bucket name.<br />
# Do not delete the /* that appears after the bucket name. This is important to ensure that all files within the bucket will have the preconfigured access privilege.<br />
<br />
<font color=cornflowerblue>Save and you are now ready to go!</font><br />
<br />
[https://app.zencoder.com/docs/guides/getting-started/working-with-s3 Reference]</div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/ZenCoder_and_Amazon_S3_IntegrationZenCoder and Amazon S3 Integration2013-03-12T02:06:19Z<p>Patricia Schmidt: Reverted edits by Patricia Schmidt (talk) to last revision by Sinisakrisan</p>
<hr />
<div>{{alert|<center><strong>NOTE!!!</strong> This page contains images from sorces that are beyond our reach. If they are not same as presented here, please refer to the original source documentation </center>|alert}}<br />
==Introduction==<br />
ZenCoder makes it easy for communities that have no FFMPEG access on their server to upload and convert videos using a third party video conversion service. Recently there are some updates on Amazon AWS service that would require you to setup special 'bucket policy' to allow external service to add and retrieve files.<br />
<br />
Upon setting up ZenCoder credentials in JomSocial Configuration, you will need to configure Amazon S3 to allow file upload and download from the S3 Bucket.<br />
<br />
===Setting it up===<br />
To get started, please login to the [http://aws.amazon.com/console/ Amazon AWS Console].<br />
<br />
[[File:Amazon5.jpg]]<br />
<br />
Once you have logged in, please select the correct bucket that you will use for ZenCoder video files.<br />
<br />
[[File:Amazon1.jpg]]<br />
<br />
Then click on Properties.<br />
<br />
[[File:Amazon2.jpg]]<br />
<br />
A bar will appear at the bottom, and then proceed to 'Add bucket policy'.<br />
<br />
[[File:Amazon3.jpg]]<br />
<br />
In the popup, Copy and Paste this Policy:<br />
<syntaxhighlight lang="php"><br />
{<br />
"Id": "ZencoderBucketPolicy",<br />
"Statement": [<br />
{<br />
"Sid": "Stmt1295042087538",<br />
"Effect": "Allow",<br />
"Principal": {<br />
"AWS": "arn:aws:iam::395540211253:root"<br />
},<br />
"Action": ["s3:PutObject", "s3:GetObject", "s3:PutObjectAcl", "s3:GetBucketLocation", "s3:ListBucketMultipartUploads", "s3:ListMultipartUploadParts"],<br />
"Resource": "arn:aws:s3:::MY-BUCKET/*"<br />
}<br />
]<br />
}<br />
</syntaxhighlight><br />
<br /><br />
[[File:Amazon4.jpg]]<br />
<br />
You are almost ready. '''But before that, you will need to change the 'MY-BUCKET' text in the above code'''<br />
<br />
Replace 'MY-BUCKET' with your own bucket name. Do not delete /* that appear after the bucket name. This is important to ensure all files within the bucket will have the preconfigured access privilege.<br />
<br />
Save and you are now ready to go!<br />
<br />
[https://app.zencoder.com/docs/guides/getting-started/working-with-s3 Reference]</div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/Plugin_TutorialsPlugin Tutorials2013-03-12T02:02:48Z<p>Patricia Schmidt: Reverted edits by Patricia Schmidt (talk) to last revision by Sinisakrisan</p>
<hr />
<div>==Overview==<br />
Plugins allow developers to extend JomSocial and provide new functionality or feature that is not already available in the core, or use the features that are available, to extend them even more.. A plugin is essentially a normal Joomla! plugin that can be installed, uninstalled and managed just like every other Joomla! plugin. JomSocial provide plenty of [[API Events|system hooks]], or trigger point which your plugin will use to add new functionality.<br/><br />
You can create any type of plugin but most common types are:<br />
* '''System plugin'''<br />
* '''User Plugin<br />
* '''Community Plugin'''<br />
<br />
==Tutorials==<br />
If you already know how to [http://docs.joomla.org/Plugin_Development create Joomla Plugins], creating JomSocial plugin would be rather easy task. <br/><br />
At very least, you will need 4 files<br />
# '''example.php''' - the main plugin file<br />
# '''example.xml''' - the plugin xml file<br />
# '''en-GB.plg_type_example.ini''' - main language file<br />
# '''en-GB.plg_type_example.sys.ini''' - system language file<br />
<br />
==System Plugin==<br />
System plugin allows you to perform various system wide task.<br/><br />
In this tutorial, we are going to create a custom system plugin that will be triggered after [http://docs.joomla.org/Plugin/Events/System#onAfterRoute onAfterRoute Joomla system event] <br/><br />
In your main php file, you will need to<br />
* include JomSocial core file<br />
* declare a class with plgSystem[Plugin name] format. This class should extends JPlugin class.<br />
<br />
====example.php====<br />
<syntaxhighlight lang="php"><br />
defined('_JEXEC') or die('Restricted access');<br />
if (! class_exists ( 'plgSystemExample' )) {<br />
class plgSystemExample extends JPlugin {<br />
/**<br />
* Method construct<br />
*/ <br />
function plgSystemExample($subject, $config) {<br />
parent::__construct($subject, $config);<br />
JPlugin::loadLanguage ( 'plg_system_example', JPATH_ADMINISTRATOR ); // only use if theres any language file<br />
include_once( JPATH_ROOT .'/components/com_community/libraries/core.php' ); // loading the core library now<br />
}<br />
<br />
/**<br />
* This event is triggered after the framework has loaded and the application initialise method has been called.<br />
*/<br />
public function onAfterRoute() {<br />
<br />
// Do something here :)<br />
<br />
}<br />
}<br />
}<br />
</syntaxhighlight><br />
<br /><br />
<br />
====example.xml====<br />
<syntaxhighlight lang="xml"><br />
<?xml version="1.0" encoding="utf-8"?><br />
<extension version="2.5" type="plugin" group="system" method="upgrade"><br />
<name>System - Example</name><br />
<author>Author Name</author><br />
<creationDate>February 2013</creationDate><br />
<copyright>Copyright 2013 - Your Company</copyright><br />
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license><br />
<authorEmail>author@email.com</authorEmail><br />
<authorUrl>http://www.site.name</authorUrl><br />
<version>x.y.z</version><br />
<br />
<description>PLG_EXAMPLE_DESCRIPTION</description><br />
<languages><br />
<language tag="en-GB">en-GB.plg_system_example.ini</language><br />
<language tag="en-GB">en-GB.plg_system_example.sys.ini</language><br />
</languages><br />
<files><br />
<file plugin="example">example.php</file><br />
</files><br />
</extension><br />
</syntaxhighlight><br />
<br /><br />
<br />
====en-GB.plg_system_example.ini====<br />
<syntaxhighlight lang="php"><br />
PLG_EXAMPLE_TITLE="Title of our plugin"<br />
</syntaxhighlight><br />
<br /><br />
<br />
====en-GB.plg_system_example.sys.ini====<br />
<syntaxhighlight lang="php"><br />
PLG_EXAMPLE_DESCRIPTION="Description of our plugin"<br />
</syntaxhighlight><br />
<br /><br />
<br />
==User plugin==<br />
In this turtorial, we will create the user plugin that will utilize the Joomla [http://docs.joomla.org/Plugin/Events/User#onUserAfterSave onUserAfterSave] hook to make an action in activity stream after new user is created. As with system plugin, we will need minimum 4 files, so we follow the same structure<br/><br />
As usual in your main php file, you will need to<br />
* include JomSocial core file<br />
* declare a class with plgUser[Plugin name] format. This class should extends JPlugin class.<br />
<br />
====example.php====<br />
<syntaxhighlight lang="php"><br />
defined('_JEXEC') or die('Restricted access');<br />
jimport('joomla.plugin.plugin');<br />
<br />
class plgUserExample extends JPlugin {<br />
<br />
public function plgUserExample(& $subject, $config) {<br />
parent::__construct($subject, $config);<br />
}<br />
<br />
public function onUserAfterSave($user, $isnew, $success, $msg) {<br />
if ($isnew) {<br />
$this->addStream($user['id']);<br />
}<br />
}<br />
<br />
private function addStream($userid) {<br />
$lang = & JFactory::getLanguage();<br />
$lang->load('plg_user_example', JPATH_ADMINISTRATOR);<br />
<br />
require_once JPATH_ROOT .'/components/com_community/libraries/core.php';<br />
CFactory::load('libraries', 'activities');<br />
$my = & CFactory::getUser($userid);<br />
<br />
$act = new stdClass();<br />
$act->cmd = 'members.register';<br />
$act->actor = $my->id;<br />
$act->target = 0;<br />
$act->title = JText::_($this->params->get('activitymessage', 'PLG_EXAMPLE_NEW_USER_REGISTERED'));<br />
$act->content = '';<br />
$act->app = 'profile';<br />
$act->cid = 0;<br />
$act->params = '';<br />
<br />
CActivityStream::add($act);<br />
}<br />
<br />
}<br />
</syntaxhighlight><br />
<br /><br />
<br />
====example.xml====<br />
<syntaxhighlight lang="xml"><br />
<?xml version="1.0" encoding="utf-8"?><br />
<extension version="2.5" type="plugin" group="user" method="upgrade"><br />
<name>User - Example</name><br />
<author>Author Name</author><br />
<creationDate>Jan 2013</creationDate><br />
<copyright>Copyright 2013 - Your Company</copyright><br />
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license><br />
<authorEmail>author@email.com</authorEmail><br />
<authorUrl>http://www.site.name</authorUrl><br />
<version>x.y.z</version><br />
<br />
<description>PLG_EXAMPLE_DESCRIPTION</description><br />
<files><br />
<filename plugin="example">example.php</filename><br />
</files><br />
<br />
<languages><br />
<language tag="en-GB">en-GB.plg_user_example.ini</language><br />
<language tag="en-GB">en-GB.plg_user_example.sys.ini</language><br />
</languages><br />
<br />
<config><br />
<fields name="params"><br />
<fieldset name="basic"><br />
<field name="activitymessage" type="text" rows="3" cols="50" default="PLG_EXAMPLE_NEW_USER_REGISTERED" label="Activity message" description="Enter the message that you want to appear in the activity" /><br />
</fieldset><br />
</fields><br />
</config><br />
<br />
</extension><br />
</syntaxhighlight><br />
<br /><br />
<br />
====en-GB.plg_user_example.ini====<br />
<syntaxhighlight lang="php"><br />
PLG_EXAMPLE_TITLE="Name of our plugin"<br />
PLG_EXAMPLE_NEW_USER_REGISTERED = "became new member of site"<br />
</syntaxhighlight><br />
<br /><br />
<br />
====en-GB.plg_user_example.sys.ini====<br />
<syntaxhighlight lang="php"><br />
PLG_EXAMPLE_DESCRIPTION="Description of our plugin"<br />
</syntaxhighlight><br />
<br /><br />
<br />
=====Plugin Sample=====<br />
This plugin is freely available at [http://www.jomsocial.com/forum/extra-addons/2308-new-user-registration#12313 our forums]. Please note that you will need a valid subscription to see the forums, and that plugin code might differ.<br />
<br />
==Community Plugin==<br />
Community, or profile plugin, also known as application, is most widely used type of plugin in JomSocial. When you create a Community plugin, a site members will be able to select your plugin to be displayed in their profile page. Your plugin will be able to draw on user profile page and will have access to user various parameters. <br/><br />
Please take note that in .xml file of Community plugin, you must add somel additional elements<br />
* '''isapplication''' - If set to true, the application can be selected by user from the front-end<br />
* '''Field coreapp''' - Within the fields section, please add a field named '''coreapp'''. This allow admin to force this application to appear on all user profile.<br />
* '''Field position''' - Within the fields section, please add a field named '''position'''. This will allow admin to select the default position if plugin is set as core.<br />
As with system plugin, we will need minimum 4 files and community plugin will work just fine, however, we recommend you to create another folder named exactly as plugin. In this folder, we will store the plugin favicon, thumbnail and eventually the '''config.xml''' file which will be used for Front End configuration of plugin options, and explained later through this tutorials.<br/><br />
As usual in your main php file, you will need to<br />
* include JomSocial core file<br />
* declare a class with plgCommunity[Plugin name] format. Unlike System and User plugin, this class should now extend CApplications class. <br />
<br />
====example.php====<br />
<syntaxhighlight lang="php"><br />
defined('_JEXEC') or die('Restricted access');<br />
require_once JPATH_ROOT .'/components/com_community/libraries/core.php';<br />
<br />
class plgCommunityExample extends CApplications<br />
{<br />
var $name = "Example";<br />
var $_name = 'example';<br />
<br />
function plgCommunityExample(& $subject, $config)<br />
{<br />
parent::__construct($subject, $config);<br />
}<br />
<br />
function onProfileDisplay()<br />
{<br />
ob_start();<br />
<br />
echo 'Hello World'; <br />
<br />
$content = ob_get_contents();<br />
ob_end_clean();<br />
<br />
return $content;<br />
}<br />
}<br />
</syntaxhighlight><br />
<br /><br />
<br />
====example.xml====<br />
<syntaxhighlight lang="xml"><br />
<?xml version="1.0" encoding="utf-8"?><br />
<extension version="2.5" type="plugin" group="community" method="upgrade"><br />
<name>Community - Example</name><br />
<author>Author Name</author><br />
<creationDate>Febraury 2013</creationDate><br />
<copyright>Copyright 2013 - Your Company</copyright><br />
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license><br />
<authorEmail>author@email.com</authorEmail><br />
<authorUrl>http://www.site.name</authorUrl><br />
<version>x.y.z</version><br />
<isapplication>true</isapplication><br />
<br />
<description>PLG_EXAMPLE_DESCRIPTION</description><br />
<br />
<languages><br />
<language tag="en-GB">en-GB.plg_community_example.ini</language><br />
<language tag="en-GB">en-GB.plg_community_example.sys.ini</language><br />
</languages><br />
<br />
<files><br />
<file plugin="example">example.php</file><br />
<folder>example</folder><br />
</files><br />
<br />
<config><br />
<fields name="params"><br />
<fieldset name="basic"><br />
<field name="coreapp" type="list" default="0" label="Core Application" description="Causes this application to not appearin the users applications list but it will allow this application to appear in the user profile automatically if selected."><br />
<option value="0">No</option><br />
<option value="1">Yes</option><br />
</field><br />
<field name="position" type="list" default="content" label="Avalaible Positions" description="Select one or more available positions from the list. You can use Ctrl-click to select more than one item."><br />
<option value="content">Content</option><br />
<option value="sidebar-top">Sidebar Top</option><br />
<option value="sidebar-bottom">Sidebar Bottom</option><br />
</field><br />
</fieldset><br />
</fields><br />
</config><br />
</extension><br />
</syntaxhighlight><br />
<br /><br />
<br />
====en-GB.plg_community_example.ini====<br />
<syntaxhighlight lang="php"><br />
PLG_EXAMPLE_TITLE="Name of our plugin"<br />
</syntaxhighlight><br />
<br /><br />
<br />
====en-GB.plg_community_example.sys.ini====<br />
<syntaxhighlight lang="php"><br />
PLG_EXAMPLE_DESCRIPTION="Description of the plugin'<br />
</syntaxhighlight><br />
<br /><br />
<br />
==Accessing Configuration Parameters==<br />
There are 2 types of plugin parameters, the site plugin params and user params<br />
<br />
=====Default system parameters=====<br />
System parameters are setting that are specified by the server administrator. It cannot be changed by the user and admin can only modify the setting from Joomla backend.<br />
This params is loaded automatically and can be accessed right away.<br />
<syntaxhighlight lang="php"><br />
$db_name = $this->params->get('db_name', '');<br />
</syntaxhighlight><br />
<br /><br />
<br />
=====User parameters=====<br />
A user parameter is params data specific to the current user. To define this params, create a file called '''config.xml''' inside the plugin folder.<br />
<syntaxhighlight lang="php"><br />
<?xml version="1.0" encoding="utf-8"?><br />
<extension version="2.5" type="plugin" group="community"><br />
<params><br />
<param name="someparam" type="text" default="5" size="3" label="Some Param" description="Some Param that user can set" /> <br />
</params><br />
</extension><br />
</syntaxhighlight><br />
<br /><br />
To use any user specific parameter, you will need to load it before you can use it. Just call<br />
<syntaxhighlight lang="php"><br />
$this->loadUserParams();<br />
// After loading, userparams object (JParameters) will be available to you<br />
$path = $this->userparams->get('path', '');<br />
</syntaxhighlight><br />
<br /><br />
<br />
==Caching plugin content==<br />
JomSocial, by default does not cache the return values for plugins. If any plugin want to use any caching system, you can deploy standard Joomla caching system.<br />
<br />
'''example'''<br />
<syntaxhighlight lang="php"><br />
class plgCommunityExample extends CApplications<br />
{<br />
var $name = "Example";<br />
var $_name = 'example'; <br />
<br />
function onProfileDisplay()<br />
{<br />
$cache =& JFactory::getCache('community');<br />
$callback = array($this, '_getExampleHTML');<br />
<br />
$content = $cache->call($callback);<br />
return $content; <br />
}<br />
<br />
function _getExampleHTML() {<br />
ob_start();<br />
<br />
echo 'Hello World'; <br />
<br />
$content = ob_get_contents();<br />
ob_end_clean();<br />
<br />
return $content;<br />
}<br />
</syntaxhighlight><br />
<br /><br />
<br />
=====Note=====<br />
*Get the cache object with 'community' community.<br />
*The function that return the final content should not try to get the 'user' and 'my' object. Caller should instead pass these data to the function.<br />
*Any css/js attachment should be attached outside the cached function.</div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/Setting_Up_Video_GalleriesSetting Up Video Galleries2013-03-12T02:01:25Z<p>Patricia Schmidt: Reverted edits by Patricia Schmidt (talk) to last revision by Sinisakrisan</p>
<hr />
<div>===Goal===<br />
Primary objective of this article is to explain how to enable, and configure video galleries at your site. Please read it completely to understand all available options<br />
<br />
===Accessing the configuration options===<br />
Navigate to site backend, and from Components dropdown menu, select JomSocial->Configuration<br />
<br />
[[File:jsconfigmenu.png]]<br />
<br />
Locate the Photo Gallery settings and make sure that Video galleries are enabled (they are enabled by default)<br />
<br />
[[File:Vidoes config.png]]<br />
<br />
===Other Options Explained===<br />
* '''Allow guest to perform search videos''' - Can guest visitors search videos?.<br />
* '''Enable profile videos''' - Allow users to select a video for their profile page<br />
* '''Enable videos upload''' - Enable or disable the videos uploading feature in JomSocial.<br />
* '''Video creation limit''' - Set a limit to creation of videos per user. 0 for unlimited<br />
* '''Show Video Map''' = Wither to show video map by default<br />
* '''Delete original videos''' - If enabled, original videos are deleted once the videos are converted to the appropriate formats.<br />
* '''Videos root folder''' - Set the path to where videos are stored.<br />
* '''Maximum upload size''' - Set the maximum uploaded video size allowed in Megabytes (MB)<br />
* '''Path to FFMPEG''' - Set the absolute path to FFMPEG binary. If the binary is not found, JomSocial will not be able to convert videos into .flv formats.<br />
* '''FLVTool2 Path''' - Set the absolute path to FLVTool2 binary to enable flash video metadata injections.<br />
* '''Video Quantizer Scale''' - Select the video quality from a scale of 1 (Excellent) to 31 (Worst). 5, 9 and 11 are recommended settings.<br />
* '''Videos Size''' - Set the video frame size in width X height format.<br />
* '''Custom Command''' - Specify additional commands for FFMPEG ( Advanced Users )<br />
* '''Pseudo streaming''' - Allow users to skip to specific section of the video.<br />
* '''Video Debugging''' - Enable or disable video debugging mode<br />
<br />
===Additional Video options===<br />
====In template settings====<br />
Default JomSocial templates have option to show latest videos on frontpage to public or registered members as well as hiding it completely. <br /><br />
Please navigate to Components->JomSocial->Templates and open the template that is currently in use at the site<br /><br />
locate this option <br />
* '''Show recent videos''' - This option control the visibility of recent videos box on frontpage<br />
====In Layout Settings====<br />
Navigate back to JomSocial Configuration and find the Frontpage options under layout Pane <br />
* '''Frontpage Recent Videos''' - is an option which will determine how many recent videos will be shown in the Latest Videos box on frontpage.<br />
<br />
=====Note on Latest Videos box=====<br />
This area only show videos that are marked with '''Public''' privacy option.<br />
<br />
====In Anti Spam settings====<br />
Under '''Anti Spam''' pane in jomSocial configuration, you can set how many videos users can link or upload daily.</div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/RSS_feedsRSS feeds2013-03-12T02:00:30Z<p>Patricia Schmidt: Reverted edits by Patricia Schmidt (talk) to last revision by Sinisakrisan</p>
<hr />
<div>{{alert|<center><strong>NOTE</strong> RSS Feeds have been disabled since JomSocial 2.8.2 till further development</center>|alert}}<br />
Need to view a particular page of your JomSocial site in RSS?<br /><br />
Try adding ?&format=feed to the end of that particular page's URL.<br />
<br />
For example,<br />
<br />
Recent activites rss feed:<br />
<br />
http://[yourjomsocialsite.com]/index.php?option=com_community&view=frontpage?&format=feed<br />
<br />
User's rss feed:<br />
<br />
http://[yourjomsocialsite.com]/index.php?option=com_community&view=profile&userid=<USERID>?&format=feed<br />
<br />
Viewing all photos:<br />
<br />
http://[yourjomsocialsite.com]/index.php?option=com_community&view=photos&task=display?&format=feed</div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/OnGroupJoinApprovedOnGroupJoinApproved2013-03-12T01:58:04Z<p>Patricia Schmidt: Reverted edits by Patricia Schmidt (talk) to last revision by Sinisakrisan</p>
<hr />
<div>===Description===<br />
This event trigger when the group's admin approved a join requested by a user.<br />
<br />
@since 1.1<br />
<br />
===Params===<br />
<br />
*'''Group''' - group object that is passed by reference, consist of the following data :<br />
<br />
#id, the id of the group<br />
#ownerid, the user id of the group owner<br />
#categoryid, the category type id.<br />
#name, name of the group.<br />
#description, the group description.<br />
#email, the group's email.<br />
#website, the group's website.<br />
#created, date when the group is created.<br />
#approvals, show whether the groups require approval or not when a user join (0 = no need aproval, 1 = requires approval).<br />
#avatar, the group's avatar location.<br />
#thumb, the group's thumbnail avatar location.<br />
#published, the publish status of the group (0 = unpublished, 1 = published).<br />
<br />
<syntaxhighlight lang="php"><br />
stdClass Object<br />
(<br />
[id] => 51<br />
[ownerid] => 66<br />
[categoryid] => 1<br />
[name] => test<br />
[description] => testing group<br />
[email] => test@test.com<br />
[website] => www.test.com<br />
[created] => 2009-02-10 04:14:11<br />
[approvals] => 0<br />
[avatar] => components/com_community/assets/group.jpg<br />
[thumb] => components/com_community/assets/group_thumb.jpg<br />
[published] => 1<br />
)<br />
</syntaxhighlight><br />
<br /><br />
*'''Member Id''' - int, User ID of the user approved by the group's admin.<br />
<br />
===Example===<br />
<syntaxhighlight lang="php"><br />
function onGroupJoinApproved( &$group, $memberid ) <br />
{<br />
/*<br />
perform your triggered action here.<br />
*/<br />
}<br />
</syntaxhighlight><br />
<br /></div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/RSS_feedsRSS feeds2013-03-09T07:30:10Z<p>Patricia Schmidt: </p>
<hr />
<div>{{alert|<center><strong>NOTE</strong> RSS Feeds have been disabled since JomSocial 2.8.2 until further development occurs.</center>|alert}}<br />
Need to view a particular page of your JomSocial site in RSS?<br /><br />
Try adding ?&format=feed to the end of that particular page's URL.<br />
<br />
For example,<br />
<br />
Recent activites rss feed:<br />
<br />
http://[yourjomsocialsite.com]/index.php?option=com_community&view=frontpage?&format=feed<br />
<br />
User's rss feed:<br />
<br />
http://[yourjomsocialsite.com]/index.php?option=com_community&view=profile&userid=<USERID>?&format=feed<br />
<br />
Viewing all photos:<br />
<br />
http://[yourjomsocialsite.com]/index.php?option=com_community&view=photos&task=display?&format=feed</div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/OnRegisterValidateOnRegisterValidate2013-03-09T07:29:26Z<p>Patricia Schmidt: /* Description */</p>
<hr />
<div>===Description===<br />
This event is triggered when registration of basic user information such as user name and email is validated.<br />
<br />
@since 1.6<br />
<br />
===Params===<br />
*'''user post data''' - array, consist of form post data<br />
<br />
<syntaxhighlight lang="php"><br />
Array<br />
(<br />
[jsname] => Alen<br />
[jsusername] => alen<br />
[usernamepass] => alen<br />
[jsemail] => alen@hotmail.com<br />
[emailpass] => alen@hotmail.com<br />
[jspassword] => password<br />
[jspassword2] => password<br />
[tnc] => Y<br />
[submit] => Next<br />
[task] => register_save<br />
[id] => 0<br />
[gid] => 0<br />
[authenticate] => 1<br />
[authkey] => 4857d92e85efe6e31ed3ea374a15f683<br />
)<br />
</syntaxhighlight><br />
<br /><br />
<br />
===Example===<br />
<syntaxhighlight lang="php"><br />
function onRegisterValidate($post) <br />
{<br />
$err = array();<br />
<br />
if(empty($post['jsname']))<br />
{<br />
$err[] = JText::_('CC IMPROPER USERNAME');<br />
}<br />
<br />
.<br />
.<br />
. <br />
<br />
return $err;<br />
}<br />
</syntaxhighlight><br />
<br /></div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/OnRegisterProfileValidateOnRegisterProfileValidate2013-03-09T07:28:54Z<p>Patricia Schmidt: /* Description */</p>
<hr />
<div>===Description===<br />
This event is triggered when registration of custom user profile information is validated.<br />
<br />
@since 1.6<br />
<br />
===Params===<br />
*'''profile post data''' - array, consist of form post data<br />
<br />
<syntaxhighlight lang="php"><br />
Array<br />
(<br />
[field2] => Male<br />
[field3] => Array<br />
(<br />
[0] => 11<br />
[1] => 2<br />
[2] => 1979<br />
)<br />
[field4] => Nothing special<br />
[field6] => <br />
[field7] => <br />
[field8] => 123, JLN 88<br />
[field9] => Kepong<br />
[field10] => KL<br />
[field11] => Malaysia<br />
[field14] => FTMS<br />
[field15] => 1999<br />
[submit] => Register<br />
[task] => registerUpdateProfile<br />
[authenticate] => 1<br />
[authkey] => 9986fd99143c768e2683f6854aec44b8<br />
)<br />
</syntaxhighlight><br />
<br /><br />
<br />
===Return===<br />
*'''error message''' - array, consist of error messages<br />
<br />
===Example===<br />
<syntaxhighlight lang="php"><br />
function onRegisterProfileValidate($post) <br />
{<br />
$err = array();<br />
<br />
if(empty($post['authkey']))<br />
{<br />
$err[] = JText::_('Session Expired.');<br />
}<br />
<br />
.<br />
.<br />
. <br />
<br />
return $err;<br />
}<br />
</syntaxhighlight><br />
<br /></div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/OnRegisterValidateOnRegisterValidate2013-03-09T07:27:15Z<p>Patricia Schmidt: /* Description */</p>
<hr />
<div>===Description===<br />
This event is triggered to validate registration of user basic information such as user name and email.<br />
<br />
@since 1.6<br />
<br />
===Params===<br />
*'''user post data''' - array, consist of form post data<br />
<br />
<syntaxhighlight lang="php"><br />
Array<br />
(<br />
[jsname] => Alen<br />
[jsusername] => alen<br />
[usernamepass] => alen<br />
[jsemail] => alen@hotmail.com<br />
[emailpass] => alen@hotmail.com<br />
[jspassword] => password<br />
[jspassword2] => password<br />
[tnc] => Y<br />
[submit] => Next<br />
[task] => register_save<br />
[id] => 0<br />
[gid] => 0<br />
[authenticate] => 1<br />
[authkey] => 4857d92e85efe6e31ed3ea374a15f683<br />
)<br />
</syntaxhighlight><br />
<br /><br />
<br />
===Example===<br />
<syntaxhighlight lang="php"><br />
function onRegisterValidate($post) <br />
{<br />
$err = array();<br />
<br />
if(empty($post['jsname']))<br />
{<br />
$err[] = JText::_('CC IMPROPER USERNAME');<br />
}<br />
<br />
.<br />
.<br />
. <br />
<br />
return $err;<br />
}<br />
</syntaxhighlight><br />
<br /></div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/OnEventJoinOnEventJoin2013-03-09T07:25:33Z<p>Patricia Schmidt: /* Description */</p>
<hr />
<div>===Description===<br />
This event is triggered when a user updates event attendance status.<br />
<br />
===Params===<br />
*'''Event''' - array, consist of event object<br />
<br />
===Examples ===<br />
<syntaxhighlight lang="php"><br />
function onEventJoin($event) <br />
{<br />
$eventObj = $event;<br />
$description = $eventObj->description;<br />
.<br />
.<br />
.<br />
}<br />
</syntaxhighlight><br />
<br /></div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/OnEventCreateOnEventCreate2013-03-09T07:25:00Z<p>Patricia Schmidt: /* Description */</p>
<hr />
<div>===Description===<br />
This event is triggered when a new event is created.<br />
<br />
===Params===<br />
*'''Event''' - array, consist of event object<br />
<br />
===Examples ===<br />
<syntaxhighlight lang="php"><br />
function onEventCreate($event) <br />
{<br />
$eventObj = $event;<br />
$description = $eventObj->description;<br />
.<br />
.<br />
.<br />
}<br />
</syntaxhighlight><br />
<br /></div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/OnEventRequestInviteOnEventRequestInvite2013-03-09T07:24:40Z<p>Patricia Schmidt: /* Description */</p>
<hr />
<div>===Description===<br />
This event is triggered when a user requests an event invitation.<br />
<br />
===Params===<br />
*'''Event''' - array, consist of event object<br />
<br />
===Examples===<br />
<syntaxhighlight lang="php"><br />
function onEventRequestInvite($event) <br />
{<br />
$eventObj = $event;<br />
$description = $eventObj->description;<br />
.<br />
.<br />
.<br />
}<br />
</syntaxhighlight><br />
<br /></div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/OnEventUpdateOnEventUpdate2013-03-09T07:23:42Z<p>Patricia Schmidt: /* Description */</p>
<hr />
<div>===Description===<br />
This event is triggered when an event is updated.<br />
<br />
===Params===<br />
*'''Event''' - array, consist of event object<br />
<br />
===Examples===<br />
<syntaxhighlight lang="php"><br />
function onEventUpdate($event) <br />
{<br />
$eventObj = $event;<br />
$description = $eventObj->description;<br />
.<br />
.<br />
.<br />
}<br />
</syntaxhighlight><br />
<br /></div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/OnFriendApproveOnFriendApprove2013-03-09T07:23:19Z<p>Patricia Schmidt: /* Description */</p>
<hr />
<div>===Description===<br />
This event is triggered after a user has approved a friend request.<br />
<br />
@since 1.2<br />
<br />
===Params===<br />
*'''approve''' - object consisting of the profile owner id and the id of the user he/she accepted to be friend with.<br />
<br />
<syntaxhighlight lang="php"><br />
approve Object<br />
(<br />
[profileOwnerId] => 64<br />
[friendId] => 63<br />
)<br />
</syntaxhighlight><br />
<br /><br />
<br />
===Example===<br />
<syntaxhighlight lang="php"><br />
function onFriendApprove( $approve ) <br />
{<br />
echo $request->profileOwnerId;<br />
echo '<br />';<br />
echo $request->friendId;<br />
<br />
return true;<br />
}<br />
<br />
result:<br />
64<br />
63<br />
</syntaxhighlight><br />
<br /></div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/OnFriendRejectOnFriendReject2013-03-09T07:22:33Z<p>Patricia Schmidt: /* Description */</p>
<hr />
<div>===Description===<br />
This event is triggered when a friend request is rejected.<br />
<br />
@since 1.2<br />
<br />
===Params===<br />
*'''reject''' - object consisting of the profile owner id and the id of the user he/she that is going to be rejected.<br />
<br />
<syntaxhighlight lang="php"><br />
reject Object (<br />
[profileOwnerId] => 63<br />
[friendId] => 64<br />
)<br />
</syntaxhighlight><br />
<br /><br />
<br />
===Example===<br />
<syntaxhighlight lang="php"><br />
function onFriendReject( $reject ) <br />
{<br />
echo $reject->profileOwnerId;<br />
echo '<br />';<br />
echo $reject->friendId;<br />
<br />
return true;<br />
}<br />
<br />
result:<br />
63<br />
64<br />
</syntaxhighlight><br />
<br /></div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/OnFriendRequestOnFriendRequest2013-03-09T07:22:13Z<p>Patricia Schmidt: /* Description */</p>
<hr />
<div>===Description===<br />
This event is triggered after a friend request has been made.<br />
<br />
@since 1.2<br />
<br />
===Params===<br />
*'''request''' - object consisting of the profile owner id and the id of the user he/she requested to be friend with.<br />
<br />
<syntaxhighlight lang="php"><br />
request Object<br />
(<br />
[profileOwnerId] => 63<br />
[friendId] => 64<br />
)<br />
</syntaxhighlight><br />
<br /><br />
<br />
===Example===<br />
<syntaxhighlight lang="php"><br />
function onFriendRequest( $request ) <br />
{<br />
echo $request->profileOwnerId;<br />
echo '<br />';<br />
echo $request->friendId;<br />
<br />
return true;<br />
}<br />
<br />
result:<br />
63<br />
64<br />
</syntaxhighlight><br />
<br /></div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/OnVideoCreateOnVideoCreate2013-03-09T07:21:45Z<p>Patricia Schmidt: /* Description */</p>
<hr />
<div>===Description===<br />
This event is triggered when a new video is created in JomSocial.<br />
<br />
===Params===<br />
*'''Video''' - consist of video object<br />
<br />
<syntaxhighlight lang="php"><br />
CTableVideo Object<br />
(<br />
[id] => 1<br />
[title] => Video Title<br />
[creator] => 45<br />
)<br />
</syntaxhighlight><br />
<br /><br />
<br />
===Example===<br />
<syntaxhighlight lang="php"><br />
function onVideoCreate($videoObj) <br />
{<br />
$videoTitle = $videoObj->title;<br />
.<br />
.<br />
.<br />
}<br />
</syntaxhighlight><br />
<br /></div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/OnGroupDisableOnGroupDisable2013-03-09T07:21:20Z<p>Patricia Schmidt: /* Description */</p>
<hr />
<div>===Description===<br />
This event is triggered when a group is disabled.<br />
<br />
@since 1.1<br />
<br />
===Params===<br />
*'''Group''' - group object that is passed by reference, consist of the following data :<br />
<br />
#id, the id of the group<br />
#ownerid, the user id of the group owner<br />
#categoryid, the category type id.<br />
#name, name of the group.<br />
#description, the group description.<br />
#email, the group's email.<br />
#website, the group's website.<br />
#created, date when the group is created.<br />
#approvals, show whether the groups require approval or not when a user join (0 = no need aproval, 1 = requires approval).<br />
#avatar, the group's avatar location.<br />
#thumb, the group's thumbnail avatar location.<br />
#published, the publish status of the group (0 = unpublished, 1 = published).<br />
<br />
<syntaxhighlight lang="php"><br />
stdClass Object<br />
(<br />
[id] => 51<br />
[ownerid] => 66<br />
[categoryid] => 1<br />
[name] => test<br />
[description] => testing group<br />
[email] => test@test.com<br />
[website] => www.test.com<br />
[created] => 2009-02-10 04:14:11<br />
[approvals] => 0<br />
[avatar] => components/com_community/assets/group.jpg<br />
[thumb] => components/com_community/assets/group_thumb.jpg<br />
[published] => 1<br />
)<br />
</syntaxhighlight><br />
<br /><br />
<br />
===Example===<br />
<syntaxhighlight lang="php"><br />
function onGroupLeave( &$group ) <br />
{<br />
/*<br />
perform your triggered action here.<br />
*/<br />
}<br />
</syntaxhighlight><br />
<br /></div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/OnGroupJoinOnGroupJoin2013-03-09T07:21:01Z<p>Patricia Schmidt: /* Description */</p>
<hr />
<div>===Description===<br />
This event is triggered when a user joins a group.<br />
<br />
@since 1.1<br />
<br />
===Params===<br />
*'''Group'''' - group object that is passed by reference, consist of the following data :<br />
<br />
#id, the id of the group<br />
#ownerid, the user id of the group owner<br />
#categoryid, the category type id.<br />
#name, name of the group.<br />
#description, the group description.<br />
#email, the group's email.<br />
#website, the group's website.<br />
#created, date when the group is created.<br />
#approvals, show whether the groups require approval or not when a user join (0 = no need aproval, 1 = requires approval).<br />
#avatar, the group's avatar location.<br />
#thumb, the group's thumbnail avatar location.<br />
#published, the publish status of the group (0 = unpublished, 1 = published).<br />
<br />
<syntaxhighlight lang="php"><br />
stdClass Object<br />
(<br />
[id] => 51<br />
[ownerid] => 66<br />
[categoryid] => 1<br />
[name] => test<br />
[description] => testing group<br />
[email] => test@test.com<br />
[website] => www.test.com<br />
[created] => 2009-02-10 04:14:11<br />
[approvals] => 0<br />
[avatar] => components/com_community/assets/group.jpg<br />
[thumb] => components/com_community/assets/group_thumb.jpg<br />
[published] => 1<br />
)<br />
</syntaxhighlight><br />
<br /><br />
*'''Member Id''' - int, User ID of the user who made a request to join a group.<br />
<br />
===Example===<br />
<syntaxhighlight lang="php"><br />
function onGroupJoin( &$group, $memberid ) <br />
{<br />
/*<br />
perform your triggered action here.<br />
*/<br />
}<br />
</syntaxhighlight><br />
<br /><br />
<br />
===Limitations===<br />
For now, onGroupJoin event only affects the frontend join. If an admin adds a user to a group, that event is not triggered.</div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/OnGroupJoinApprovedOnGroupJoinApproved2013-03-09T07:20:42Z<p>Patricia Schmidt: /* Description */</p>
<hr />
<div>===Description===<br />
This event is triggered when the group's admin approves a join request by a user.<br />
<br />
@since 1.1<br />
<br />
===Params===<br />
<br />
*'''Group''' - group object that is passed by reference, consist of the following data :<br />
<br />
#id, the id of the group<br />
#ownerid, the user id of the group owner<br />
#categoryid, the category type id.<br />
#name, name of the group.<br />
#description, the group description.<br />
#email, the group's email.<br />
#website, the group's website.<br />
#created, date when the group is created.<br />
#approvals, show whether the groups require approval or not when a user join (0 = no need aproval, 1 = requires approval).<br />
#avatar, the group's avatar location.<br />
#thumb, the group's thumbnail avatar location.<br />
#published, the publish status of the group (0 = unpublished, 1 = published).<br />
<br />
<syntaxhighlight lang="php"><br />
stdClass Object<br />
(<br />
[id] => 51<br />
[ownerid] => 66<br />
[categoryid] => 1<br />
[name] => test<br />
[description] => testing group<br />
[email] => test@test.com<br />
[website] => www.test.com<br />
[created] => 2009-02-10 04:14:11<br />
[approvals] => 0<br />
[avatar] => components/com_community/assets/group.jpg<br />
[thumb] => components/com_community/assets/group_thumb.jpg<br />
[published] => 1<br />
)<br />
</syntaxhighlight><br />
<br /><br />
*'''Member Id''' - int, User ID of the user approved by the group's admin.<br />
<br />
===Example===<br />
<syntaxhighlight lang="php"><br />
function onGroupJoinApproved( &$group, $memberid ) <br />
{<br />
/*<br />
perform your triggered action here.<br />
*/<br />
}<br />
</syntaxhighlight><br />
<br /></div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/OnGroupLeaveOnGroupLeave2013-03-09T07:20:02Z<p>Patricia Schmidt: /* Description */</p>
<hr />
<div>===Description===<br />
This event is triggered when either an admin removes the user from a group or a user leaves the group.<br />
<br />
@since 1.1<br />
<br />
===Params===<br />
*'''Group''' - group object that is passed by reference, consist of the following data :<br />
<br />
#id, the id of the group<br />
#ownerid, the user id of the group owner<br />
#categoryid, the category type id.<br />
#name, name of the group.<br />
#description, the group description.<br />
#email, the group's email.<br />
#website, the group's website.<br />
#created, date when the group is created.<br />
#approvals, show whether the groups require approval or not when a user join (0 = no need aproval, 1 = requires approval).<br />
#avatar, the group's avatar location.<br />
#thumb, the group's thumbnail avatar location.<br />
#published, the publish status of the group (0 = unpublished, 1 = published).<br />
<br />
<syntaxhighlight lang="php"><br />
stdClass Object<br />
(<br />
[id] => 51<br />
[ownerid] => 66<br />
[categoryid] => 1<br />
[name] => test<br />
[description] => testing group<br />
[email] => test@test.com<br />
[website] => www.test.com<br />
[created] => 2009-02-10 04:14:11<br />
[approvals] => 0<br />
[avatar] => components/com_community/assets/group.jpg<br />
[thumb] => components/com_community/assets/group_thumb.jpg<br />
[published] => 1<br />
)<br />
</syntaxhighlight><br />
<br /><br />
*'''Member Id''' - int, User ID of the user who left the group or removed from the group. <br />
<br />
===Example===<br />
<syntaxhighlight lang="php"><br />
function onGroupLeave( &$group, $memberid) <br />
{<br />
/*<br />
perform your triggered action here.<br />
*/<br />
}<br />
</syntaxhighlight><br />
<br /></div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/OnBeforeGroupDeleteOnBeforeGroupDelete2013-03-09T07:19:41Z<p>Patricia Schmidt: /* Description */</p>
<hr />
<div>===Description===<br />
This event is triggered when deleting a group.<br />
<br />
@since 1.2<br />
<br />
===Params===<br />
*'''Group''' - group object that is passed by reference, consist of the following data :<br />
<br />
#id, the id of the group<br />
#ownerid, the user id of the group owner<br />
#categoryid, the category type id.<br />
#name, name of the group.<br />
#description, the group description.<br />
#email, the group's email.<br />
#website, the group's website.<br />
#created, date when the group is created.<br />
#approvals, show whether the groups require approval or not when a user join (0 = no need aproval, 1 = requires approval).<br />
#avatar, the group's avatar location.<br />
#thumb, the group's thumbnail avatar location.<br />
#published, the publish status of the group (0 = unpublished, 1 = published).<br />
#discusscount, the group's total discussions.<br />
#wallcount, the group's total walls.<br />
#membercount, the group's total members.<br />
<br />
<syntaxhighlight lang="php"><br />
stdClass Object<br />
(<br />
[id] => 51<br />
[ownerid] => 66<br />
[categoryid] => 1<br />
[name] => test<br />
[description] => testing group<br />
[email] => test@test.com<br />
[website] => www.test.com<br />
[created] => 2009-02-10 04:14:11<br />
[approvals] => 0<br />
[avatar] => components/com_community/assets/group.jpg<br />
[thumb] => components/com_community/assets/group_thumb.jpg<br />
[published] => 1<br />
[discusscount] => 0<br />
[wallcount] => 0<br />
[membercount] => 0<br />
<br />
)<br />
</syntaxhighlight><br />
<br /><br />
<br />
===Example===<br />
<syntaxhighlight lang="php"><br />
function onBeforeGroupDelete( $group ) <br />
{<br />
/*<br />
perform your triggered action here.<br />
*/<br />
}<br />
</syntaxhighlight><br />
<br /></div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/OnAfterGroupDeleteOnAfterGroupDelete2013-03-09T07:19:27Z<p>Patricia Schmidt: /* Description */</p>
<hr />
<div>===Description===<br />
This event is triggered after a group is deleted.<br />
<br />
@since 1.2<br />
<br />
===Params===<br />
*'''Group''' - group object that is passed by reference, consist of the following data :<br />
<br />
#id, the id of the group<br />
#ownerid, the user id of the group owner<br />
#categoryid, the category type id.<br />
#name, name of the group.<br />
#description, the group description.<br />
#email, the group's email.<br />
#website, the group's website.<br />
#created, date when the group is created.<br />
#approvals, show whether the groups require approval or not when a user join (0 = no need aproval, 1 = requires approval).<br />
#avatar, the group's avatar location.<br />
#thumb, the group's thumbnail avatar location.<br />
#published, the publish status of the group (0 = unpublished, 1 = published).<br />
#discusscount, the group's total discussions.<br />
#wallcount, the group's total walls.<br />
#membercount, the group's total members.<br />
<br />
<syntaxhighlight lang="php"><br />
stdClass Object<br />
(<br />
[id] => 51<br />
[ownerid] => 66<br />
[categoryid] => 1<br />
[name] => test<br />
[description] => testing group<br />
[email] => test@test.com<br />
[website] => www.test.com<br />
[created] => 2009-02-10 04:14:11<br />
[approvals] => 0<br />
[avatar] => components/com_community/assets/group.jpg<br />
[thumb] => components/com_community/assets/group_thumb.jpg<br />
[published] => 1<br />
[discusscount] => 0<br />
[wallcount] => 0<br />
[membercount] => 0<br />
)<br />
</syntaxhighlight><br />
<br /><br />
<br />
===Example===<br />
<syntaxhighlight lang="php"><br />
function onAfterGroupDelete( $group ) <br />
{<br />
/*<br />
perform your triggered action here.<br />
*/<br />
}<br />
</syntaxhighlight><br />
<br /></div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/OnProfileCreateOnProfileCreate2013-03-09T07:19:06Z<p>Patricia Schmidt: /* Description */</p>
<hr />
<div>===Description===<br />
This event is triggered when a new user is created in JomSocial.<br />
<br />
===Params===<br />
*'''User''' - array, consist of user object<br />
<br />
<syntaxhighlight lang="php"><br />
CUser Object<br />
(<br />
[name] => John<br />
[username] => johnlee<br />
[_thumb] => images/photos/63/5/thumb_ff5e436b8148d10a7750abab.jpg<br />
)<br />
</syntaxhighlight><br />
<br /><br />
<br />
===Example===<br />
<syntaxhighlight lang="php"><br />
function onprofilecreate($userObj) <br />
{<br />
$userObj = $userObj[0];<br />
$userName = $userObj->name;<br />
.<br />
.<br />
.<br />
}<br />
</syntaxhighlight><br />
<br /></div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/OnProfileDisplayOnProfileDisplay2013-03-09T07:18:39Z<p>Patricia Schmidt: /* Description */</p>
<hr />
<div>===Description===<br />
This event is triggered when the user profile is being displayed. Used to render application box in user profile.<br />
<br />
===Params===<br />
*'''null'''<br />
<br />
===Returns===<br />
*'''htmlContent''' - html content of application<br />
<br />
===Examples ===<br />
<syntaxhighlight lang="php"><br />
function onProfileDisplay() <br />
{<br />
.<br />
.<br />
.<br />
return $content;<br />
<br />
}<br />
</syntaxhighlight><br />
<br /></div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/OnGetUserInfoOnGetUserInfo2013-03-09T07:17:23Z<p>Patricia Schmidt: /* Description */</p>
<hr />
<div>===Description===<br />
This event is triggered when getting current logged-in user info by field code (e.g. FIELD_GENDER, FIELD_BIRTHDATE, etc). The plugin may manipulate the obtained field value provided that the extended user info configuration is enabled.<br />
<br />
===Params===<br />
An array with two items; fieldcode and fieldvalue.<br />
<br />
<syntaxhighlight lang="php"><br />
Array<br />
(<br />
[0] => FIELD_GENDER,<br />
[1] => Male (corresponding value of the fieldcode passed by reference)<br />
)<br />
</syntaxhighlight><br />
<br /><br />
<br />
===Example===<br />
<syntaxhighlight lang="php"><br />
function onGetUserInfo( $arrItems ) <br />
{<br />
$arrGenderShortForm = array('male' => 'M', 'female' => 'F');<br />
<br />
$arrItems[1] = $arrGenderShortForm[$arrItems[1]];<br />
<br />
return true;<br />
}<br />
Result:<br />
Field Value changed from "Male" to "M"<br />
</syntaxhighlight><br />
<br /></div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/OnBeforePhotoDeleteOnBeforePhotoDelete2013-03-09T07:16:49Z<p>Patricia Schmidt: /* Description */</p>
<hr />
<div>===Description===<br />
This event is triggered before the photo is deleted.<br />
<br />
@since 1.6<br />
<br />
===Params===<br />
*'''Photo''' - array, consist of photo object<br />
<br />
<syntaxhighlight lang="php"><br />
CTablePhoto Object<br />
(<br />
[id] => 13<br />
[albumid] => 5<br />
[name] => <br />
[caption] => cwindow_type<br />
[permissions] => 0<br />
[created] => 2009-10-20 04:52:14<br />
[thumbnail] => images/photos/63/5/thumb_ff5e436b8148d10a7750abab.jpg<br />
[image] => images/photos/63/5/ff5e436b8148d10a7750abab.jpg<br />
[creator] => 63<br />
[published] => 1<br />
[original] => images/originalphotos/63/5/ff5e436b8148d10a7750abab.jpg<br />
)<br />
</syntaxhighlight><br />
<br /><br />
<br />
===Example===<br />
<syntaxhighlight lang="php"><br />
function onBeforePhotoDelete($photos) <br />
{<br />
$photoObj = $photos[0];<br />
$photoCaption = $photoObj->caption;<br />
.<br />
.<br />
.<br />
}<br />
</syntaxhighlight><br />
<br /></div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/OnAfterPhotoDeleteOnAfterPhotoDelete2013-03-09T07:16:32Z<p>Patricia Schmidt: /* Description */</p>
<hr />
<div>===Description===<br />
This event is triggered after the photo is deleted.<br />
<br />
@since 1.6<br />
<br />
===Params===<br />
*'''Photo''' - array, consist of photo object<br />
<br />
<syntaxhighlight lang="php"><br />
CTablePhoto Object<br />
(<br />
[id] => 13<br />
[albumid] => 5<br />
[name] => <br />
[caption] => cwindow_type<br />
[permissions] => 0<br />
[created] => 2009-10-20 04:52:14<br />
[thumbnail] => images/photos/63/5/thumb_ff5e436b8148d10a7750abab.jpg<br />
[image] => images/photos/63/5/ff5e436b8148d10a7750abab.jpg<br />
[creator] => 63<br />
[published] => 1<br />
[original] => images/originalphotos/63/5/ff5e436b8148d10a7750abab.jpg<br />
)<br />
</syntaxhighlight><br />
<br /><br />
<br />
===Example===<br />
<syntaxhighlight lang="php"><br />
function onAfterPhotoDelete($photos) <br />
{<br />
$photoObj = $photos[0];<br />
$photoCaption = $photoObj->caption;<br />
<br />
$message = 'The photo ' . $photoCaption . ' with the id [' . $photoObj->id . '] has been removed by user [' . $photoObj->creator . ']';<br />
<br />
$mailfrom = 'system@jomsocial.com';<br />
$fromname = 'www.jomsocial.com';<br />
$email = 'admin@jomsocial.com';<br />
$subject = 'Photo ' . $photoCaption . ' removed';<br />
<br />
JUtility::sendMail($mailfrom, $fromname, $email, $subject, $message);<br />
<br />
}<br />
</syntaxhighlight><br />
<br /></div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/OnPhotoCreateOnPhotoCreate2013-03-09T07:16:14Z<p>Patricia Schmidt: /* Description */</p>
<hr />
<div>===Description===<br />
This event is triggered when a new photo is created in JomSocial.<br />
<br />
===Params===<br />
*'''Photo''' - consist of photo object<br />
<br />
<syntaxhighlight lang="php"><br />
CTablePhoto Object<br />
(<br />
<br />
[id] => 10<br />
[albumid] => 1<br />
[caption] => Photo Caption<br />
[created] => johnlee<br />
[published] => 1<br />
</syntaxhighlight><br />
<br /><br />
<br />
===Examples===<br />
<syntaxhighlight lang="php"><br />
function onPhotoCreate($photoObj) <br />
{<br />
$caption = $photoObj->caption;<br />
.<br />
.<br />
.<br />
}<br />
</syntaxhighlight><br />
<br /></div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/OnFormSaveOnFormSave2013-03-09T07:15:31Z<p>Patricia Schmidt: /* Description */</p>
<hr />
<div>===Description===<br />
Called after a form is saved. It allows the developer to either manipulate POST result from a form POST or store custom form data from onFormDisplay event.<br />
<br />
===Params===<br />
* form name | name of the form saved.<br />
<br />
===Example===<br />
<syntaxhighlight lang="php"><br />
function onFormSave( $form_name ) <br />
{<br />
if( $form_name == 'jsform-profile-privacy' )<br />
{<br />
$myvar_1 = JRequest::getVar('custom1');<br />
$myvar_2 = JRequest::getVar('custom2');<br />
<br />
/* the plugin is responsible in storing this var in database <br />
or using it in any way it like<br />
*/<br />
}<br />
return ;<br />
}<br />
</syntaxhighlight><br />
<br /><br />
<br />
===Note===<br />
The plugin is free to do whatever it want with the POST var. In most cases, it might want to store it in the database. JomSocial does not automatically save any custom form data.</div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/OnWallDisplayOnWallDisplay2013-03-09T07:14:25Z<p>Patricia Schmidt: /* Description */</p>
<hr />
<div>===Description===<br />
This event is triggered when the wall is being displayed. Allow to format the comment in the rows.<br />
<br />
===Params===<br />
*'''Wall entry''' - consist of comment object<br />
<br />
===Example===<br />
<syntaxhighlight lang="php"><br />
function onWallDisplay(&$rows) <br />
{<br />
$row->comment = filter_content($row->comment);<br />
}<br />
</syntaxhighlight><br />
<br /></div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/OnMessageDisplayOnMessageDisplay2013-03-09T07:13:45Z<p>Patricia Schmidt: /* Description */</p>
<hr />
<div>===Description===<br />
This event is triggered when the inbox message is being displayed. Allow to format the content in the rows.<br />
<br />
===Params===<br />
*'''Message''' - object, consist of message object<br />
<br />
===Example===<br />
<syntaxhighlight lang="php"><br />
function onWallDisplay(&$rows) <br />
{ <br />
$row->body= filter_content($row->body);<br />
}<br />
</syntaxhighlight><br />
<br /></div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/OnDiscussionDisplayOnDiscussionDisplay2013-03-09T07:13:05Z<p>Patricia Schmidt: /* Description */</p>
<hr />
<div>===Description===<br />
This event is triggered when the discussion entry is being displayed. Allow to format the content in the rows.<br />
<br />
===Params===<br />
*'''Discussion''' - object, consist of discussion object<br />
<br />
===Example===<br />
<syntaxhighlight lang="php"><br />
function onDiscussionDisplay(&$rows) <br />
{<br />
$row->message= filter_content($row->message);<br />
}<br />
</syntaxhighlight><br />
<br /></div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/OnDiscussionDisplayOnDiscussionDisplay2013-03-09T07:12:13Z<p>Patricia Schmidt: /* Description */</p>
<hr />
<div>===Description===<br />
This event is triggered when the discussion entry is being display. Allow to format the content in the rows.<br />
<br />
===Params===<br />
*'''Discussion''' - object, consist of discussion object<br />
<br />
===Example===<br />
<syntaxhighlight lang="php"><br />
function onDiscussionDisplay(&$rows) <br />
{<br />
$row->message= filter_content($row->message);<br />
}<br />
</syntaxhighlight><br />
<br /></div>Patricia Schmidthttp://documentation.jomsocial.com/wiki/Cant_create_announcementCant create announcement2013-03-09T07:10:57Z<p>Patricia Schmidt: /* See Also */</p>
<hr />
<div>If you experience problems with creating the '''Announcement''' in Groups and you get error similar to this one:<br />
<syntaxhighlight lang="php"><br />
ROOT/components/com_community/events/group.trigger.php:104<br />
</syntaxhighlight><br />
<br /><br />
Please, open the phpMyAdmin and run this '''query''' against your database:<br />
<syntaxhighlight lang="php"><br />
ALTER TABLE `PREFIX_community_groups_bulletins` ADD `params` TEXT NOT NULL;<br />
</syntaxhighlight><br />
<br /><br />
{{alert|<strong>Note:</strong> Replace the PREFIX with your database prefix.|alert-info}} <br />
<br />
===See Also===<br />
* [[Cant create discussion]]</div>Patricia Schmidt