changed screenshots in Matrix Listing view to popup
This commit is contained in:
parent
9d62603869
commit
d7f94f450b
7 changed files with 74 additions and 74 deletions
Binary file not shown.
Binary file not shown.
BIN
docs/upgrades/packages-7.7.0/matrix-default-screenshots.wgpkg
Normal file
BIN
docs/upgrades/packages-7.7.0/matrix-default-screenshots.wgpkg
Normal file
Binary file not shown.
|
|
@ -33,6 +33,7 @@ my $session = start(); # this line required
|
||||||
# upgrade functions go here
|
# upgrade functions go here
|
||||||
|
|
||||||
addGroupToAddToMatrix( $session );
|
addGroupToAddToMatrix( $session );
|
||||||
|
addScreenshotTemplatesToMatrix( $session );
|
||||||
|
|
||||||
finish($session); # this line required
|
finish($session); # this line required
|
||||||
|
|
||||||
|
|
@ -47,6 +48,19 @@ sub addGroupToAddToMatrix {
|
||||||
print "Done.\n" unless $quiet;
|
print "Done.\n" unless $quiet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
sub addScreenshotTemplatesToMatrix {
|
||||||
|
my $session = shift;
|
||||||
|
print "\tAdding screenshot templates to Matrix table \n" unless $quiet;
|
||||||
|
|
||||||
|
$session->db->write("alter table Matrix add screenshotsConfigTemplateId char(22);");
|
||||||
|
$session->db->write("update Matrix set screenshotsConfigTemplateId = 'matrixtmpl000000000007';");
|
||||||
|
$session->db->write("alter table Matrix add screenshotsTemplateId char(22);");
|
||||||
|
$session->db->write("update Matrix set screenshotsTemplateId = 'matrixtmpl000000000006';");
|
||||||
|
|
||||||
|
print "Done.\n" unless $quiet;
|
||||||
|
}
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
# Describe what our function does
|
# Describe what our function does
|
||||||
#sub exampleFunction {
|
#sub exampleFunction {
|
||||||
|
|
|
||||||
|
|
@ -692,33 +692,10 @@ sub view {
|
||||||
my $storage = $file->getStorageLocation;
|
my $storage = $file->getStorageLocation;
|
||||||
my @files;
|
my @files;
|
||||||
@files = @{ $storage->getFiles } if (defined $storage);
|
@files = @{ $storage->getFiles } if (defined $storage);
|
||||||
|
$var->{screenshotsUrl} = $self->getUrl('func=viewScreenshots');
|
||||||
$var->{screenshots} = qq|
|
$var->{screenshotThumbnail} = $storage->getUrl('thumb-'.$files[0]);
|
||||||
<script type="text/javascript" src="/extras/ukplayer/swfobject.js"></script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
swfobject.registerObject("myFlashContent","9.0.0","/extras/ukplayer/expressInstall.swf");
|
|
||||||
</script>
|
|
||||||
<div>
|
|
||||||
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="400" height="300" id="myFlashContent">
|
|
||||||
<param name="movie" value="/extras/ukplayer/slideShow.swf" />
|
|
||||||
<param name="flashvars" value="config=?func=getScreenshotsConfig" />
|
|
||||||
<!--[if !IE]>-->
|
|
||||||
<object type="application/x-shockwave-flash" data="/extras/ukplayer/slideShow.swf" width="400"
|
|
||||||
height="300">
|
|
||||||
<param name="flashvars" value="config=?func=getScreenshotsConfig" />
|
|
||||||
<!--<![endif]-->
|
|
||||||
<a href="http:/www.adobe.com/go/getflashplayer">
|
|
||||||
<img src="http:/www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe
|
|
||||||
Flash player" />
|
|
||||||
</a>
|
|
||||||
<!--[if !IE]>-->
|
|
||||||
</object>
|
|
||||||
<!--<![endif]-->
|
|
||||||
</object>
|
|
||||||
</div>
|
|
||||||
|;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Rating form
|
# Rating form
|
||||||
|
|
||||||
my %rating;
|
my %rating;
|
||||||
|
|
@ -977,9 +954,7 @@ sub www_getScreenshots {
|
||||||
my $thumb = 'thumb-'.$file;
|
my $thumb = 'thumb-'.$file;
|
||||||
$xml .= "
|
$xml .= "
|
||||||
<slide>
|
<slide>
|
||||||
<width>400</width>
|
<title></title>
|
||||||
<height>300</height>
|
|
||||||
<title><![CDATA[<b>Slide</b> One]]></title>
|
|
||||||
<description><![CDATA[ Screenshots ]]></description>
|
<description><![CDATA[ Screenshots ]]></description>
|
||||||
<image_source>".$storage->getUrl($file)."</image_source>
|
<image_source>".$storage->getUrl($file)."</image_source>
|
||||||
<duration>5</duration>
|
<duration>5</duration>
|
||||||
|
|
@ -1007,56 +982,14 @@ Returns the xml config file for the ukplayer that displays the screenshots.
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
sub www_getScreenshotsConfig {
|
sub www_getScreenshotsConfig {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
my $var = $self->get;
|
||||||
|
|
||||||
return $self->session->privilege->noAccess() unless $self->canView;
|
return $self->session->privilege->noAccess() unless $self->canView;
|
||||||
|
|
||||||
$self->session->http->setMimeType('text/xml');
|
$self->session->http->setMimeType('text/xml');
|
||||||
|
|
||||||
my $xml = qq|<?xml version="1.0" encoding="UTF-8"?>
|
return $self->processTemplate($var,$self->getParent->get("screenshotsConfigTemplateId"));
|
||||||
<config>
|
|
||||||
|
|
||||||
<content_url>?func=getScreenshots</content_url>
|
|
||||||
|
|
||||||
<width>400</width><!-- this value is overwritten by the flashVars but the tag needs to be here (and it is
|
|
||||||
useful for offline testing) -->
|
|
||||||
<height>300</height><!-- this value is overwritten by the flashVars but the tag needs to be here (and it is
|
|
||||||
useful for offline testing) -->
|
|
||||||
<background_color>0xDDDDEE</background_color>
|
|
||||||
<default_duration>20</default_duration>
|
|
||||||
<default_slidewidth>100</default_slidewidth>
|
|
||||||
<default_slideheight>100</default_slideheight>
|
|
||||||
|
|
||||||
<font>Verdana</font>
|
|
||||||
<font_size>12</font_size>
|
|
||||||
<font_color>0xCCCCCC</font_color>
|
|
||||||
<text_border_color>0xCCCCCC</text_border_color>
|
|
||||||
<text_bg_color>0x000000</text_bg_color>
|
|
||||||
<text_autohide>true</text_autohide>
|
|
||||||
|
|
||||||
<controls_color>0xCCCCCC</controls_color>
|
|
||||||
<controls_border_color>0xCCCCCC</controls_border_color>
|
|
||||||
<controls_bg_color>0x000000</controls_bg_color>
|
|
||||||
<controls_autohide>false</controls_autohide>
|
|
||||||
|
|
||||||
<thumbnail_width>48</thumbnail_width>
|
|
||||||
<thumbnail_height>36</thumbnail_height>
|
|
||||||
<thumbnail_border_color>0x000000</thumbnail_border_color>
|
|
||||||
<menu_autohide>true</menu_autohide>
|
|
||||||
<menu_dead_zone_width>100</menu_dead_zone_width>
|
|
||||||
<menu_gaps>5</menu_gaps>
|
|
||||||
|
|
||||||
<mute_at_start>false</mute_at_start>
|
|
||||||
<autostart>true</autostart>
|
|
||||||
<autopause>false</autopause>
|
|
||||||
<loop>false</loop>
|
|
||||||
<error_message_content><![CDATA[XML not found: ]]></error_message_content>
|
|
||||||
<error_message_image><![CDATA[Image not found]]></error_message_image>
|
|
||||||
|
|
||||||
</config>
|
|
||||||
|;
|
|
||||||
|
|
||||||
return $xml;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
@ -1164,7 +1097,24 @@ sub www_view {
|
||||||
return $self->view;
|
return $self->view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 www_viewScreenshots ( )
|
||||||
|
|
||||||
|
Returns this listing's screenshots in a ukplayer.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
sub www_viewScreenshots {
|
||||||
|
my $self = shift;
|
||||||
|
my $var = $self->get;
|
||||||
|
|
||||||
|
$var->{configUrl} = 'config='.$self->getUrl("func=getScreenshotsConfig");
|
||||||
|
|
||||||
|
return $self->session->privilege->noAccess() unless $self->canView;
|
||||||
|
|
||||||
|
return $self->processTemplate($var,$self->getParent->get("screenshotsTemplateId"));
|
||||||
|
}
|
||||||
1;
|
1;
|
||||||
|
|
||||||
#vim:ft=perl
|
#vim:ft=perl
|
||||||
|
|
|
||||||
|
|
@ -130,6 +130,22 @@ sub definition {
|
||||||
hoverHelp =>$i18n->get('edit listing template description'),
|
hoverHelp =>$i18n->get('edit listing template description'),
|
||||||
label =>$i18n->get('edit listing template label'),
|
label =>$i18n->get('edit listing template label'),
|
||||||
},
|
},
|
||||||
|
screenshotsTemplateId=>{
|
||||||
|
defaultValue =>"matrixtmpl000000000006",
|
||||||
|
fieldType =>"template",
|
||||||
|
tab =>"display",
|
||||||
|
namespace =>"Matrix/Screenshots",
|
||||||
|
hoverHelp =>$i18n->get('screenshots template description'),
|
||||||
|
label =>$i18n->get('screenshots template label'),
|
||||||
|
},
|
||||||
|
screenshotsConfigTemplateId=>{
|
||||||
|
defaultValue =>"matrixtmpl000000000007",
|
||||||
|
fieldType =>"template",
|
||||||
|
tab =>"display",
|
||||||
|
namespace =>"Matrix/ScreenshotsConfig",
|
||||||
|
hoverHelp =>$i18n->get('screenshots config template description'),
|
||||||
|
label =>$i18n->get('screenshots config template label'),
|
||||||
|
},
|
||||||
defaultSort=>{
|
defaultSort=>{
|
||||||
fieldType =>"selectBox",
|
fieldType =>"selectBox",
|
||||||
tab =>"display",
|
tab =>"display",
|
||||||
|
|
|
||||||
|
|
@ -481,6 +481,16 @@ listing,|,
|
||||||
message => q|Select a template to be used to show the listing edit screen.|,
|
message => q|Select a template to be used to show the listing edit screen.|,
|
||||||
lastUpdated => 0,
|
lastUpdated => 0,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
'screenshots template description' => {
|
||||||
|
message => q|Select a template to be used to show a listing's screenshots.|,
|
||||||
|
lastUpdated => 0,
|
||||||
|
},
|
||||||
|
|
||||||
|
'screenshots config template description' => {
|
||||||
|
message => q|Select a template for a listing's screenshots configuration.|,
|
||||||
|
lastUpdated => 0,
|
||||||
|
},
|
||||||
|
|
||||||
'categories label' => {
|
'categories label' => {
|
||||||
message => q|Categories|,
|
message => q|Categories|,
|
||||||
|
|
@ -612,6 +622,16 @@ listing,|,
|
||||||
lastUpdated => 0,
|
lastUpdated => 0,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
'screenshots template label' => {
|
||||||
|
message => q|Listing Screenshots Template|,
|
||||||
|
lastUpdated => 0,
|
||||||
|
},
|
||||||
|
|
||||||
|
'screenshots config template label' => {
|
||||||
|
message => q|Listing Screenshots Config Template|,
|
||||||
|
lastUpdated => 0,
|
||||||
|
},
|
||||||
|
|
||||||
'edit listing template label' => {
|
'edit listing template label' => {
|
||||||
message => q|Edit Listing Template|,
|
message => q|Edit Listing Template|,
|
||||||
lastUpdated => 0,
|
lastUpdated => 0,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue