4images Forum & Community

4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: Jaap12 on June 19, 2002, 09:14:42 PM

Title: Links? and ..... layout
Post by: Jaap12 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
Title: Links? and ..... layout
Post by: Jan 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
Title: Links? and ..... layout
Post by: Jan 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
Title: Thx
Post by: Jaap12 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
Title: Links? and ..... layout
Post by: Jan 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
Title: Thx
Post by: Jaap12 on June 21, 2002, 09:51:22 PM
Thanks for helping me Jan! i really like it. License comes soon!!!
Title: Searchengine
Post by: Jaap12 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
Title: Links? and ..... layout
Post by: Jan 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
Title: Ok
Post by: Jaap12 on June 22, 2002, 10:14:29 PM
Hope it will released soon!!!

Looking forward to it!
Title: Links? and ..... layout
Post by: Art By Vicky 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
Title: Links? and ..... layout
Post by: Jan on October 23, 2002, 11:28:42 PM
What error messages do you get?

Jan
Title: Links? and ..... layout
Post by: Art By Vicky 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!
Title: Missing a parameter
Post by: Chris 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]
?>
Title: Links? and ..... layout
Post by: Art By Vicky 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?
Title: Double check
Post by: Chris 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.
Title: I Got It!
Post by: Art By Vicky on October 24, 2002, 04:02:34 AM
Never mind.  I got it.  When I added the line, it somehow added several returns after the final ?>.  I just deleted those and added a return before the final ?> and it's working now.  Thank you for all your help.  You've been great.

Would it be an imposition for me to ask one more questions?  I hope not.  Is there a way for a user to change the order in which their images appear.  I know I can do it in admin, but is there a way for the user to do it?
Title: Can only sort
Post by: Chris on October 24, 2002, 04:12:09 AM
You can't explicitly set the order of the images as with the categories.  Even the admin control panel only lets you sort the images by date, by name, etc.

So the only way a user can set the display order is to choose a naming convention.  So if the admin CP setting is to sort by name, their images are shown in the desired order.

Make sense?

Example:  (admin setting sorts images by name)

01 - Picture One
02 - My Picture Two
03 - A Third Picture

By the way, it's the trailing carriage returns AFTER the "?>" that causes the problem.  It's safe to have just a space or single carriage return after the line's semicolon ";" and the "?>"
Title: Links? and ..... layout
Post by: Art By Vicky on October 24, 2002, 04:18:17 AM
Ok, thanks for replying so quickly.  I think I've got everything under control now.  Thanks for all your help.
Title: Links? and ..... layout
Post by: Jan on October 24, 2002, 09:16:44 AM
What text editor do you use? Be sure to remove everything behind the ?> at the end of the file (spaces etc.).

Jan
Title: One more problem...
Post by: Art By Vicky on October 25, 2002, 06:45:41 PM
Sorry to be such a pain, but the $lang code does not display when I add it to my templates.  Here's a snippet of the code as I've got it in the main.php file:

Code: [Select]
$lang['last_action'] = "Last Activity:";
$lang['email'] = "Email:";
$lang['email_confirm'] = "Confirm email:";
$lang['homepage'] = "League Bio Page:";
$lang['icq'] = "ICQ ID:";
$lang['yahoo'] = "Yahoo ID:";
$lang['msn'] = "MSN ID:";
$lang['aim'] = "AIM ID:";
$lang['show_email'] = "Show my email address:";
$lang['allow_emails'] = "Receive emails from administrators:";
$lang['invisible'] = "Hide your online status:";
$lang['optional_infos'] = "Optional";
$lang['change_password'] = "Change password";
$lang['old_password'] = "Old password:";
$lang['new_password'] = "New password:";
$lang['new_password_confirm'] = "Confirm new password:";
$lang['lost_password'] = "Enter password again";
$lang['lost_password_msg'] = "In case you forgot your password, enter the email address you have used for registration.";
$lang['user_name'] = "Username:";
$lang['password'] = "Password:";
$lang['first'] = "First Name:";
$lang['last'] = "Last Name:";
$lang['website'] = "Website:";


All the new code I've added shows blank when I add the code to my templates, but any changes I make to code that was already listed is displayed correctly.  Example: I added first to correspond to my new {user_first} db field.  The db part of it works fine, but the words "First Name:" do not show up when I use the {lang_first} in the html code of the templates.  Is there somewhere else that I'm also supposed to put this new code so that the program will recognize it?  Here is the html code from my member_editprofile template:

