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

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

0 Members and 1 Guest are viewing this topic.

Offline Sun Zaza

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
Re: [MOD] Dropdown options for custom database fields
« Reply #120 on: June 19, 2010, 08:16:56 PM »
Hi V@no,

Because in the first time I got this error:

Code: [Select]
Fatal error: Call to undefined function get_user_table_field() in /hsphere/local/home/******/*******/includes/db_field_definitions.php on line 423
I used this code:

Code: [Select]
<?php $sql "SELECT user_name, user_id
        FROM "
.USERS_TABLE."        
        ORDER BY user_name ASC"
;
$result $site_db->query($sql);
$user_name = array("----------------------");
while (
$user_row $site_db->fetch_array($result))
{
  
$user_name[] = $user_row['user_name']." (ID=" $user_row['user_id'].")";  
}
$additional_test_fields['test_player'] = array($lang['test_player'], "dropdown"0$user_name0000);?>

Do you know why?




Offline MrAndrew

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
    • Aviation PhotoBase
Re: [MOD] Dropdown options for custom database fields
« Reply #121 on: July 17, 2010, 09:55:36 AM »
Very strange. I use 1.7.7 version of my gallery. I have installed this mod for ver 1.7.6. Installed correct. But nothing to change? I have trying and trying... but {image_blablabla_dropdown} - not working and i see nothing. Please help me with this mod.

Thanks!

Offline Cambons

  • Pre-Newbie
  • Posts: 8
    • View Profile
Re: [MOD] Dropdown options for custom database fields
« Reply #122 on: September 16, 2010, 03:40:51 AM »
With 1.7.8 do ihave to do 1.7.6 + 1.7.7 or just 1.7.7?

Thank you!

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Dropdown options for custom database fields
« Reply #123 on: September 16, 2010, 04:05:39 AM »
There is no code for 1.7.7, so try do the 1.7.6
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Cambons

  • Pre-Newbie
  • Posts: 8
    • View Profile
Re: [MOD] Dropdown options for custom database fields
« Reply #124 on: September 16, 2010, 04:07:22 AM »
4images v1.7

i thought it was 1.7.7 for a moment.. sorry about that.

But still, should I do the 1.7.6 + 1.7  ( next steps? )

--

Edit nevermind dumb me, 1.7 = "1.7.0" so no point in doing that

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Dropdown options for custom database fields
« Reply #125 on: September 16, 2010, 04:09:22 AM »
no, just 1.7.6

I've added some notes regarding this on first page.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Cambons

  • Pre-Newbie
  • Posts: 8
    • View Profile
Re: [MOD] Dropdown options for custom database fields
« Reply #126 on: September 16, 2010, 04:11:02 AM »
Yea sorry i'm dumb it took me a while to figure out 1.7 = 1.7.0 lol

Offline MrAndrew

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
    • Aviation PhotoBase
Re: [MOD] Dropdown options for custom database fields
« Reply #127 on: October 17, 2010, 11:05:21 AM »
This MOD work fine for users table! But doesn`t work for images table..

How to show dropdown from images table?

Code: [Select]
  $sql = "SELECT image_aircraft
             FROM ".IMAGES_TABLE."
             ORDER BY image_aircraft DESC
";
             $result = mysql_query($sql);
$image_aircraft = array();
while ($image_row = $site_db->fetch_array($result)) {
$image_aircraft[] = current($image_row);
$additional_image_fields['image_aircraft'] = array($lang['image_aircraft'], "dropdown", 0, $image_aircraft, 0, 0, 0, 0);
 }

Nothing to show me  :(

Offline Sun Zaza

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
Dropdown options for custom database fields in the member_editprofile
« Reply #128 on: November 12, 2011, 12:24:03 AM »
Hello,

How can I use the dropdown options for custom database fields in the member_editprofile?

I am using thisl line on the file but without success:
Code: [Select]
<input type="dropdown" name="user_foot"  size="30" value="{user_foot}" class="input" />
Thanks in advance,

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Dropdown options for custom database fields
« Reply #129 on: November 12, 2011, 03:15:32 AM »
did you try use {user_foot_dropdown} (without any additional <input>)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Sun Zaza

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
Re: [MOD] Dropdown options for custom database fields
« Reply #130 on: November 12, 2011, 09:42:17 AM »
No, but now I did. Het is working. Thanks.

I just realize another problem, because I cannot update the database from the page member_editprofile.html.
I am talking here about everything (Not only the dropdown.

I will open a new topic.

Thank V@no

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 #131 on: December 29, 2011, 08:37:37 PM »
1.7.10 tauglich
Danke Harald




Offline Pawel_el

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: [MOD] Dropdown options for custom database fields
« Reply #132 on: January 31, 2014, 08:13:16 PM »
If it works for version 1.7.10?

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 #133 on: January 31, 2014, 08:53:54 PM »
1.7.10 tauglich

und mit Sicherheit auch 1.7.11
Danke Harald




Offline .Infecto

  • Newbie
  • *
  • Posts: 48
    • View Profile
Re: [MOD] Dropdown options for custom database fields
« Reply #134 on: May 03, 2014, 01:48:06 AM »
Wenn ich das so anlege
$additional_image_fields['image_filesize'] = array("Filesize""dropdown"0, array("n" => "---""KB" => "KB""MB" => "MB""GB" => "GB"), 1000); 
und auch so
$additional_user_fields['image_filesize'] = array("Filesize""dropdown"0, array("n" => "---""KB" => "KB""MB" => "MB""GB" => "GB"), 1000); 
wird mir das Feld nicht im ACP angezeigt...