Topic: Editing index.php master file (JS help) / Images stretching
Hey guys,
Really loving SimpleViewer Pro and svManager (this is my first experience with it). I have a client where I'm putting in 60+ galleries in their portfolio on their Drupal website (beta mode right now).
I'm using the latest version of both as I just purchased them yesterday (10/19/2010) but the trouble I'm having is this:
1) The Drupal drop-down menus are hiding behind the first few iFrame embedded SV galleries I've made (see example here: http://www.jhlconstructors.net/drupal/r … featured). Now, after doing some research on here, I know that I need to insert params.wmode = "transparent"; somewhere in the index.php master file (located here: /svmanager/plugins/simpleviewer2/sv2master/index.php). Since I do not know JavaScript, I need to know where I put this line in the index.php file.
Here is the index.php code I currently have:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" >
<?php
/* Leave this block of php code intact if customizing this page */
error_reporting(0);
$preferences = file_get_contents('preferences.txt');
$preferences = unserialize($preferences);
$title = htmlspecialchars($preferences['htmlTitle'], ENT_QUOTES, 'UTF-8');
$galleryWidth = isset($preferences['galleryWidth']) ? "'".$preferences['galleryWidth']."'" : "'100%'";
$galleryHeight = isset($preferences['galleryHeight']) ? "'".$preferences['galleryHeight']."'" : "'100%'";
$useFlash = isset($preferences['useFlash']) ? strtolower($preferences['useFlash']) : 'true';
$backgroundColor = isset($preferences['backgroundColor']) ? $preferences['backgroundColor'] : '0x222222';
$backgroundColor = "'".ltrim(str_replace('0x', '', $backgroundColor), '#')."'";
?>
<title><?php print $title; ?></title>
</head>
<body>
<!--START SIMPLEVIEWER EMBED -->
<script type="text/javascript" src="svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
$(document).ready(function () {
SV.simpleviewer.load(
'sv-container',
<?php print $galleryWidth ?>,
<?php print $galleryHeight ?>,
<?php print $backgroundColor; ?>,
<?php print $useFlash ?>);
});
</script>
<div id="sv-container"></div>
<!--END SIMPLEVIEWER EMBED -->
</body>
</html>
2) In addition to the issue I have above, I am having an issue with "tall" photos not working right (see example here: http://www.jhlconstructors.net/drupal/r … s-featured and view the 2nd and 4th thumbnails). Most of the photos I have are of the dimension 600x300 but the client has a few where they are reversed: 300x600. Is there a way to just make it fit in the 600x300 image window I have there? This would mean that it wouldn't stretch or anything like that for tall photos. I would just want it to appear smaller to where the tall photos would appear at 150x300 (no stretching).
Thanks in advance for your help! :cool:
-Wes