Gossamer Forum
Quote Reply
New plug in idea
Hi

This is a mod I had working with Links 2 Flat version and it was very helpful for me and my editors...

What it does it create a search icon and adds it to the IE and netscape toolbar...

Then when the Authorized user is visiting a given web site (page) and he/she thinks it is good to be included he will just hit the add bottom:

The script then will:

1- add the site URL, and title from the page..

2- Grap the description from the description tag and if non will either spider the first X words from the page or just leave it blank.

3- look for e-mail address and add it as an owner and if not use default one.

4- Use webmaster as an owner name.

5- Selecting a category: the script MUSt be defaulted to a specific category (spider category or so).. and if the add bottom in for an Editor they can set this to their category..

After filling that form the script will forward the request to add.cgi where the link will be added to the database..

and display the add succes page to the adding person..

(User log in required must be set to no in the Links SQL setting).

That sounds like a very helpful plug in for editors, users and admin...

Does anyone have an idea or welling to develope such a plug in..?

If you need more info please let me know or just e-mail me webmaster@2muslims.com
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] New plug in idea In reply to
Wasn't this requested by someone a week or two ago?...whoops:

http://gossamer-threads.com/...ie%20toolbar;#203022

*cough*

http://gossamer-threads.com/...ie%20toolbar;#202909
Quote Reply
Re: [Paul] New plug in idea In reply to
Hi Yup.. it was .. Tongue

I thought getting it to teh Plug in area my get a hand or two on it.. Crazy
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] New plug in idea In reply to
What language were you thinking it should be written in?

Are you talking about a proper deskband type thing in C++?
Quote Reply
Re: [katabd] New plug in idea In reply to
Hi,

If you had this working with Links 2, then the only changes would be ???

If it's running in the browser, and simply sends a block of data to add.cgi, it *should* work with Links 2.x the same way?? Or am I missing something?

You might need to simply change the tags it sends to make Links' add.cgi think it was sent from a browser click.

The user should be logged in, but the problem is that referrers need to off.... and that is a bad thing for many sites. Then again, maybe the code could be tweaked a bit so that if a user is logged in, and/or is an editor or administrator, referrers are not checked???


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] New plug in idea In reply to
Hi

I think that should be achieved through java..

I am no java expert but I had together a code that was working for Links 2..

With Links SQL that code does not parse the information to the form!!

<a href="javascript:Q='';if(top.frames.length==0)Q=document.selection.createRange().text;void(btw=window.open('http://url_to/add.cgi?&amp;URL='+escape(location.href)+'&amp;Title='+document.title+'&amp;Keywords='+document.keywords+'&amp;Description='+escape(Q),'AddToLinks','menubar=1,location=1,resizable=1,scrollbars=1,status=1,toolbar=1'));btw.focus();" name="bmlink">
Add this to my Links</a>

It is getting to add.cgi but not filling any of the fields!

Any Java experts here that can give me a hand?
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory

Last edited by:

katabd: Jul 19, 2002, 4:14 AM
Quote Reply
Re: [katabd] New plug in idea In reply to
Now I understand... the problem is probably in Links::User::add.pm

Code:


else {
# Otherwise display the add form.
my $category = _category_list();
if ($USER) {
$IN->param('Contact_Name') or ($IN->param('Contact_Name', $USER->{Name} || $USER->{Username}));
$IN->param('Contact_Email') or ($IN->param('Contact_Email', $USER->{Email}));
}
print $IN->header();
if (! $category) {
print Links::SiteHTML::display('error', { error => Links::language('ADD_INVALIDCAT', $IN->param('ID')) });
}
else {
print Links::SiteHTML::display('add', { Category => $category });
}
}


change the red line to:

my $in = $IN->get_hash;
print Links::SiteHTML::display('add', { Category => $category, %$in });


You need to pass all the input, not just the Category tag.....


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] New plug in idea In reply to
BTW...

Did you try linking to .../page.cgi?p=add

? That might work better. (add &d=1 if you are running your site in dynamic mode).


Forgot, you'd have to pass in &Category="string" ... where category is the place you want to put it. To make it easy, might as well dump them into some basic category, then move them when approved.

You could also make a short template global to grab the category list for you (I think some of that has been posted before).


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.

Last edited by:

pugdog: Jul 19, 2002, 9:21 AM
Quote Reply
Re: [pugdog] New plug in idea In reply to
Hi

Thanks Pugdog..

The code I have is :

<a href="javascript:Q='';if(top.frames.length==0)Q=document.selection.createRange().text;void(btw=window.open('http://www.url_to/page.cgi?p=add&amp;URL='+escape(location.href)+'&amp;Title='+document.title+'&amp;Description='+escape(Q)&amp;Category='+String+','AddToLinks','menubar=1,location=1,resizable=1,scrollbars=1,status=1,toolbar=1'));btw.focus();" name="bmlink">
Add this to my Links</a>

That will pull the add.cgi.. but will not fill any of the fields..and the category will say Unknown Tag "Category"

I found a very similar plug in for links 2 :

http://www.gossamer-threads.com/...ces/jump.cgi?ID=1066

and

http://www.gossamer-threads.com/...ces/jump.cgi?ID=1076

My idea was to enhance the Editors job by giving them a script, or java code that they can place on their browser toolbar.. and then when they come across a good site they will just click that buttom then enter their password and just approve the link since all fields are filled out for them..

That will be a great enhancement every to IAN's EM plug in..

Now we need a perl script or a javascript that will grab that info (description, title, keywords, site owner email from the page) and will get some pre defined values (category) or even promot them to pick one up or as Pugdog said create a basic one then move the links latter..

All those elements are out there but how to put them together is the big question..

Then the script will process that info to the add.cgi and parse it into the form...

and all what the user/Editor will have to do is click submit or add...

I know that was done for links 2 and I hope we can develope it for links SQL as well..

I have contacted some java experts and i am waiting to hear back from them, but if it can be done though a perl script (remember paul's spider script) it will be nicer since we will not have to deal with the java code problems..

Thanks
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] New plug in idea In reply to
If you make this change to Add.pm

Code:
my $in = $IN->get_hash;
print Links::SiteHTML::display('add', { Category => $category, %$in });


the tags should just be passed through, including the Category tag -- if db_gen_category is on.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [katabd] New plug in idea In reply to
In this post, I posted a bookmarklet for Links SQL. I used the add-spider plugin.

John