Jump to content


Etogal 1.1 Snippet - Features And Usage


21 replies to this topic

#1 mikef

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 1,551 posts

Posted 27 March 2006 - 06:22 PM

The following documentation for the current version of EtoGal is based on that provided by hugelmopf for Etogal 1.0, extended for later versions of Etomite 0.6.1 and for the new features in EtoGal 1.1 beta 2 and up.
This version last updated 11 August 2006

Snippet name: EtoGal
Author: hugelmopf (+ mikef)
Version: 1.1 (Beta)

&#91
Prerequisites:[/u]]
  • Minimum Etomite version: 0.6.1 (while RC1 and later will work, Final is of course preferred. These instructions relate to RC3 and upwards.)
  • User login snippet: A user login snippet is required for access to the management functions. There are currently two possible snippets to use.
    • Ralph's EtomiteLoginOut snippet, which is compatible with RC3 and up - no longer available
    • Ralph's Authenticate_visitor snippet from the snippet library, which has more functionality and is preferred, but is only compatible with 0.6.1Final
  • You should have Etomite access permissions enabled, because that is what EtoGal's admin mode is based on! (if you don't, only administrators will be able to manage the galleries)

This gallery was made for Etomite and is very deeply integrated (database, access permissions etc.). It is very flexible in integrating in your site and you will be able to integrate a new gallery into every page of your site you like.
Despite the flexibility, installation remains simple.

There is a demo of the frontend for EtoGal at the Demo URL, but there isn't a current demonstration for the admin (one may be added some time after Etomite 0.6.1 final is released). Other examples of EtoGal's use can be found in the 'Showcase' section.

&#91
Features:[/u]]
  • Picture-Upload (up to 10 at a time, jpegs or zips) and thumbnail creation with GD
  • Complete control over access rights (uses Etomite's access rights for every page you place a gallery on)
  • easily and all at once edit pictures descriptions/delete pictures
  • different modes for displaying the full size pictures (including pop-up, different page with e.g. a different template)
  • navigation in picture view (thanks to bastian29)
  • easy switching between admin-mode and view-mode
  • different options for order of pictures, including (EXIF/edit) date, title, filename, upload date. (as snippetcall parameters)
  • mode for listing all galleries that exist in children pages (with thumbs, title and link)

&#91
Installation instructions:[/u]]
You have to have Etomite access permissions enabled, because that is what EtoGal's admin mode is based on!
  • Download the latest Etogal.php file from the Etogal download area and add it to your installation as a snippet: go to Etomite manager -> Manage Resources -> Manage Snippets -> New snippet -> "Name: EtoGal" and paste the complete text from the file into the Snippet code field.
  • Download a login snippet (Authenticate_visitor preferred), and add it to your installation as a snippet.
  • Create a folder (e.g. assets/galleries) where you want your pictures stored and make it writeable for the webserver. If needed, change the $path_to_galleries variable in the beginning of the EtoGal Snippet code appropriately.
  • Add a gallery to any of your pages by adding a call to the Etogl snippet (ie adding [[EtoGal]] or [!EtoGal!] to the page content). This page will need to be published for normal use - remember the page id.
    A folder with the name of the page ID will be created automatically in $path_to_galleries, and all pictures/thumbnails for this page's gallery will be uploaded/created in this folder. Database creation and everything else is taken care of automatically.
  • Add a page to allow users to login. If you are only using the login for a single EtoGal gallery you might want to make the login snippet automatically redirect to the page with the Gallery (pass the id to the snippet as a parameter (eg [[EtomiteLoginOut?id=id]])). This page will need to be published, but need not be part of the site menu structure. (you could combine the login and etogal snippets on a single page for initial testing)
  • Go to the login page you created as a user and login (using credentials defined in the manager for manager logins). Note that EtoGal respects the rights defined in the manager, so you must have access rights for the page. Initially its easier to use the admin login for testing.
