Photo Gallery module

Talk about new features for CMSMS and modules.
westis

Photo Gallery module

Post by westis »

There are plenty of good photo gallery scripts out there, but not yet one that is fully integrated with CMSMS in that it is using the same user database (I am not aware if ghostrifle's Gallery2 module will do this and even so, a simpler gallery would be good to complement Gallery2).

If someone with enough skills would like to make a module of a simple, easy-to-use yet good-looking and xhtml compliant, I have two suggestions:
I tried myself with Plogger, but encountered problems when integrating it, with an eternal include loop or perhaps something with the database connector that made the server freak out. There were also two things that needed to be fixed for it to work properly with php 5, but with that fixed it was very easy to install it as a standalone.

But it should be pretty easy to make a module of Plogger and I suppose MG2 wouldn't be that hard either.

Anyone up for the task?

;D
Greg
Power Poster
Power Poster
Posts: 598
Joined: Sun Sep 26, 2004 6:15 pm
Location: Saskatchewan - Canada

Re: Photo Gallery module

Post by Greg »

Installed MG2 as a standalone gallery (not integrated into CMSMS) looks great!
About 400KB in total.
Greg
Piratos

Re: Photo Gallery module

Post by Piratos »

The two titles have all many errors like this in mg2 (see picture) and don#t work good with php 5.xx

but mg2 seems to be better.





[attachment deleted by admin]
westis

Re: Photo Gallery module

Post by westis »

Piratos wrote: The two titles have all many errors like this in mg2 (see picture) and don#t work good with php 5.xx

but mg2 seems to be better.
So the code of those galleries will have to be edited a lot to make a module for CMSMS that also works well with php 5.x.x?
Piratos

Re: Photo Gallery module

Post by Piratos »

Something must be done.

I try to test SimpleViewer but i cannot install this module with 0.11.1



[attachment deleted by admin]
Piratos

Re: Photo Gallery module

Post by Piratos »

I'm testing plogger. it works 90%.

The rss-feed is a disaster:

Code: Select all

<br />
<font size='1'><table border='1' cellspacing='0'>
<tr><th bgcolor='#ee5555' colspan="3">Warning: <i>mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource</i> in <i>I:\xampp\htdocs\plogger\plog-rss.php</i> on line <i>76</i></th></tr>
<tr><th bgcolor='#7777dd' colspan='3'>Call Stack</th></tr>
<tr><th bgcolor='#9999ee'>#</th><th bgcolor='#9999ee'>Function</th><th bgcolor='#9999ee'>Location</th></tr>

<tr><td bgcolor='#ddddff' align='center'>1</td><td bgcolor='#ddddff'>{main}()</td><td bgcolor='#ddddff'>I:\xampp\htdocs\plogger\plog-rss.php<b>:</b>0</td></tr>
<tr><td bgcolor='#ddddff' align='center'>2</td><td bgcolor='#ddddff'>generate_RSS_feed()</td><td bgcolor='#ddddff'>I:\xampp\htdocs\plogger\plog-rss.php<b>:</b>133</td></tr>
<tr><td bgcolor='#ddddff' align='center'>3</td><td bgcolor='#ddddff'><a href='http://localhost/phphandbuch/mysql_fetch_assoc' target='_new'>mysql_fetch_assoc</a>
()</td><td bgcolor='#ddddff'>I:\xampp\htdocs\plogger\plog-rss.php<b>:</b>76</td></tr>

<tr><th colspan='3' bgcolor='#33aa33'>Variables in local scope (#2)</th></tr>
<tr><th colspan='2' bgcolor='#55cc55'>Variable</th><th bgcolor='#55cc55'>Value</th></tr>
<tr><td colspan='2' align='right' bgcolor='#ccffcc'>$config = </td><td bgcolor='#ccffcc'><pre>
<b>array</b>
  'max_thumbnail_size' <font color='#777777'>=></font> <font color='#bb00bb'>'100'</font>
  'max_display_size' <font color='#777777'>=></font> <font color='#bb00bb'>'500'</font>

  'thumb_num' <font color='#777777'>=></font> <font color='#bb00bb'>'20'</font>
  'admin_username' <font color='#777777'>=></font> <font color='#bb00bb'>'admin'</font>
  'admin_password' <font color='#777777'>=></font> <font color='#bb00bb'>'21232f297a57a5a743894a0e4a801fc3'</font>

  'admin_email' <font color='#777777'>=></font> <font color='#bb00bb'>''</font>
  'date_format' <font color='#777777'>=></font> <font color='#bb00bb'>'n.j.Y'</font>
  'compression' <font color='#777777'>=></font> <font color='#bb00bb'>'75'</font>

  'default_sortby' <font color='#777777'>=></font> <font color='#bb00bb'>''</font>
  'default_sortdir' <font color='#777777'>=></font> <font color='#bb00bb'>''</font>
  'gallery_name' <font color='#777777'>=></font> <font color='#bb00bb'>'test'</font>

  'allow_dl' <font color='#777777'>=></font> <font color='#bb00bb'>'0'</font>
  'allow_comments' <font color='#777777'>=></font> <font color='#bb00bb'>'1'</font>
  'allow_print' <font color='#777777'>=></font> <font color='#bb00bb'>'1'</font>

  'truncate' <font color='#777777'>=></font> <font color='#bb00bb'>'12'</font>
  'square_thumbs' <font color='#777777'>=></font> <font color='#bb00bb'>'1'</font>
  'feed_num_entries' <font color='#777777'>=></font> <font color='#bb00bb'>'15'</font>

  'rss_thumbsize' <font color='#777777'>=></font> <font color='#bb00bb'>'400'</font>
  'feed_title' <font color='#777777'>=></font> <font color='#bb00bb'>'Plogger Photo Feed'</font>
  'use_mod_rewrite' <font color='#777777'>=></font> <font color='#bb00bb'>'0'</font>

  'comments_notify' <font color='#777777'>=></font> <font color='#bb00bb'>'1'</font>
  'feed_language' <font color='#777777'>=></font> <font color='#bb00bb'>'en-us'</font>
  'basedir' <font color='#777777'>=></font> <font color='#bb00bb'>'I:\xampp\htdocs\plogger/'</font>

  'baseurl' <font color='#777777'>=></font> <font color='#bb00bb'>'http://localhost/plogger/'</font>
  'charset' <font color='#777777'>=></font> <font color='#bb00bb'>'UTF-8'</font>
</pre></td></tr>
<tr><td colspan='2' align='right' bgcolor='#ccffcc'>$level = </td><td bgcolor='#ccffcc'><pre><font color='#bb00bb'>'collections'</font>
</pre></td></tr>

<tr><td colspan='2' align='right' bgcolor='#ccffcc'>$header = </td><td bgcolor='#ccffcc'><pre><font color='#00bb00'>1</font>
</pre></td></tr>
<tr><td colspan='2' align='right' bgcolor='#ccffcc'>$id = </td><td bgcolor='#ccffcc'><pre><font color='#bb00bb'>'0'</font>
</pre></td></tr>
<tr><td colspan='2' align='right' bgcolor='#ccffcc'>$search = </td><td bgcolor='#ccffcc'><pre><font color='#ff0000'>null</font>
</pre></td></tr>
<tr><td colspan='2' align='right' bgcolor='#ccffcc'>$result = </td><td bgcolor='#ccffcc'><pre><font color='#0000ff'>false</font>
</pre></td></tr>
<tr><td colspan='2' align='right' bgcolor='#ccffcc'>$query = </td><td bgcolor='#ccffcc'><pre><font color='#bb00bb'>'SELECT * FROM plogger_config WHERE 1'</font>

</pre></td></tr>
<tr><td colspan='2' align='right' bgcolor='#ccffcc'>$TABLE_PREFIX = </td><td bgcolor='#ccffcc'><pre><font color='#bb00bb'>'plogger_'</font>
</pre></td></tr>
<tr><td colspan='2' align='right' bgcolor='#ccffcc'>$rssFeed = </td><td bgcolor='#ccffcc'><pre><font color='#bb00bb'>'<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel>
<title>Plogger Photo Feed</title>
<description>Plogger RSS Feed</description>
<language>en-us</language>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<generator>http://www.plogger.org</generator>
<link>http://localhost/plogger/</link>
'</font>

</pre></td></tr>
</table></font>
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel>
<title>Plogger Photo Feed</title>
<description>Plogger RSS Feed</description>
<language>en-us</language>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<generator>http://www.plogger.org</generator>
<link>http://localhost/plogger/</link>
</channel></rss>
Need anyone the comments function ??

By myself i am only interested to show my pictures .
westis

Re: Photo Gallery module

Post by westis »

Thanks, Piratos!

Comments would be a nice feature, but not necessary (at least not to start with). Like you, I am mainly interested in just displaying pictures. I had no problem installing Plogger as a stand-alone, but the problem was making a module of it. Would be amazing if you got it to work! ;D
cyberman

Re: Photo Gallery module

Post by cyberman »

Piratos wrote: I try to test SimpleViewer but i cannot install this module with 0.11.1
You are need the uploads module to work with simple viewer  ;) ...
Last edited by cyberman on Wed Dec 21, 2005 12:24 pm, edited 1 time in total.
Piratos

Re: Photo Gallery module

Post by Piratos »

Module uploads installed but it doesn't work (uploads)

fatal error in line 2946


$this->smarty->assign_by_ref ('itemcount', count ($rowarray));


must be

$newvariable=count ($rowarray);

$this->smarty->assign_by_ref ('itemcount', $newvariable);

or

$this->smarty->assign ('itemcount', count ($rowarray));
there are something more like this.

line  2993, 2995, 2107 and much more !!

Is this module not tested !!?? :'(
Last edited by Piratos on Wed Dec 21, 2005 1:20 pm, edited 1 time in total.
Piratos

Re: Photo Gallery module

Post by Piratos »

SimpleViewer has the same errors  (you shpuld read the smartydoc!)

i have changed all

assign_by_ref

to

assign

and now i can test it.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Photo Gallery module

Post by calguy1000 »

You're probably using PHP5 right.  I don't encounter these problems in PHP4. 

If you send me a diff, I'll gladly apply it.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Piratos

Re: Photo Gallery module

Post by Piratos »

php 5.05

change all assign_by_ref to assign and it works.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Photo Gallery module

Post by calguy1000 »

I created a new virtual machine today, and installed FC4.  Then (with great effort, what a pain) installed php-5.1.1.  I then installd cms, uploads, and simpleviewer from svn and visited the admin pages of each module and did not get any error messages.

error_reporting is set to E_ALL
display_errors is on

other than that, I have not touched the php.ini

Is there anything I'm missing?
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Piratos

Re: Photo Gallery module

Post by Piratos »

assign_by_ref with smarty is only to use with variables not with functions (see smarty manual).

As example count() is a function

if you are using functions you need to use assign

To use it with objects see php manual - the best solution is here to use assign too.

i am using Apache and PHP wth

Xdebug v2.0.0beta5-dev, Copyright (c) 2002, 2003, 2004, 2005, by Derick Rethans
DBG v2.11.32, (C) 2000,2005, by Dmitri Dmitrienko

Xdebug in use with Windows tsWebeditor  and DBG in use with PHPEdit.

But if you have the debugger installed the errors are posted without the editors directly.

Xdebug and DBG is on my Debian Linux Sarge enabled and the same errors are displayed.

if you change the code from assign_by_ref to assign all errors are gone.

if you wish i can send you the phpinfo - output.
Piratos

Re: Photo Gallery module

Post by Piratos »

I have a plan to make a plugin named PiPicture.

1.It works with GD Version >= 2.00

2.No Database needed

3.Images must be transfered with FTP to images/PiPicture

4.The folders in PiPictures are the name of the Gallery

Example

  images/PiPicture/My last Holiday
 
5.Thumbs are created in images/PiPicture/My last Holiday/thumbs

6.The Comments comes from the Exif and so only JPG or TIFF Files are supported.

Here you can see an Exif - Output.

Array ( [FileName] => pimenu.jpg [FileDateTime] => 1135253371 [FileSize] => 7322 [FileType] => 2 [MimeType] => image/jpeg [SectionsFound] => IFD0, COMMENT [COMPUTED] => Array ( [html] => width="314" height="130" [Height] => 130 [Width] => 314 [IsColor] => 1 [ByteOrderMotorola] => 1 ) [COMMENT] => Array ( [0] => Das ist das Logo von Pimenu ) )

This [COMMENT] => Array ( [0] => Das ist das Logo von Pimenu ) is what i need to display a comment.

7.Output with a smarty - template

So we have a small plugin with a big function and is very simple and fast.

What do you mean about that ?
Post Reply

Return to “Feature ideas”