Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [ADDON] phpInstantGallery  (Read 2926 times)

Anders Hansen

  • Newbie
  • *
  • Karma: 0
  • Posts: 35
  • Yehaaaaa
    • Kaff
[ADDON] phpInstantGallery
« on: December 20, 2007, 11:45:29 AM »

Hello all.

I have a problem with my gallery added to my site at http://www.xclusive.name/

The gallery is not added as a link to the site yet, and is located at this link
http://www.xclusive.name/kaff/gal/index.php?gallery=dog&currpage=1

If you just use http://www.xclusive.name/kaff/gal/ you will find a problem in the index.php because there is no gallery defined yet. The gallery used in above link is named DOG.

As you can se I have a bit of a problem with something that for me looks to be the function title, but I am not sure. Since I don't know alot of code I turn to you to ask for some help.
This gallery is a easy and simple gallery, and will be used as links added to articles.

What do I have to provide to get the help I need?

You can find the package here http://www.ikemcg.com/scripts/pig/2.0/phpInstantGallery_v2.0.zip

I have done some alteration to the config.php file in the root of this addon folder, and the templates.

Make sure to change the extention from html to php in the template files, and also in both the image.php and the index.php around line 20 from html to php.

The css file is also needed to strip down so you dont get conflicts with the css of the snews. And you should delete this part from the main.css in the phpInstantGallery folder

Code: [Select]
body {
font-size: 12px;
background-color:#FFF;
font-family: Verdana, sans-serif;
color: #000;
}

h1 {
margin: 16px 0;
padding-bottom: 0;
font: 24px normal Georgia, serif;
color: #999;
border-bottom: #999 1px solid;
}