Access rights for managing the pictures (uploading, changing the title, deleting) are granted according to the (Etomite-) access rights of the page that the gallery is created on. This of course means, the user has to have logged in, for managing pictures.

&#91
Options you can pass to the EtoGal-Snippet:[/u]]
  • display=[embedded | childgalleries|none]
    Three special modes:
    embedded: Makes full size pictures pop up in a new window without any HTML around them.
    childgalleries: Will produce an overview of galleries in the children pages.
    none: beta 2 and later only displays when in admin mode (for use with the associated etoGalGallery snippet for even more flexibility in display, nd eaasier customisation).
    Default: not chosen
  • picture_target=NUMBER
    Full size pictures can be displayed on a different page (possibly with a different template/text around it), whose ID you can specify here. You just have to place an [[EtoGal?is_target=yes]] call on that page. (overwrites display=embedded)
    If nothing is specified, it uses the same page as the gallery is on.
    Default: not chosen
  • titles_in_overview=[no | yes]
    Shall picture titles be shown in the picture overview, or only on the picture view page? Useful for embedded mode, because no titles are shown in the "pure picture" pop up window
    Default: no
  • max_pic_size=NUMBER
    If this is nonzero, larger pictures will get resized on uploading.
    Default: 800
  • max_thumb_size=NUMBER
    Thumbnails will get created with the longer edge this size.
    Default: 150
  • pics_in_a_row=NUMBER
    Pretty self-explanatory... number of pictures in a row in the overview
    Default: 3
  • order_by=[date | id | filename | title]
    In the picture overview, pictures are ordered by: EXIF/last edit date, picture id ("upload date"), filename or title.
    Default: date
  • order_direction=[ASC | DESC]
    together with the order_by parameter, this determines which direction the order should take: ascending or descending.
    Default: DESC (together with date brings newest pictures on top)
  • keep_date=[yes | no]
    If yes, then EtoGal won't reset the date on each picture when editing. This means, the date will be left at the upload status (which is either the upload date or the EXIF date).
    Default: no
  • gtable=TEXT
    This allows you to rename the name of the table that gets created in your database (should not be necessary except for testing purposes).
    Default: etogal
  • quality=[low|medium|high] (only with beta 2 or higher)
    This selects tradeoffs between upload processing time and image file size against final image quality for thumbnails and larger image if it is resized to the maximum on loading.
    low: quick to load, small file, but uses a fast resizing algorithm, and agressive jpeg compression
    medium: slower to load (using a better resizing algorithm), and agressive jpeg compression
    high: slower to load, and less agressive compression
    Default: low (to match etoGal 1.0, but may be changed later)
  • delete=[0|1] (only with beta 2 or higher)
    If delete is set to zero, users who have edit rights to the gallery page will be able to add images and edit their titles and descriptions, but will not be able to delete images. Only administrators will be able to delete images.
    Default: 1
Usage examples: [[EtoGal]] for all default options, [[EtoGal?max_pic_size=0]] for unlimited pictures size, [[EtoGal?display=embedded&pics_in_a_row=4&max_thumb_size=200]] for more then one Option.

&#91
Restrictions:[/u]]
  • you can only have one instance of EtoGal on each page
This is a logical consequence of the design. The unique identifier for the gallery is the page id, so if you put two on the same page they can't work correctly. As it happens, the way the code is written causes a runtime error (function redeclaration) if you try to do this.

&#91
Issues:[/u]]
Use when PHP is installed to operate in 'Safe Mode'
Safe mode causes file access permission problems for EtoGal. When new galleries are created, it's impossible to put images into them. The following instructions come from martin.kuna

Quote

I add new galleries this way:
1) make new document in etomite (for example with id 10), insert the snippet [ [etogal]]
2) create new directory in ftp client with the same name as id of my document (in this case 10)
3) set chmod 777 for this directory in ftp client
4) upload new images using etogal snippet

Hugelmopf posted a version for use with Etomite 0.6 at this post later in the original Etogal support thread: http://www.etomite.com/index.php?sh...ost&p=19794
This one will not be updated though, and is incompatible with add-on snippets.


