mygallery mod

Post custom hacks and enhancements for phpwcms here only. Maybe some of these things will be included in official release later.
scraper
Posts: 30
Joined: Tue 9. Aug 2005, 08:01
Location: Belgium

Post by scraper »

Hi Prisma and Tmerz,

Sorry that you had to wait so lang for a respons.

@Prisma: seems that you don't have sufficient permissions on the database to create the tables.

@Tmerz: When SAFE MODE is on, you can't create folders through the script. I thought of a solution for this, but haven't had the time yet to work it out.
Basically it comes down to this:

All images and thumbnails must be stored in the same folder. The album_id must be incorporated in the filename of the image and thumbnail.
But as I said, didn't get around to it to implement it.
Kurt S.
Pick something up whenever you fall.
-O.Avery-
Phadda
Posts: 4
Joined: Sat 19. Nov 2005, 13:41

Post by Phadda »

[quote="scraper"]
@Tmerz: When SAFE MODE is on, you can't create folders through the script. I thought of a solution for this, but haven't had the time yet to work it out.
[/quote]

how about this?

create a .htaccess file an upload it to the image directory, the content of the file is a single line
[code]php_value safe_mode "1"[/code]

i test it on my space, it works now and now error messages appear :)

but dont know if you can overrite the php safe mode from your webspace, i run the script on a virtual server @ host europe, works fine.
TMerz
Posts: 47
Joined: Wed 3. Nov 2004, 13:56
Location: Herxheim/Deutschland

Post by TMerz »

Phadda wrote:
scraper wrote: @Tmerz: When SAFE MODE is on, you can't create folders through the script. I thought of a solution for this, but haven't had the time yet to work it out.
how about this? create a .htaccess file an upload it to the image directory, the content of the file is a single line

Code: Select all

php_value safe_mode "1"
i test it on my space, it works now and now error messages appear :)
but dont know if you can overrite the php safe mode from your webspace, i run the script on a virtual server @ host europe, works fine.
Hi, Phadda!
Sorry for answering so late. :oops:

My provider says, there is no possibility to change the basis settings for PHP-SAFE-MODE on my webspace (I don´t have a dedicated web-server). So I tried as You´ve suggested. But: The way with a .htaccess-file wasn´t successful. The upcoming error messages are still the same. So I think, the secury settings on my webspace seem to be very strong....

Let´s wait for a solution from sracper?

Happy christmas and all the best for 2006!
Greetings,
TMerz
LPWV
Posts: 34
Joined: Mon 19. Dec 2005, 04:31

Data base problem...

Post by LPWV »

Okay I did the install...Everything seemed to work...When I added an album it said my DB tables did not exist...

I deleted all of my tables...Tried to manually create them and recieved an error in the PHPMYADMIN...

I really need to know how to edit this section...
in MAIN.CONFIG.PHP

Code: Select all

<?php
// main config for gallery mod

// table names
$prefix				= "";
$tables['phpwcms_gal_albums'] 		= $prefix . "phpwcms_gal_albums";
$tables['phpwcms_gal_caption']	= $prefix . "phpwcms_gal_caption";
$tables['phpwcms_gal_config']        = $prefix . "phpwcms_gal_config";
//$tables['phpwcms_cal_langList']         = $prefix . "phpwcms_cm_languageList";

$GLOBALS['tables'] = $tables;
In my database, my phpwcms tables look like this...

Code: Select all

  comm_phpwcms_address
  comm_phpwcms_article
  comm_phpwcms_articlecat
  comm_phpwcms_articlecontent
  comm_phpwcms_bid
  comm_phpwcms_blog
  comm_phpwcms_cache
Please help...I also assume that after I get this code fixed, I can just re-upload all of the files and then take it away from there again...

Thanks in advance...This script will be awesome for my site....

UPDATE

I reinstalled and these are the problems I am having...When I try to create a album...i get the following:

Code: Select all

Error: 1146: Table 'XXXmyDBnameishereXXX.phpwcms_gal_albums' doesn't exist
--------------------------------------------------------------------------------
INSERT INTO `phpwcms_gal_albums` (id,album_order,title,description,pic_count) VALUES ('1','1','Test','Test','0')
Here is what my MAIN.CONFIG.PHP

