Guten Tag alleseites,
ich schreibe gerade ein Shoutbox welche ich nun per iframe in das Dashboard einbinde.
Zurzeit müssen die Agenten Ihr Name noch von Hand eintragen, ich möchte jedoch das dies automatisch vonstatten geht.
mit mysql hat ichs schon versucht, da bekomme ich ja nicht die Information welcher Agent eingeloggt ist. Aber wie bekommt ich die Verbindung zu perl hin damit ich z.B $QEnv{"UserFirstname"} einbinden kann.
geschrieben ich das Ding mit php, hat mir jemand ein Input?
Iframe Dashboard Shoutbox
-
- Znuny guru
- Posts: 5018
- Joined: 13 Mar 2011, 09:54
- Znuny Version: 6.0.x
- Real Name: Renée Bäcker
- Company: Perl-Services.de
- Contact:
Re: Iframe Dashboard Shoutbox
Wie integrierst Du das iframe im Dashboard? Das Modul, kennt die UserID des eingeloggten Users, damit kommst Du an den Namen (siehe http://dev.otrs.org/ -> Kernel::System::User) des Agenten. Das kannst Du dann dem iframe-src übergeben...
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Re: Iframe Dashboard Shoutbox
Im Anhang siehst du wie ich die Shoutbox einbinde...
Wie soll ich jetzt das mitgeben können?
Wie soll ich jetzt das mitgeben können?
You do not have the required permissions to view the files attached to this post.
-
- Znuny guru
- Posts: 5018
- Joined: 13 Mar 2011, 09:54
- Znuny Version: 6.0.x
- Real Name: Renée Bäcker
- Company: Perl-Services.de
- Contact:
Re: Iframe Dashboard Shoutbox
In Kernel::Output::HTML::DashboardIFrame steht die UserID zur Verfügung...
Änderung in Kernel/Output/HTML/Standard/AgentDashboardIFrame.dtl:
nach
neue Version des Moduls:
(ungetestet)
Edit: Dem GET-Parameter für URL noch den Namen "Username" gegeben...
Änderung in Kernel/Output/HTML/Standard/AgentDashboardIFrame.dtl:
Code: Select all
<iframe src="$QData{"URL"}"
Code: Select all
<iframe src="$QData{"URL"}?Username=$QData{"UserFirstname"}"
Code: Select all
# --
# Kernel/Output/HTML/DashboardIFrame.pm
# Copyright (C) 2001-2012 xxx, http://otrs.org/
# --
# $Id:
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see L<http://www.gnu.org/licenses/agpl.txt>.
# --
package Kernel::Output::HTML::DashboardIFrame;
use strict;
use warnings;
use vars qw($VERSION);
$VERSION = qw($Revision: 1.3 $) [1];
sub new {
my ( $Type, %Param ) = @_;
# allocate new hash for object
my $Self = {%Param};
bless( $Self, $Type );
# get needed objects
for (
qw(Config Name ConfigObject LogObject DBObject LayoutObject ParamObject TicketObject UserObject UserID)
)
{
die "Got no $_!" if ( !$Self->{$_} );
}
return $Self;
}
sub Preferences {
my ( $Self, %Param ) = @_;
return;
}
sub Config {
my ( $Self, %Param ) = @_;
return (
%{ $Self->{Config} }
);
}
sub Run {
my ( $Self, %Param ) = @_;
# quote Title attribute, it will be used as name="" parameter of the iframe
my $Title = $Self->{Config}->{Title} || '';
$Title =~ s/\s/_/smx;
my %UserData = $Self->{UserObject}->GetUserData(
UserID => $Self->{UserID},
);
my $Content = $Self->{LayoutObject}->Output(
TemplateFile => 'AgentDashboardIFrame',
Data => {
%{ $Self->{Config} },
Title => $Title,
%UserData,
},
);
return $Content;
}
1;
Edit: Dem GET-Parameter für URL noch den Namen "Username" gegeben...
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de