Code: [Select]
<tr>
            <td class="row1"><b>{lang_first}First Name:</b></td>
            <td class="row1"><input type="text" name="user_first"  size="30" value="{user_first}" class="input" /></td>
          </tr>


As you can see, I had to manually type First Name: in order for it to appear when that page is accessed.  I hope I've provided enough information and was clear enough about my problem.  I hope you're able to help.  Thank you again, in advance for your assistance.

Vicky
Title: Links? and ..... layout
Post by: Jan on October 26, 2002, 07:30:30 AM
Use {lang_user_first}

Jan
Title: Thank for replying
Post by: Art By Vicky on October 26, 2002, 07:56:38 AM
Nope. Didn't work.  Changed first & last from {lang_first} & {lang_last} to:

Code: [Select]
<tr>
            <td class="row1"><b>{lang_user_first}</b></td>
            <td class="row1"><input type="text" name="user_first"  size="30" value="{user_first}" class="input" /></td>
          </tr>
<tr>
            <td class="row2"><b>{lang_user_last}</b></td>
            <td class="row2"><input type="text" name="user_last"  size="40" value="{user_last}" class="input" /></td>
          </tr>


and they now show blank (see http://www.animalartists.org/gallery/register.php)

Here's a snippet of the main.php file:

Code: [Select]
$lang['user_name'] = "Username:";
$lang['password'] = "Password:";
$lang['first'] = "First Name:";
$lang['last'] = "Last Name:";
$lang['website'] = "Website:";

$lang['register_msg'] = "Please fill out all fields. Enter a valid email address so we can provide you with your activation code.";
$lang['agreement'] = "Terms of Registration:";


What am I missing?  Heelllppp! (whimper... whimper...)
Title: Links? and ..... layout
Post by: Jan on October 26, 2002, 09:46:54 AM
How does your db_field_definitions.php entries look like?

Jan
Title: Here they are:
Post by: Art By Vicky on October 26, 2002, 10:17:18 AM
These were the db_field_definitions.php entries:

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

?>


I have tried both ways - with the user_ before the word and without it.  Getting very frustrated here.  The db fields are user_*; the main.php entries are ['*'] and the db_field_definition.php entries are now ['*'] and they're still showing blank.
Title: Links? and ..... layout
Post by: Jan on October 26, 2002, 10:49:10 AM
$lang['first'] = "First Name:";
$additional_user_fields['user_first'] = array($lang['user_first'], "text", 1);

must be the same.

Correct:

$lang['user_first'] = "First Name:";
$additional_user_fields['user_first'] = array($lang['user_first'], "text", 1);

Jan
Title: Links? and ..... layout
Post by: Art By Vicky on October 27, 2002, 04:08:01 AM
I had them both without the user_ infront of the word.  They both said 'first' only.  I had tried it once before with both of them with 'user_first' and it didn't work.  I don't know what I did different this time, but its working now.  Thank you very much for all your help and for your patience with me.

Thanks,
Vicky
Title: Links? and ..... layout
Post by: Johanna on February 27, 2003, 04:46:54 PM
Hallo Jan!

Ich hab jetzt mit dieser Anleitung versucht ein zusätzliches Textfeld einzufügen, bekomme aber folgende Fehlermeldung, wenn ich die Startseite aufrufe:

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, i.user_info, c.cat_name, u.user_name FROM bilder_images i, bilder_categories c LEFT JOIN bilder_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 2, 4, 5, 7, 9, 8, 6) ORDER BY i.image_date DESC LIMIT 3
Unknown column 'i.user_info' in 'field list'

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/www/web/html/bilder/includes/db_mysql.php on line 116

Gruß

Johanna
Title: Links? and ..... layout
Post by: Jan on February 27, 2003, 04:54:50 PM
Hast Du auch das entsprechende Feld in der Datenbank angelegt?

Jan
Title: Links? and ..... layout
Post by: Johanna on February 27, 2003, 04:59:44 PM
Quote from: Jan
Hast Du auch das entsprechende Feld in der Datenbank angelegt?

Jan


Hab ich gemacht:

user_info  text   Nein    

Gruß

Johanna
Title: Links? and ..... layout
Post by: Jan on February 27, 2003, 07:54:37 PM
i.user_info sagt mir, dass Du ein zusätzliche Feld für Bilder eingefügt hast. Dann musst Du das Feld in der Tabelle 4images_images hinzufügen. Wenn Du ein User-Feld hinzufügen willst, musst Du das Array $additional_user_fields in db_field_definitions.php verwenden.

