Author Topic: Links? and ..... layout  (Read 98272 times)

0 Members and 1 Guest are viewing this topic.

Offline Jaap12

  • Full Member
  • ***
  • Posts: 108
    • View Profile
Links? and ..... layout
« on: June 19, 2002, 09:14:42 PM »
Hi all i want add some new fields into my site i have used the search here on the site, but i have found a old version where it is explained. I can't figure out it, can make someone a same tutorial like this? : http://www.4homepages.de/forum/viewtopic.php?t=180&highlight=add+field

I think it's very useful, maby you can help me? A lot of users have the same problem i think.

And my second question i saw a cool site:
http://www.dieblen.de/ how is it possible to change the hole layout like this site? Wich files i must change? Not only a stylesheet i think but maby there is a good tutorial some else?

Some little problems but i can't fix it, can you help me?

Best regards,
jim
« Last Edit: September 12, 2005, 10:27:41 AM by XippiX »

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Links? and ..... layout
« Reply #1 on: June 19, 2002, 10:29:17 PM »
Hi,

take a look at "includes/db_field_definitions.php". This file is to simply add new fields to store more image informations.
Create the new columns to the database and follow the instructions given in the file.
Note: The new fields are not searchable by the search engine of 4images.

Greets Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Links? and ..... layout
« Reply #2 on: June 20, 2002, 10:03:19 PM »
Ok, i try to explain it ;)

First add a cloumn to your database table "4images_images" and "4images_images_temp". In this case i will explain it with the column "image_photographer".

Add this line to "includes/db_field_definitions.php":
Code: [Select]
$additional_image_fields['image_photographer'] = array($lang['image_photographer'], "text", 1);


The key of the array is the name of the database column.

Then add this line to your language files (main.php):
Code: [Select]
$lang['image_photographer'] = "Photographer:";

I think the values "text" and 1 in the array are explained in "includes/db_field_definitions.php".

Now, you can use the following tags in your template (detail.html)

{lang_image_photographer} -> will display Photographer:
{image_photographer} -> will display the entry of the database field

For example add in the template details.html after:
Code: [Select]
<tr>
  <td valign="top" class="row2"><b>{lang_added_by}</b></td>
  <td valign="top" class="row2">{user_name_link}</td>
</tr>

this code:
Code: [Select]
<tr>
  <td valign="top" class="row1"><b>{lang_image_photographer}</b></td>
  <td valign="top" class="row1">{image_photographer}</td>
</tr>


In addition to this, you can add in the template member_uploadform.html after:
Code: [Select]
<tr>
  <td class="row2" valign="top"><b>{lang_keywords}</b></td>
  <td class="row2"><textarea cols="30" class="textarea" rows="5" wrap="VIRTUAL" name="image_keywords">{image_keywords}</textarea></td>
</tr>


this code:
Code: [Select]
<tr>
  <td class="row2"><b>{lang_image_photographer}</b></td>
  <td class="row2"><input type="text" name="image_photographer"  size="30" value="{image_photographer}" class="input" /></td>
</tr>


The needed input fields in the Control Panel will appear automatically.
Hope this will help.

Greets Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline Jaap12

  • Full Member
  • ***
  • Posts: 108
    • View Profile
Thx
« Reply #3 on: June 21, 2002, 08:32:52 PM »
Thanks for your very fast reply and install instuctions.

Only i mistake i think, you have explained if a user want add new informatie to a picture with uploading.

I mean, in the control panel then : Add new image, and i want there add a new row, so if i want add a new image, then it is displayed with the new info that i have added in the add a new image section (in the control panel)

I mean:
Add new image -> new field -> new field displayed bij advanched information by the site.

I want place a link under a picture, and that link i want add and eddited in the control panel, that's my question


jim
« Last Edit: September 12, 2005, 10:28:30 AM by XippiX »

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Links? and ..... layout
« Reply #4 on: June 21, 2002, 09:07:55 PM »
If you add the new line to "includes/db_field_definitions.php"
Code: [Select]
$additional_image_fields['image_photographer'] = array($lang['image_photographer'], "text", 1);
the new row will appear automatically in the control panel.

Greets Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline Jaap12

  • Full Member
  • ***
  • Posts: 108
    • View Profile
Thx
« Reply #5 on: June 21, 2002, 09:51:22 PM »
Thanks for helping me Jan! i really like it. License comes soon!!!

Offline Jaap12

  • Full Member
  • ***
  • Posts: 108
    • View Profile
Searchengine
« Reply #6 on: June 22, 2002, 08:38:05 PM »
You said it is not possible to add new field to the search engine, how i can i make this possible? I think the must be a way to do it. or not?

Regards,
jim
« Last Edit: September 12, 2005, 10:28:39 AM by XippiX »

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Links? and ..... layout
« Reply #7 on: June 22, 2002, 10:07:56 PM »
Hi,

its a little bit difficult, because 4images makes use of a search index. At the moment, i'm working on a solution for this problem...

Greets Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline Jaap12

  • Full Member
  • ***
  • Posts: 108
    • View Profile
Ok
« Reply #8 on: June 22, 2002, 10:14:29 PM »
Hope it will released soon!!!

Looking forward to it!

Offline Art By Vicky

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
    • ABV Arts Enterprises
Links? and ..... layout
« Reply #9 on: October 23, 2002, 10:32:19 PM »
Quote from: Jan
If you add the new line to "includes/db_field_definitions.php"
Code: [Select]
$additional_image_fields['image_photographer'] = array($lang['image_photographer'], "text", 1);
the new row will appear automatically in the control panel.


Where in the "includes/db_field_definitions.php" file do you place the new field information?  When I attempt to add the appropriate lines, I get error messages.  These are what I added:

