Jump to content
Sign in to follow this  
killerwhale65

photo gallery for oscommerce

Recommended Posts

same problem here. i installed this contribution successfully, but when I`m logged in and I try to upload a photo it redirect me to login page (when I press UPLOAD button)

 

Can someone tell me how to fix this issue ?


I Need Money

Share this post


Link to post
Share on other sites

Thanks for the code to show thumbnails in the admin.

 

I have another problem; almost every day now, some spamming robot is adding hundreds of lines of text and links to other sites in the comment box in the first image.

Does anyone have any ideas how to stop this?


--------------------------------------------------------------------------------------------------

Share this post


Link to post
Share on other sites
Thanks for the code to show thumbnails in the admin.

 

I have another problem; almost every day now, some spamming robot is adding hundreds of lines of text and links to other sites in the comment box in the first image.

Does anyone have any ideas how to stop this?

anti spam and other security measures will be incorporated in the next update.


Matthias Thoen

my contribution: Photo Gallery for osCommerce

--check my homepage in my CARD--

Share this post


Link to post
Share on other sites
I dont know if it is the problem of your SQL-query, but, at the end, you have forgotten " ; "

CREATE TABLE `gallery` (
 `id` int(4) NOT NULL auto_increment,
 `cID` int(4) NOT NULL,
 `pID` int(4) NOT NULL,
 PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=18;

 

And verify if you have not already a table named gallery, it could create conflicts.

Delete table gallery, and apply again the query

 

I am having the following error:

 

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ',,,3,,,,,,,,,,,,,,,,,,,,) and c.categories_id = cd.categories_id and cd.language' at line 1

 

select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from categories c, categories_description cd where c.parent_id = '0' and c.categories_id in (4,3,3,3,3,3,3,3,3,3,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,,,,,3,,,,,,,,,,,,,,,,,,,,) and c.categories_id = cd.categories_id and cd.language_id='1' order by sort_order, cd.categories_name

 

 

I reimported the gallery.sql and made sure the extra space before the last semi colon was removed. But it had not effect.

 

There was another person in this forum that had the same error. I am not running 5.0 or higher of mysql either. I am running version 4.1.22

 

I get this error when I go to my main site. When i go into admin all I find is a Gallery link under configuration and once I click on it the page on the right shows

 

"Clean up thumbnail folder"

 

There is nothing else in that window under admin. SHouldn't I have more things to configure or look at?

Share this post


Link to post
Share on other sites
There is nothing else in that window under admin. SHouldn't I have more things to configure or look at?

If you have no pics uploaded, then this is all you will see. Once you have pics, you will be able to remove them, and edit their comments. More will be added later, as mentioned on the project website.


Matthias Thoen

my contribution: Photo Gallery for osCommerce

--check my homepage in my CARD--

Share this post


Link to post
Share on other sites
If you have no pics uploaded, then this is all you will see. Once you have pics, you will be able to remove them, and edit their comments. More will be added later, as mentioned on the project website.

 

 

Ok I understand that part. Now I just need to find out why I am getting that sql error mentioned earlier.

 

 

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ',,,3,,,,,,,,,,,,,,,,,,,,) and c.categories_id = cd.categories_id and cd.language' at line 1

 

select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from categories c, categories_description cd where c.parent_id = '0' and c.categories_id in (4,3,3,3,3,3,3,3,3,3,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,,,,,3,,,,,,,,,,,,,,,,,,,,) and c.categories_id = cd.categories_id and cd.language_id='1' order by sort_order, cd.categories_name

Share this post


Link to post
Share on other sites

Hi

I've installed this contribution, but I have 2 problems.

 

In the admin I've a permission problem when I click on photo gallery or I tape galery.php, I am redirect on forbiden.php

 

Second problem, when I try to upload a pic I am redirect on login page and nothing is uploaded.

 

I've changed gallery and thumbs folder permissions.

 

Suggestions ?

 

Thanks

Share this post


Link to post
Share on other sites
Hi

I've installed this contribution, but I have 2 problems.

 

In the admin I've a permission problem when I click on photo gallery or I tape galery.php, I am redirect on forbiden.php

 

Second problem, when I try to upload a pic I am redirect on login page and nothing is uploaded.

 

I've changed gallery and thumbs folder permissions.

 

Suggestions ?

 

Thanks

 

 

I got the same problem! Someone knows?

Share this post


Link to post
Share on other sites

no one? please! i want to try this ;) It is something that can make my page worth visiting for my costumers

Share this post


Link to post
Share on other sites

This gallery is great!

 

How can I change the number of pics that a user can upload?

 

Thanks.

 

Samantha

Share this post


Link to post
Share on other sites
This gallery is great!

 

How can I change the number of pics that a user can upload?

 

Thanks.

 

Samantha

In gallery_user.php, you will find a 4 times the number 6, change it to whatever you like.


Matthias Thoen

my contribution: Photo Gallery for osCommerce

--check my homepage in my CARD--

Share this post


Link to post
Share on other sites

I have the Additional images mod installed on my store. Will adding the on the fly mod affect images other than what is in the gallery?


If the only tool you have is a hammer, all your problems look like nails

Share this post


Link to post
Share on other sites
Hi

I've installed this contribution, but I have 2 problems.

 

In the admin I've a permission problem when I click on photo gallery or I tape galery.php, I am redirect on forbiden.php

 

Second problem, when I try to upload a pic I am redirect on login page and nothing is uploaded.

 

I've changed gallery and thumbs folder permissions.

 

Suggestions ?

 

Thanks

 

Please help me, I need to find a solution quickly.

 

Thanks

Share this post


Link to post
Share on other sites
I have the Additional images mod installed on my store. Will adding the on the fly mod affect images other than what is in the gallery?

yes, it will also affect your product pictures. It will automatically create a thumbnail for your product pictures, like it does for your gallery images. No idea if it can work together with the additional images contrib.


Matthias Thoen

my contribution: Photo Gallery for osCommerce

--check my homepage in my CARD--

Share this post


Link to post
Share on other sites

hey. any news on if this will support different photo albums or anything like that. Also would it be possible to display the latest image on the left column in the info box thats allready there. Also lol any chance it can have a heading for each image well a title.

Share this post


Link to post
Share on other sites
You can always sort the query to your likings. Sorting will be added in the future.

 

Could anyone please elaborate on how to sort the query to get the images in a certain order.

 

Thanks

 

Samantha

Share this post


Link to post
Share on other sites

Hello I met a day gallery.php the admin with the code oscommerce add category you can add pages editor sorry for the translation I'm french

<?php
/*
 $Id: gallery.php,v 0.6.1 Beta 2008/11/20 00:00:00 burt Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Released under the GNU General Public License
|----------------------------------------------------- 
code copier de pages editor et transfomer pour gallery.php 
BACKUP! BACKUP! BACKUP! BACKUP!

Open catalog/admin/includes/database_tables.php

// BOF gallery.php 
define('TABLE_GALLERY', 'gallery');
// EOF 

Open catalog/admin/includes/filenames.php

// BOF gallery.php 
define('FILENAME_GALLERY', 'gallery.php');
// EOF 

-- Run the following file on your MySQL database:
-- Upload
--
ALTER TABLE gallery ADD gallery_status INT( 4 ) DEFAULT '1' NOT NULL;
--
-----------------------------------------------------|  
*/

 require('includes/application_top.php');

 $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');
 if (tep_not_null($action)) {
switch ($action) {
case 'setflag':
	if ( ($HTTP_GET_VARS['flag'] == '0') || ($HTTP_GET_VARS['flag'] == '1') ) {
	  if (isset($HTTP_GET_VARS['dID'])) {
		tep_db_query("update gallery set gallery_status='".$HTTP_GET_VARS['flag']."' where id='".$HTTP_GET_VARS['dID']."'");
	  }
	  if (USE_CACHE == 'true') {
		tep_reset_cache_block('gallery');
	  }
	}

	tep_redirect(tep_href_link(FILENAME_GALLERY, 'dID=' . $HTTP_GET_VARS['dID']));
	break;
// cet parti peu etre utiliser pour crée manque l'envois de l'imades a supprimer 					
  case 'insert':
	$title = tep_db_prepare_input($HTTP_POST_VARS['title']);
	$description = tep_db_prepare_input($HTTP_POST_VARS['description']);
	$title_url = tep_db_prepare_input($HTTP_POST_VARS['title_url']);
	$taille = tep_db_prepare_input($HTTP_POST_VARS['taille']);
	$comment = tep_db_prepare_input($HTTP_POST_VARS['comment']);
// a supprimer si on utilise pas pages editor		
	$pages_title = tep_db_prepare_input($HTTP_POST_VARS['pages_title']);
// FIN		
	tep_db_query("insert into " . TABLE_GALLERY . " (title, description, title_url, taille, comment) values ('" . tep_db_input($title) . "', '" . tep_db_input($description) . "', '" . tep_db_input($title_url) . "', '" . tep_db_input($taille) . "', '" . tep_db_input($pages_title) . "', '" . tep_db_input($pages_title) . "', '1')");
	  if (USE_CACHE == 'true') {
		tep_reset_cache_block('gallery');
	  }
	tep_redirect(tep_href_link(FILENAME_GALLERY, 'page=' . $HTTP_GET_VARS['page']));
	break;
//fin si on veu supprimer " case 'insert':"

  case 'save':
	$id = tep_db_prepare_input($HTTP_GET_VARS['dID']);
	$title = tep_db_prepare_input($HTTP_POST_VARS['title']);
	$description = tep_db_prepare_input($HTTP_POST_VARS['description']);
	$title_url = tep_db_prepare_input($HTTP_POST_VARS['title_url']);
	$taille = tep_db_prepare_input($HTTP_POST_VARS['taille']);
	$comment = tep_db_prepare_input($HTTP_POST_VARS['comment']);
// a supprimer si on utilise pas pages editor		
	$pages_title = tep_db_prepare_input($HTTP_POST_VARS['pages_title']);
// FIN		
	tep_db_query("update " . TABLE_GALLERY . " set pages_title = '" . tep_db_input($pages_title) . "',title = '" . tep_db_input($title) . "', description = '" . tep_db_input($description) . "', title_url = '" . tep_db_input($title_url) . "', taille = '" . tep_db_input($taille) . "', comment = '" . tep_db_input($comment) . "' where id = '" . (int)$id . "'");
	  if (USE_CACHE == 'true') {
		tep_reset_cache_block('gallery');
	  }
	tep_redirect(tep_href_link(FILENAME_GALLERY, 'page=' . $HTTP_GET_VARS['page'] . '&dID=' . $id));
	break;
  case 'deleteconfirm':
	$id = tep_db_prepare_input($HTTP_GET_VARS['dID']);
// La suppresion ne fonctione pas	a corriger  
  unlink('../gallery/'.$HTTP_GET_VARS['cID']."_".$HTTP_GET_VARS['pID'].".jpg");		
	$cID = tep_db_prepare_input($HTTP_GET_VARS['cID']);
	$pID = tep_db_prepare_input($HTTP_GET_VARS['pID']);
// fin		
	tep_db_query("delete from " . TABLE_GALLERY . " where id = '" . (int)$id . "'");
			  if (USE_CACHE == 'true') {
		tep_reset_cache_block('gallery');
	  }
	tep_redirect(tep_href_link(FILENAME_GALLERY, 'page=' . $HTTP_GET_VARS['page']));
	break;
}
 }
 function empty_folder($folder, $debug = false){	
if ($debug) { 
	echo "Netoyages du dossier $folder ... <br>"; 
} 
$d = dir($folder); 
while (false !== ($entry = $d->read())) { 
	$isdir = is_dir($folder."/".$entry); 
	if (!$isdir and $entry!="." and $entry!="..") { 
		unlink($folder."/".$entry); 
	} elseif ($isdir  and $entry!="." and $entry!="..") { 
		empty_folder($folder."/".$entry,$debug); 
		rmdir($folder."/".$entry); 
	} 
} 
$d->close(); 
} 
 if (isset($_GET['cleanthumbs'])) {
empty_folder("../gallery/thumbnails",true);
$messageStack->add('Ces effecuer avec success.','success');

}
 ?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
<script language="javascript" src="includes/general.js"></script>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onLoad="SetFocus();">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="2" cellpadding="2">
 <tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
<!-- body_text //-->
<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
  <tr>
	<td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="pageHeading"><p>Sauvegarde des membres</p>
		  <p><?php echo '<a href="'.tep_href_link('gallery.php', 'gID=1&selected_box=configuration&cleanthumbs').'" class="buttoncss">Nettoyer le cache des images</a>'; ?>  |  <?php echo '<a href="' . tep_href_link("pages.php") . '" class="buttoncss">Liste des categorie</a>'; ?>  |  <?php echo '<a href="' . tep_href_link("pages.php?action=new_page") . '" class="buttoncss">Nouvelle categorie</a>'; ?></p></td>
		<td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr class="dataTableHeadingRow">
			<td class="dataTableHeadingContent">Categorie</td>
			<td class="dataTableHeadingContent" align="center">Nom du fichier </td>
			<td class="dataTableHeadingContent" align="right">Status du fichier</td>
			<td class="dataTableHeadingContent" ><?php  // Compte le nombre totale des images
														$gallery_reviews_query = tep_db_query("select count(*) as count from " . TABLE_GALLERY);
														$gallery_reviews = tep_db_fetch_array($gallery_reviews_query); 
									   echo '<span style="color: rgb(255, 0, 0);"><b>' . $gallery_reviews['count'] . '</b></span><br>Fichiers Membres'; ?>
			</td>
		  </tr>
<?php
 $gallery_query_raw ="select g.id ,g.cID ,g.pID , g.title, g.description, g.title_url, g.taille, g.comment, g.pages_title, g.gallery_status, c.customers_id, c.customers_lastname, c.customers_firstname from " . TABLE_GALLERY . " g, " . TABLE_CUSTOMERS . " c  where g.cID = c.customers_id ORDER BY g.id DESC"; 
 $gallery_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $gallery_query_raw, $gallery_query_numrows);
 $gallery_query = tep_db_query($gallery_query_raw);
 while ($gallery = tep_db_fetch_array($gallery_query)) {
 $info = tep_db_fetch_array($info_query);
if ((!isset($HTTP_GET_VARS['dID']) || (isset($HTTP_GET_VARS['dID']) && ($HTTP_GET_VARS['dID'] == $gallery['id']))) && !isset($cInfo)) {
// img
  $dir = "../gallery/";
  $file = $gallery['cID']."_".$gallery['pID'].".jpg";   
// end img
	$cInfo = new objectInfo($gallery);
  }
if (isset($cInfo) && is_object($cInfo) && ($gallery['id'] == $cInfo->id)) {
  echo '				  <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_GALLERY, 'dID=' . $gallery['id']) . '\'">' . "\n";
} else {
  echo '				  <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_GALLERY, 'page=' . $HTTP_GET_VARS['page'] . '&dID=' . $gallery['id']) . '\'">' . "\n";
}
?>
			<td class="dataTableContent"><?php echo $gallery['pages_title']; ?></td>
			<td class="dataTableContent"><?php echo $gallery['title']; ?></td>
			<td  class="dataTableContent" align="center">
<?php
  if ($gallery['gallery_status'] == '1') {
	echo tep_image(DIR_WS_IMAGES . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN, 10, 10) . '  <a href="' . tep_href_link(FILENAME_GALLERY,'action=setflag&flag=0&dID=' . $gallery['id'], 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', IMAGE_ICON_STATUS_RED_LIGHT, 10, 10) . '</a>';
  } else {
	echo '<a href="' . tep_href_link(FILENAME_GALLERY, 'action=setflag&flag=1&dID=' . $gallery['id'], 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_green_light.gif', IMAGE_ICON_STATUS_GREEN_LIGHT, 10, 10) . '</a>  ' . tep_image(DIR_WS_IMAGES . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED, 10, 10);
  }				
?>
</td>
			<td class="dataTableContent" align="right"><?php if (isset($cInfo) && is_object($cInfo) && ($gallery['id'] == $cInfo->id)) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif'); } else { echo '<a href="' . tep_href_link(FILENAME_GALLERY, 'page=' . $HTTP_GET_VARS['page'] . '&dID=' . $gallery['id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td>
		  </tr>
<?php
 }
?>
		  <tr>
			<td colspan="3"><table border="0" width="100%" cellspacing="0" cellpadding="2">
			  <tr>
				<td class="smallText" valign="top"><?php echo $gallery_split->display_count($gallery_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_GALLERY); ?></td>
				<td class="smallText" align="right"><?php echo $gallery_split->display_links($gallery_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page']); ?></td>
			  </tr>
			</table></td>
		  </tr>
		</table></td>
<?php
 $heading = array();
 $contents = array();

	  //if ($cInfo->comment != '') {
	  //   $cInfo->comment = explode('<-->',$cInfo->comment);
	  //foreach ($cInfo->comment as $val) {
	  //		 $cInfo->comment = explode ('///',$val);
	  //}
	  // }
// Edite toute les catégorie crée par pages editor		a supprimer si on utilise pas pages editor  
$groups_query = tep_db_query("select p.pages_id, p.pages_name, p.pages_image, p.pages_status, p.sort_order, pd.pages_title  from " . TABLE_PAGES . " p, " . TABLE_PAGES_DESCRIPTION . " pd where p.pages_id = pd.pages_id and pd.language_id = '" . (int)$languages_id . "' order by p.sort_order");
		 while($groups = tep_db_fetch_array($groups_query)) {
		$groups_array[] = array('value' => $cInfo->pages_title,
								 'text' => $groups['pages_name'],
								   'id' => $groups['pages_title']);
								   }
// FIN													   
 switch ($action) {
// si on veu supprimer "case 'new':" 								
case 'new':
  $heading[] = array('text' => '<b>' . TEXT_HEADING_NEW_COUPON . '</b>');

  $contents = array('form' => tep_draw_form('gallery', FILENAME_GALLERY, 'action=insert'));
  $contents[] = array('text' => TEXT_NEW_INTRO);
// a supprimer si on utilise pas pages editor					defauts --->$cInfo->pages_title |Categorie --->   $groups_array		  
  $contents[] = array('text' => '<br><b>Categorie du fichier</b><br>' . tep_draw_pull_down_menu('pages_title', $groups_array));
// FIN	  
  $contents[] = array('text' => '<br><b>Nom du fichier</b><br>' . tep_draw_input_field('title'));
  $contents[] = array('text' => '<br><b>Adresse du fichier</b><br>' . tep_draw_input_field(('description'), '60', '15'));	 
  $contents[] = array('text' => '<br><b>Déscriptif du fichier</b><br>' . tep_draw_textarea_field(('title_url'), 'soft', '60', '15'));
  $contents[] = array('text' => '<br><b>info du fichier</b><br>' . tep_draw_input_field('taille'));
  $contents[] = array('text' => '<br><b>Commenter des visiteurs</b><br>' . tep_draw_input_field('comment'));
  $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_save.gif', IMAGE_SAVE) . ' <a href="' . tep_href_link(FILENAME_GALLERY, 'page=' . $HTTP_GET_VARS['page'] . '&dID=' . $HTTP_GET_VARS['dID']) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
  break;
//FIN si on veu supprimer "case 'new':" 	  
case 'edit':				 
  $heading[] = array('text' => '<b>' . TEXT_HEADING_EDIT_COUPON . '</b>');
  $contents = array('form' => tep_draw_form('gallery', FILENAME_GALLERY, 'page=' . $HTTP_GET_VARS['page'] . '&dID=' . $cInfo->id . '&action=save'));	
  $contents[] = array('text' => TEXT_EDIT_INTRO);
// a supprimer si on utilise pas pages editor	  
  $contents[] = array('text' => '<br><b>Categorie du fichier</b><br>' . tep_draw_pull_down_menu('pages_title', $groups_array, $gallery_selected)); 
// FIN		  
  $contents[] = array('text' => '<br><b>Nom du fichier</b><br>' . tep_draw_input_field('title', $cInfo->title)); 
  $contents[] = array('text' => '<br><b>Adresse du fichier</b><br>' . tep_draw_input_field('description', $cInfo->description));
  $contents[] = array('text' => '<br><b>Déscriptif du fichier</b><br>' . tep_draw_textarea_field('title_url','soft', '60', '15', $cInfo->title_url));
  $contents[] = array('text' => '<br><b>info du fichier</b><br>' . tep_draw_input_field('taille', $cInfo->taille));
  $contents[] = array('text' => '<br><b>Commenter des visiteurs</b><br>' . tep_draw_input_field('comment', $cInfo->comment));
  $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_save.gif', IMAGE_SAVE) . ' <a href="' . tep_href_link(FILENAME_GALLERY, 'page=' . $HTTP_GET_VARS['page'] . '&dID=' . $cInfo->id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
  break;
case 'delete':
  $heading[] = array('text' => '<b>' . TEXT_HEADING_DELETE_COUPON . '</b>');
  $contents = array('form' => tep_draw_form('gallery', FILENAME_GALLERY, 'page=' . $HTTP_GET_VARS['page'] . '&dID=' . $cInfo->id . '&action=deleteconfirm'));
  $contents[] = array('text' => TEXT_DELETE_INTRO);
  $contents[] = array('text' => '<br><b>' . $cInfo->title . '</b>');
  $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . tep_href_link(FILENAME_GALLERY, 'page=' . $HTTP_GET_VARS['page'] . '&dID=' . $cInfo->id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
  break;
default:				
  if (isset($cInfo) && is_object($cInfo)) {
	$heading[] = array('text' => '<b>' . strtoupper($cInfo->title) . '</b>');
	$contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_GALLERY, 'page=' . $HTTP_GET_VARS['page'] . '&dID=' . $cInfo->id . '&action=edit') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_GALLERY, 'page=' . $HTTP_GET_VARS['page'] . '&dID=' . $cInfo->id . '&action=delete') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a>');
	$contents[] = array('text' => "\n".'<a id="autoload'.$gallery['cID'].$gallery['pID'].'" href="' . tep_href_link($dir.$file) . '\')">'.tep_image($dir . $file, '', 100, 100, 'hspace="5" vspace="5"').'</a><br>');
	$contents[] = array('text' => '<br><b>Poster par : <a href="' . tep_href_link(FILENAME_CUSTOMERS, 'cID=' . (int)$cInfo->cID . '&action=edit') . '"><span style="color: rgb(255, 0, 0);">' . $cInfo->customers_firstname .'</span></a></b>');
// a supprimer si on utilise pas pages editor		 
	$contents[] = array('text' => '<br><b>Categorie du fichier</b><br>'. $cInfo->pages_title);
// FIN		 
	$contents[] = array('text' => '<br><b>Adresse du fichier</b><br />' . $cInfo->description);
	$contents[] = array('text' => '<br><b>Déscriptif du fichier</b><br />' . $cInfo->title_url);
	$contents[] = array('text' => '<br><b>info du fichier</b><br />' . $cInfo->taille);
	$contents[] = array('text' => '<br><b>Commenter des visiteurs</b><br><b>'. $cInfo->comment); 
	}
  break;
  }

 if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
echo '			<td width="25%" valign="top">' . "\n";

$box = new box;
echo $box->infoBox($heading, $contents);

echo '			</td>' . "\n";
 }
?>
	  </tr>
	</table></td>
  </tr>
</table></td>
<!-- body_text_eof //-->
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

may be correct or change the function of his edit gallery_user.php

 

sorry "title_url" and "taille" function added by me. thank you delete

Edited by morka

Share this post


Link to post
Share on other sites
gallery_user.php requests a customer_id to be registered (so you must be logged in). For some reason you get logged out when uploading a pic.

 

Can you confirm that, when you click upload, then you are transfered to the login page. If you now DO NOT LOGIN, but go to account.php directly: what happens? Do you see the account page or the login screen?

 

Hi I've this problem yet. I log in, then in my account page I click on My Gallery so I'm on gallery_user.php?osCsid=(some number id), when I choose a pic and I click on UPLOAD I'm redirected on the login page and I'm logged OUT (if I click on my account I see again the login page).

 

Other problem in admin, when I click on Photo Gallery, with this link: gallery.php?gID=1&selected_box=configuration I'm redirected on forbiden.php, Access Denied....

 

Why ?

 

How can I solve these problems ?

 

Thanks

 

Best Regards

Share this post


Link to post
Share on other sites

gallery.php new in admin

added the account total send

added the account by member

cleaning of codes

<?php
/*
 $Id: gallery.php,v 0.6.2 Beta 2008/11/24 00:00:00 burt Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Released under the GNU General Public License
|----------------------------------------------------- 
code copier de pages editor et transfomer pour gallery.php 
BACKUP! BACKUP! BACKUP! BACKUP!

Open catalog/admin/includes/database_tables.php
add
// BOF gallery.php 
define('TABLE_GALLERY', 'gallery');
// EOF 

Open catalog/admin/includes/filenames.php
add 
// BOF gallery.php 
define('FILENAME_GALLERY', 'gallery.php');
// EOF 

-- Run the following file on your MySQL database:
-- Upload
--
ALTER TABLE gallery ADD gallery_status INT( 4 ) DEFAULT '1' NOT NULL;
--
-----------------------------------------------------|  
*/
// Lang  ________________________________________
define('TEXT_HEADING_TITLE_GALLERY', 'Sauvegarde des membres');
define('TEXT_NAME_GALLERY', 'Categorie');
define('TEXT_FILENAME_GALLERY', 'Nom du fichier');
define('TEXT_STATUS_GALLERY', 'Status du fichier');
define('TEXT_DISPLAY_NUMBER_OF_GALLERY', 'Nombre de fichier par pages');
define('TEXT_HEADING_EDIT_GALLERY', 'Edition du fichier');
define('TEXT_EDIT_INTRO', 'Attention de bien remplire');
define('TEXT_HEADING_DELETE_GALLERY', 'Suppretion du fichier');
define('TEXT_DELETE_INTRO', 'Ete vous sur de vouloir supprimer le fichier');
define('TEXT_CATEGORY_GALLERY', 'Catégorie');
define('TEXT_NAMEFILE_GALLERY', 'Nom du fichier');
define('TEXT_DESCR_GALLERY', 'Déscription du fichier');
define('TEXT_URL_GALLERY', 'Adresse du fichier ');
define('TEXT_INFO_GALLERY', 'Info consernent le fichier');
define('TEXT_COMM_GALLERY', 'Commentaire des visiteurs');
define('TEXT_POST_GALLERY', 'Fichier poster par : ');
define('TEXT_GALLERY', ' fichier');
define('TEXT_UPLOAD_GALLERY', ' et a uploader : ');
define('TEXT_CLEAN_THUM_GALLERY', 'Nettoyer le cache des images');
define('TEXT_ALL_TOTAL_GALLERY', 'Fichier membre');
//  Delete if not using Pages Editor to create category	
define('TEXT_LIST_CAT_GALLERY', 'Liste des catégorie');
define('TEXT_NEWS_CAT_GALLERY', 'Nouvelle catégorie');
//  FIN	_____
// Lang fin _____________________________________
 require('includes/application_top.php');

 $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');
 if (tep_not_null($action)) {
switch ($action) {

case 'setflag':
	if ( ($HTTP_GET_VARS['flag'] == '0') || ($HTTP_GET_VARS['flag'] == '1') ) {
	  if (isset($HTTP_GET_VARS['dID'])) {
		tep_db_query("update gallery set gallery_status='".$HTTP_GET_VARS['flag']."' where id='".$HTTP_GET_VARS['dID']."'");
	  }
	}
	tep_redirect(tep_href_link(FILENAME_GALLERY, 'page=' . $HTTP_GET_VARS['page']));	
	break;	

  case 'save':
	$id = tep_db_prepare_input($HTTP_GET_VARS['dID']);
	$title = tep_db_prepare_input($HTTP_POST_VARS['title']);
	$description = tep_db_prepare_input($HTTP_POST_VARS['description']);
	$comment = tep_db_prepare_input($HTTP_POST_VARS['comment']);
//  Delete if not using Pages Editor to create category	_______________________________	
	$pages_title = tep_db_prepare_input($HTTP_POST_VARS['pages_title']);
//  FIN		______________________________________
	tep_db_query("update " . TABLE_GALLERY . " set pages_title = '" . tep_db_input($pages_title) . "',title = '" . tep_db_input($title) . "', description = '" . tep_db_input($description) . "', comment = '" . tep_db_input($comment) . "' where id = '" . (int)$id . "'");
	  if (USE_CACHE == 'true') {
		tep_reset_cache_block('gallery');
	  }
	tep_redirect(tep_href_link(FILENAME_GALLERY, 'page=' . $HTTP_GET_VARS['page'] . '&dID=' . $id));
	break;

  case 'deleteconfirm':
	$id = tep_db_prepare_input($HTTP_GET_VARS['dID']);	
	tep_db_query("delete from " . TABLE_GALLERY . " where id = '" . (int)$id . "'");
			  if (USE_CACHE == 'true') {
		tep_reset_cache_block('gallery');
	  }
	tep_redirect(tep_href_link(FILENAME_GALLERY, 'page=' . $HTTP_GET_VARS['page']));
	break;

}
 }
 function empty_folder($folder, $debug = false){	
if ($debug) { 
	echo "Netoyages du dossier $folder ... <br>"; 
} 
$d = dir($folder); 
while (false !== ($entry = $d->read())) { 
	$isdir = is_dir($folder."/".$entry); 
	if (!$isdir and $entry!="." and $entry!="..") { 
		unlink($folder."/".$entry); 
	} elseif ($isdir  and $entry!="." and $entry!="..") { 
		empty_folder($folder."/".$entry,$debug); 
		rmdir($folder."/".$entry); 
	} 
} 
$d->close(); 
} 
 if (isset($_GET['cleanthumbs'])) {
empty_folder("../gallery/thumbnails",true);
$messageStack->add('Ces effecuer avec success.','success');

}
 ?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
<script language="javascript" src="includes/general.js"></script>
<style type="text/css">
<!--
.buttoncss{ background-color: #B3BAC5; border: 2px #CCCCCC outset; padding: 1px 4px; color: black; text-decoration: none; font: bold 90% "Lucida Grande", "Trebuchet MS", Verdana, Helvetica, sans-serif; }
.buttoncss:visited{ color: black; }
.buttoncss:hover{ border-style: inset; background-color: #CCCCCC; padding: 2px 3px 0 5px; }
.buttoncss:active{ color: black; }
-->
</style>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onLoad="SetFocus();">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="2" cellpadding="2">
 <tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
<!-- body_text //-->
<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
  <tr>
	<td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="pageHeading"><?php echo TEXT_HEADING_TITLE_GALLERY; ?>
		  <p><?php echo '<a href="'.tep_href_link('gallery.php', 'gID=1&selected_box=configuration&cleanthumbs').'" class="buttoncss">' . TEXT_CLEAN_THUM_GALLERY . '</a>'; ?>  |  <?php //  Delete if not using Pages Editor 
		  echo'<a href="' . tep_href_link("pages.php") . '" class="buttoncss">' . TEXT_LIST_CAT_GALLERY . '</a>'; ?>  |  <?php echo '<a href="' . tep_href_link("pages.php?action=new_page") . '" class="buttoncss">'.TEXT_NEWS_CAT_GALLERY.'</a>'; 
		  // FIN ?></p></td>
		<td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr class="dataTableHeadingRow">
			<td class="dataTableHeadingContent"><?php echo TEXT_NAME_GALLERY; ?></td>
			<td class="dataTableHeadingContent" align="center"><?php echo TEXT_FILENAME_GALLERY; ?></td>
			<td class="dataTableHeadingContent" align="right"><?php echo TEXT_STATUS_GALLERY; ?></td>
			<td class="dataTableHeadingContent" ><?php  // Count the total number all sent
														$gallery_total_query = tep_db_query("select count(*) as countg from " . TABLE_GALLERY);
														$gallery_total = tep_db_fetch_array($gallery_total_query); 
									   echo '<span style="color: rgb(255, 0, 0);"><b>' . $gallery_total['countg'] . '</b></span><br>'.TEXT_ALL_TOTAL_GALLERY; ?>
			</td>
		  </tr>
<?php
 $gallery_query_raw ="select g.id ,g.cID ,g.pID , g.title, g.description, g.comment, g.pages_title, g.gallery_status, c.customers_id, c.customers_lastname, c.customers_firstname from " . TABLE_GALLERY . " g, " . TABLE_CUSTOMERS . " c  where g.cID = c.customers_id ORDER BY g.id DESC"; 
 $gallery_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $gallery_query_raw, $gallery_query_numrows);
 $gallery_query = tep_db_query($gallery_query_raw);
 while ($gallery = tep_db_fetch_array($gallery_query)) {
if ((!isset($HTTP_GET_VARS['dID']) || (isset($HTTP_GET_VARS['dID']) && ($HTTP_GET_VARS['dID'] == $gallery['id']))) && !isset($cInfo)) {
  $dir = "../gallery/";
  $file = $gallery['cID']."_".$gallery['pID'].".jpg";   
// Count the total number sent by member 
  $gallery_count_query = tep_db_query("select count(pID) as counti from " . TABLE_GALLERY . " where cID = '" . (int)$gallery['cID'] . "'GROUP BY cID");
  $gallery_count = tep_db_fetch_array($gallery_count_query);

  $cInfo_array = array_merge($gallery, $gallery_count);
  $cInfo = new objectInfo($cInfo_array);
 }
if (isset($cInfo) && is_object($cInfo) && ($gallery['id'] == $cInfo->id)) {
  echo '				  <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_GALLERY, 'dID=' . $gallery['id']) . '\'">' . "\n";
} else {
  echo '				  <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_GALLERY, 'page=' . $HTTP_GET_VARS['page'] . '&dID=' . $gallery['id']) . '\'">' . "\n";
}
?>
			<td class="dataTableContent"><?php //  Delete "echo $gallery['pages_title'];" if not using Pages Editor add "echo $gallery['customers_firstname'] .' '.$gallery['customers_lastname'];"
			echo $gallery['pages_title']; ?></td>
			<td class="dataTableContent"><?php echo $gallery['title']; ?></td>
			<td  class="dataTableContent" align="center">
<?php
  if ($gallery['gallery_status'] == '1') {
	echo tep_image(DIR_WS_IMAGES . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN, 10, 10) . '  <a href="' . tep_href_link(FILENAME_GALLERY,'action=setflag&flag=0&dID=' . $gallery['id'], 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', IMAGE_ICON_STATUS_RED_LIGHT, 10, 10) . '</a>';
  } else {
	echo '<a href="' . tep_href_link(FILENAME_GALLERY, 'action=setflag&flag=1&dID=' . $gallery['id'], 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_green_light.gif', IMAGE_ICON_STATUS_GREEN_LIGHT, 10, 10) . '</a>  ' . tep_image(DIR_WS_IMAGES . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED, 10, 10);
  }				
?>
</td>
			<td class="dataTableContent" align="right"><?php if (isset($cInfo) && is_object($cInfo) && ($gallery['id'] == $cInfo->id)) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif'); } else { echo '<a href="' . tep_href_link(FILENAME_GALLERY, 'page=' . $HTTP_GET_VARS['page'] . '&dID=' . $gallery['id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td>
		  </tr>
<?php
 }
?>
		  <tr>
			<td colspan="3"><table border="0" width="100%" cellspacing="0" cellpadding="2">
			  <tr>
				<td class="smallText" valign="top"><?php echo $gallery_split->display_count($gallery_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_GALLERY); ?></td>
				<td class="smallText" align="right"><?php echo $gallery_split->display_links($gallery_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page']); ?></td>
			  </tr>
			</table></td>
		  </tr>
		</table></td>
<?php										 
//  Delete if not using Pages Editor to create category	 _________________________________
$groups_query = tep_db_query("select p.pages_id, p.pages_name, p.pages_image, p.pages_status, p.sort_order, pd.pages_title  from " . TABLE_PAGES . " p, " . TABLE_PAGES_DESCRIPTION . " pd where p.pages_id = pd.pages_id and p.pages_status = '1' order by p.sort_order");
		 while($groups = tep_db_fetch_array($groups_query)) {
		$groups_array[] = array('value' => $cInfo->pages_title,
								 'text' => $groups['pages_title'],
								   'id' => $groups['pages_name']);
								   }
// FIN	__________________________________________										 		 
 $heading = array();
 $contents = array();										 													   
 switch ($action) {

case 'edit':				 
  $heading[] = array('text' => '<b>' . TEXT_HEADING_EDIT_GALLERY . '</b>');
  $contents = array('form' => tep_draw_form('gallery', FILENAME_GALLERY, 'page=' . $HTTP_GET_VARS['page'] . '&dID=' . $cInfo->id . '&action=save'));	
  $contents[] = array('text' => TEXT_EDIT_INTRO);
//  Delete if not using Pages Editor to create category	______________________________	  
  $contents[] = array('text' => '<br><b>'.TEXT_CATEGORY_GALLERY.'</b><br>' . tep_draw_pull_down_menu('pages_title', $groups_array, $gallery_selected)); 
// FIN	__________________________________________________	  
  $contents[] = array('text' => '<br><b>'.TEXT_NAMEFILE_GALLERY.'</b><br>' . tep_draw_input_field('title', $cInfo->title)); 
  $contents[] = array('text' => '<br><b>'.TEXT_DESCR_GALLERY.'</b><br>' . tep_draw_textarea_field('description','soft', '60', '2', $cInfo->description));
  $contents[] = array('text' => '<br><b>'.TEXT_COMM_GALLERY.'</b><br>' . tep_draw_textarea_field('comment','soft', '60', '15', $cInfo->comment));
  $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_save.gif', IMAGE_SAVE) . ' <a href="' . tep_href_link(FILENAME_GALLERY, 'page=' . $HTTP_GET_VARS['page'] . '&dID=' . $cInfo->id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
  break;

case 'delete':
  $heading[] = array('text' => '<b>' . TEXT_HEADING_DELETE_GALLERY . '</b>');
  $contents = array('form' => tep_draw_form('gallery', FILENAME_GALLERY, 'page=' . $HTTP_GET_VARS['page'] . '&dID=' . $cInfo->id . '&action=deleteconfirm'));
  $contents[] = array('text' => TEXT_DELETE_INTRO);
  $contents[] = array('text' => '<br><b>' . $cInfo->title . '</b>');
  $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . tep_href_link(FILENAME_GALLERY, 'page=' . $HTTP_GET_VARS['page'] . '&dID=' . $cInfo->id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
  break;

default:				
  if (isset($cInfo) && is_object($cInfo)) {
	$heading[] = array('text' => '<b>' . strtoupper($cInfo->title) . '</b>');
	$contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_GALLERY, 'page=' . $HTTP_GET_VARS['page'] . '&dID=' . $cInfo->id . '&action=edit') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_GALLERY, 'page=' . $HTTP_GET_VARS['page'] . '&dID=' . $cInfo->id . '&action=delete') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a>');
	$contents[] = array('text' => "\n".'<a id="autoload'.$gallery['cID'].$gallery['pID'].'" href="' . tep_href_link($dir.$file) . '\')">'.tep_image($dir . $file, '', 100, 100, 'hspace="5" vspace="5"').'</a><br>');
	$contents[] = array('text' => '<br><b>'.TEXT_POST_GALLERY.'<a href="' . tep_href_link(FILENAME_CUSTOMERS, 'cID=' . (int)$cInfo->cID . '&action=edit') . '"><span style="color: rgb(255, 0, 0);">' . $cInfo->customers_firstname .'</span></a></b>'.TEXT_UPLOAD_GALLERY.'<span style="color: rgb(255, 0, 0);">'. $cInfo->counti .'</span>'.TEXT_GALLERY);
//  Delete if not using Pages Editor to create category	__________________________________		 
	$contents[] = array('text' => '<br><b>'.TEXT_CATEGORY_GALLERY.'</b><br>'. $cInfo->pages_title);
//  FIN		 ___________________________________________________________
	$contents[] = array('text' => '<br><b>'.TEXT_DESCR_GALLERY.'</b><br/>' . $cInfo->description);
	$contents[] = array('text' => '<br><b>'.TEXT_COMM_GALLERY.'</b><br><b>'.$cInfo->comment);
	}
  break;
  }

 if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
echo '			<td width="25%" valign="top">' . "\n";

$box = new box;
echo $box->infoBox($heading, $contents);

echo '			</td>' . "\n";
 }
?>
	  </tr>
	</table></td>
  </tr>
</table></td>
<!-- body_text_eof //-->
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

killerwhale65 thank you for this great project

Share this post


Link to post
Share on other sites

morka could you add photo albums i really need it.

 

oh p.s it dont work.

 

1054 - Unknown column 'g.title_url' in 'field list'

select g.id ,g.cID ,g.pID , g.title, g.description, g.title_url, g.taille, g.comment, g.pages_title, g.gallery_status, c.customers_id, c.customers_lastname, c.customers_firstname from gallery g, customers c where g.cID = c.customers_id ORDER BY g.id DESC limit 0, 4

 

If you can fix and also post in english that would be great.

Share this post


Link to post
Share on other sites

Look I have clean code with my Commende add me if you want to use Page Editor to create categories and sorry for the translation I'm french I have to use google translate

// Lang  ________________________________________
define('TEXT_HEADING_TITLE_GALLERY', 'Gallery members');
define('TEXT_NAME_GALLERY', 'Members');
define('TEXT_FILENAME_GALLERY', 'Filename');
define('TEXT_STATUS_GALLERY', 'Status File');
define('TEXT_DISPLAY_NUMBER_OF_GALLERY', 'Number of pages by file');
define('TEXT_HEADING_EDIT_GALLERY', 'Edit file');
define('TEXT_EDIT_INTRO', 'Attention de bien remplire');
define('TEXT_HEADING_DELETE_GALLERY', 'Delete File');
define('TEXT_DELETE_INTRO', 'you want to delete the file');
define('TEXT_NAMEFILE_GALLERY', 'Filename');
define('TEXT_DESCR_GALLERY', 'description');
define('TEXT_COMM_GALLERY', 'Comment by visitors');
define('TEXT_POST_GALLERY', 'File post by: ');
define('TEXT_GALLERY', ' File');
define('TEXT_UPLOAD_GALLERY', ' and upload : ');
define('TEXT_CLEAN_THUM_GALLERY', 'Cleaning the cache thumbnails');
define('TEXT_ALL_TOTAL_GALLERY', 'File member');


//  Delete if not using Pages Editor to create category

define('TEXT_LIST_CAT_GALLERY', 'List des catégory');
define('TEXT_CATEGORY_GALLERY', 'Category');
define('TEXT_NEWS_CAT_GALLERY', 'New Category');

//  FIN	_____


// Lang fin _____________________________________

Share this post


Link to post
Share on other sites

yeah I tryed and no luck. why do you not make the categories section in the code itself instead of using from page editor. this would be better.

 

cheers

Share this post


Link to post
Share on other sites

Is there a way with the gallery to set it up so that you can upload any height and width image. Right now it is limited to 800 wide by 600 high. I know I cna just change those values but I don't want to keep guessing what size is a good size to set. I am also concerned about file size. It is set to 100000 right now. I know I can change all these values but what would be a good size? The way it is now is just not user friendly. Customers would have to know how to resize their files and if they have to do those additional steps they may get annoyed and end up not uploading at all.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×