(edit - removed EtomiteLoginOut from list of login snippets as no longer availble)

Edited by mikef, 17 June 2007 - 09:48 AM.


#2 mikef

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 1,551 posts

Posted 29 April 2006 - 02:12 PM

I will redo the documentation eventually, but its a matter of having time, and still waiting for a piece of the jigsaw from Ralph which will change what needs to be written. I'm also helping oput with the Etomite 0.6.1 documentation, which takes priority.

Basics for installing EtoGal today:
1) download the EtoGal file
2) copy the contents of the file into a snippet using the snippet editor. (Snippets are PHP code, and so I labelled it as a PHP file (it also makes it easier to edit outside of the snippet editor). Call the snippet EtoGal.
3) copy one of the login snippets into another snippet. Unless you are using a releaase candidate version of Etomite 0.6.1 use authenticate_visitor.
4) create a directory on your server under the assets directory called galleries.
5) put a call to the EtoGal snippet (ie [[EtoGal]] or [!EtoGal!] ) on an Etomite document. This will need to be published for normal use - note the id.
6) put a call to the login snippet on another page, adding the id as a parameter (eg [!authenticate_visitor?id=id!] ). This needs to be published too. (You can put both the snippets on the same page if you want.)
7) Go to the login page you created as a user and login (using credentials defined in the manager for manager logins). Note that EtoGal respects the rights defined in the manager, so you must have access rights for the page. Initially its easier to use the admin login for testing.

EtoGal will automatically create the database table it needs on the first run.

I will write better documentation, but I'm still waiting for Ralph to release the snippet that is supposed to be used for user login with 0.6.1, to see what changes have been made for 0.6.1 final.

edit: updated to refere to the authenticate-visitor snippet

Edited by mikef, 26 May 2006 - 10:30 AM.


#3 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,524 posts
  • Gender:Male

Posted 29 April 2006 - 02:17 PM

mikef, on Apr 29 2006, 11:12 AM, said:

I will write better documentation, but I'm still waiting for Ralph to release the snippet that is supposed to be used for user login with 0.6.1, to see what changes have been made for 0.6.1 final.
Check the Snippet Library for the authenticate_visitor snippet... B)

#4 mikef

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 1,551 posts

Posted 29 April 2006 - 02:33 PM

Ralph (rad14701), on Apr 29 2006, 03:17 PM, said:

Check the Snippet Library for the authenticate_visitor snippet... B)
Oops, sorry - that comes of cut+paste without carefully reading what you're copying.
OK, I'm now waiting to find time to test it ... it works the way I use etogal, but I haven't tested it in all the etogal configurations, because I haven't yet set up a thorough test bed. CAPTCHA codes is a nice addition!

#5 mikef

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 1,551 posts

Posted 01 May 2006 - 01:00 PM

first post updated to include

- more obvious (i hope) prerequisites section
- better installation instructions, covering requirement for a login snippet
- interface details to cater for changes in Etogal 1.1 beta 2

#6 Guest_xrepins_*

  • Guests

Posted 03 June 2006 - 04:45 PM

Just wanted to say: Installed today. Very clear and informative documentation. Thanks for making it an easy install.

#7 thetribe

    Etomite Forum Newbie

  • Member
  • 29 posts

Posted 19 June 2006 - 10:29 PM

just like to echo what xrepins said above, hopefully will have a site to add to the showcase in a few weeks.

#8 mikef

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 1,551 posts

Posted 11 September 2006 - 10:40 PM

First post updated to cover 'safe mode' issues.

#9 sunny

    Etomite Forum Newbie

  • Member
  • 1 posts

Posted 07 January 2007 - 11:32 PM

View Postmikef, on Mar 27 2006, 07:22 PM, said:

The following documentation for the current version of EtoGal is based on that provided by hugelmopf for Etogal 1.0, extended for later versions of Etomite 0.6.1 and for the new features in EtoGal 1.1 beta 2 and up.
This version last updated 11 August 2006

