Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Editor Activity Monitoring - Plugin

(Page 2 of 4)
> > > >
 
Re: [Ian] Plugin Update In reply to
This sounds weird. Are you saying that when trying to modify one record (that your were first searching through the link you gave) modifies all records? What exactly is modified in all records/

Ivan
-----
Iyengar Yoga Resources / GT Plugins
 
Re: [yogi] Plugin Update In reply to
Hi Ivan,

It copies the current record over the top of all the other records, including the modifcation. Yes, really weird.

Have you ever used this sucessfully?


http://www.iuni.com/...tware/web/index.html
Links Plugins
 
Re: [Ian] Plugin Update In reply to
Weird.

Yes, I have used this successfully (e.g. for the GForum Poll plugin, but also for a Links SQL plugin).

Could there be a problem with your table definition? Dunno...

Ivan
-----
Iyengar Yoga Resources / GT Plugins
 
Re: [yogi] Plugin Update In reply to
Maybe it is something to do with my actual function.

Would you mind sharing with me a working example? (pm me if you want)l.

I have even tried replicating GT's editor code, and this still does not work:

Code:


sub tableeditor {
# -------------------------------------------------------------------
# My own table editor ;-)
#
#
print $IN->header();
#

print qq~

<script language="Javascript">
<!--
var field_clear = 1;

function setid (myform) {
var opts = 'do';
var action = myform.todo.options[myform.todo.selectedIndex].value;
var table = myform.db.options[myform.db.selectedIndex].text;
var key = myform.keyid.value;
if (key == 'id') {
key = '';
}
if (action == 'search_results') {
myform[opts].value = 'search_results';
myform.keyword.value = '*';
myform.ID.value = '';
myform.Username.value = '';
}
else if ((action == 'modify_search_form') && key) {
myform[opts].value = 'modify_search_results';
myform.keyword.value = '';
if (table == 'Users') {
myform.Username.value = key;
myform.ID.value = '';
}
else {
myform.Username.value = '';
myform.ID.value = key;
}
}
else if ((action == 'delete_search_form') && key) {
myform[opts].value = 'delete_search_results';
myform.keyword.value = '';
if (table == 'Users') {
myform.Username.value = key;
myform.ID.value = '';
}
else {
myform.Username.value = '';
myform.ID.value = key;
}
}
else if ((action == 'search_form') && key) {
myform[opts].value = 'search_results';
myform.keyword.value = '';
if (table == 'Users') {
myform.Username.value = key;
myform.ID.value = '';
}
else {
myform.Username.value = '';
myform.ID.value = key;
}
}
else {
myform[opts].value = action;
myform.keyword.value = '';
myform.ID.value = '';
myform.Username.value ='';
}
myform.keyid.value = '';
}
// -->
</script>

<form method="GET" action="admin.cgi" onSubmit="setid(this)" name="searchform" target="content">
<input type="hidden" name="keyword" value="">
<input type="hidden" name="Username" value="">
<input type="hidden" name="ID" value="">
<input type="hidden" name="do" value="">
<input type="hidden" name="ID-opt" value="=">
<input type="hidden" name="Username-opt" value="=">
<table border="1" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td bgcolor="#DDDDDD"><font face="Tahoma,Arial,Helvetica" size="2">&nbsp;Editor</font></td>
</tr>
<tr>
<td><br>
&nbsp;<select size="1" name="db">
<option>EditorDetails</option>
</select><br>
&nbsp;<select size="1" name="todo">
<option value="add_form">Add</option>
<option value="modify_search_form">Modify</option>
<option value="delete_search_form">Delete</option>
<option value="search_form">Search</option>
<option value="search_results">List All</option>
<option value="editor_table_form">Properties</option>
</select><br>
&nbsp;<nobr><input type=text name="keyid" value="id" onFocus="if (field_clear) { searchform.keyid.value=''; field_clear = 0; }" size=5> <input type="submit" value="Go">&nbsp;<font face="Tahoma,Arial,Helvetica" size="2"></font></nobr>
<font face="Tahoma,Arial,Helvetica" size="2">
<br>
&nbsp;</font></td>
</tr>
</table>

</form>
~;

}