Code: Select all

<?php
// main config for gallery mod

// table names
$prefix				= "comm_";
$tables['gal_albums'] 		= $prefix . "phpwcms_gal_albums";
$tables['gal_caption']	= $prefix . "phpwcms_gal_caption";
$tables['gal_config']        = $prefix . "phpwcms_gal_config";
//$tables['cal_langList']         = $prefix . "comm_phpwcms_cm_languageList";

$GLOBALS['tables'] = $tables;
Here is what my tables look like:

Code: Select all

  comm_phpwcms_fonts_styles
  comm_phpwcms_forum
[b]  comm_phpwcms_gal_albums
  comm_phpwcms_gal_caption
  comm_phpwcms_gal_config[/b]
  comm_phpwcms_guestbook
  comm_phpwcms_imgcache
  comm_phpwcms_log
Michael S. Wilson
scraper
Posts: 30
Joined: Tue 9. Aug 2005, 08:01
Location: Belgium

Post by scraper »

Hi LPWV,

I wasn't able to check the forum for a while, due to the holidays and my daughter that needed to be hospitalized. All is well again so... 8)

I checked the code and (again) found a bug :oops:

If you open the file add.album.php in the inc_act folder where you stored the mygallery files.

On line 11 you see the insert query. If you replace

Code: Select all

`phpwcms_gal_albums`
with

Code: Select all

$tables['gal_albums']
your problem would be solved.
LPWV
Posts: 34
Joined: Mon 19. Dec 2005, 04:31

Post by LPWV »

I made that change and now get the following error when I select "Add Album"

Code: Select all

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /usr/local/4admin/apache/vhosts/lpwv.org/httpdocs/include/inc_module/mygallery/inc_act/add.album.php on line 11
OR

If I go back to the original line 11:

I get this now when I try to add a gallery!

Code: Select all

Warning: mkdir(/usr/local/4admin/apache/vhosts/lpwv.org/httpdocs/include/inc_module/mygallery/images/1): File exists in /usr/local/4admin/apache/vhosts/lpwv.org/httpdocs/include/inc_module/mygallery/inc_act/add.album.php on line 9
Couldn't create a new folder (check permissions!)
I have checked permissions in the image folder and the mygallery folder ... Not sure what else I can do!


Thanks for the helo on this, I really like the gallery and would love to be able to use it on my site!
Michael S. Wilson
scraper
Posts: 30
Joined: Tue 9. Aug 2005, 08:01
Location: Belgium

Post by scraper »

The mkdir fails because the folder already exists. Before it creates the folder it checks the album table to know which ID to give to the new album. I presume that your table is empty (as you had errors with the insert query on this table) and that's the reason why it tries to recreate album 1 again.

Can you replace

Code: Select all

`phpwcms_gal_albums`
in the add album file to

Code: Select all

'". $tables['gal_albums'] ."'
Delete the folder /usr/local/4admin/apache/vhosts/lpwv.org/httpdocs/include/inc_module/mygallery/images/1
so that you start with a clean images folder.

Sorry that the gallery is a bit buggy, but I'm sure we'll get there. :roll:
Kurt S.
Pick something up whenever you fall.
-O.Avery-
Himmelreich
Posts: 4
Joined: Wed 27. Apr 2005, 13:41
Contact:

Post by Himmelreich »

Hallo zusammen,

ich hab folgendes Problem

Beim klicken auf den Button "Install ExData Mod" im Gallery Modul
bekomme ich folgede Fehlermeldung:
"Error creating the entries table: Query was empty"

Könnt Ihr mir weiterhelfen?

Gruß Himmelreich
dsachs
Posts: 1
Joined: Wed 25. Jan 2006, 22:24

Post by dsachs »

Hey, habe auch ein kleines Problem nach der Installation der Gallery.
1. Fehler - Probleme mit der Datenbank - Fehler behoben
2. Fehler
- Gallery läuft... - naja - beim erzeugen eines Albums kommt folgende Fehlermeldung:

Code: Select all