Snippet name: EtoGal
Author: hugelmopf (+ mikef)
Version: 1.1 (Beta)

Somehow the site http://etogal.etomite.com/ cannot be resolved anymore?
Can you tell me where to download the latest versions of the etogal snippets?

TIA

#10 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,524 posts
  • Gender:Male

Posted 07 January 2007 - 11:47 PM

I don't think the Etogal site has been migrated to our new server yet... Dean...???

#11 Dean

    Loves Etomite Forums!

  • Admin
  • 4,758 posts
  • Gender:Male

Posted 07 January 2007 - 11:59 PM

:Sigh:
Its pinned at the start of the etogal forum.

#12 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,524 posts
  • Gender:Male

Posted 08 January 2007 - 12:40 AM

View PostDean, on Jan 7 2007, 06:59 PM, said:

:Sigh:
Its pinned at the start of the etogal forum.
Considering how I can't seem to find that post I guess it isn't all that odd to have someone ask... Please post a link to that post here, Dean, as I've been in and out of the etoGal subforums and although I do seem to recall reading the post previously I'm just not finding it...

#13 Dean

    Loves Etomite Forums!

  • Admin
  • 4,758 posts
  • Gender:Male

Posted 08 January 2007 - 08:53 AM

http://www.etomite.com/index.php?showtopic=5495

It was up one level and pinned.

#14 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,524 posts
  • Gender:Male

Posted 08 January 2007 - 02:25 PM

View PostDean, on Jan 8 2007, 03:53 AM, said:

http://www.etomite.com/index.php?showtopic=5495

It was up one level and pinned.
Consider me officially dazed and confused as I must have mis-read the post altogether... I was fully aware that the download scripts were in that forum thread but I was hunting for information on the status of etogal.etomite.com for some unknown reason... See what happens when I try to take a few hours off to relax... :blink:

#15 Dean

    Loves Etomite Forums!

  • Admin
  • 4,758 posts
  • Gender:Male

Posted 08 January 2007 - 03:12 PM

Thats where the download link used to be at ;) It was pointing to the wrong place :D

#16 allfather

    Etomite Forum Newbie

  • Member
  • 7 posts

Posted 16 June 2007 - 12:40 PM

link to login is broken...

#17 Dean

    Loves Etomite Forums!

  • Admin
  • 4,758 posts
  • Gender:Male

Posted 16 June 2007 - 01:03 PM

link? login?

#18 Ed Headset

    Likes Etomite Forums!

  • Developers
  • PipPip
  • 194 posts
  • Gender:Male
  • Location:The Netherlands
  • Interests:Etomite, PHP, Ajax.
    3D imaging

Posted 17 June 2007 - 08:53 AM

@allfather:
Please be more specific about a missing or broken link.
It is sometimes not easy finding a broken link, if you don't know where to look.
No offence intended. ;)

[edit]
Never mind I just found it..
[/edit]

@Dean:
Sorry for acting like a moderator here,
but this was very confusing, just trying to help out here.. ;)

View PostDean, on Jun 16 2007, 03:03 PM, said:

link? login?
I think he means this one:

Quote

Ralph's EtomiteLoginOut snippet, posted here, which is compatible with RC3 and up
It returns:

Quote

Sorry, the link that brought you to this page seems to be out of date or broken.
;)

Edited by Ed Headset, 17 June 2007 - 08:54 AM.


#19 Dean

    Loves Etomite Forums!

  • Admin
  • 4,758 posts
  • Gender:Male

Posted 17 June 2007 - 09:07 AM

I think that snippet has been replaced by Authenticate_Visitor

#20 mikef

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 1,551 posts

Posted 17 June 2007 - 09:50 AM

Thanks for clarifying Ed.

First post prequisites updated.

And thanks Dean for re-enabling the fancy fomatting.

:)

Edited by mikef, 17 June 2007 - 09:51 AM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users