Author Topic: [1.7 - 1.7.6] Additional user fields not being used for guests  (Read 24711 times)

0 Members and 1 Guest are viewing this topic.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
[1.7 - 1.7.6] Additional user fields not being used for guests
« on: September 15, 2008, 05:29:47 AM »
This bug doesn't affect 4images itself, only possibly some MODs.

$additinal_user_fields array not being used for guests, and $user_info array will contain only default 4images fields, which might through out warning messages in some MODs.

The fix is simple:
in includes/sessions.php find:

    return $user_info;


Insert ABOVE:
    global $additional_user_fields;
    foreach (
$additional_user_fields as $key => $val)
    {
      if (!isset(
$user_info[$key]))
      {
        
$user_info[$key] = "";
      }
    }
« Last Edit: September 15, 2008, 02:35:13 PM by V@no »
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 mawenzi

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [1.7 - 1.7.6] Additional user fields not being used for guests
« Reply #1 on: September 15, 2008, 10:26:53 AM »
... thanks for sharing this fix ...
... but now there is the following error message ...
Code: [Select]
Warning: Invalid argument supplied for foreach() in /usr/export/www/.../includes/sessions.php on line ...
« Last Edit: September 15, 2008, 01:35:54 PM by mawenzi »
Your first three "must do" before you ask a question ! ( by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [1.7 - 1.7.6] Additional user fields not being used for guests
« Reply #2 on: September 15, 2008, 02:35:44 PM »
Ops...forgot add global.
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 mawenzi

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [1.7 - 1.7.6] Additional user fields not being used for guests
« Reply #3 on: September 16, 2008, 01:36:17 PM »
... ok ... now it is perfect ...
... thanks again ...
Your first three "must do" before you ask a question ! ( by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline hannes61

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: [1.7 - 1.7.6] Additional user fields not being used for guests
« Reply #4 on: November 06, 2008, 08:32:24 AM »
Solves this the problem for the detailed view, where it is possible to add
comments to an image without filling the spam check?



Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [1.7 - 1.7.6] Additional user fields not being used for guests
« Reply #5 on: November 06, 2008, 09:03:19 AM »
Welcome to 4images forum.
Open global.php and change to 0 where you don't want have captcha:
Code: [Select]
$captcha_enable              = 1;
$captcha_enable_comments     = 1;
$captcha_enable_upload       = 1;
$captcha_enable_registration = 1;
$captcha_enable_postcards    = 1;
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 hannes61

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: [1.7 - 1.7.6] Additional user fields not being used for guests
« Reply #6 on: November 06, 2008, 11:09:47 AM »
Thanks.

Now I know more about, where to change settings for CAPTCHA.
Only Big Chars, ... :)

But I had the case, that i could add comments without filling the CAPTCHA field,
even when  it was displayed.  :roll:

But now it seems to work. Only comments can be send when the field  is filled.

Thanks again, Hannes 

 

Post your comments here