Code: [Select]
$additional_user_fields['user_yahoo'] = array($lang['user_yahoo'], "text", 1);
$additional_user_fields['user_msn'] = array($lang['user_msn'], "text", 1);
$additional_user_fields['user_aim'] = array($lang['user_aim'], "text", 1);


I tried to add them in a couple different places in the file and got error messages each time.  I've added the {lang_xxx} codes to the main.php file without a problem, but can't seem to get this one to work.  Am I missing something here?  What am I doing wrong?

Please help.
Thanx
ABVarts.com
RoundTableWebDesign.com
ArtByVicky.com
League of Animal Artists - AnimalArtists.org

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Links? and ..... layout
« Reply #10 on: October 23, 2002, 11:28:42 PM »
What error messages do you get?

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline Art By Vicky

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
    • ABV Arts Enterprises
Links? and ..... layout
« Reply #11 on: October 24, 2002, 01:41:15 AM »
Ok, first I wasn't specific enough about the error messages.  They appear when I am logged into admin.  They appear at the top of the large panel on the right where you actually make all the changes.  Here are the messages:

Code: [Select]
Warning: Cannot add header information - headers already sent by (output started at /web/vseymour/public_html/gallery/includes/db_field_definitions.php:98) in /web/vseymour/public_html/gallery/admin/admin_functions.php on line 168

Warning: Cannot add header information - headers already sent by (output started at /web/vseymour/public_html/gallery/includes/db_field_definitions.php:98) in /web/vseymour/public_html/gallery/admin/admin_functions.php on line 169

Warning: Cannot add header information - headers already sent by (output started at /web/vseymour/public_html/gallery/includes/db_field_definitions.php:98) in /web/vseymour/public_html/gallery/admin/admin_functions.php on line 170

Warning: Cannot add header information - headers already sent by (output started at /web/vseymour/public_html/gallery/includes/db_field_definitions.php:98) in /web/vseymour/public_html/gallery/admin/admin_functions.php on line 171

Warning: Cannot add header information - headers already sent by (output started at /web/vseymour/public_html/gallery/includes/db_field_definitions.php:98) in /web/vseymour/public_html/gallery/admin/admin_functions.php on line 172


All I did was enter the code in like this:
Code: [Select]
if (!defined('ROOT_PATH')) {
  die("Security violation");
$additional_user_fields['user_yahoo'] = array($lang['user_yahoo'], "text");
}


I've also placed it after the } before the /* row.  Same message.  And also at the very bottom, just before the ?> row.  After I've made any of the changes and then go and delete what I had put in, it still gives the error messages.  I end up having to reupload the original php file.

I don't know what I could be doing wrong!  Sorry for so many questions!  I'm still learning all this php and database stuff.  I appreciate your help.

Thanks!
ABVarts.com
RoundTableWebDesign.com
ArtByVicky.com
League of Animal Artists - AnimalArtists.org

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Missing a parameter
« Reply #12 on: October 24, 2002, 03:04:27 AM »
Quote
$additional_user_fields['user_yahoo'] = array($lang['user_yahoo'], "text");

You missed the last parameter:
Code: [Select]
%is_required% bool

  Sets up the field as required when adding data through the Control Panel or the user upload form.

So your line should look like this (if required)
Code: [Select]
$additional_user_fields['user_yahoo'] = array($lang['user_yahoo'], "text", 1);
or this if data entry is NOT required:
Code: [Select]
$additional_user_fields['user_yahoo'] = array($lang['user_yahoo'], "text", 0);
And the line belongs at the bottom before the closing
Code: [Select]
?>

Offline Art By Vicky

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
    • ABV Arts Enterprises
Links? and ..... layout
« Reply #13 on: October 24, 2002, 03:37:34 AM »
I actually did have it coded as you showed:

Code: [Select]
$additional_user_fields['user_yahoo'] = array($lang['user_yahoo'], "text", 1);

I was trying different variations to see what would work and just copied the wrong one into the thread.  I just tried the one listed above again where you told me (which I'd already tried before) and this is the error message I get:
Code: [Select]

Warning: Cannot add header information - headers already sent by (output started at /web/vseymour/public_html/gallery/includes/db_field_definitions.php:98 ) in /web/vseymour/public_html/gallery/admin/admin_functions.php on line 168

Warning: Cannot add header information - headers already sent by (output started at /web/vseymour/public_html/gallery/includes/db_field_definitions.php:98 ) in /web/vseymour/public_html/gallery/admin/admin_functions.php on line 169

Warning: Cannot add header information - headers already sent by (output started at /web/vseymour/public_html/gallery/includes/db_field_definitions.php:98 ) in /web/vseymour/public_html/gallery/admin/admin_functions.php on line 170

Warning: Cannot add header information - headers already sent by (output started at /web/vseymour/public_html/gallery/includes/db_field_definitions.php:98 ) in /web/vseymour/public_html/gallery/admin/admin_functions.php on line 171

Warning: Cannot add header information - headers already sent by (output started at /web/vseymour/public_html/gallery/includes/db_field_definitions.php:98 ) in /web/vseymour/public_html/gallery/admin/admin_functions.php on line 172


Am I supposed to put any blank rows or anything else?
ABVarts.com
RoundTableWebDesign.com
ArtByVicky.com
League of Animal Artists - AnimalArtists.org

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Double check
« Reply #14 on: October 24, 2002, 03:55:42 AM »
Best thing to do is first double check the format of every additional field line.  Second thing is to make sure there is nothing after the
Code: [Select]
?>
at the end of the file.  No spaces, no carriage return, no blank lines.

If you still have trouble, please post the contents of /web/vseymour/public_html/gallery/includes/db_field_definitions.php here so someone can try to spot the problem.