(Jot Comments tool)
Last version : Module: 0.9.2
, Snippet: 0.9.1.4
On : 2009/01/21
I re-wrote and upgraded JoCo. In new version
- You can moderate your comments
- You can moderate comments from your last login
- You can moderate comments of documents which you have created or published or edited
- Search in comments by string and highlighting, by webgroups, users, guests, docgroups, documents, between two dates and etc
- All important elements need permissions to see and managers can set permission, add or remove a user and etc
- There is summary part for see list of documents which have comments, subscriptions, last comment date and ...
- JoCo users do not see comments in documents that they have not enough permissions to access them
- Another view added for manage more comments in a page
- Manage and modify all Jot calls in TVs, Chunks and document Content (in module). NEW in 0.9.2
- And... .
By JoCo snippet you have module in a frontend page, you can set trusted webusers to access to this page and moderate comments. There are some parameters to set permissions for each webuser and set a certain permission for all webusers for example no webuser can edit a comment or access to permission part and ....
To see snippet parameters see snippets codes.
Put JoCo snippet call in a documents with BLANK
Also you can see logs of webusers actions in JoCo module
- JoCo gets value of jot custom fields ONLY from "jot_fields" table. if it find a custom field, search the language file for a string which it's KEY is the custom field label and prints the value of language variables else prints the label of field. you can see some default custom fields below:
$JoCo_lang['name'] = "Name";
$JoCo_lang['email'] = "Email";
$JoCo_lang['website'] = "Website";
$JoCo_lang['title'] = "Subject";
so you can add yours easily; for example if you have set userGender custom field in Jot, you can add variable below and see "Gender" instead "userGender":
$JoCo_lang['userGender'] = "Gender";
all found custom fields prints automatically.
- JoCo codes are clear but there is another way to custimize output without modify modules codes directly:
There is customactions.php in joco/inculdes folder. you can add your custom codes in this file to modify output. it is useful for set some data that needs to more codes for example insering FULL NAME of comment owner or update another table on delete a comment and etc.
It contains 5 functions that each one runs in a LOOP:
: It runs after comments data collected from "jot_content" and "jot_fields" tables. $row is comment data which is an associative array, KEY is column name and VALUE is column value from "jot_content". $row['label] is another associative array, KEY is "label" column and VALUE is "content" column value from "jot_fields". This function MUST return an array with 2 items, first is associative array that is merged to $row (VALUE of $row['customKey'] is replaced with [+customKey+] in indv.tpl.html) and second is new row tpl which is replaced with current tpl.
: It runs right before parse comment output and decides to accept (and parse) comment or reject comment. If it returns TRUE comment data will parse and if it returns FALSE current comment will reject.
functions below run right before UPDATE database and return void :
[ed. note: AHHP last edited this post 8 years, 5 months ago.]