Adds a Feedback button to all pages so that the user can provide feedback to the site administrator. The feedback can be reviewed by the administrator under the Administration->Site Feedback menu.
0.5 fixes
0.4 fixes
0.3 fixes
0.2 fixes
View Prashant Juvekar's plugins
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
VERY NICE! Thank you!
How can I adjust the position on the left up or down to fit better wtih my layout?
@elgg_noob - I'm pretty sure you can adjust that in the CSS file.
@Trajan thx. I found it.
Fabuloso!!! I am working on a Spanish translation. Since I am total Noob to php, how could I make sure the tab is translated as well as the basic content?
Here is the es.php content
<?php
/**
* Elgg Feedback plugin
* Feedback interface for Elgg sites
*
* @package Feedback
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
* @author Prashant Juvekar
* @copyright Prashant Juvekar
* @link http://www.linkedin.com/in/prashantjuvekar
* @translated into Spanish with very slight modifications by rbryn RedCMI.net
*/
$spanish = array(
'item:object:feedback' => 'Comentarios',
'feedback:label' => 'Comentarios',
'feedback:title' => 'Comentarios',
'feedback:message' => 'Utilice este formulario si desea comunicar con la Red de Capacitación Misionera Internacional.',
'feedback:default:id' => 'Nombre y correo electrónico',
'feedback:default:txt' => 'Escriba su mensaje!',
'feedback:default:txt:err' => 'Ningún mensaje fue provisto!\nValoramos su comunicaci&oactue;n.\nFavor de escriba algo y aprete Send.',
'feedback:captcha:blank' => 'No proveyó captcha',
'feedback:submit_msg' => 'Enviando...',
'feedback:submit_err' => 'No se pudo enviar!',
'feedback:submit:error' => 'No se pudo enviar!',
'feedback:submit:success' => 'Exito! Su mensaje fue enviado. Gracias!',
'feedback:admin:menu' => 'Contactar el sitio',
'feedback:admin:title' => 'Contactar el sitio',
'feedback:delete:success' => 'Exito! Su mensaje fue suprimido',
'feedback:mood:' => 'Ninguna',
'feedback:mood:angry' => 'Frustrado',
'feedback:mood:neutral' => 'Neutral',
'feedback:mood:happy' => 'Feliz',
'feedback:about:' => 'Ninguno',
'feedback:about:bug_report' => 'Reportar un problema',
'feedback:about:content' => 'Contenido',
'feedback:about:suggestions' => 'Sugerencias',
'feedback:about:compliment' => 'Felicitación',
'feedback:about:other' => 'Oro',
'feedback:list:mood' => 'Emoción',
'feedback:list:about' => 'Acerca de',
'feedback:list:page' => 'Enviar página',
'feedback:list:from' => 'Procedente de:',
'feedback:user_1' => "User Name 1: ",
'feedback:user_2' => "User Name 2: ",
'feedback:user_3' => "User Name 3: ",
'feedback:user_4' => "User Name 4: ",
'feedback:user_5' => "User Name 5: ",
'feedback:email:subject' => 'Recibió un mensaje de %s',
'feedback:email:body' => '%s',
);
add_translation("es",$spanish);
?>
sorry it doesnt display correctly in the Iexplorer
any help
I've modified this because I've implemented it in 1.7 and I couldn't delete feedback entries from the admin section. In this file - "\views\default\feedback\listing.php" I changed this:
$controls .= " (<a href=\"{$vars['url']}action/feedback/delete?guid={$vars['entity']->guid}\">" . elgg_echo('delete') . "</a>)";
to this:
$controls .= elgg_view("output/confirmlink",array('href' => $vars['url'] . "action/feedback/delete?guid=" . $vars['entity']->guid, 'text' => elgg_echo('delete'), 'confirm' => elgg_echo('deleteconfirm'),));
There may be other spots where the security isn't ready for 1.7, but I haven't found them yet.
Interesting plugin, though I am having a problem...
I cannot delete feedback once i've reviewed it.
Selecting delete causes:
Form is missing __token or __ts fields
Any ideas?
Also, it messed up my Tinymce. Now if I deactivate feedback my tinymce functions on messages goes too. It seems after I installed this Tinymce options become reliant on it?!
Prashant, do you still maintain this plugin? A compatibility release for Elgg 1.7+ would be nice.
I've fixed this, I will upload it today.
To author: If you don't want me to upload please tell so I can remove :]
Looks like a much needed plugin. Is the developement still active?
Else I can try to implement this for 1.8 version.
the code is too heavy..
there's easier way to code a much simpler feedback utlity ;)
problem the feed back menu works perfectly but when i go to see the feed back i can't delete them it says something about token mismatch or summert or other
@Darwin: there's a fixed version of this plugin here:
http://community.elgg.org/pg/plugins/release/583311/developer/Simox/site-feedback-form
It's the same plugin but the token mismatch error when deleting feedback entries shouldn't occur anymore with this version.
Hi, how can I modify the code below to move the footer links ("Report this" and "About", "Terms", ...) so that they are flash with the ends of the sidebars as shown below? I have tried so many things withou success.
<?php
/**
* Contact Importer Plugin (using OpenInviter)
*
* @package ElggContactImporter
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
* @author Prashant Juvekar
* @copyright SocialTrak, 2009
* @link http://www.socialtrak.com
*/
require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
global $CONFIG;
gatekeeper();
set_context('friends');
set_page_owner($_SESSION['guid']);
//set the title
$title = elgg_echo('contact_importer:title');
// setup some defaults
$oi_provider = $_POST['oi_provider'];
if ( $oi_provider == null || empty($oi_provider) ) {
$oi_provider = "gmail";
}
$oi_username = $_POST['oi_username'];
$oi_password = $_POST['oi_password'];
$oi_session_id = $_POST['oi_session_id'];
// include and initialize openinviter
global $CONFIG;
include ( $CONFIG->path . 'mod/contact_importer/OpenInviter/openinviter.php');
$inviter=new OpenInviter();
$oi_services=$inviter->getPlugins();
// lookup the provider name
foreach ($oi_services as $type=>$providers) {
foreach ($providers as $provider=>$details) {
if ( $oi_provider == $provider ) {
$oi_provider_name = $details['name'];
}
}
}
function get_web_mails () {
return array (
'aol' => 'AOL',
'gmail' => 'GMail',
'hotmail' => 'Live/Hotmail',
'yahoo' => 'Yahoo!',
);
}
function get_social_networks () {
return array (
'facebook' => 'Facebook',
'linkedin' => 'LinkedIn',
'twitter_ex' => 'Twitter',
'orkut' => 'Orkut',
);
}
function echo_OpenInviter_Inputs_form ($oi_services, $oi_provider, $oi_username) {
$body = "<form action='' method='POST' name='OpenInviter_Inputs'>";
$body .= "<table>";
$body .= "<tr>";
$body .= "<td style='width:150px'><label>".elgg_echo('contact_importer:choose_provider')."</label></td>";
$body .= "<td>";
foreach ( get_web_mails() as $provider => $details )
{
if ( $oi_provider == $provider ) {
$body .= "<input type='radio' name='oi_provider' value='{$provider}' checked='checked'> {$details}</input><br />";
} else {
$body .= "<input type='radio' name='oi_provider' value='{$provider}'> {$details}</input><br />";
}
}
$body .= "<br />";
foreach ( get_social_networks() as $provider => $details )
{
if ( $oi_provider == $provider ) {
$body .= "<input type='radio' name='oi_provider' value='{$provider}' checked='checked'> {$details}</input><br />";
} else {
$body .= "<input type='radio' name='oi_provider' value='{$provider}'> {$details}</input><br />";
}
}
$body .= "<br /";
$body .= "</td>";
$body .= "</tr>";
$body .= "<tr>";
$body .= "<td><label>".elgg_echo('contact_importer:username')."</label></td>";
$body .= "<td><input type='text' name='oi_username' value='{$oi_username}' / ></td>";
$body .= "</tr>";
$body .= "<tr>";
$body .= "<td><label>".elgg_echo('contact_importer:password')."</label></td>";
$body .= "<td><input type='password' name='oi_password' / ></td>";
$body .= "<td style='color:red;font-size:11px'>".elgg_echo('contact_importer:password:disclaimer').".</td>";
$body .= "</tr>";
$body .= "</table>";
$body .= "<input type='submit' name='submit' value='".elgg_echo('contact_importer:submit')."' />";
$body .= "<input type='hidden' name='oi_step' value='Inputs' />";
$body .= "</form>";
return $body;
}
function echo_OpenInviter_Invite_form ($oi_provider, $oi_provider_name, $oi_username, $oi_contacts, $oi_session_id) {
$body .=
"<script type='text/javascript'>
function selectAll(count,which)
{
for( z=1; z<=count; z++ )
{
var check_obj = document.getElementById('check_'+z)
if ( check_obj ) {
check_obj.checked = which;
}
}
}
</script>";
$body .= "<form action='' method='POST' name='OpenInviter_Invite'>";
if (count($oi_contacts)==0)
{
$body .= "<table class='contactImportTable'>";
$body .= "<H2>".sprintf(elgg_echo('contact_importer:contacts'),$oi_provider_name)."</H2>";
$body .= "<tr class='contactImportTableOddRow'>";
$body .= "<td align='center' style='padding:20px;' colspan='".($plugType=='email'? "3":"2")."'>";
$body .= "<label class='OpenInviter_Error'>".elgg_echo('contact_importer:nocontacts')."</label>";
$body .= "</td>";
$body .= "</tr>";
$body .= "</table>";
}
else
{
$body .= "<input type='submit' name='send' value='".elgg_echo('contact_importer:send_invites')."' class='thButton'>" . "  ";
$body .= "<H2>".sprintf(elgg_echo('contact_importer:contacts2'),$oi_provider_name,count($oi_contacts))."</H2>";
$body .= "<a href='javascript:none(0)' onclick='selectAll(".count($oi_contacts).",true)'>".elgg_echo('contact_importer:select_all')."</a>" . "  ";
$body .= "<a href='javascript:none(0)' onclick='selectAll(".count($oi_contacts).",false)'>".elgg_echo('contact_importer:unselect_all')."</a>";
$body .= "<table class='contactImportTable'>";
$body .= "<tr class='contactImportTableDesc'>";
$body .= "<td style='font-weight:bold'>".elgg_echo('contact_importer:invite')."</td>";
$body .= "<td style='font-weight:bold'>".elgg_echo('contact_importer:name')."</td>".($plugType == 'email' ?"<td style='font-weight:bold'>E-mail</td>":"")."</tr>";
$odd=true;$counter=0;
foreach ($oi_contacts as $email=>$name)
{
$counter++;
if ($odd) {
$class='contactImportTableOddRow';
} else {
$class='contactImportTableEvenRow';
}
$body .= "<tr class='{$class}'>";
$body .= "<td><input name='check_{$counter}' id='check_{$counter}' value='{$counter}' type='checkbox' class='thCheckbox' checked>";
$body .= "<input type='hidden' name='email_{$counter}' value='{$email}'>";
$body .= "<input type='hidden' name='name_{$counter}' value='{$name}'>";
$body .= "</td><td>{$name}</td>".($plugType == 'email' ?"<td>{$email}</td>":"")."</tr>";
$odd=!$odd;
}
$body .= "</table>";
$body .= "<a href='javascript:none(0)' onclick='selectAll(".count($oi_contacts).",true)'>".elgg_echo('contact_importer:select_all')."</a>" . "  ";
$body .= "<a href='javascript:none(0)' onclick='selectAll(".count($oi_contacts).",false)'>".elgg_echo('contact_importer:unselect_all')."</a><br />";
$body .= "<input type='submit' name='send' value='".elgg_echo('contact_importer:send_invites')."' class='thButton'>" . "  ";
$body .= "<input type='hidden' name='oi_step' value='Invite' />";
$body .= "<input type='hidden' name='oi_provider' value='{$oi_provider}'>";
$body .= "<input type='hidden' name='oi_username' value='{$oi_username}'>";
$body .= "<input type='hidden' name='oi_session_id' value='{$oi_session_id}'>";
}
$body .= "</form>";
return $body;
}
function ers($ers)
{
if (!empty($ers))
{
$contents="<table cellspacing='0' cellpadding='0' style='border:1px solid red;' align='center' class='tbErrorMsgGrad'><tr><td valign='middle' style='padding:3px' valign='middle' class='tbErrorMsg'><img src='/images/ers.gif'></td><td valign='middle' style='color:red;padding:5px;'>";
foreach ($ers as $key=>$error)
$contents.="{$error}<br >";
$contents.="</td></tr></table><br >";
return $contents;
}
}
function oks($oks)
{
if (!empty($oks))
{
$contents="<table border='0' cellspacing='0' cellpadding='10' style='border:1px solid #5897FE;' align='center' class='tbInfoMsgGrad'><tr><td valign='middle' valign='middle' class='tbInfoMsg'><img src='/images/oks.gif' ></td><td valign='middle' style='color:#5897FE;padding:5px;'> ";
foreach ($oks as $key=>$msg)
$contents.="{$msg}<br >";
$contents.="</td></tr></table><br >";
return $contents;
}
}
if ( !isset($_POST['oi_step']) ) {
$body .= echo_OpenInviter_Inputs_form($oi_services, $oi_provider, $oi_username);
} else if ( $_POST['oi_step'] == "Inputs" ) {
$ers=array();$oks=array();$import_ok=false;$done=false;
$inviter->startPlugin($oi_provider);
$internal=$inviter->getInternalError();
if ($internal)
{
$body .= echo_OpenInviter_Inputs_form($oi_services, $oi_provider, $oi_username);
$body .= "<label class='OpenInviter_Error'>" . $internal . "</label>";
}
elseif (!$inviter->login($oi_username,$oi_password))
{
$body .= echo_OpenInviter_Inputs_form($oi_services, $oi_provider, $oi_username);
$internal=$inviter->getInternalError();
if ( $internal )
$body .= "<label class='OpenInviter_Error'>" . $internal . "</label>";
else
$body .= "<label class='OpenInviter_Error'>" . elgg_echo('contact_importer:login_failed') . "</label>";
}
elseif (false===$contacts=$inviter->getMyContacts())
{
$body .= echo_OpenInviter_Inputs_form($oi_services, $oi_provider, $oi_username);
$body .= "<label class='OpenInviter_Error'>" . elgg_echo('contact_importer:contact_err') . "</label>";
}
else
{
// success -> show the contacts
$body .= echo_OpenInviter_Invite_form ($oi_provider, $oi_provider_name, $oi_username, $contacts, $inviter->plugin->getSessionID());
}
} else if ( $_POST['oi_step'] == "Invite" ) {
$inviter->startPlugin($oi_provider);
$internal=$inviter->getInternalError();
if ($internal)
{
$body .= echo_OpenInviter_Inputs_form($oi_services, $oi_provider, $oi_username);
$body .= "<label class='OpenInviter_Error'>" . $internal . "</label>";
}
else
{
$selected_contacts=array(); $invitee_list="";
foreach ($_POST as $key=>$val) {
if (strpos($key,'check_')!==false) {
$selected_contacts[$_POST['email_'.$val]]=$_POST['name_'.$val];
$invitee_list .= " - " . $_POST['name_'.$val] . "<br />";
} elseif (strpos($key,'email_')!==false) {
$temp=explode('_',$key);$counter=$temp[1];
if (is_numeric($temp[1])) $contacts[$val]=$_POST['name_'.$temp[1]];
}
}
if (count($selected_contacts)==0) {
$body .= "<label class='OpenInviter_Error'>" . elgg_echo('contact_importer:contacts_sel_err') . "</label>";
} else {
// Compose the message
$message['subject'] =
sprintf(
elgg_echo ('contact_importer:email:subject'),
$CONFIG->site->name
);
$message['body'] =
sprintf(
elgg_echo ('contact_importer:email:mailbody'),
$CONFIG->site->name,
$_SESSION['user']->name,
$CONFIG->wwwroot
);
$sendMessage=$inviter->sendMessage($oi_session_id,$message,$selected_contacts);
$inviter->logout();
if ($sendMessage===-1)
{
$message_subject=$_SESSION['user']->name.": ".$message['subject'];
$message_body=$message['body'];
$headers="From: {$_SESSION['user']->email}";
foreach ($selected_contacts as $email=>$name) {
mail($email,$message_subject,$message_body,$headers);
}
$body .= "<label class='OpenInviter_Info'>" . elgg_echo('contact_importer:send_success') . "<br />" . $invitee_list . "</label>";
}
elseif ($sendMessage===false)
{
$internal=$inviter->getInternalError();
if ( $internal ) {
$body .= "<label class='OpenInviter_Error'>" . $internal . "</label>";
} else {
$body .= "<label class='OpenInviter_Error'>" . elgg_echo('contact_importer:send_err') . "</label>";
}
}
else
{
$body .= "<label class='OpenInviter_Info'>" . elgg_echo('contact_importer:send_success') . "<br />" . $invitee_list . "</label>";
}
}
}
}
$body .= "</div>";
$body = elgg_view_layout('two_sidebar', $body);
// Finally draw the page
echo elgg_view_page($title, $body);
?>