• [MOD] Dropdown options for custom database fields 4 0 5 1
Currently:  

Author Topic: [MOD] Dropdown options for custom database fields  (Read 199457 times)

0 Members and 1 Guest are viewing this topic.

computer123

  • Guest
Re: [MOD] Dropdown options for custom database fields
« Reply #75 on: August 14, 2007, 02:31:42 AM »
Ofcourse, I think that we have to change someting in member.php.

If you use 1.7.4 so please install this very important MOD and you will see yourself what wrong :idea:

NOTE: Thousand of 4images users wil thank you if you solve this problem.

WE NEED YOUR PHP KNOWLEDGE!


Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [MOD] Dropdown options for custom database fields
« Reply #76 on: August 14, 2007, 02:32:46 AM »
Post in topic all diff report foreach users ... how can no if problem with MOD and no user ?  :mrgreen:
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline bacterio

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
Re: [MOD] Dropdown options for custom database fields
« Reply #77 on: October 07, 2007, 09:28:16 PM »
For dropdown Male, Female, ---, who is:

ALTER TABLE 4images_images ADD images_sex...... ?¿?¿?¿

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [MOD] Dropdown options for custom database fields
« Reply #78 on: October 07, 2007, 09:48:13 PM »
Sorry ... I no get last reply ...
what is question with code ?
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline bacterio

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
Re: [MOD] Dropdown options for custom database fields
« Reply #79 on: October 07, 2007, 10:49:36 PM »
$additional_image_fields['images_sex'] = array($lang['image_sex'], "dropdown", 0, array("---","Male", "Female"), 1, 0, 0, 0);

As a new field within the table for dropdown is added?

ALTER TABLE 4images_images ADD .......? ? ?

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [MOD] Dropdown options for custom database fields
« Reply #80 on: October 08, 2007, 12:06:36 AM »
Code: [Select]
ALTER TABLE ".IMAGES_TABLE." ADD image_sex varchar(8) NOT NULL";

If in phpmyadmin, replace " . IMAGES_TABLE . " with real image table name with prefix (and, yes, remove: " . ... . " include).
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline bacterio

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
Re: [MOD] Dropdown options for custom database fields
« Reply #81 on: October 09, 2007, 01:05:40 AM »
Can be adapted this mod to add dropdown in member_uploadform.html ??? no in register user.

When raising one photo to specify continent: Europe, Asia .....

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [MOD] Dropdown options for custom database fields
« Reply #82 on: October 09, 2007, 01:13:34 AM »
Quote
Can be adapted this mod to add dropdown in member_uploadform.html ??? no in register user.

Step 1 and step 1.1 in member.php in uploadform action. ;)

Quote
When raising one photo to specify continent: Europe, Asia .....

This ... I no get question ...
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline bacterio

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
Re: [MOD] Dropdown options for custom database fields
« Reply #83 on: October 09, 2007, 12:10:52 PM »
Ok, works!

But now I have a problem.

When choosing a country immediately is sent the image and it does not let continue filling up the form. Eligo the city and inserts intro automatically.

The problem can esar here ????????:

  $keypress = ($keypress)? “onkeypress= \ “if (window.event.keyCode==13) this.form.submit (); \ "": "";

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [MOD] Dropdown options for custom database fields
« Reply #84 on: October 09, 2007, 01:37:21 PM »
Is keypress variable exist in uploadform ? If no ... must add it. ;)
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline bacterio

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
Re: [MOD] Dropdown options for custom database fields
« Reply #85 on: October 09, 2007, 02:10:17 PM »
I do not understand to you….

I have made steps 1 and 1,1 in member.php and admin/admin_functions, includes/functions.php in register.php not because single quieor to add dropdown in member_uploadform.html

But the variable? where is due to add and like?  :oops:

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [MOD] Dropdown options for custom database fields
« Reply #86 on: October 09, 2007, 02:55:35 PM »
Sorry for last post ... $keypress is in functions ... please post exact error message is say on screen.
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline bacterio

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
Re: [MOD] Dropdown options for custom database fields
« Reply #87 on: October 09, 2007, 03:47:03 PM »
There is no error, the problem is that when selecting a value of the list of dropdown in member_uploadform.html puts intro without letting fill up the fields that lack if option to press the button to accept. If you have single dropdown it puts as I complete field to fill up and it already is, but has but fields after dropdown you cannot fill up them.

Offline bacterio

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
Re: [MOD] Dropdown options for custom database fields
« Reply #88 on: October 09, 2007, 09:40:57 PM »
It already works correctly.

In includes/function.php I have had to eliminate:

onkeypress= \ “if (window.event.keyCode==13) this.form.submit ()

By:

onkeypress= \ “if (window.event.keyCode==13)

Thank you very much by everything!

Offline Jan-Lukas

  • Addicted member
  • ******
  • Posts: 1.289
    • View Profile
    • Discover the New World of Kindersurprise
Re: [MOD] Dropdown options for custom database fields
« Reply #89 on: May 11, 2008, 06:35:08 PM »
Bitte für version 1.7.6 im ersten Posting nachtragen

dieses ist in der 1.7.6 nur 1x vorhanden

Code: [Select]
else {
        $value = (isset($HTTP_POST_VARS[$key])) ? format_text(stripslashes(trim($HTTP_POST_VARS[$key]))) : $image_row[$key];
      }

der Rest ist wie bei 1.7.3 zu bearbeiten

Danke Harald