Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Plugins don't work anymore when site is online
#12
Light-Pix Wrote:[p01-contact] does refer to user.xml,
...
How would I change it to point to the current user?
For a quick solution, you can edit the file p01-contact_gs.php in the plugin directory:
Code:
function admin_email()
{
    $data = getXML(GSDATAOTHERPATH . 'user.xml');
    return $data->EMAIL;
}
The file user.xml is only valid for GS versions <3.0. For 3.0+, there can be more than one user.xml-equivalent file, stored in (webroot)/data/users/ and named according to the login names of your registered users. You can substitute one of those filenames in the admin_email() function mentioned above.

In fact, you can manage without that function. The email address returned is only set as the default for the contact form and it can be entered manually in the p01-contact set-up page in the GS backend – after all, it's not very likely that contact forms will be added or removed frequently. In this case, simply add a return instruction at the top of the function definition, before $data = ...
--
Nick.
Reply


Messages In This Thread
Plugins don't work anymore when site is online - by hameau - 2011-10-14, 17:58:11



Users browsing this thread: 4 Guest(s)