1

Topic: SimpleViewer integration, need help

SimpleViewer is a free, customizable Flash image viewing application.
I´d like to integrate SimpleViewer in PunBB.

I´ve tried a lot, however I don´t get ahead.
<pun_include "blablabla.php"> doesn´t work, the script must change to another folder to load some other configuration files.
The programm also uses his own stylesheets.

If I start the script directly all is working fine. You can see it on my forum.
But for a better looking I need the header, footer and styles of my punbb.

My PunBB Arcade Mod & Game Packs 1-9 (update 01-06-2007):
Test and download here !

2 (edited by Dr.Jeckyl 2006-07-28 17:51)

Re: SimpleViewer integration, need help

have you read the FAQ for SimpleViewer? ? #10 is where to start.

http://www.airtightinteractive.com/simp … r/faq.html

if not it's worth a look. then use the blank page template for punbb:

<?php
 
define('PUN_ROOT', './');
define('PUN_QUIET_VISIT', 1);
require PUN_ROOT.'include/common.php';
 
//Set the page title here
$page_title = pun_htmlspecialchars($pun_config['o_board_title']) . ' / New page 1';
define('PUN_ALLOW_INDEX', 1);
require PUN_ROOT.'header.php';
require PUN_ROOT.'include/parser.php';
 
?>
        <div class="block">
            <h2><span>Box 1</span></h2>
            <div class="box">
                <div class="inbox">
                    <p>
                    Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent augue. Nulla facilisi. Fusce bibendum accumsan erat. Quisque sollicitudin mattis neque. Sed dapibus. Integer a lectus eu sem consequat pellentesque. Morbi rhoncus nulla. Duis adipiscing interdum velit. Fusce ante. Ut vitae enim sit amet magna sodales hendrerit. In sed tortor at sapien convallis eleifend. Proin mauris. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut metus. Cras ac arcu et arcu porttitor blandit. Nam vitae lectus eget mauris sollicitudin placerat. Suspendisse vestibulum. Donec varius libero. Duis velit tellus, euismod vitae, consequat sed, consectetuer ut, purus.
                    </p>
                    <p>
                    Praesent viverra venenatis magna. Etiam in dolor. Ut in justo ac nibh malesuada cursus. Duis urna arcu, aliquam vitae, consequat nec, tincidunt non, mi. Nunc lobortis. Nunc pharetra. Sed porttitor. Maecenas turpis tortor, blandit nec, dignissim in, porttitor eu, odio. In hac habitasse platea dictumst. Suspendisse augue odio, ornare a, elementum ac, tincidunt varius, orci. Nulla libero ante, hendrerit ac, consectetuer eu, sollicitudin et, eros. Duis sapien. Suspendisse ornare enim sit amet dui. Donec ullamcorper diam.
                    </p>
                </div>
            </div>
        </div>
<?php
 
require PUN_ROOT.'footer.php';
~James
FluxBB - Less is more

Re: SimpleViewer integration, need help

man... just get my lightbox galley script..hahaha..
http://www.punres.org/viewtopic.php?id=1742
DrJ it is done with a slit mod to the header

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

4

Re: SimpleViewer integration, need help

DrJeckyl,
yes I´ve read FAQ´s but I don´t know how to integrate it. It´s to difficult for me.  :-(
The blank template is a good start, but how does it continue?
How do I change the directory in the template script, for example this index.php in the dir /gallery looks like this:

<?php

header("Expires: Mon, 31 Dec 2003 12:34:56 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") ." GMT");
header("Pragma: no-cache");
header("Cache-Control: no-cache");
header("Cache-Control: post-check=0, pre-check=0", false);

// Load the SimpleViewer configuration.
require_once '[b]SimpleViewerConfig.php[/b]';

// Load the SimpleViewer functions library.
require_once '[b]SimpleViewerFunctions.php[/b]';

// Get the current number of albums.
$dirList = getDirList('./', '', false, 'dirs');

// SimpleViewer is not installed yet.
if ($dirList['Number'] == 0) {
    header('Location:SimpleViewerAdmin.php');
    exit;
}

?>
<!DOCTYPE html 
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <title><?php echo (!empty($simpleViewer['title']) ? $simpleViewer['title'] : $simpleViewer['defaultTitle']); ?></title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link rel="stylesheet" type="text/css" href="SimpleViewerCss.php" />
    </head>
    <body>
        <?php require_once '[b]SimpleViewer.php[/b]'; ?>
    </body>
</html>

You can see the script needs to load 3 other scripts in the same directory.
Sorry, I don´t have the know how to do that.

My PunBB Arcade Mod & Game Packs 1-9 (update 01-06-2007):
Test and download here !

5

Re: SimpleViewer integration, need help

quaker wrote:

man... just get my lightbox galley script..hahaha..
http://www.punres.org/viewtopic.php?id=1742
DrJ it is done with a slit mod to the header

Yes, looks nice but I think SimpleViewer is better.  ;-)

My PunBB Arcade Mod & Game Packs 1-9 (update 01-06-2007):
Test and download here !

Re: SimpleViewer integration, need help

