| Index
» Projekty
» phpMyEdit
» Fórum
» Change Log Help |
 |
bobwill
Založený: 04.02.2007
Príspevky: 13
Zaslal: 2007-02-09 14:47
Návrat hore
Odpovedať s citátom
|
I created a table named "changelog" as describe in the user manual. I also added a "index" to the table.
I place the option code
$opts['logtable'] = 'changelog';
in my "php" file that accesses my table.
Not quite sure where to place this in the code. So I just placed it near the top. I accessed my table and nothin was being written to the "changelog" table. I did a search on the forum for help and found out that placing the following code may help.
if(empty($_SERVER['REMOTE_USER'])) { $_SERVER['REMOTE_USER'] = $login; }
Still nothing written to "changelog" Any suggestions?
|
jeffs
Založený: 17.05.2007
Príspevky: 3
Zaslal: 2007-05-17 17:39
Návrat hore
Odpovedať s citátom
|
I have looked at the answers here and still can't get the changelog features to work. I've created the changelog table and put in the opt changelog line but nothing gets written to the changelog.
Does anyone have an example script that works?
Thanks,
|
jeffs
Založený: 17.05.2007
Príspevky: 3
Zaslal: 2007-05-18 17:45
Návrat hore
Odpovedať s citátom
|
I got changelog to work. my changelog db had a field column instead of col.
My question now is how do you get user to come up with a name since there is no login?
|
nad2000
Založený: 16.07.2010
Príspevky: 1
Zaslal: 2010-07-16 10:26
Návrat hore
Odpovedať s citátom
|
phpMyEdit.php add a method to the class
phpMyEdit
:
| Kód: |
protected $user_name = NULL;
public function get_user_name()
{
if (!isset($this->user_name)) {
$this->user_name = $this->get_server_var('REMOTE_USER');
}
return $this->user_name;
}
|
and replace all
| Kód: |
| $this->get_server_var('REMOTE_USER') |
with
| Kód: |
| $this->function get_user_name() |
and now you can override it in your application for you specific authentication schema, e.g.:
| Kód: |
require_once 'phpMyEdit.class.php';
class myPhpMyEdit extends phpMyEdit {
public function get_user_name()
{
if (!isset($this->user_name)) {
$this->user_name = Common::getLoginName(); // or whatever
}
return $this->user_name;
}
}
|
and star using your customized
phpMyEdit
.
Cheers!
PS even though phpMyEdit in the age of AJAX and jQuery looks a bit outdated, it is a really great gadget. Good work! Many thanks
|
|
Odoslať novú tému
Odpovedať na tému
|
|
|
|