Warning: copy(/hp/aa/ae/yq/www/keda/include/inc_module/mygallery/images/1/1.jpg): failed to open stream: Permission denied in /hp/aa/ae/yq/www/keda/include/inc_module/mygallery/inc_lib/main.functions.php on line 247
Kann mir da jemand helfen?

Daniel

PS: die Berechtigungen der Ordner stimmen auch. Habe auch schon die .htaccess eingefügt - kein Erfolg.
ludwigvb
Posts: 2
Joined: Mon 30. Jan 2006, 15:18

Post by ludwigvb »

Hi,

After making the proper changes when trying to create album, I 'm still getting the error:

Code: Select all

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 ''wcms_phpwcms_gal_albums' (id,album_order,title,descripti
Any tips?
Something must be wrong with the add.album.php file
sven_hom
Posts: 15
Joined: Wed 25. Aug 2004, 12:00

mygallery only works when i'm logged in as admin

Post by sven_hom »

Hi there!

I've installed the latest version of the "mygallery"-mod on phpwcms v1.2.5-DEV. The backend module works well, but displaying the photos in the frontend only works when logged in as "admin".

Does anybody has the same problem or maybe a solution for this?

Another problem is that the "forwards" and "backwards"-links doesn't work, because the path to the root is wrong.

Thanks,
Sven
User avatar
sustia
Posts: 651
Joined: Fri 2. Apr 2004, 22:29
Location: Lecce (Italy)
Contact:

Post by sustia »

Hi scraper, I've tried to install the gallery, but reading the topic I have a doubt.
In the Gallery module I see a blank page, and I'm not able to install the module.
This could be because in my server the SAFE_MODE is On? :?

In addiction to this, adding this

Code: Select all

// Gallery MOD by Scraper
if($phpwcms["gallery_mod"]) { //enabled/disable Gallery MOD
	require_once ('include/inc_module/mygallery/inc_front/func.inc.php');
} 
in the content.func.inc.php, I will see only a blank page in the frontend too.

Edit:
I've tried to install in local, and receive this error

Code: Select all

Fatal error: Cannot redeclare fmod() in C:\WM\www\wcms\include\inc_module\mygallery\inc_lib\main.functions.php on line 4
Removing this part of code

Code: Select all

function fmod($x,$y){
    $i = floor($x/$y);
    return $x - $i*$y;
}
the installation starts normally :cry:
Campeones del mundo!
Vegetables!
haedjin
Posts: 18
Joined: Mon 6. Feb 2006, 11:47

Post by haedjin »

This mod looks promising...
However, I don't seem to be able to set it up the way I want to.
What I want to do is add a photo album to a specific article.

So, let's say I have album1 to album10, and I want to display album1 on article1, album2 on article2 and so on. Is this possible?
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Post by update »

Hi,

I wonder if there is some sort of update for this really promising take off for a gallery. I have installed it but can't get it working as imagined.
But it would be really cool to have some tools for showing loads of pictures (eg for monthly exhibitions and archiving them...)

Greetings
claus
wwww
Posts: 3
Joined: Sat 4. Mar 2006, 23:04
Contact:

another database error

Post by wwww »

Hi,

I got another database error when trying to install this (great) script:

In my case the tables were not installed automatically neither. However, when trying to execute the query from page 3 of this script, I get an error message from phpmyadmin:

Code: Select all

Error

SQL query:

$create_albums_sql = " CREATE TABLE `".$GLOBALS[ 'tables'][ 'gal_albums']. "` ( `id` int(11) unsigned NOT NULL default '0', `album_order` int(11) NOT NULL default '0', `title` varchar(150) NOT NULL default '', `description` text, `pic_count` int(11) NOT NULL default '0', PRIMARY KEY (`id`) )" 

This is the error message when that I get when trying to add a new gallery:

Code: Select all

Error: 1146: Table 'wwwinfo_phpwcms.phpwcms_gal_albums' doesn't existINSERT INTO `phpwcms_gal_albums` (id,album_order,title,description,pic_count) VALUES ('1','1','test','psdlkf','0')

Any ideas?

Thanks a lot for your help

:)
Last edited by wwww on Sun 5. Mar 2006, 12:26, edited 1 time in total.
Post Reply