Where is SimpleViewer located in relation to your forum install?

Looking for a certain modification for your forum? Please take a look here before posting.

7

Re: SimpleViewer integration, need help

It would be great to use the gallery inside posts smile

Re: SimpleViewer integration, need help

Rod wrote:

It would be great to use the gallery inside posts smile

Very true

9

Re: SimpleViewer integration, need help

pogenwurst wrote:

Where is SimpleViewer located in relation to your forum install?

This is my forum structure:

  |---Puntal
             |---punBB
                       |---SimpleViewer

My PunBB Arcade Mod & Game Packs 1-9 (update 01-06-2007):
Test and download here !

Re: SimpleViewer integration, need help

Will something like this work (upload to your PunBB directory)?

<?php

header("Expires: Mon, 31 Dec 2003 12:34:56 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") ." GMT");
header("Pragma: no-cache");
header("Cache-Control: no-cache");
header("Cache-Control: post-check=0, pre-check=0", false);

define('PUN_ROOT', './');
require PUN_ROOT.'include/common.php';

// Load the SimpleViewer configuration.
require_once 'SimpleViewer/SimpleViewerConfig.php';

// Load the SimpleViewer functions library.
require_once 'SimpleViewer/SimpleViewerFunctions.php';

// Get the current number of albums.
$dirList = getDirList('./SimpleViewer/', '', false, 'dirs');

// SimpleViewer is not installed yet.
if ($dirList['Number'] == 0) {
    header('Location:SimpleViewer/SimpleViewerAdmin.php');
    exit;
}
 
//Set the page title here
$page_title = pun_htmlspecialchars($pun_config['o_board_title']) . ' / ' . !empty($simpleViewer['title']) ? $simpleViewer['title'] : $simpleViewer['defaultTitle']);
define('PUN_ALLOW_INDEX', 1);
require PUN_ROOT.'header.php';
 
?>
        <link rel="stylesheet" type="text/css" href="SimpleViewerCss.php" />
    <div class="block">
            <h2><span>Gallery</span></h2>
            <div class="box">
                <div class="inbox">
            <?php require_once 'SimpleViewer/SimpleViewer.php'; ?>
                </div>
            </div>
        </div>
<?php
 
require PUN_ROOT.'footer.php';
Looking for a certain modification for your forum? Please take a look here before posting.

11

Re: SimpleViewer integration, need help

A crazy request : possible to integrate TAGS ?
In this way, it becomes possible
1. to search galleries by users
2. to search galleries by ... tags smile

No need to have a gallery script smile

12

Re: SimpleViewer integration, need help

pogenwurst,

I´ve tested your code but it doesnt work.

Can't read file: SimpleViewerConfig.xml

SimpleViewerConfig.xml is used in SimpleViewerConfig.php and SimpleViewerFunctions.php.
Ok, it sounds simple but is there a command in punbb to change the directory? Like ind DOS "cd /SimpleViewer" ...

My PunBB Arcade Mod & Game Packs 1-9 (update 01-06-2007):
Test and download here !

13

Re: SimpleViewer integration, need help

can u not add this ?

<?php require_once 'SimpleViewer/SimpleViewerConfig.xml'; ?>
or
<?php include 'SimpleViewer/SimpleViewerConfig.xml';?>
My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

Re: SimpleViewer integration, need help

ango wrote:

pogenwurst,

I´ve tested your code but it doesnt work.

Can't read file: SimpleViewerConfig.xml

SimpleViewerConfig.xml is used in SimpleViewerConfig.php and SimpleViewerFunctions.php.
Ok, it sounds simple but is there a command in punbb to change the directory? Like ind DOS "cd /SimpleViewer" ...

Sorry then. I'd try harder to help (the code I posted was mostly guesswork & copy/paste), but I've managed to render my desktop install of Apache nonfunctional (again) so I can't really do testing at the moment.

Looking for a certain modification for your forum? Please take a look here before posting.

15

Re: SimpleViewer integration, need help

quaker wrote:

can u not add this ?

<?php require_once 'SimpleViewer/SimpleViewerConfig.xml'; ?>
or
<?php include 'SimpleViewer/SimpleViewerConfig.xml';?>

Yes, I´ve test it too, but doesnt work.
I´ve tested also the other way. Changed to the SimpleViewer directory, edit index.php and paste some punbb settings:

define('PUN_ROOT', '../');
require PUN_ROOT.'include/common.php';
define('PUN_ALLOW_INDEX', 1);
require PUN_ROOT.'header.php';

blablablabla "SimpleViewer" blablabla

require PUN_ROOT.'footer.php';

Then I´ve copied the "style" and "img" folder from punbb root to the SimpleViewer folder and voila ... SimpleViewer started.
Ok, not 100% perfect but it started. The links in punbb header are bashed up. For example the "forum" link is not http://mysite/forum/index.php , it´s http://mysite/forum/SimpleViewer/index.php

My PunBB Arcade Mod & Game Packs 1-9 (update 01-06-2007):
Test and download here !

Re: SimpleViewer integration, need help

Yeah, just open functions.php, find generate_navlinks() and prefix each link with PUN_ROOT.