Topic: svManager and Wordpress integration

I have successfully set up Wordpress to retrieve the galleries from svManager with some handy cut and paste coding.

However, there is one thing I would like to be able to do, which is control the gallery's apperance from svManager, instead of hand-editing the javascript that calls the Tiltviewer from my template pages.

I have tried adding this code to the header.php file of my wordpress template pages, which I pulled from my svManager's gallery index.php file.

      /* Leave this block of php code intact if customizing this page */
      $preferences = file_get_contents('');
      $preferences = unserialize($preferences);
      $title = htmlspecialchars($preferences['htmlTitle'], ENT_QUOTES, 'UTF-8');
      $useFlickr = $preferences['useFlickr'] ? 'true' : 'false';
      $showTakenByText = $preferences['flickrShowTakenByText'] ? 'true' : 'false';
      $useReloadButton = $preferences['useReloadButton'] ? 'true' : 'false';
      $showFlipButton = $preferences['showFlipButton'] ? 'true' : 'false';
      $showLinkButton = $preferences['showLinkButton'] ? 'true' : 'false';
      $bkgndTransparent = $preferences['bkgndTransparent'] ? 'true' : 'false';
      $showFullscreenOption = $preferences['showFullscreenOption'] ? 'true' : 'false';
      $enableSounds = $preferences['enableSounds'] ? 'true' : 'false';
      print '<title>'.$title.'</title>';

From what I can tell, Wordpress is not pulling and/or parsing the preferences.txt file correctly for the gallery and hence the settings are not being fed to the displayed gallery correctly.

This is not mission critical stuff but it would be nice to know that I could control the gallery appearance from svManager instead of having to hand-edit the settings for the page.


Re: svManager and Wordpress integration

WordPress is unknown territory for me but one thing strikes me in looking at your code.

$preferences = file_get_contents('');

Not all servers support urls in php file operations, so you might need a path. You could try a relative path. If that doesn't work, try an absolute path from the server root, so it would look something like:


Any WordPress experts out there with anything to add?


Jack Hardie
SimpleViewer Support Team.