Jan
Title: Links? and ..... layout
Post by: jengwen on March 06, 2003, 11:37:08 PM
Last night on a whim I added "fullname" as a new field for my users.  I added it manually to the database and then just did searches and wherever I found "homepage" or "ICQ" I repeated the code for "fullname".  This seems to have worked except I am missing it on some parts of the control panel.

Today, I read these posts.  I hadn't added it to "includes/db_field_definitions.php" because I didn't quite understand what it did.  I am thinking of adding it now, but am worried it might conflict with what I have already done.  

What exactly does putting it in the "includes/db_field_definitions.php" do?  Does it add it to the SQL calls on the fly?  I am thinking if I add it here, I can remove everything else I did except the html pages and main.php.  Any thoughts?
Title: Links? and ..... layout
Post by: jengwen on March 07, 2003, 06:07:37 AM
Never mind.  I was able to just revert back to my saved copy before I added it and everything worked great.
Title: help
Post by: Psy on March 28, 2003, 05:58:15 AM
I've tried this Mod and it works great. After using it, I noticed that you also have to add any fields you add to the member_editimage.html in order for uses to be able to edit there images. So, I did it, and that also works great. My problem is that any extra fields added to the member_editimage.html do not auto fill, like keywords and discretions do. How would get these extra fields to auto fill in member_editimage.html.
I tried adding a PHP script to member_editimage.html that I have used before to grab a content and place then in the fields, but it seems that you can't but PHP tags inside the template html files.
Title: Re: help
Post by: Chris on March 28, 2003, 02:37:29 PM
Quote from: Psy
I tried adding a PHP script to member_editimage.html that I have used before to grab a content and place then in the fields, but it seems that you can't but PHP tags inside the template html files.

You can.  See my FAQ post about how to include another php file in the templates.

You also must place the PHP tags like so:
Code: [Select]
<?php 
// Code goes here and the <?php and ?>
must appear at the start of separate lines
?>
Title: Links? and ..... layout
Post by: Jan on April 04, 2003, 04:07:57 PM
Hast Du die Felder in der Datenbank angelegt?

Jan
Title: pflichtfelder
Post by: Michael on June 08, 2003, 09:38:49 AM
Hallo, ich habe nun noch einige Felder zum Profil (Kontrollzentrum) hinzugefügt welche soweit auch funktionieren, obwohl ich sie unter "freiwillige" Angaben gesetzt habe sind es nun alles "Pflichtfelder", das stört ungemein.
Habe schon alles mögliche versucht aber ohne Ergebnis, wo muss ich was ändern damit es keine Pflichtfelder mehr sind?????   :oops:

über eine schnelle Antwort würde ich mich sehr freuen!!

schöne Pfingsten wünsch ich Euch allen.
Title: Links? and ..... layout
Post by: Jan on June 10, 2003, 03:38:11 PM
Code: [Select]
$additional_user_fields['user_adress'] = array($lang['user_adress'], "text", 1);
Das letzte Argument auf von 1 auf 0 gesetzt, macht das Feld zu einem freiwilligen Feld.

Jan
Title: Links? and ..... layout
Post by: Michael on June 10, 2003, 04:21:15 PM
ahaaa...nun bin ich schlauer, danke   :D

Gruß, Michael
Title: Weiteres Problem dazu! Felder nur für Admins einsehbar...
Post by: hinzwiekunz on June 17, 2003, 01:29:37 AM
Hallo, ersteinmal haben mir die Beiträge hier sehr geholfen :D , denn bei mir hat es nach langer Zeit geklappt Felder hinzuzufügen. NUr fällt mir jetzt auf das alle neuen Felder bei Neuregistrierten Nutzern für Fremde über das Kontrollzentrum ersichtlich sind - z.B. durch klick auf den Namen "Wer online ist". :?

Ich möchte das die neuen Angaben wie Adresse u.Ä. nur dem Nutzer selbst und den Administratoren zugänglich sind!!! Wo muss ich die Angaben da hinschreiben, was modifizieren??????

Gruß,
hinzwiekunz
Title: Re: Links? and ..... layout
Post by: ascanio on April 06, 2005, 12:53:54 AM
Hi I have follow all the steps but I don get this to work ... I have created the 2 columns in my data base
Code: [Select]
image_description
I put this on db_field_definitions.php :
Code: [Select]
$additional_image_fields['image_description'] = array($lang['image_description'], "text", 1);
and this on the templates:

