[Snippet] EtogalExtenderSuiteV1(beta)
#1
Posted 12 July 2007 - 12:56 PM
File Submitter: Cris D.
File Submitted: 12 Jul 2007
File Updated: 19 Jul 2007
File Category: Images & Galleries
//Snippet EtogalExtender 1.3
//By Cris D. 12/7/07
//Use: When placed in the same page as etogal, it creates and shows additional fields displayed on the same page as an etogal //image.
//A new table can be added for each etogal gallery or use the default table name for all galleries.
//Table names and unlimited column names are added via the snippet call like this:
//[!EGextender?tableName=your_table_name&colnames=lable1,lable2,lable3,lable4,lable5,lable6!]
//If the default table is used, THE COLNAMES MUST BE IDENTICAL for each use of the snippet.
//Otherwise, a different table name and unique colnames can be set for every etogal gallery.
//Style used for the presentation of the additional info for the CSS: <table style="eg_addon">
//Future development: compare etogal and tableName to delete tableName rows that correspond to deleted etogal rows
##################### Snippet Configuration Here #######################
$etoPrefix="etomite_";//set this to the prefix of your etomite installation
$etogal=$etoPrefix."etogal";//set this to the name of your etogal installation
$defaultTableName="egExtender";//set the default table name here (optional)
$colan=" : ";//set this to the preferred divider between the field lable and the data,
//remove if just the etogal title and description are required.
//The rest happens from the snippet call: set the additional table names and colnames (as described above).
This snippet does the following:
For surfers, it just shows the additional data entered like EGPicInfo.
For Admin, once logged in, and zoomed to a single etogal picture, a new table and form is created that allows you to enter the data for surfers to see.
You can also use etogal in the normal way and edit the title and description and upload and delete pictures via the "Manage Pictures" button.
The snippet is well commented for customisation.
Instructions: 1) Install and populate Etogal. 2) Download this snippet and save it in your snippet library. 3) Call the snippet in the same page as etogal (include your tableName(optional) and colnames (required) parameters). That's it!
The snippet counts the number of colnames you put in the snippet call and automatically creates the table fields and form fields to enter and store the data.
CHANGELOG:
14/7/07 Changed the authentication method to make it more secure.
Updated file to fix a typo //(to comment out a comment regarding the changelog!).
Click here to download this file
#2
Posted 19 July 2007 - 05:06 AM
Quote
I have re-uploaded the snippet twice but for some reason, the old snip is being returned with the typo. Just change the snippet line 11
CHANGELOG:14/7/07 Changed the authentication code to make it more secure.
to
//CHANGELOG:14/7/07 Changed the authentication code to make it more secure.
note the added "//".
Now I know this is simple, but could cause frustration for some if they new nothing :)
Note: It is relatively easy to change the table-based output to div-based output which means you can control the positioning of the add-on fields fairly easily.
Also, the default table column type is varchar 100, once the table has been created, you could change the column type with phpMyAdmin and keep the column name the same before you start entering data. This would be good to include things like timestamps, urls, binary etc. (some modifications may have to be made to the entry form and data handling section of the snippet).
For a live sample, fields beside the picture or fields above the picture. Be aware that you can not see the manager's form, just what the browsers see.
This post has been edited by Cris D.: 19 July 2007 - 09:34 AM
#3
Posted 25 October 2007 - 09:21 PM
I finally tried this snippet- it works great and really opens up EtoGal to a wide variety of uses. Home listings, for instance would be simple now.
#4
Posted 15 September 2008 - 11:13 PM
could this be used to add and manage columns on the etomite_etogal table or does it have to be a new table. I just need to save height and width for each image so it's available in a snippet... either by hand or maybe on the fly, i don't know yet.
thanks,
#5
Posted 15 September 2008 - 11:47 PM
This post has been edited by mikef: 16 September 2008 - 12:02 AM
#6
Posted 16 September 2008 - 02:13 AM
being able to present a flash photo gallery that a non-techical user can create and modify would, in my case, 'catch me up with the competition' so to speak. whether or not it is 'better' to use flash is another argument entirely :)
You and Cris have done an awesome job developing and extending etoGal, it's opened another dimension to what we can do with etomite. Thanks!
#7
Posted 16 September 2008 - 07:27 AM
By the way... love your collection of integrations you are creating! Awsome job darren!
This post has been edited by Cris D.: 16 September 2008 - 07:55 AM
#8
Posted 16 September 2008 - 08:02 PM
Cris D., on Sep 16 2008, 01:27 AM, said:
thank you :D
you are correct, it was easier to use getimagesize to obtain the w/h...
#10
Posted 17 September 2008 - 07:11 PM
cathode, on Sep 16 2008, 08:00 PM, said:
I'm working on something similar to that next, (lightbox slideshow) however i do have to 'work' every once in a while. :lol:
#11
Posted 12 March 2009 - 07:15 AM
I have installed the Extender but i recive at error.
Quote
I don't know alot about SQL so I don't know where to start the debugging.
Can someone please help
Thanks
Thomas
#12
Posted 12 March 2009 - 08:43 AM
1) Do you already have etogal installed and populated with images?
2) Are you placing this on the same page that has etogal added via a separate snippet?
3) Have you successfully added this to other pages yet?
4) Have you changed any of the table names for etogal or this snippet?
5) Please provide the snippet call you are using to attempt to add this to the page.
I do know that if you use a table name in the snippet call and attempt to re-use the same name with different columns it with new columns, you will get an error. It has been a long time since I have used this code and it amazes me when I look at it how amaturish the formatting and use of variables is... a bit of a walk down memory lane. But is should work.
The only other item that looks odd is the loss of back-ticks, you could also try changing line 70:
$sql.=$n." VARCHAR (100),";
with this:
$sql.="`".$n."` VARCHAR (100),";
#13
Posted 12 March 2009 - 02:13 PM
EDIT: After looking at the query it appears that some of the field/column names are not nested within backticks... While both with and without all of them having backticks works in my phpMyAdmin it may not work on all servers when sent via PHP/MySQL script...
#14
Posted 12 March 2009 - 03:01 PM
Cris D., on Mar 12 2009, 10:43 AM, said:
1) Do you already have etogal installed and populated with images?
2) Are you placing this on the same page that has etogal added via a separate snippet?
3) Have you successfully added this to other pages yet?
4) Have you changed any of the table names for etogal or this snippet?
5) Please provide the snippet call you are using to attempt to add this to the page.
I do know that if you use a table name in the snippet call and attempt to re-use the same name with different columns it with new columns, you will get an error. It has been a long time since I have used this code and it amazes me when I look at it how amaturish the formatting and use of variables is... a bit of a walk down memory lane. But is should work.
The only other item that looks odd is the loss of back-ticks, you could also try changing line 70:
$sql.=$n." VARCHAR (100),";
with this:
$sql.="`".$n."` VARCHAR (100),";
Thanks for using your time to help me with this. This codes are almost 2 years old, I guess that it takes a bit of digging. hehe.
For your quistions....
1) Yes
2) Yes
3) No
4) No
5) [!EGextender?colnames=lable1,lable2,lable3,lable4,lable5,lable6!]
I have made the change to line 70 and now I get this.
CREATE TABLE`etomite_etogal_egExtender`(`ai` INT(100) NOT NULL AUTO_INCREMENT,`id` INT(100) NOT NULL,`lable1` VARCHAR (100),`lable2` VARCHAR (100),`lable3` VARCHAR (100),`lable4` VARCHAR (100),`lable5` VARCHAR (100),`lable6` VARCHAR (100),PRIMARY KEY (`ai`),UNIQUE (`id`)) TYPE=myisam;
Thomas
#15
Posted 12 March 2009 - 07:18 PM
Also, are you on a hosted server or running in localhost mode on a WAMP server...???


Help

Back to top
MultiQuote








