Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Kjeld

Pages: [1]
1
I am thinking about setting up two installations of 4images that would share users. I have very carefully searched the forum, and although there are similar threads I couldn't find the answer to my dilemma. I was hoping someone would be able to think with and tell me if I am correct or wrong, or whether I am trying to do something that may potentially damage my data.

These are the requirements:

1. Installation 2 would use the users of installation 1
2. All other data (images, categories, comments, captions, etc.) would be separate

I have been playing around to figure out how to do this.

In installation 2, I changed "includes/constants.php" as follows:

from
Code: [Select]
define('USERS_TABLE', $table_prefix.'users');
to
Code: [Select]
define('USERS_TABLE', 'installation1_users');
This worked fine. The users were now available in installation 2.

However, when I log in at installation 1, I am still not logged in at installation 2 and visa versa.

This is of course because of the cookie settings in includes/sessions.php. I figure I must change sessions.php of installation 2. I tried several combinations, but couldn't figure it out.

If my setup for installation 1 is domain.com/photos and for installation 2 is domain.com/photos2, how should I change the following in sessions.php of installation 2?

Code: [Select]
define('COOKIE_PATH', '');
My questions in summary:

1. What do I put in COOKIE_PATH?
2. Is there anything else that I would need to change?
3. Is there any danger that data may get damaged, or that the program won't work when two installations share users and 1 cookie?

I  am sure that many other users would benefit from this modification as well, so I hope there will be some good input.  :D

2
-- I have added several new searchable fields to the script ('model release', 'property release', 'color', 'black and white')
-- I need one more searchable field for the orientation of the image ('horizontal' or 'vertical')

-- You could create two searchable fields ( 'horizontal' or 'vertical') as described in http://www.4homepages.de/forum/index.php?topic=9148.0 and click them for each image that you upload.
-- However, I believe it should be easy for the script to calculate the width and height of the image (or perhaps get the information from the EXIF data) upon upload and then store the result into a boolean (tinyint 1) field called 'image_horizontal' ('horizontal' = 1; 'vertical' = 0).  In this way, the whole process is automatic.

-- You would then add another boolean search field in the way described on http://www.4homepages.de/forum/index.php?topic=9148.0 (I finally solved how to do this, V@no -- you may want to have a look at it).

-- I searched the forum, but found no solutions to this problem.
-- Being able to search by horizontal or vertical orientation should be of interest to all photographers who use 4images to sell photographs. This would be a great mod to have!

 :?: Anybody knows how to do this?

3
Would it be possible to automatically order the keywords alphabetically?

This way the data will be correct even when the data entry person makes mistakes.

Either done globally on the whole database once every often by the administrator clicking a 'sort' link.
Or automatically done in the array that prints the keywords on the page.

4
Feedback & Suggestions / [MOD] Newsletter template
« on: April 19, 2006, 12:49:44 AM »
I just wanted to share this little code change to add a newsletter template.

I believe it is important to have consistency in the newsletters I send out, so I use a template. I used to just copy it into the subject and message boxes of 'send email' in the administration. But this little, and super easy, modification does that for you.

It is not really a mod, but I don't know what to label it, and where to post it... I think people will find it very helpful though. And I'd like to give something back after all the help and advice I received on this forum!

[MOD] Newsletter template
- This mod inserts a lay-out template that you designed into the 'send email' message and subject of the admin control panel
- It is different from the files in /lang/english/email/ in that you can see and adjust the text when you send an e-mail from the admin control panel
- tested with 4images 1.7.2

FILES
Files to be modified: (please take a backup copy of all of these!)
  • /admin/email.php
  • /lang/english/main.php

Find in /admin/email.php:
Code: [Select]
show_input_row($lang['send_emails_subject'], "subject", "", 45);
show_textarea_row($lang['send_emails_message'], "message", "", 60, 20);

Change to:
Code: [Select]
show_input_row($lang['send_emails_subject'], "subject", $lang['newsletter_subject'], 45);
show_textarea_row($lang['send_emails_message'], "message", $lang['newsletter_message'], 60, 20);

Add to /lang/english/main.php
Code: [Select]
$lang['newsletter_subject'] = "TYPE SUBJECT HERE";
$lang['newsletter_message'] = "TYPE MESSAGE HERE";

Don't forget to change the text in "TYPE SUBJECT HERE" and "TYPE MESSAGE HERE"

5
I have just created 2  to $additional_image_fields.
One is for 'Model release', the other for 'Property release'.
When I added the new fields to the MySQL database, I set the default to '0' in the database.

The new fields are displayed correctly in the administration for entering new images.
However, they show 'yes' as the default selection. I want 'no' as the default.

I have spent many hours searching the forum and trying out solutions, but can't figure it out...   :?
I imagine that a solution for this issue would help lots of people. And I really need the help.

Please help. How do I set the default to 'no' for these 2  $additional_image_fields?

PS
I am using 4images version: 1.7.2

Pages: [1]