Welcome to Geeklog, Anonymous Thursday, April 25 2024 @ 02:54 am EDT

Geeklog Forums

what am I missing?


FreakWorld

Anonymous
Geeklog for some reason has E-mail from admin unchecked by default.
So I changed it in the sql database setup for a new site to have it checked.
And after a new site is installed.
It is checked.
But you refresh or change themes. It's back, unchecked.
What is removing the check?
How can it stay checked.
Banging your head
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
look for the following in the editpreferences() function of usersettings.php: ($A is from the database)
Text Formatted Code

    // privacy options block
    if ($A['emailfromadmin'] == 1) {
        $preferences->set_var ('emailfromadmin_checked', 'checked="checked"');
    } else {
        $preferences->set_var ('emailfromadmin_checked', '');
    }



 


that said, I don't know what would cause it to uncheck itself, but here is the code that controls it from the savepreferences() function: ($A is from $_POST)
Text Formatted Code

    if (isset ($A['emailfromadmin']) && ($A['emailfromadmin'] == 'on')) {
        $A['emailfromadmin'] = 1;
    } else {
        $A['emailfromadmin'] = 0;
    }


 
 Quote

FreakWorld

Anonymous
I gave up on it and set both variables to checked.
And thin removed it from the theme
 Quote

All times are EDT. The time is now 02:54 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content