register_form.html:
Code: [Select]
  <tr>
 <td class="row2"><b>{lang_image_description}</b> </td>
 <td class="row2"><input type="text" name="image_descrption"  size="30" value="{image_description}" class="input" /></td>
</tr>

member_profile.html:
Code: [Select]
<tr>
<td class="row1"width="40%"><b>{lang_image_description}</b> </td>
<td class="row1">{image_description} </td>
</tr>

When I try to register it show correct the language but when I clcik in the submit butom the text does not save can anybdy help me?
Title: Re: Links? and ..... layout
Post by: V@no on April 06, 2005, 01:04:24 AM
pay attention to which variable u are using: $additional_image_fields
for 4images_users table u need use $additional_user_fields
Title: Re: Links? and ..... layout
Post by: ascanio on April 06, 2005, 01:12:29 AM
thankssss!!!
Title: Re: Links? and ..... layout
Post by: ascanio on April 06, 2005, 01:22:11 AM
hi V@no so what makes do I have to do? just in  db_field_definitions.php or do i have to make a colum in 4images_user also?
Title: Re: Links? and ..... layout
Post by: V@no on April 06, 2005, 01:29:02 AM
hi V@no so what makes do I have to do? just in db_field_definitions.php or do i have to make a colum in 4images_user also?
what?
u added image_description into 4images_images table??? that column was supposed to be there by default!
Title: Re: Links? and ..... layout
Post by: ascanio on April 06, 2005, 01:46:22 AM
ok ok I didn't know so what colum I have to create? and where?
Title: Re: Links? and ..... layout
Post by: ascanio on April 06, 2005, 01:50:17 AM
yeeee finaly it's working!!!!! :) i'm so happy
Title: Re: Links? and ..... layout
Post by: ascanio on April 06, 2005, 09:46:33 PM
Hi I have made some new fields for the user profile but now they are requied to fill i want them optional how can I change that $additional_image_fields['image_photographer'] = array($lang['image_photographer'], "text", 1);
"text", 0); if I put a 0 there is optional?
Title: Re: Links? and ..... layout
Post by: V@no on April 07, 2005, 12:50:39 AM
"text", 0); if I put a 0 there is optional?
that is correct
Title: Additional field and IPTC import
Post by: ipicture on April 30, 2005, 12:30:33 PM
Bei mir funktionieren die zusätzlichen Felder bei Images und User.

Wie kann ich jetzt im Control Panel erreichen, dass z.B. das neue Feld in der DB {image_city} den Eintrag aus den IPTC-Daten übernimmt, wenn ich "neue Bilder checke" - ähnlich wie bei Keywords, Beschreibung, Aufnahmedatum.

Ich denke, hier ist eine Modifikation der admin/images.php notwendig. Wer weiß näheres?

The additional fields in images and user works fine.
When I check new images I like to include the new field {image_city} automatically from IPTC-Datas to the database - simular like the keywords, description and date created.
I guess there must be a modify in admin/images.php. Has somebody a solution?

Thanks
Klaus
Title: Re: Links? and ..... layout
Post by: V@no on April 30, 2005, 02:41:21 PM
mmmm...and what does your question has to do with this topic?
Title: ...
Post by: ipicture on April 30, 2005, 03:02:05 PM
I think a lot. The topic named by XippiX is not the right headline for his question and the following threads.
If you want I can start a new thread. But my question is related to Jans answer...

K.
Title: Re: Links? and ..... layout
Post by: V@no on April 30, 2005, 03:15:15 PM
But my question is related to Jans answer...
ah, I see now.
well, next time please use "quote" button if u reply to a specific post ;) - thats way we'll avoid confusion :)
Title: Re: Links? and ..... layout
Post by: kief24 on August 31, 2005, 10:26:42 AM
i added 2 extra user fields, but they do not appear in control panel.

This is what i did :
in db_field_definitions i added :
Code: [Select]
$additional_user_fields['user_organisation'] = array($lang['user_organisation'], "text", 1);
$additional_user_fields['user_realname'] = array($lang['user_realname'], "text", 1);
and closed with ?>

then in language/main.php :
Code: [Select]
$lang['user_organisation'] = "Organisatie:";
$lang['user_realname'] = "Naam:";