http://www.iuni.com/...tware/web/index.html
Links Plugins
 
Re: [Ian] Plugin Update In reply to
What I have is much simpler.

In the install routine, I added a menu option, for you that would be something along the lines of
Code:
$mgr->install_menu ( 'EditorDetails', [ ['Add Editor', 'admin.cgi?db=EditorDetails&do=add_form'] ] );

Ivan
-----
Iyengar Yoga Resources / GT Plugins
 
Re: [yogi] Plugin Update In reply to
Thats seems to be ok, but not for any other function, like delete_search_form, or modify_search_form. It still overwrites all records.

Oh well, I may just have to re-invent the wheelUnimpressed

Thank Ivan.


http://www.iuni.com/...tware/web/index.html
Links Plugins
 
Re: [Ian] Plugin Update In reply to
I have not problem with this.

It works fine with
Code:
$mgr->install_menu ( 'EditorDetails', [ ['Modify', 'admin.cgi?db=EditorDetails&do=modify_search_form'] ] );

Hmm..

Ivan
-----
Iyengar Yoga Resources / GT Plugins
 
Re: [yogi] Plugin Update In reply to
This is weird indeed!

I am reluctant to ask anyone to look at my plugin on their system, in case it messes something up.

The EditorDetails table creates fine. When I first install this plugin, I run a Repair Table function, which basically compares EditorDetails and your Editors file and adds in any new editors. This works fine as well.

It is only when I try these functions that the table seems to get messed up :-(

Bizarre.


http://www.iuni.com/...tware/web/index.html
Links Plugins
 
Re: [Ian] Plugin Update In reply to
Can you post the code for the creation of the table in the Install.pm file (as an attachement, please). This might help.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
 
Re: [yogi] Plugin Update In reply to
Yes, I sure can! Thanks for having a look :-)

Code:


sub install {
# -------------------------------------------------------------------
#
my ($mgr, $tar) = @_;
my $c = $DB->creator('EditorDetails');
my $error = '';
my $message = '';

$mgr->install_menu ( 'EditorMonitor', [ ['About', 'admin.cgi?do=plugin&plugin=EditorMonitor&func=about'] ] );
$mgr->install_menu ( 'EditorMonitor', [ ['Editors Online', 'admin.cgi?do=plugin&plugin=EditorMonitor&func=whoson'] ] );
$mgr->install_menu ( 'EditorMonitor', [ ['Repair Table', 'admin.cgi?do=plugin&plugin=EditorMonitor&func=repair'] ] );
$mgr->install_menu ( 'EditorMonitor', [ ['Statistics', 'admin.cgi?do=plugin&plugin=EditorMonitor&func=statistics'] ] );
$mgr->install_menu ( 'EditorMonitor', [ ['Table Editor', 'admin.cgi?do=plugin&plugin=EditorMonitor&func=tableeditor'] ] );

$c->cols (
Username => { pos => 1, type => 'CHAR', size => '50', not_null => 1 },
Email => { pos => 2, type => 'CHAR', size => '75', not_null => 0 },
Bio => { pos => 3, type => 'CHAR', size => '255', not_null => 0 },
Webpage => { pos => 4, type => 'CHAR', size => '255', not_null => 0 },
MyAddress => { pos => 5, type => 'CHAR', size => '75', not_null => 0},
Editor_Status => { pos => 6, type => 'CHAR', size => '75' , not_null => 1, default => 'None' },
Editor_Since => { pos => 7, type => 'DATE' },
Validations => { pos => 8, type => 'INT', not_null => 1, unsigned => 1, default => 0 },
Clicks => { pos => 9, type => 'INT', not_null => 1, unsigned => 1, default => 0 },
Last_Login => { pos => 10, type => 'DATE' },
Total_Logins => { pos => 11, type => 'INT', not_null => 1, unsigned => 1, default => 0 },
EditorNotes => { pos => 12, type => 'CHAR', size => '255', not_null => 0 },
TS => { pos => 13, type => 'TIMESTAMP' }
);
if (! $c->create()) {
$GT::SQL::errcode ||= '';
$GT::SQL::errcode eq 'TBLEXISTS' ? ($message .= "Could not create table EditorDetails (table already

exists)\n") :
($error .= "Could not create table

EditorDetails: $GT::SQL::error)");
$c->set_defaults();
$c->save_schema();
};


return "The plugin has been successfully installed!";
}


