Gossamer Forum
Home : Products : Links 2.0 : Customization :

"SEMI"-COOKIE "MyLinks" Mod

(Page 1 of 3)
> >
Quote Reply
"SEMI"-COOKIE "MyLinks" Mod
After a couple of days of blood, sweat, tears and hair pulling, I have finished a non-cookie MyLinks style mod.

I am really proud of this mod and have had several people test it and it seems to be running well.

I have put up a demo here:

http://www.cyberwhispers.com/search/track.cgi

CyberWhispers is an adult site but contains no pictures or anything offensive (only links in text format). But still if you are offended by stuff like that then I thought I should let you know.

If anyone is interested in this mod please reply to this thread and I'll zip it up and make it available. Also let me know if there are anymore features you'd like and if you experience any problems.

It uses a combination of cookies and text files. The cookie stores the username and password for identification and the text file stores the saved links, but only the ID of the link is saved, so the file looks like:

23
324
45

...so the file size is tiny - only 3-4k per user. (depending on the number of saved links). I reckon about 2400 users would take up 10MB of space.

I will add a limit to the number of links a user can save if that is a feature people would want.

Anyway hope you like it, or contructively criticize if necessary....

PS: Thanks to the people who helped me fix a couple of bugs.


Installations:http://www.wiredon.net/gt/
Favicon:http://www.wiredon.net/favicon/

Quote Reply
Re: NON-COOKIE "MyLinks" Mod In reply to
Wow Paul this looks great. 1 question, does this add the users e-mail to your newsletter database.
Thank You,
Paul

Hot Web Hosting
Low cost web hosting:
http://www.thehotweb.net/webhosting
Quote Reply
Re: NON-COOKIE "MyLinks" Mod In reply to
Doesn't seem to work, Paul...

In Reply To:

An error occured whilst processing your request:

User database doesn't exist. Please contact support@cyberwhispers.com.
You could try logging in again here


Error occurred when I tried "saving" a link.

Also, this is not really a NON-COOKIE MOD, since you have already stated that it uses COOKIES...Wink

Regards,

Eliot Lee
Quote Reply
Re: NON-COOKIE "MyLinks" Mod In reply to
In Reply To:
Also, this is not really a NON-COOKIE MOD, since you have already stated that it uses COOKIES...
If it's anything like the one I did, then it only uses cookies to store login info. Maybe a better description (ie, "Database driven MyLinks mod") would please you, Eliot. Tongue

I had the same problem Eliot described. Attempting to add or view favorites returns a CGI-wrap error.

--Drew
Free, hot camel soup for Links hackers...
http://www.camelsoup.com
Quote Reply
Re: NON-COOKIE "MyLinks" Mod In reply to
Hm strange. It seems to work fine for me.

That error only occurs when you have logged in and then removed the cookie and then try to save a link because it can't find the database file. The file name is detected using the cookie value so if the cookie doesn't exits or the value is wrong then you will see that error.

If you login again, go to temporary internet files and look for a cookie called /search and open it up. It should have usename--password inside it.

EDIT: It should be ok because I've just checked and your user files were create successfully.

kjk
junko
test

Yes it uses cookies but it is essentially NON-COOKIE. You have to have some way of identifying people to show the correct saved links and as far as I know, that isn't possible without cookies (or maybe it is but cookies are easiest). The saved links however are not saved in cookies so that is why it is NON-COOKIE.

Installations:http://www.wiredon.net/gt/
Favicon:http://www.wiredon.net/favicon/

Quote Reply
Re: NON-COOKIE "MyLinks" Mod In reply to
Hi Hacker,

Did it work for you?

It currently stores the email in a seperate database but it isn't used so it would be better to add it to the email.db so that should be fairly easy to do.

Installations:http://www.wiredon.net/gt/
Favicon:http://www.wiredon.net/favicon/

Quote Reply
Re: NON-COOKIE "MyLinks" Mod In reply to
I can't reproduce this Junko. I've tried adding/deleting/viewing and have not had any errors.

As I said to Eliot, if you check whether the cookie is created correctly then that may hold the key to the problem.

Installations:http://www.wiredon.net/gt/
Favicon:http://www.wiredon.net/favicon/

Quote Reply
Re: NON-COOKIE "MyLinks" Mod In reply to
Some more testers would be great so I can try to fix this bug, if it is in fact a bug.

Installations:http://www.wiredon.net/gt/
Favicon:http://www.wiredon.net/favicon/

Quote Reply
Re: NON-COOKIE "MyLinks" Mod In reply to
It also gave me the error;

An error occured whilst processing your request:


User database doesn't exist. Please contact support@cyberwhispers.com.
You could try logging in again here

Go Back


I also double checked I was logged in etc. Otherwise, it looks like a good mod Wink, can't wait to see the finished product!

Andy

webmaster@ace-installer.com
http://www.ace-installer.com
Quote Reply
Re: NON-COOKIE "MyLinks" Mod In reply to
I wouldn't have thought there would be any reason why it works for me and not you. Unless you don't have cookies on.

Check that the /search cookie exists, and see what is inside.

Installations:http://www.wiredon.net/gt/
Favicon:http://www.wiredon.net/favicon/

Quote Reply
Re: NON-COOKIE "MyLinks" Mod In reply to
OK could you try again please and tell me which error code appears. On the error page it will say ERROR CODE and then have a number next to it. That will help me pinpoint the error.

Installations:http://www.wiredon.net/gt/
Favicon:http://www.wiredon.net/favicon/

Quote Reply
Re: NON-COOKIE "MyLinks" Mod In reply to
I got an error code 2. Also, I couldn't see your cookie in my folder. It may be because I am on a school network, and i am not sure I am looking in the correct folder, but I know cookies are enabled as I use it for the GT forum.

Andy