a   { color: #3054BF; }
a:link    { color: #3054BF; }
a:visited { color: #5C73B8; }

#wrapper {
margin: 0;
padding: 0;
width: 630px;
}

Remember to also add the snews css in the header.php

I have also worked a bit with the gallery it self and found out that it can easily be implemented to the snews.php file, but to make this as easy as possible, it is better to just use it like it already is.

The template is a tricky part. Because if you want to make the template look like you original snews template, you have to splitt it up and make it look like i have done ( this is an example of how my templates look like, you can make your own)

This is the header.php
Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php title(); search_javascript();?>
<meta name="Robots" content="index,follow" />
   
<link rel="stylesheet" type="text/css" href="../templates/default/css/style.css" media="screen" />
<link rel="stylesheet" type="text/css" href="../css/lightbox.css" media="screen" />
<link rel="stylesheet" type="text/css" href="main.css" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="rss-articles/" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="rss-pages/" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="rss-comments/" />
<script type="text/javascript" src="../js/prototype.js"></script>
<script type="text/javascript" src="../js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="../js/lightbox.js"></script>

<!-- do not remove following line -->
<-- JAVASCRIPT -->


<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />

</head>
<body>

This is the completion of how the thumbpart look like: thumb_page.php
Code: [Select]
<table class="table">
  <tr>
    <td>
<div class="wrap">

<div align="center" id="header">
<a href="http://www.xclusive.name/kaff/"><img src="../images/logo.gif" alt="Kultur- arrangering, formidling og forvaltning" /></a></div>
<br />
        <div id="logo">
<h1><?php echo s('website_title'); ?></h1>
</div>

        <ul id="menu">
        <?php default_pages(); ?>
</ul>

<div id="subheader">
<div id="breadcrumbs">
<a id="top" name="top"></a>
<?php /* jump_to('footer', 'All Links |') */ ?><?php breadcrumbs(); ?>

</div>

<div id="search">
<?php searchform(); ?>
</div>
</div>

<div id="left">

<?php user_status(); ?>
<?php extra(); ?>
                       
<!--                        <h3>Dine sider:</h3>
--> <ul> <?php extra_pages(); ?> </ul>

  <h3>Arrangering:</h3>
                        <?php categories(1,'false'); ?>
                <h3>Formidling:</h3>
                        <?php categories(2,'false'); ?>
                <h3>Forvaltning:</h3>
                        <?php categories(3,'false'); ?>
               
<!-- <h3>Nye artikler:</h3>
<ul> <?php menu_articles(0,3); ?> </ul>
-->
<h3>Innhold:</h3>
<ul> <?php lead_articles(0,3); ?> </ul>

<h3>Kommentarer:</h3>
<ul> <?php new_comments(530); ?> </ul>
</div>

  <div id="right">
 
  <div class="extrabox"> <?php second_extra(); ?> </div><br />


<div id="pagination_menu">
<-- PAGE_NAVIGATION -->
</div>

<-- THUMBNAIL_TABLE -->

<div id="pagination_menu">
<-- PAGE_NAVIGATION -->
</div>

<!-- do not remove following line -->
<form name="img"><script language="JavaScript">imgList();</script></form>

<br /><div class="extrabox"> <?php third_extra(); ?> </div><br />
<p><?php jump_to('header''<img src=\'sn_icons/totop.gif\' alt=\'Back to Page Top\' />'?></p>
</div>

<div id="footer">
<ul id="rss"> <?php rss_links(); ?>
  </ul>
<div class="right">Barbequed by <a href="http://www.snewscms.com/" target="_blank">sNews</a> &copy; <?php echo s('copyright_date'); ?>&nbsp;<?php echo s('website_copyright'); ?>
</div>
</div></div></td>
  </tr>
</table>
</body>
</html>

And the last part is how the single picture view look like: image_page.php
Code: [Select]
<table class="table">
  <tr>
    <td>
<div class="wrap">

<div align="center" id="header">
<a href="http://www.xclusive.name/kaff/"><img src="../images/logo.gif" alt="Kultur- arrangering, formidling og forvaltning" /></a></div>
<br />
        <div id="logo">
<h1><?php echo s('website_title'); ?></h1>
</div>

        <ul id="menu">
        <?php default_pages(); ?>
</ul>

<div id="subheader">
<div id="breadcrumbs">
<a id="top" name="top"></a>
<?php /* jump_to('footer', 'All Links |') */ ?><?php breadcrumbs(); ?>

</div>

<div id="search">
<?php searchform(); ?>
</div>
</div>

<div id="left">

<?php user_status(); ?>
<?php extra(); ?>
                       
<!--                        <h3>Dine sider:</h3>
--> <ul> <?php extra_pages(); ?> </ul>

  <h3>Arrangering:</h3>
                        <?php categories(1,'false'); ?>
                <h3>Formidling:</h3>
                        <?php categories(2,'false'); ?>
                <h3>Forvaltning:</h3>
                        <?php categories(3,'false'); ?>
               
<!-- <h3>Nye artikler:</h3>
<ul> <?php menu_articles(0,3); ?> </ul>
-->
<h3>Innhold:</h3>
<ul> <?php lead_articles(0,3); ?> </ul>

<h3>Kommentarer:</h3>
<ul> <?php new_comments(530); ?> </ul>
</div>

  <div id="right">
 
  <div class="extrabox"> <?php second_extra(); ?> </div><br />

       
        <div class="scroll_bar">
<-- SCROLL_BAR -->
</div>

<img src="<-- DISPLAY_IMAGE -->" id="full_image" />

<!-- do not remove following line -->
<form name="img"><script language="JavaScript">imgList();</script></form>

<br /><div class="extrabox"> <?php third_extra(); ?> </div><br />
<p><?php jump_to('header''<img src=\'sn_icons/totop.gif\' alt=\'Back to Page Top\' />'?></p>
</div>

<div id="footer">
<ul id="rss"> <?php rss_links(); ?>
  </ul>
<div class="right">Barbequed by <a href="http://www.snewscms.com/" target="_blank">sNews</a> &copy; <?php echo s('copyright_date'); ?>&nbsp;<?php echo s('website_copyright'); ?>
</div>
</div></div></td>
  </tr>
</table>
</body>
</html>

As you can see, there are to small parts added to the template instead of the center().
This is placed in the thumb_page.php
Code: [Select]
<div id="pagination_menu">
<-- PAGE_NAVIGATION -->
</div>

<-- THUMBNAIL_TABLE -->

<div id="pagination_menu">
<-- PAGE_NAVIGATION -->
</div>

<!-- do not remove following line -->
<form name="img"><script language="JavaScript">imgList();</script></form>

and
This is placed in the image_page.php
Code: [Select]
       <div class="scroll_bar">
<-- SCROLL_BAR -->
</div>

<img src="<-- DISPLAY_IMAGE -->" id="full_image" />

<!-- do not remove following line -->
<form name="img"><script language="JavaScript">imgList();</script></form>
« Last Edit: December 20, 2007, 12:16:25 PM by Anders Hansen »
Logged