http://www.iuni.com/...tware/web/index.html
Links Plugins

Last edited by:

Ian: May 29, 2002, 10:47 AM
 
Re: [Ian] Plugin Update In reply to
It might have got something to do with there not being a Editor ID field (unique, autoincrement, primary key).

Try adding the following column:
Code:
$->cols([
ID => {
type => 'INT',
not_null => 1
},
and then also make it autoincrement and primary key as follows (before you do $c->create):
Code:
$c->pk('ID');
$c->ai('ID');
Tell me if this changes anything...

Ivan
-----
Iyengar Yoga Resources / GT Plugins
 
Re: [yogi] Plugin Update In reply to
Ivan, you are my new hero!!!! It workedSmileSmileSmile

I guess any table I make from now on, is going to have and autoincrementing ID column in itWink


http://www.iuni.com/...tware/web/index.html
Links Plugins
 
Re: [Ian] Plugin Update In reply to
I am getting closer to releasing a test version (missing many features) for this plug-in.

I am hoping someone could try it out on their system and let me know the errors.

Before I do this, there are two known problems which have to be fixed:

Cool


http://www.iuni.com/...tware/web/index.html
Links Plugins
 
Re: [Ian] Plugin Update In reply to
I have solved the template business.... just the global prob now.Smile


http://www.iuni.com/...tware/web/index.html
Links Plugins
 
Re: [Ian] Plugin Update In reply to
The plug-in now records The total number of times your editors have logged into Links as well as the date/time they last logged-in, paving the way for detailed stats about your editors.

John
Total Logins: 431 Last Login: 2002-06-01 20:00:37
Category: Family and Personal/Personal Homepages
Category: Regional/Ontario/Localities/Metropolitan Areas/Ottawa Metro/Education
Category: Regional/Ontario/Business



I am getting very close to releasing the first version of this. I will continue to add features once it is released. I am just thinking it will be easier to find all the bugs once there are a few users, and nice for those who want to start using this right away. (I do have a volunteer to test prior to release - just to try and avoid major prolems). I am also keenly waiting to see if anything in Links 2.1.1 will affect the design of my plug-in.


http://www.iuni.com/...tware/web/index.html
Links Plugins

Last edited by:

Ian: Jun 1, 2002, 5:17 PM
 
Re: [Ian] Plugin Update In reply to
UPDATE:

Thomas
LOGINS: Total Logins: 1034 Last Login: 2002-06-01 21:07:08
LINK EDITING: Additions: 231 Modifications: 201 Deletions: 17 Validations: 103
CATEGORY EDITING: Additions: 45 Modifications: 28 Deletions: 9
Category: Family and Personal/Personal Homepages
Category: Regional/Ontario/Localities/Metropolitan Areas/Ottawa Metro/Education
Category: Regional/Ontario/


Pretty good huh?Wink


http://www.iuni.com/...tware/web/index.html
Links Plugins
 
ANNOUNCEMENT In reply to
I just emailed Alex the first version of the plug-in, with everthing in it so far.



This plug-in is aimed at enhancing the external editor/editing functionality in Links SQL.

Current features include:
  • Editors on-line
  • Editor statistics
  • Enhanced editor list for each category with links to respective profile pages
  • Dynamically created editor profile pages - Template Based
  • Editor tracking
  • Tracking statistics
  • Many more features to come!


This Release:
  • This plug-in is designed to work with static pages, though it may work with the dynamic setup as well (untested)
  • Currently the <%editorlinks%> tag is NOT produced by the plug-in and must be created by manually copying this code into your current globals, naming it editorlinks . The code for this global is contained in your tar file, and is called editorlinks.txt. The plus side to this, is you can change the formatting to what you like this wayWink




Please, if you are not on the "free" list,(basically those who helped me) send me the requested (very small) payment. This plug-in took me A LOT of work to do, especially since it is only my 2nd one!

If there are any bugs just let me know, and I will fix them as I can.

I will be adding more features, and cleaning up the code. EnjoySmile

EDIT: I won't be posting the plugin on the forum... you have to download through links, once Alex puts it on.


http://www.iuni.com/...tware/web/index.html
Links Plugins

Last edited by:

Ian: Jun 1, 2002, 8:06 PM
 
Re: [Ian] ANNOUNCEMENT In reply to
  • Quote:
    Currently the <%editorlinks%> tag is NOT produced by the plug-in and must be created by manually copying this code into your current globals, naming it editorlinks . The code for this global is contained in your tar file, and is called editorlinks.txt. The plus side to this, is you can change the formatting to what you like this wayWink
    This is now included and working. You can simply add <%Plugins::EditorMonitor::EditorLinks($ID)%> as a replacement for the old <%editors%> tag. This will create the links to your editors profile pages on each category page.




  • EDIT: The version I emailed Alex is missing a few things... so once I can get access to the download area, I will put up the latest version, so you might want to hold off til then.


    http://www.iuni.com/...tware/web/index.html
    Links Plugins

    Last edited by:

    Ian: Jun 2, 2002, 9:26 AM
     
    Re: [Ian] ANNOUNCEMENT In reply to
    I am adding custom tags to this plug-in so you can access and place certain values which Editor Montior tracks into your templates or editor browser!

    This one I just put in:

    Last Login Tag

    <%Plugins::EditorMonitor::EditorLastLogin('Username')%> Replace Username with the exact name of the editor and the tag will return the date and time that editor last logged in. Or you can automatically insert the username, like in your editor browser template by using: <%Plugins::EditorMonitor::EditorLastLogin($Username)%> Example Output: 2002-06-03 00:33:40

    I use this one (as well as a few others) in my editor browser, as part of keeping them informed!


    http://www.iuni.com/...tware/web/index.html
    Links Plugins
     
    Re: [Ian] ANNOUNCEMENT In reply to
    If possible, please let me know if this works with dynamic pages, as that is what I use. :)
     
    Re: [rayhne] ANNOUNCEMENT In reply to
    I cannot see any reason why it wouldn't. I just have not tested it in a dynamic setup. It may just need a change or two if it doesn't.

    You can always try the script, and if it works, then you can look at buying it.Wink


    http://www.iuni.com/...tware/web/index.html
    Links Plugins

    Last edited by:

    Ian: Jun 3, 2002, 8:34 AM
     
    Re: [Ian] ANNOUNCEMENT In reply to
    Version 1.0.0 is now in the download area. Hopefully there will be few bugs, but I will sort them out as I find out about any. ENJOY!!

    PLEASE NOTE: This is a commercial plug-in. I do know that other plug-in developers share the same sentiments... the motivation for the developement and then the support of these plug-ins is quickly diminished if people use these products without rewarding the small fee that the authors ask for. Please support GT and the people who strive to improve it. That way everyone benefits.


    http://www.iuni.com/...tware/web/index.html
    Links Plugins
     
    Re: [Ian] ANNOUNCEMENT In reply to
    Okay, I'm going to give this a testing to see if it's what I'm looking...:)
     
    Re: [rayhne] ANNOUNCEMENT In reply to
    I am going to release 1.0.1 later this week.

    So far corrections will include:
    • Repair Table fix. When you delete editors, the table will now correctly remove them instead of re-adding them.
    • Additional functions (depending on feedback).


    I notice there have been a few downloads already. I am keen to hear back from you on how the installations went.Smile


    http://www.iuni.com/...tware/web/index.html
    Links Plugins

    Last edited by:

    Ian: Jun 3, 2002, 6:30 PM
     
    Re: [Ian] ANNOUNCEMENT In reply to
    I think this thread is getting too long and I have decided to move it to my own forum area.

    You can read about any of my Links plugins etc by registering on my forum. (see address in my signature block - the one with /forum in itWink).

    Support and upgrades for this is also through the forum, but only PAID users will be able to see this area there. (Version 1.0.1 is ready now in this area.) .


    http://www.iuni.com/...tware/web/index.html
    Links Plugins
    > > > >