webmaster@ace-installer.com
http://www.ace-installer.com
Quote Reply
Re: NON-COOKIE "MyLinks" Mod In reply to
Yeah it may be different on a school network but on my PC you need to right click the start button and press "Explore" and then select the "Temporary Internet Files" folder and it should be in there.

The cookies are being set on my machine...

CWTRACKER
paul--sae9RT2nSRLKA
www.cyberwhispers.com/search/
0
834253184
29420996
278385216
29417979
*


Installations:http://www.wiredon.net/gt/
Favicon:http://www.wiredon.net/favicon/

Quote Reply
Re: NON-COOKIE "MyLinks" Mod In reply to
I think I know what the problem is. You have been going to the wrong URL

You are clicking on the "Favourites" link right? - That is the old URL so produces an error - I forgot to update it! - DUH!

It is updated now!

Installations:http://www.wiredon.net/gt/
Favicon:http://www.wiredon.net/favicon/

Quote Reply
Re: NON-COOKIE "MyLinks" Mod In reply to
OK guys, I've had a little chat with Glennu and it seems we (he) has solved the problem.

I was using perl.com's example of setting cookies:

Code:
$cookie = new CGI::Cookie ( -name => '',
-value => '',
-expires => '',
-domain => ''
);
print header ( -cookie => $cookie );
But there seemed to be a problem with it for some reason.

So Glennu suggested:
Code:
$cookie = $IN->cookie( -name => '',
-value => '',
-expires => '',
-domain => ''
);
print $IN->heaader( -cookie => $cookie );
...and we both have it working now. I'd be really grateful if some others could test it again to let me know if the problem has infact been solved.

Thanks all...and Glennu!

http://www.cyberwhispers.com/search/track.cgi


I'm just to add the ability to add the email addresses to email.db

Installations:http://www.wiredon.net/gt/
Favicon:http://www.wiredon.net/favicon/

Quote Reply
Re: NON-COOKIE "MyLinks" Mod In reply to
Uh...Paul, I have cookies enabled in both Netscape and IE, and guess what...doesn't work in either..

See ya...

Regards,

Eliot Lee
Quote Reply
Re: NON-COOKIE "MyLinks" Mod In reply to
junko,

Yes...the description, IMHO, needs to be changed because it is technically not a NON-COOKIE MOD, still uses cookies as I already stated..."Database Driven Mod" would be better. And also, I don't really see the difference between your portal.cgi script and this Mod, seems to operate the same.

TongueWinkTongue

Regards,

Eliot Lee
Quote Reply
Re: NON-COOKIE "MyLinks" Mod In reply to
A strange bug! Works for me fine in both Netscape and IE, I use:

IE 5.00
Netscape 4.7




Glenn

Links 2 Mods Site:
http://cgi-resource.co.uk/pages/links2mods.shtml
Quote Reply
Re: NON-COOKIE "MyLinks" Mod In reply to
Yes, indeed...since I use the following browsers:

Netscape 3.0
Netscape 4.6
Netscape 4.73
Netscape 6.1

IE 2.7
IE 3.02
IE 4.0
IE 5.5

Regards,

Eliot Lee
Quote Reply
Re: NON-COOKIE "MyLinks" Mod In reply to
Sheesh...i didnt realise the description of the mod would cause such a problem...i'll change it if it is SUCH a biggie....

Installations:http://www.wiredon.net/gt/
Favicon:http://www.wiredon.net/favicon/

Quote Reply
Re: NON-COOKIE "MyLinks" Mod In reply to
Eliot, it works for myself, Glennu, Ed and hacker i assume so im not sure why not for you.

My mod doesn't use cookies for link storage/tracking so that is the difference between my mod and junko's, although ive never used/seen junko's mod so don't know for sure.

I made this mod for myself and someone else and wasnt even going to release it but I changed my my to give people an OPTION.

Installations:http://www.wiredon.net/gt/
Favicon:http://www.wiredon.net/favicon/

Quote Reply
Re: NON-COOKIE "MyLinks" Mod In reply to
Paul,

The title of the MOD is terribly misleading since it does require COOKIES. A truly NON-COOKIE MOD would be to have a user database (similar to junko's PORTAL.CGI mod) and have people login to access their favorites. Basically, your mod ties users to one computer to access their favorites, since the LINK information is stored in the COOKIE.

Thus, I wanted to point out that the title is confusing and misleading...not a biggie.

Regards,

Eliot Lee
Quote Reply
Re: NON-COOKIE "MyLinks" Mod In reply to
In Reply To:
Basically, your mod ties users to one computer to access their favorites, since the LINK information is stored in the COOKIE.
No Eliot that isn't true - as I have mentioned several times, the LINK information is stored on the SERVER, not in a cookie.

Only the login details are stored in the cookie, therefore you can use my mod from ANY manchine as all you need to do is re-login!

I accept what you are saying about the mod name.

Installations:http://www.wiredon.net/gt/
Favicon:http://www.wiredon.net/favicon/

Quote Reply
Re: NON-COOKIE "MyLinks" Mod In reply to
Hi,
I haven't tried it yet paul, I will in a few.
Thanks,
Paul

Hot Web Hosting
Low cost web hosting:
http://www.thehotweb.net/webhosting
Quote Reply
Re: NON-COOKIE "MyLinks" Mod In reply to
Paul,

For clarification...

I have done three different versions of my portal mod.

1.x uses cookies to save link ID's (no user database); 2.x uses a database to lookup logins stored in a cookie or passed through the form, the ID's are stored in a database; 3.x is virtually the same as 2.x, except it uses mySQL.

I'm going to to change 2.x and 3.x so no client-side cookies are used at all (session cookies? I think their called) next time I revise them.

--Drew
Free, hot camel soup for Links hackers...
http://www.camelsoup.com
> >