then in my template register_form.html
Code: [Select]
{lang_user_realname}
            <input type="text" name="user_realname" size="30" value="{user_realname}" class="input" />
         
         
            {lang_user_organisation}
            <input type="text" name="user_organisation" size="30" value="{user_organisation}" class="input" />
          

that should be it ? wright ?

but i can't find the new fields in my control panel, when i look at the users information
Title: Re: Links? and ..... layout
Post by: Jan on August 31, 2005, 01:41:53 PM
Did you added the new fields to the database?
Title: Re: Links? and ..... layout
Post by: Jan-Lukas on September 25, 2005, 12:57:18 AM
Hi,
habe noch ein kleines Problem
Habe mir 3 neue Tabellen erstellt
wenn ich die Bilder bearbeite, werden die neuen Bildeinträge auch in der Datenbank gespeichert, und auch ausgegeben.

Nur wenn ich die Daten in der member_uploadform.html eingebe, werden diese nicht in der Datenbank gespeichert.

Kann mir vielleicht jemand sagen welche Dateien dafür noch geändert werden müssen.


Edit: war ein Dreher drin, klappt jetzt.
Jetzt fehlt noch die Suche, denn die Einträge wollen ja auch gefunden werden  :wink:

Und vielleicht noch die Dateien für die Suche

würde es dann aber gerne selbst versuchen
Danke Harald
Title: Re: Links? and ..... layout
Post by: soyola on January 27, 2006, 09:52:20 PM
Are these custom fields that we created will be visible to all registered users when they click user profile?  If yes how do we hide and these are visible only to conditional users?
Title: Re: Links? and ..... layout
Post by: trez on February 08, 2006, 01:42:25 AM
i;ve posted my question i a new topic, but everyone tells me i find my answer in THIS topic - i didnt, so i post it here:

is there any way to ad manually a title to an user? So that the title is shown in the profile, in the whos online etc. But i dont want this to be automatic, just selected users from the admin... like "vip" , "mrs. xxx" and so one.

For example:

I have 50 users (47 registred, 3 admins) - i want to give two titles to some registred users so it would be "username<BR>usertitle"  in the profile, memberlist, whoisonline etc.

i know how to make a new field etc, but how can i make it restricted, controlled by the adminpanel. For the templates, the code will be like {if_user_title}{user_title}{end_if_user_title}

I hope someone can understand that and help me :)

thanks!
Title: Re: Links? and ..... layout
Post by: killerwhale65 on March 07, 2006, 08:24:26 PM
hi,

i would like to have a dropdown-list as custom field.

What i did was in memberuploadform.html, replacing

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

with

Code: [Select]

<tr>
  <td class="row2"><b>{lang_registratie}</b></td>
  <td class="row2">
<select name="type" class="input">
<option>Make your choice !
<option value="{registratie}">Boeing

</select>
</td>
  </tr>

But the field stays empty in the mysql. When i change it however from the admin (it is not a listbox their, so i just type it), it does work.

What did i do wrong?

thanks!
Title: Re: Links? and ..... layout
Post by: killerwhale65 on March 08, 2006, 12:48:51 PM
can anyone point me in the right direction please?
Title: Re: Links? and ..... layout
Post by: Hannibal on March 09, 2006, 04:01:53 PM
Hello. I have a problem with add new fields.
I will add field: Date of taking photo. I add 2 new fields called  image_photographer1 and image_photographer2. I add query to the databsase.

My db_field_definitions.php  looked this:

Quote
// Example for additional image fields:
$additional_image_fields['image_photographer'] = array($lang['image_photographer'], "text", 1);
$additional_image_fields['image_photographer1'] = array($lang['image_photographer1'], "text", 1);
$additional_image_fields['image_photographer2'] = array($lang['image_photographer2'], "text", 1);

Details.html:
Quote
                        <tr>
                            <td valign="top" class="row1"><b>{lang_description}</b></td>
                            <td valign="top" class="row1">{image_description}</td>
                          </tr>
                        <tr>
 <td valign="top" class="row1"><b>{lang_image_photographer}</b></td>
 <td valign="top" class="row1">{image_photographer}{image_photographer1}{image_photographer2}</td>
