Extension Hooks
delete_rating_end
- File: mod.rating.php
- Method: delete()
- Possible Uses: Additional processing AFTER deleting a rating
- Variables:
- $rating_id - ID of rating that was deleted
- $entry_id - Entry ID that this rating is assigned to
if (isset(ee()->extensions->extensions['delete_rating_end']))
{
$edata = ee()->extensions->call('delete_rating_end', $rating_id, $entry_id);
if (ee()->extensions->end_script === TRUE) return $edata;
}
delete_rating_start
- File: mod.rating.php
- Method: delete()
- Possible Uses: Additional processing BEFORE deleting a rating
- Variables:
- $rating_id - ID of rating to be deleted
- $entry_id - Entry ID that this rating is assigned to
if (isset(ee()->extensions->extensions['delete_rating_start']))
{
$edata = ee()->extensions->call('delete_rating_start', $rating_id, $entry_id);
if (ee()->extensions->end_script === TRUE) return $edata;
}
insert_rating_end
- File: mod.rating.php
- Method: insert_new_rating()
- Possible Uses: More emails, more processing, different redirect
- Variables:
- $data - Array of fields/values inserted into database for this rating
- $rating_moderate - y/n, if this rating is being moderated
$edata = ee()->extensions->call('insert_rating_end', $data, $rating_moderate);
if (ee()->extensions->end_script === TRUE) return;
insert_rating_insert_array
- File: mod.rating.php
- Method: insert_new_rating()
- Possible Uses: Modify or validate values for exp_ratings insert prior to INSERT
- Variables:
- $data - Array of fields/values inserted into database for this rating
if (isset(ee()->extensions->extensions['insert_rating_insert_array']))
{
$data = ee()->extensions->call('insert_rating_insert_array', $data);
if (ee()->extensions->end_script === TRUE) return $edata;
}
insert_rating_preferences_sql
- File: mod.rating.php
- Method: insert_new_rating()
- Possible Uses: Rewrite or add to the rating preference sql query to add more restrictions
- Variables:
- $sql - Current SQL query to retrieve preferences
if (isset(ee()->extensions->extensions['insert_rating_preferences_sql']))
{
$sql = ee()->extensions->call('insert_rating_preferences_sql', $sql);
if (ee()->extensions->end_script === TRUE) return $edata;
}
insert_rating_start
- File: mod.rating.php
- Method: insert_new_rating()
- Possible Uses: Complete override of rating submission routine or POST data possible, after security checks performed
- Variables: N/A
$edata = ee()->extensions->call('insert_rating_start');
if (ee()->extensions->end_script === TRUE) return;
rating_form_action
- File: mod.rating.php
- Method: form()
- Possible Uses: Modify the action="" attribute of the outputted \<form> tag
- Variables:
- $RET - Current action attribute value
if (isset(ee()->extensions->extensions['rating_form_action']))
{
$RET = ee()->extensions->call('rating_form_action', $RET);
if (ee()->extensions->end_script === TRUE) return;
}
rating_form_hidden_fields
- File: mod.rating.php
- Method: form()
- Possible Uses: Add/Remove/Modify Hidden Fields for the user side Rating Form
- Variables:
- $hidden_fields - Array of current hidden fields that will be outputted
if (isset(ee()->extensions->extensions['rating_form_hidden_fields']))
{
$hidden_fields = ee()->extensions->call('rating_form_hidden_fields', $hidden_fields);
if (ee()->extensions->end_script === TRUE) return;
}
rating_form_tagdata
- File: mod.rating.php
- Method: form()
- Possible Uses: Modify or add something to the rating form prior to output
- Variables:
- $tagdata - The current tagdata for the form that will be outputted
if (isset(ee()->extensions->extensions['rating_form_tagdata']))
{
$tagdata = ee()->extensions->call('rating_form_tagdata', $tagdata);
if (ee()->extensions->end_script === TRUE) return;
}
Support
Having problems setting up and/or using Rating? Support is offered from 10am to 4pm EST weekdays. Send us an email at help@eeharbor.com and we will respond as quickly as we can.