4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: widgit1981 on February 06, 2003, 11:15:40 AM
-
Hi all
I know how to add fields when a user uploads but when I try to add fields for edit profile I get this error:
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.image_photographer, i.image_grey, i.user_camera, c.cat_name, u.user_name FROM galleryimages i, gallerycategories c LEFT JOIN galleryusers 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, 50, 58, 77, 40, 25, 17, 74, 66, 2, 55, 18, 75, 26, 41, 78, 11, 69, 51, 19, 31, 81, 79, 76, 52, 20, 59, 27, 42, 80, 60, 43, 29, 53, 70, 44, 32, 22, 54, 12, 63, 30, 47, 23, 13, 56, 72, 24, 33, 46, 14, 57, 71, 35, 15, 48, 61, 36, 3, 45, 73, 37, 9, 49, 38, 16, 65, 28, 64, 39) ORDER BY i.image_date DESC LIMIT 6
Unknown column 'i.user_camera' in 'field list'
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /***/includes/db_mysql.php on line 116
What is going on ?
Thanks
Steve
-
first u'll need manualy add new fields into database, then:
http://4homepages.de/forum/viewtopic.php?t=3079
same u can do for profile.
-
Do I put it in the images or member category
I tried both and they give the same error
Thanks
Steve
-
what do u mean put?
tryed what?
in the database insert new field into 4image_users
then enter the name of new field as in that thread.
-
Ok I created a new field in users.
The thread u linked to says this:
first see the code in global.php after this line:
Code:
if (defined("GET_CACHES")) {
Add the new field to the sql query. All category data will be saved to the $cat_cache array. From this you can register the value to the template engine.
For example in categories.php
Add after
Code:
"cat_hits" => $cat_cache[$cat_id]['cat_hits'],
this
Code:
"cat_age" => $cat_cache[$cat_id]['cat_age'],
Now you can use {cat_age} in the categories.html template.
What does this all mean especilly :
Add the new field to the sql query. All category data will be saved to the $cat_cache array. From this you can register the value to the template engine.
Thanks
Steve
-
ok, after u inserted new field and edited includes/db_field_definitions.php
u'll need find out what variable uses to store user info (in each script like categories.php, home.php, details.php so on it might be little different.)
so, as in that example
$cat_cache[$cat_id]['field_name'] has category's information from field field_name
so, for example in details.php $user_info['field_name'] has current user information. $user_info['user_name'] - will pull user name.
-
Ok
I tried that and got this error:
['image_entrance'], "text", 1); $additional_image_fields['image_address'] = array($lang['image_address'], "textarea", 1); $additional_image_fields['image_tel'] = array($lang['image_tel'], "text", 1); $additional_image_fields['image_map'] = array($lang['image_map'], "text", 1); ?>
Thanks
Steve
-
is this the error message or peace of code?
if it's code, I dont see <?php
P.S. please, when u write your post, use [ code ] ... [ /code ] if u want show some code, or [ quote ] ... [ /quote ] if want show error message or quote something.
-
Here is the code
['image_entrance'], "text", 1); $additional_image_fields['image_address'] = array($lang['image_address'], "textarea", 1); $additional_image_fields['image_tel'] = array($lang['image_tel'], "text", 1); $additional_image_fields['image_map'] = array($lang['image_map'], "text", 1); ?> ?>>
Warning: Cannot add header information - headers already sent by (output started at /web/highrez/public_html/includes/db_field_definitions.php:34) in /web/highrez/public_html/includes/sessions.php on line 85
Warning: Cannot add header information - headers already sent by (output started at /web/highrez/public_html/includes/db_field_definitions.php:34) in /web/highrez/public_html/includes/sessions.php on line 85
Warning: Cannot add header information - headers already sent by (output started at /web/highrez/public_html/includes/db_field_definitions.php:34) in /web/highrez/public_html/includes/sessions.php on line 85
Warning: Cannot add header information - headers already sent by (output started at /web/highrez/public_html/includes/db_field_definitions.php:34) in /web/highrez/public_html/includes/sessions.php on line 85
Steve
-
Have you tried this FAQ topic?
http://www.4homepages.de/forum/viewtopic.php?t=3378
-
This has now brought my whole site down I cant get it working
-
Ok I have now got everything back to normal with my backups thew !
What went wrong do you know ?
-
It just occurred to me that you shouldn't see any code as part of the error message that is displayed in the browser:
['image_entrance'], "text", 1); $additional_image_fields['image_address'] = array($lang['image_address'], "textarea", 1); $additional_image_fields['image_tel'] = array($lang['image_tel'], "text", 1); $additional_image_fields['image_map'] = array($lang['image_map'], "text", 1); ?> ?>>
Check the syntax of your code. Maybe you're missing a \ or " or ; Certainly "?> ?>>" doesn't look right.
-
It just occurred to me that you shouldn't see any code as part of the error message that is displayed in the browser:
['image_entrance'], "text", 1); $additional_image_fields['image_address'] = array($lang['image_address'], "textarea", 1); $additional_image_fields['image_tel'] = array($lang['image_tel'], "text", 1); $additional_image_fields['image_map'] = array($lang['image_map'], "text", 1); ?> ?>>
Check the syntax of your code. Maybe you're missing a \ or " or ; Certainly "?> ?>>" doesn't look right.
Actually, if the code above is what appears in your includes/db_field_definitions.php then delete the trailing ?>>
at the bottom of that file. Note that this includes the SPACE between the "?>" and the "?>>"
-
Thanks
I will have to go through the steps again. Not know though maybe later 2nite. I will let u know how it goes
Steve