</tr>
And member_uploadform:
Quote
<td class="row2" valign="top"><b>{lang_keywords}</b></td>
            <td class="row2">
              <textarea cols="30" class="textarea" rows="10" wrap="VIRTUAL" name="image_keywords">{image_keywords}</textarea>
            </td>
          </tr>
       <tr>
 <td class="row2"><b>{lang_image_photographer}</b></td>
 <td class="row2"><FORM>
     <SELECT NAME="image_photographer" value="{image_photographer}" >
          <OPTION>2006
          <OPTION>2005
           <OPTION>2004
       <OPTION>2003
     <OPTION>2002
      <OPTION>2001
      <OPTION>2000
     <OPTION>1999
    <OPTION>1998
    <OPTION>1997
    <OPTION>1996
    <OPTION>1995
 <OPTION>1994
     <OPTION>1993
     <OPTION>1992
    <OPTION>1991
    <OPTION>1990
   </SELECT>
</FORM>
<FORM>
     <SELECT NAME="image_photographer1"value="{image_photographer1}" >
          <OPTION>31
          <OPTION>30
           <OPTION>29
     <OPTION>28
      <OPTION>27
      <OPTION>26
     <OPTION>25
    <OPTION>24
    <OPTION>23
    <OPTION>22
    <OPTION>21
 <OPTION>20
     <OPTION>19
     <OPTION>18
    <OPTION>17
    <OPTION>16
     <OPTION>15
     <OPTION>14
    <OPTION>13
    <OPTION>12
   </SELECT>
</FORM>
<FORM>
     <SELECT NAME="image_photographer2"value="{image_photographer2}" >
          <OPTION>Styczeń
          <OPTION>Luty
           <OPTION>Marzec
     <OPTION>Kwiecień
      <OPTION>Maj
      <OPTION>Czerwiec
     <OPTION>Lipiec
    <OPTION>Sierpień
    <OPTION>Wrzesień
    <OPTION>Pazdziernik
    <OPTION>Listopad
 <OPTION>Grudzień
   
   </SELECT>
</FORM></td>
</tr>
      </table>
      </td>
    </tr>
  </table>

So in photo details I saw only one option - year.

Please help me

PS: Sorry for my bad english..
Title: Re: Links? and ..... layout
Post by: PartyPix on April 17, 2006, 12:21:29 AM
Hello
I have all steps make how Jan describe. But it wouldnt be show corectly. The Content and the Title don't be displayed. How can i fix the mistake ? Sorry for my bad english.

Here are screens how show that i try to discribe ;)

(http://funchecks.fu.funpic.de/register.JPG
)

(http://funchecks.fu.funpic.de/profil.JPG
)


Here are my Code !

db_field_definations.php
Code: [Select]
$additional_user_fields['user_first'] = array($lang['user_first'], "text", 0);
$additional_user_fields['user_last'] = array($lang['user_last'], "text", 1);


main.php
Code: [Select]
$lang['user_first'] = "Vorname:";
$lang['user_last'] = "Nachmame:";


register_form.html
Code: [Select]
<tr>
<td class="row2"><b>{lang_user_first}</b></td>
<td class="row2"><input type="text" name="user_first"  size="30" value="{user_first}" class="input" /></td>
</tr>
<tr>
<td class="row1"><b>{lang_user_last}</b></td>
<td class="row1"><input type="text" name="user_last"  size="30" value="{user_last}" class="input" /></td>
</tr>


member_profile.html
Code: [Select]
<tr>
<td class="row2"><b>{lang_user_first}</b></td>
<td class="row2">{user_first}</td>
</tr>


How can i make that the Last name only will be show in ACP ?
Title: Re: Links? and ..... layout
Post by: PartyPix on April 17, 2006, 11:27:36 PM
Hi

Also das obige Problem konnte ich nun beheben aber irgendwie speichert er die Inhalte nicht bzw. gibt sie mir nicht aus ! Was muss ich da noch ändern ??

So the Problem i have fixed but how can i make it that the contents from the fields are save or show me in the templates ? I think the script didnt save the fields. How can i change this ???
Title: Re: Links? and ..... layout
Post by: live@ct on May 18, 2006, 05:39:11 AM
How can I made that the new field have a default value like a url!?!? to point a image

thanks
Title: Re: Links? and ..... layout
Post by: adizlaja on July 22, 2006, 08:13:33 PM
hello

is it possible to have 2 different upload forms. one for videos and another for tutorials. tutorials would have a few more text fields and that is why i need them to be seperate.
Title: Re: Links? and ..... layout
Post by: sooner1 on August 08, 2006, 11:38:37 PM
I know this is a very old thread however I am working on doing the samething as the poster.

