<?
#######################################################
# nimages -- Nar3 Images -- An Image Gallery
# default/theme.php -- The default theme.
# v %!%!VERSION%!%!
# %!%!DATE%!%!
#
# Brett Profitt
# brett@narnarnar.com
# devel.narnarnar.com/nimages/
#
# Released under the GPL.
#######################################################
global $config, $_SERVER, $HTTP_GET_VARS;
$http=$HTTP_GET_VARS;
# Setting up the basic theme info.
$theme['name'] = "Theme Name"; // The name of the theme
$theme['author'] = "Theme Author"; // The Author of the theme
$theme['email'] = "Author's email"; // The email address of the author
$theme['www'] = "The addy for theme / author"; // The address of the theme
$theme['version'] = "Version"; // The version of the theme
$theme['info'] = "Theme Description"; // The theme's description
$theme['preview'] = "relative/path/to/preview.jpg"; // The relative path from the theme's dir to a preview image
# This if statement is used to set $tag to display a "powered by"
# tag if the user decided to allow it in the config.
# This is not required, but high recommended in order to
# publicize your theme.
# Notice that if the user says they don't want a powered by tag,
# it's still printed, just commented out in html.
# I'm tricky that way.
if ($config['general_conf']['powered_by']==1) {
$tag = <<<___end
<!-- Powered By Nimages version $config[version] -->
<!-- http://devel.narnarnar.com -->
<!-- Using the $theme[name] theme -->
<p align="right"><font size="-2">$config[powered_by_tag]</font>
___end;
}
else {
$tag = <<<___end
<!-- Powered By Nimages version $config[version] -->
<!-- http://devel.narnarnar.com -->
<!-- Using the $theme[name] theme -->
___end;
}
##########################################
# Basic images for ascending and descending
# sorting options.
# These are used to tell the user how the program will
# sort on their next click.
# These are used mostly in the gallery list to sort
# The galleries, but can also be (eventually) used
# in the thumbnail view.
##########################################
$theme['asc']="Sort Ascending";
$theme['desc']="Sort Descending";
##########################################
# Links to use during the listing galleries
# (op=list_galleries)
# Each of these are similar.
# $theme['list']['*_link_std'] is the default link if you're
# not sorting by anything.
# $theme['list']['*_link_change'] is the link if you're
# sorting by that variable.
#
# The %ORDER_SWITCH% variable will provide the
# order opposite of how it is currently sorting (if it's
# sorting asc, %ORDER_SWITCH% is desc).
#
# The %ORDER_MARK% variable will use whatever
# is in $theme['asc'] and $theme['desc'] to show which
# order is currently used.
#
# $theme['list']['preview_image'] is what to display if
# the gallery allows preview images.
#
# $theme['list']['no_preview'] is what to display if the
# gallery does not allow preview images.
#
#
# The variables valid in this section are:
# %ORDER_SWITCH%
# %ORDER_MARK%
# %RND_IMG_TAG%
# %RND_IMG_URL%
# %RND_IMG_WIDTH%
# %RND_IMG_HEIGHT%
##########################################
# These don't work yet. They might never...
# Ignore them for now...
#$theme['gallery']['sort_link_std']="<a href=\"$_SERVER[PHP_SELF]?op=list_galleries&orderby=%ORDER_BY%&orderhow=asc\">Name</a>";
#$theme['gallery']['sort_link_change']="<a href=\"$_SERVER[PHP_SELF]?op=list_galleries&orderby=%ORDER_BY%&orderhow=%ORDER_SWITCH%\">%ORDER_BY% %ORDER_MARK%</a>";
$theme['list']['name_link_std']="<a href=\"$_SERVER[PHP_SELF]?op=list_galleries&orderby=name&orderhow=asc\">Name</a>";
$theme['list']['name_link_change']="<a href=\"$_SERVER[PHP_SELF]?op=list_galleries&orderby=name&orderhow=%ORDER_SWITCH%\">Name %ORDER_MARK%</a>";
$theme['list']['id_link_std']="<a href=\"$_SERVER[PHP_SELF]?op=list_galleries&orderby=id&orderhow=asc\">ID</a>";
$theme['list']['id_link_change']="<a href=\"$_SERVER[PHP_SELF]?op=list_galleries&orderby=id&orderhow=%ORDER_SWITCH%\">ID %ORDER_MARK%</a>";
$theme['list']['dsc_link_std']="<a href=\"$_SERVER[PHP_SELF]?op=list_galleries&orderby=dsc&orderhow=asc\">Description</a>";
$theme['list']['dsc_link_change']="<a href=\"$_SERVER[PHP_SELF]?op=list_galleries&orderby=dsc&orderhow=%ORDER_SWITCH%\">Description %ORDER_MARK%</a>";
$theme['list']['num_images_link_std']="<a href=\"$_SERVER[PHP_SELF]?op=list_galleries&orderby=num_images&orderhow=asc\">Images</a>";
$theme['list']['num_images_link_change']="<a href=\"$_SERVER[PHP_SELF]?op=list_galleries&orderby=num_images&orderhow=%ORDER_SWITCH%\">Images %ORDER_MARK%</a>";
$theme['list']['preview_link_std']="<a href=\"$_SERVER[PHP_SELF]?op=list_galleries&orderby=preview&orderhow=asc\">Preview</a>";
$theme['list']['preview_link_change']="<a href=\"$_SERVER[PHP_SELF]?op=list_galleries&orderby=preview&orderhow=%ORDER_SWITCH%\">Preview %ORDER_MARK%</a>";
$theme['list']['preview_image']="%RND_IMG_TAG%";
$theme['list']['no_preview']="No Preview";
##########################################
# Links to use during the viewing of thumbnails
# within a gallery (op=gallery&id=%GID%)
#
# $theme['gallery']['beginning_link'] is used in thumbnail
# view as the very first page's link.
#
# $theme['gallery']['end_link'] is used in thumbnail
# view as the very last page's link.
#
# $theme['gallery']['previous_link'] is used in thumbnail
# view as the link to the previous page.
#
# $theme['gallery']['next_link'] is used in thumbnails
# view as the link to the next page.
#
# $theme['gallery']['current_page'] is the current page
#
# $theme['gallery']['page_link'] is used for all pages
# except the current one.
#
#
# The variables valid in this section are:
# %GALLERY_PAGE_URL%
# %GALLERY_PAGE_LINK%
# %GALLERY_PREVIOUS_PAGE_URL%
# %GALLERY_PREVIOUS_PAGE_LINK%
# %GALLERY_NEXT_PAGE_URL%
# %GALLERY_NEXT_PAGE_LINK%
# %GALLERY_CURRENT_PAGE%
# %GALLERY_PAGE_NUMBER%
# %GALLERY_NAME%
##########################################
$theme['gallery']['beginning_link'] = "<font color=#777777><< </font>";
$theme['gallery']['end_link'] = "<font color=#777777> >></font>";
$theme['gallery']['previous_link'] = "<a href=\"%GALLERY_PREVIOUS_PAGE_URL%&theme_command=left_menu\"><<</a> ";
$theme['gallery']['next_link'] = " <a href=\"%GALLERY_NEXT_PAGE_URL%&theme_command=left_menu\">>></a>";
$theme['gallery']['current_page']= "<b><font color=\"#FF0000\">%GALLERY_CURRENT_PAGE%</font></b>";
$theme['gallery']['page_link']=" <a href=\"%GALLERY_PAGE_URL%&theme_command=left_menu\">%GALLERY_PAGE_NUMBER%</a> ";
##########################################
# Links to use during the viewing of images
# within a gallery (op=image&id=%ID%&gid=%GID%)
#
# These links are similar to the links in the thumbnail
# view, but apply to the images view.
#
# The variables valid here are:
# %IMAGE_PREVIOUS_URL%
# %IMAGE_NEXT_URL%
# %IMAGE_PREVIOUS_ID%
# %IMAGE_NEXT_ID%
##########################################
$theme['image']['beginning_link'] = "<img src=\"themes/{$config['general_conf']['theme']}/images/prev_x.gif\" width=\"49\" height=\"13\" alt=\"Previous\" border=\"0\">";
$theme['image']['end_link'] = "<img src=\"themes/{$config['general_conf']['theme']}/images/nextbutton_x.gif\" width=\"49\" height=\"13\" alt=\"Previous\" border=\"0\">";
$theme['image']['previous_link'] = "<a href=\"%IMAGE_PREVIOUS_URL%\" target=\"main\"><img src=\"themes/{$config['general_conf']['theme']}/images/prev.gif\" width=\"49\" height=\"13\" alt=\"Previous\" border=\"0\"></a>";
$theme['image']['next_link'] = "<a href=\"%IMAGE_NEXT_URL%\" target=\"main\"><img src=\"themes/{$config['general_conf']['theme']}/images/nextbutton.gif\" width=\"49\" height=\"13\" alt=\"Previous\" border=\"0\"> </a>";
##########################################
# Theme for op=list_galleries
# Lists the galleries.
# This MUST contain %GALLERY_LIST% or it will not display
# any galleries.
#
# The variables valid in this section are:
#
# %LIST_NAME_LINK%
# %LIST_ID_LINK%
# %LIST_DSC_LINK%
# %LIST_NUM_IMAGES_LINK%
# %LIST_PREVIEW_LINK%
# %GALLERY_LIST%
##########################################
# themes/{$config['general_conf']['theme']}/images/
$theme['list']['list_main']=<<<___eoft
<HTML>
<HEAD>
<TITLE>%SITE_NAME%</TITLE>
</HEAD>
<BODY marginheight=0 topmargin=0 marginwidth=0 BGCOLOR="#FFFFFF" LINK="#660000" BACKGROUND="themes/{$config['general_conf']['theme']}/images/beige.gif" vlink="#660000" alink="#660000">
<CENTER>
<table border="0" cellpadding="3" cellspacing="1" width="500" bgcolor="#000000" align="center">
<tr valign="middle" bgcolor="#77aadd">
<th align="center" colspan="4">
<b>Galleries</b>
</th>
</tr>
<tr valign="middle" bgcolor="#77aadd">
<td align="center" width="25%">
<b>%LIST_NAME_LINK%<br>
<font size="-2">(%LIST_ID_LINK%)</font></b>
</td>
<td align="center" width="25%">
<b>%LIST_DSC_LINK%</b>
</td>
<td align="center" width="25%">
<b>%LIST_NUM_IMAGES_LINK%</b>
</td>
<td align="center" width="25%">
<b>%LIST_PREVIEW_LINK%</b>
</td>
</tr>
%GALLERY_LIST%
</table>
<br><br>
$tag
</body>
</html>
___eoft;
##########################################
# For each gallery, this theme will be processed
# and filled in with the proper information.
# Then it replaces %GALLERY_LIST%, above.
# The order in which this is done depends upon
# the current sorting.
#
# The variables valid in this section are:
#
# %GALLERY_URL%
# %GALLERY_NAME%
# %GALLERY_ID%
# %GALLERY_DSC%
# %GALLERY_NUM_IMAGES%
# %GALLERY_PREVIEW_IMAGE%
##########################################
$theme['list']['gallery_list']=<<<___eoft
<tr valign="middle" bgcolor="#b3b3b3">
<td align="center">
<a href="%GALLERY_URL%">
%GALLERY_NAME%<br>
<font size="-2">(%GALLERY_ID%)</font></a>
</td>
<td align="center">
<a href="%GALLERY_URL%">
%GALLERY_DSC%
</a>
</td>
<td align="center">
<a href="%GALLERY_URL%">
%GALLERY_NUM_IMAGES%
</a>
</td>
<td align="center">
<a href="%GALLERY_URL%">
%GALLERY_PREVIEW_IMAGE%
</a>
</td>
</tr>
___eoft;
##########################################
# This is the theme for op=gallery&gid=%GID%
# This is the screen on which the thumbnails are
# viewed. Note that this MUST contain the
# %GALLERY_THUMBS% variable.
#
# Variables valid in this section are:
#
# %GALLERY_PREVIOUS_PAGE_LINK%
# %GALLERY_PAGES_LINK%
# %GALLERY_NEXT_PAGE_LINK%
# %GALLERY_THUMBS%
# %GALLERY_NAME%
# %GALLERY_ID%
#
#
# Notice that this section is from the picturetrail.com
# theme. It's showing how you can use GET methods
# to cause the theme to do some Interesting Things.
# In this case, I had to have frames when op=gallery&gid=GID
# was called. So what I did was make the default op=gallery&gid=GID
# view call BACK to op=gallery&gid=GID, but this time with a
# "theme_command" in the URL. Then, in the if statement, I checked
# if we were called with or without a theme_command, and if so,
# to output the proper frame.
#
# It's a bit confusing if you're not, well..
# if you're not the author of the program, but hopefully
# this has explained some of it.
#
# Please note also that the "standard" way of doing
# this would to be to just set $theme['gallery']['view_main']
# to include somewhere in it %GALLERY_THUMBS%
##########################################
if ($http['theme_command']=="left_menu") {
$theme['gallery']['view_main']=<<<___eoft
<html>
<head><title>PictureTrail</title>
</head>
<body bgcolor="#333366" text="#FFFFFF" link="#FFFFFF" alink="#FFFFFF" vlink="#FFFFFF">
<font face="Arial, Helvetica" size=2>
<center>
<a href="%SITE_URL%" target="_top"><img src="themes/{$config['general_conf']['theme']}/images/landing_logo.gif" height=46 width=121 border=0></a>
<a target='_top' href='$_SERVER[PHP_SELF]?op=list_galleries'>
<img src="themes/{$config['general_conf']['theme']}/images/back_to_album.gif" border=0 width=126 height=20 alt='Click on a image below'></a><br>
<font color="#FFFFFF"><b>Guest Book</b></font><br>
<br>
<b>Gallery</b><br>
<table border=0 width="100%">
<table BORDER=0 CELLSPACING=4 CELLPADDING=0 ALIGN=CENTER>
%GALLERY_THUMBS%
</table>
<br>
Page:<br>
%GALLERY_PREVIOUS_PAGE_LINK% %GALLERY_PAGES_LINK% %GALLERY_NEXT_PAGE_LINK%
</body>
</html>
___eoft;
}
elseif ($http['theme_command']=="main_body") {
$theme['gallery']['view_main']=<<<___eoft
<html>
<head><title>PictureTrail</title>
</head>
<body marginheight="0" topmargin="0" bgcolor="#FFFFFF" text="#000000" link="#AA0000" alink="#AA0000" vlink="#880000" background="themes/{$config['general_conf']['theme']}/images/banner_background.gif">
<font face="Arial, Helvetica" size=2>
<center>
</center>
</font><br>
<table width="95%" border="0">
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td width=200><img src="themes/{$config['general_conf']['theme']}/images/click_on_a_picture.gif" width=145 height=31 vspace="2"></td>
<td align=left><a HREF="" TARGET=_top><img src="themes/{$config['general_conf']['theme']}/images/slideshow_button.gif" width=114 height=24 border=0 ></a></td>
</tr>
</table>
</center>
</font>
<br><br>
$tag
</body>
</html>
___eoft;
}
else {
$theme['gallery']['view_main']=<<<___eoft
<html>
<head>
<title>{$config['general_conf']['site_name']} : Gallery </title>
</head>
<frameset cols="175, *" border="1" frameborder="1" framespacing="0">
<frame src="%GALLERY_URL%&theme_command=left_menu" name="left" noresize>
<frame src="%GALLERY_URL%&theme_command=main_body" name="main" border=0>
</frameset>
<noframes>
<body bgcolor="#FFFFFF">
You must have a frame-compatible webrowser to access this script
</body>
</noframes>
</html>
___eoft;
}
##########################################
# For each thumbnail, this theme will be processed
# and filled in with the proper information.
# Then it replaces %GALLERY_THUMBS%, above.
#
# This is slightly more confusing than the gallery list
# because we need different code if we're on the first,
# on the last, or in the middle of printing out the
# thumbnails. (This is for tables...<tr><td> and
# </tr></td>, if it wasn't obvious)
#
#
# The variables valid in each of these sections will
# all be the same. They are:
#
# %GALLERY_ID%
# %GALLERY_NAME%
#
# %IMAGE_ID%
# %IMAGE_NAME%
# %IMAGE_FILENAME%
# %IMAGE_DSC%
# %IMAGE_USER%
# %IMAGE_NUM_COMMENTS%
# %IMAGE_DATE%
# %IMAGE_THUMB_WIDTH%
# %IMAGE_THUMB_HEIGHT%
# %IMAGE_WIDTH%
# %IMAGE_HEIGHT%
#
# %THUMB_WIDTH%
# %THUMB_HEIGHT%
#
# %IMAGE_THUMB_LINK%
# %IMAGE_THUMB_URL%
# %IMAGE_THUMB_TAG%
#
# %IMAGE_LINK%
# %IMAGE_URL%
# %IMAGE_TAG%
##########################################
# This is the first thumbnail printed.
# It is also the thumbnail printed after we've reset
# the max number of thumbnails to print in a row.
#
# Note that this will only make a difference to
# themes with a table view of thumbnails.
# Picturetrail.com uses a "straight up and down"
# view, and of course all the thumbnails have
# the same code.
$theme['gallery']['thumbs_first']=<<<___eoft
<tr bgcolor="#77aadd">
<td valign=top align=center>
<a href="%IMAGE_URL%">
%IMAGE_THUMB_TAG%<br>
<font size=-2>%IMAGE_DSC%</font></a>
</td>
___eoft;
# This is any thumbnail that isn't the first or last
# of the max_cols.
$theme['gallery']['thumbs_std']=<<<___eoft
<td valign=top align=center>
<a href="%IMAGE_URL%">
%IMAGE_THUMB_TAG%<br>
<font size=-2>%IMAGE_DSC%</font></a>
</td>
___eoft;
# This is the last thumbnails before we reset.
$theme['gallery']['thumbs_last']=<<<___eoft
<td valign=top align=center>
<a href="%IMAGE_URL%">
%IMAGE_THUMB_TAG%<br>
<font size=-2>%IMAGE_DSC%</font></a>
</td>
</tr>
___eoft;
# This is what to do until the number of thumbnails printed out ==
# the max for the column. (so you can finish up the <td>s to
# make the table pretty.)
$theme['gallery']['thumbs_blank']=<<<___eoft
<td valign=top align=center>
<img src="themes/{$config['general_conf']['theme']}/images/blank.gif" width="80" height="40" alt="">
</td>
___eoft;
# Because of some oddities, this has to be done.
# if we've happened to end on a blank image,
# AND on the last column of the row, print this out.
$theme['gallery']['thumbs_blank_last']=<<<___eoft
<td valign=top align=center>
<img src="themes/{$config['general_conf']['theme']}/images/blank.gif" width="80" height="40" alt="">
</td>
</tr>
___eoft;
##########################################
# This is the theme for op=image&%id%=3&gid=%GID%
# It displays the full image.
#
# This must contain the %IMAGE_TAG% var, or
# the image will not show up.
#
# The variables valid in this section are:
#
# %IMAGE_TAG%
# %IMAGE_NAME%
# %IMAGE_DSC%
# %IMAGE_PREVIOUS_LINK%
# %IMAGE_NEXT_LINK%
# %IMAGE_PREVIOUS_ID%
# %IMAGE_NEXT_ID%
# %IMAGE_SELECT_LINK% (see below)
#
# %GALLERY_NAME%
# %CURRENT_GALLERY_LINK%
##########################################
$theme['image']['main']=<<<___eoft
$theme['image']['main']=<<<___eoft
<html>
<head>
<title>%IMAGE_NAME%</title>
<style type="text/css"><!--
a { text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-family: arial, helvetica, sans-serif; font-size: 18pt; font-weight: bold;}
h2 { font-family: arial, helvetica, sans-serif; font-size: 14pt; font-weight: bold;}
body, td { font-family: arial, helvetica, sans-serif; font-size: 10pt; }
th { font-family: arial, helvetica, sans-serif; font-size: 11pt; font-weight: bold; }
input { font-family: arial, helvetica, sans-serif; font-size: 9pt; }
input.select.yes { font-family: arial, helvetica, sans-serif; font-size: 9pt; color:#007700;}
//--></style>
</head>
<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0"
bgcolor="#ffffff" text="#000000" link="#000099" alink="#0000ff"
vlink="#000099" background="themes/{$config['general_conf']['theme']}/images/background.gif">
<br>
<table border="0" cellpadding="3" cellspacing="1" bgcolor="#000000" align="center" width="85%">
<tr valign="middle" bgcolor="#77aadd">
<td align="left" width="33%">
<b>
%IMAGE_PREVIOUS_LINK%
</b>
</td>
<td align="middle" width="33%">
<b><a href="%CURRENT_GALLERY_LINK%">
%GALLERY_NAME% (Thumbnails)
</a></b>
<form name="image_select" action="%IMAGE_SELECT_LINK%" method="POST">
<select name=id onChange="this.form.submit()">
%IMAGE_SELECT%
</select>
</form>
</td>
<td align="right" width="33%">
<b>
%IMAGE_NEXT_LINK%
</b>
</td>
</tr>
</table>
<br>
<table border="0" cellpadding="3" cellspacing="1" bgcolor="#000000" align="center">
<tr valign="middle" bgcolor="#77aadd">
<td align="center">
<h1>%IMAGE_NAME%</h1>
%IMAGE_DSC%
</td>
</tr>
<tr valign="middle" bgcolor="#77aadd">
<td align="center">
%IMAGE_TAG%
</td>
</tr>
</table>
<br><br>
$tag
</body>
</html>
___eoft;
##########################################
# This is also kind of confusing.
# I personally used it for a select option for the Images.
# Basically, this is called for every image and replaced
# with the proper values then the lot of it replaces
# %IMAGE_SELECT% above.
#
# The variables valid in this section are the same as
# in the image display, above.
##########################################
$theme['image']['list']=<<<___eoft
<option value="%IMAGE_ID%">%IMAGE_NAME%
___eoft;
# what to do if the image is the current image in image_select
$theme['image']['list_current']=<<<___eoft
<option value="%IMAGE_ID%" selected>%IMAGE_NAME%
___eoft;
?>
|