How on earth do I add a new column to my database. I have phpadmin but I do not have a clue how to
create a new column
I am totally new to doing this. Any help would be very appreciated.

Thanks
Title: Re: Links? and ..... layout
Post by: sooner1 on August 12, 2006, 06:46:57 PM
Does no one know how to create a new column ?
Title: Re: Links? and ..... layout
Post by: sooner1 on January 23, 2007, 02:41:08 AM
I am trying to add addtional user fields. I have created a new column called address and edited the db_fields_definitions.php with

Code: [Select]
$additional_user_fields['user_address'] = array($lang['User_address'], "text", 1);
then I added the following to the register_form.html
Code: [Select]
<td valign="top" class="row3"><b>{lang_Address}</b></td>
  <td class="row3"><input type="address" name="user_address" size="30" class="input" /></td>

When I did that the text box appears on the register form but no name beside it.

Nothing shows up in the control panel nothing happens. I have tried to figure out where to put everything with the info given in the beginning of this thread but it is for images not users.

Can someone tell me step by step for adding user fields? I am so confused on this one.

Thanks

Title: Re: Links? and ..... layout
Post by: topdolla on February 22, 2007, 04:08:05 PM
But how can you add additional fields to the registration form ex. gender, age, city, country, etc...then be able to search for that particular field ex. (gender) will show all males or females.
Title: Re: Links? and ..... layout
Post by: CeJay on February 22, 2007, 06:38:38 PM
@ topdolla

But how can you add additional fields to the registration form ex. gender, age, city, country, etc...
http://www.4homepages.de/forum/index.php?topic=2174.0

Quote
then be able to search for that particular field ex. (gender) will show all males or females.
http://www.4homepages.de/forum/index.php?topic=1313.msg5562#msg5562
Title: Re: Links? and ..... layout
Post by: FunnyUser on March 20, 2007, 01:57:53 PM
Hey all,

it works great for me with Version: 1.7.4!

I'm using [MOD] Batch Copy/Move/Edit Images v3.7.3 (http://www.4homepages.de/forum/index.php?topic=6759.0 (http://www.4homepages.de/forum/index.php?topic=6759.0)).
Now I want to "Quick edit" my additional field like I can do with "Description". I need a new ration button for my new field.

Does anybody have an idea how to fix that?


Thanks, and sorry for my englisch!
FunnyUser
Title: Re: Links? and ..... layout
Post by: ccsakuweb on April 05, 2007, 02:19:45 PM
hi thank you for this great explanation .
ok.. i have a question.
 I want that the input field from member_uploadform only is shown in the categories that I want .
something like:
Code: [Select]
{if cat=='1' || cat=='2'}
  <tr>
  <td class="row2"><b>{lang_image_text}</b><br><span class="smalltext">Texto de tu historia/poema/fanfic si prefieras que lean una preliminar aqui, o no quieres subir el archivo de word</span></td>
  <td class="row2"><textarea name="image_text" cols="30" class="textarea" rows="50" wrap="VIRTUAL">{image_text}</textarea></td>
</tr>{endif}

how can i do that?? I don't know php and I don't know if cat is a name of variable
Title: Re: Links? and ..... layout
Post by: Jacob on May 01, 2007, 08:44:21 AM
Hello friends,

I have not yet read all pages in this thread but i want if someone can teach me how to add a additional fileds just for admin, in add a new image page in admin control panel?

Really thanks to all for the help :D
Title: Re: Links? and ..... layout
Post by: tansamalaja on September 02, 2007, 10:21:52 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
It appears but only in a short form. We want a bigger input-field in the cp so that we can complete longer texts.

Where can I change the input-field-size in the cp?
Title: Re: Links? and ..... layout
Post by: live@ct on February 11, 2008, 03:14:46 AM
how can I use the new field to asing to a variable in the index, details and categories PHP files?!?!
Title: Re: Links? and ..... layout
Post by: FrankUSA on August 27, 2008, 09:25:27 PM
How do you add this in the add image in admin control? Please help thanks.
Title: Re: Links? and ..... layout
Post by: wurzelsepp on January 04, 2009, 01:40:41 AM
Hallo,

bis jetzt hat alles bestens funktioniert. Ich habe 7 neue Felder eingebaut.
Wenn Admins Bilder einstellen werden alle Daten übernommen. Füllen aber User die Felder aus, so sind die Felder nach dem Freischalten leer.

So wie es aussieht hängt das mit der validateimages.php zusammen. Bei der Überprüfung der Bilder, vor der Freischaltung, fehlen die Felder.
Kann mir jemand veraten was ich noch in die validatimages.php einbauen muss damit dort die Felder auch angezeigt werden?
Wenn ich mich selbst daran versuche besteht die Gefahr das ich alles abschieße.

Ich bedanke mich schon mal im vorraus.
Title: Re: Links? and ..... layout
Post by: wurzelsepp on January 04, 2009, 12:32:59 PM
Hallo,

bis jetzt hat alles bestens funktioniert. Ich habe 7 neue Felder eingebaut.
Wenn Admins Bilder einstellen werden alle Daten übernommen. Füllen aber User die Felder aus, so sind die Felder nach dem Freischalten leer.

So wie es aussieht hängt das mit der validateimages.php zusammen. Bei der Überprüfung der Bilder, vor der Freischaltung, fehlen die Felder.
Kann mir jemand veraten was ich noch in die validatimages.php einbauen muss damit dort die Felder auch angezeigt werden?
Wenn ich mich selbst daran versuche besteht die Gefahr das ich alles abschieße.

Ich bedanke mich schon mal im vorraus.

Habe etwas gebastelt. Allerdings bisher ohne Erfolg. Mal sehen was ich noch hinbekomme.

Vielleicht hat aber auch jemand eine andere Lösung für mich. Ich würde mich freuen...
Title: Re: Links? and ..... layout
Post by: wurzelsepp on January 04, 2009, 07:02:54 PM
Hat wirklich niemand eine Idee? Bei anderen scheint es problemlos zu laufen, nur bei uns bekommen wir die zusätzlichen Datenfelder (inklusive Daten) nicht angezeigt. Nach dem Freischalten sind die Felder dann leer.

Die Admins und Direktuploader können die Felder ausfüllen und nach dem veröffentlichen sind die Daten auch vorhanden. Nur eben bei den Usern nicht, da wir hier ja den Umweg über die Freischaltkontrolle machen müssen. Ich wäre für jede Hilfe dankbar.
Title: Re: Links? and ..... layout
Post by: Nicky on January 04, 2009, 08:29:49 PM
hi,

wenn ich mir das so ansehe...  fehlen die felder in der PREFIX_images_temp
der administrator schreibt direkt in die PREFIX_images

d.h.
die felder die du in PREFIX_images erstellt hast, musst du auch in PREFIX_images_temp erstellen, damit wenn die USER ihre daten absenden auch gespeichert werden

LG
Title: Re: Links? and ..... layout
Post by: wurzelsepp on January 04, 2009, 11:27:04 PM
Ja, genau das war es! Ich habe mal jemanden in meiner Datenbank schnüffeln lassen. Der hat es dann gefunden...

Aber besten Dank für Deine Antwort
Title: Re: Links? and ..... layout
Post by: fermachado on March 26, 2009, 12:12:22 PM
Hi
Need Help, :?

I'm a litle lost here.

I need  one more field (about me) in the user profile .

Put this in the db_field_definitions

Code: [Select]
$additional_user_fields['user_about'] = array($lang['user_about'], "textarea", 0);
In lang

Code: [Select]
$lang['user_about'] = "About me:";
member_editprofile

Code: [Select]
  <tr>
  <td class="row2"><b>{lang_user_about}</b></td>
  <td class="row2"><input type="textarea" name="user_about"  size="30" value="{user_about}" class="input" /></td>
</tr>

member_profile

Code: [Select]
<tr>
  <td valign="top" class="row1"><b>{lang_user_about}</b></td>
  <td valign="top" class="row1">{user_about}</td>
</tr>

And insert this in database.

Code: [Select]
ALTER TABLE `4images_users` ADD `user_about` VARCHAR( 255 ) NOT NULL;
Woks,but have a problem... just show a litlle box to put the text.

Can you help me,please

Sorry the poor english

Fernando
Portugal
www.artnudephotografy.com



Title: Re: Links? and ..... layout
Post by: fermachado on March 26, 2009, 12:39:38 PM
Found the solution here

http://www.4homepages.de/forum/index.php?topic=20747.0

Code: [Select]
<textarea name="user_about" cols="30" class="textarea" rows="10">{user_about}</textarea>
Now have another problem.

How I do to put the box of textarea in another place.

See the image please

Thanks,