Gossamer Forum
Quote Reply
MY LINKS
If you Perl gurus feel this mod is working well enough, please, will you develop some step by step instructions and post them somewhere. This could be one of the most important mods ever created for Links. I know I would very much like to use it.

Thanks,

------------------
Will
Webmaster
FishHoo! Search index for Fishermen
www.fishhoo.com
Quote Reply
Re: MY LINKS In reply to
i know that the javascript and the perl of the current code works.. however.. i will rescript it into 100% perl for the heck of it tonight (we have a 2 day vacation).. right now i have to go to the library and pull up some value lines for some stocks i bought..

ticker symbols (CMGI EXDS NTAP AOL NTAP) yes.. high returns.. Smile

jerry
Quote Reply
Re: MY LINKS In reply to
There's no great hurry. I just thought you had forgotten about it, but i sure will appreciate it.

Good luck with the stocks, you tycoon.

------------------
Will
Webmaster
FishHoo! Search index for Fishermen
www.fishhoo.com
Quote Reply
Re: MY LINKS In reply to
Jerry
I've already done that and I only have one little snag to fix before I can make it available. here's my post concerning my problem.

Quote:
Hey, I'm near the end of a really nice MyLinks mod which was obviouslly inspired by this thread. It works 100% (as far as I know) during one browser session, but close the browser and return and your cookie is lost. I'm using Matt's cookie.lib and I've set the experation date in the file.
$Cookie_Exp_Date = 'Mon, 01-Jan-2001 12:00:00 GMT';

but it still doesn't hold. Like i said it store the cookies fine as long as you don't close the browser. Lil help anyone?

http://bartour.hypermart.net/links2/pages/index.html

you can check it out here. goto any detailed page a click "Add to My BarTour" add a couple and the you can view the listing from the popup, modify your links from the popup, clicking a link in the popup opens the detailed page for that link in the main window. or click "My BarTour" at the top of any Links page and see the listing of your saved links.

I've spent as much time trying to fix this damn cookie eperation as I did writing the whole script. I also screwed up my local cookies making it so I'm not sure if this is my problem or a script problem.

Any input would be great.

Widgets and Eliot - I couldn't get your script to work but in the process of trying I came up with this. Thanx!

I've also tried setting the cookie experation in the script itself but had the same problem.

If anybody knows cookies and can point me in the right direction, I'd be able to make this available for everyone.

Try it out and tell me what you think
Mutt

------------------
http://bartour.hypermart.net
Quote Reply
Re: MY LINKS In reply to
widgetz, not bad choices. i got in on kide when it was 32.
Quote Reply
Re: MY LINKS In reply to
ok.. it works.. there are just a bunch of templates that need to be added..

site_html_my_add
site_html_my_add_error
site_html_my_delete
site_html_my_delete_error
site_html_my_link
site_html_my_home

the script originally was using "strict" but because strict is TOTALLY uncompatible with links 2.0.. i had to take it off.. there are still a bunch of variables that are localized and globalized though..

jerry
Quote Reply
Re: MY LINKS In reply to
mutt..

the problem isn't the expiration date.. it's the way your setting cookies..

i haven't made the script yet.. cause when i got home all i did was eat and then sleep.. i couldn't stay awake..

anyways.. i'll do it now.. i'm gonna make it the way you guys want it (cookies) then i'm gonna make it for Links SQL.. (db) so the data is saved forever.. not expiring in a certain period of time..

jerry
Quote Reply
Re: MY LINKS In reply to
ok.. i'm done with the perl.. i'm gonna test it with someones Links 2.0 though.. cause i don't have links 2.0 installed anywhere anymore..

jerry
Quote Reply
Re: MY LINKS In reply to
where did you post the code? i do not see it anywhere on your site. or are you still working on it?
Quote Reply
Re: MY LINKS In reply to
test it out first..

http://www.hexapods.com/...in/links/mylinks.cgi

to add..

ADD ?add=####

behind the URL.. some small numbers don't exist.. like #1, #2, and some more.. so add big 3 digit numbers.. or add 1000+ numbers.. there are actually over 7000 links..

then go back to the main mylinks.cgi and you will see the links displayed.. also.. you can test closing the browser completely and then going to see that it's still there..

i know.. the templates are SOO plain Smile they took me a WHOLE minute.. to do all.. umm 7

jerry
Quote Reply
Re: MY LINKS In reply to
Good work JERRY Wink i'm looking foward to get this script Smile
Rimvis
Quote Reply
Re: MY LINKS In reply to
it seems to be working fine. i closed the browser and cleared the cache and went back and the links i added still there.
does the links expire after a certain number of days? is it possible to use a differnt computer and see the same links i added?
like assigning an id to the page where i can access it using any computer from any location.
Quote Reply
Re: MY LINKS In reply to
looks great. Mine works now, but since yours will be using templetes, It will be easier for people to modify.
Quote Reply
Re: MY LINKS In reply to
This looks pretty cool, could server a purpose for my site.
Quote Reply
Re: MY LINKS In reply to
theguy.. no you can't do that.. that's why cookies suck Smile

the Links SQL one i made uses the user database to save the data.. so it doesn't use cookies.. that way the data can be used anywhere..

ok.. this version doesn't require much.. it only requires CGI.pm and CGI/Carp.pm.. if you don't have CGI/Carp.pm you can just take a line out and it will be ok.. but you have to have CGI.pm.. if you don't have CGI.pm then you have to use a cookie library like Matt's cookie.lib.. or the one i wrote (in the other thread)..

also.. you can set how many days you want the cookie to expire.. for the demo.. i set the cookie to expire in 3 years from the time set.. it's dynamic because with CGI.pm you don't have to set the exact date.. you can say

'+1y +3m +15d +6s'

to expire in 1 year, 3 months, 15 days, and 6 seconds..

here is just a skim through of the instructions..

ADD

Code:
sub site_html_my_link {
my %rec = @_;

($rec{'isNew'} eq 'Yes') ? ($rec{'isNew'} = 1) : (delete $rec{'isNew'});
($rec{'isPopular'} eq 'Yes') ? ($rec{'isPopular'} = 1) : (delete $rec{'isPopular'});

return &load_template ('my_link.html', {
%rec,
%globals
});
}

sub site_html_my_home {
my $tags = shift;
print &load_template ('my_home.html', {
%$tags,
%globals
});
}

sub site_html_my_add {
my %rec = @_;
print &load_template ('my_add.html', {
%rec,
%globals
});
}

sub site_html_my_add_error {
my $message = shift;
print &load_template ('my_add_error.html', {
message => $message,
%globals
});
}

sub site_html_my_delete {
my %rec = @_;
print &load_template ('my_delete.html', {
%rec,
%globals
});
}

sub site_html_my_delete_all {
my $tags = shift;
print &load_template ('my_delete_all.html', {
%$tags,
%globals
});
}

sub site_html_my_delete_error {
my $message = shift;
print &load_template ('my_delete_error.html', {
message => $message,
%globals
});
}

to site_html_templates.pl (if you don't use site_html.pl.. you'll have to figure it out yourself.. it's actually not that hard.. if you don't know how to do it.. email me (jsu7785@email.com)..

then you need like 7 templates... i think you guys should be able to figure these out yourselves.. first..

my_link.html
(very similiar to link.html.. except you add something like

Code:
<a href="mylinks.cgi?delete=<%ID%>">delete</a

my_home.html
(main thing to this is <%total%> and <%link_results%> .. you guys might want span pages.. if so.. tell me and i'll implement it.. (i might as well.. so i'll do it after i post this message)..

my_add.html
(you can put any link tags here..)

my_add_error.html
(the only tag other than globals is <%message%>.. which contains the error message..)

my_delete.html
(you can put any link tags here..)

my_delete_all.html
(you can put <%total%> here to tell them how many links there were that they deleted)

my_delete_error.html
(the only tag other than globals is <%message%>.. which contains the error message..)

and finally.. mylinks.cgi..

http://www.widgetz.com/mylinks.txt

jerry
Quote Reply
Re: MY LINKS In reply to
ok.. i added span pages.. the thing you guys need to know is <%span%> in my_home.html

and to put it insde something like this

Code:
<%if link_results%>
<%if span%>
<p><%span%></p>
<%endif%>
<%link_results%>
<%endif%>
<%ifnot link_results%>
No Links!
<%endif%>

that way you don't get a unknown tag: span or unknown tag: link_results..

that's all..

jerry
Quote Reply
Re: MY LINKS In reply to
also.. there are a few variables to define..

Code:
# Links to display per page.
my $per_page = 10;

# Cookie information.
my %cookie = (
name => 'MyLinks',
expires => '+3y',
path => '/',
domain => '.widgetz.com'
);

they are all self explainatory.. you can leave them all alone except for domain in %cookie.. change it to you domain.. it requires 2 periods.. if you have a subdomain.. like something.hypermart.net.. put .hypermart.net if you put .something.hypermart.net it won't work..

jerry
Quote Reply
Re: MY LINKS In reply to
i just changed the code again.. you now use <%links%> instead of <%link_results%> .. did that for the heck of it Wink

and then the biggest change is when i added 50 ids.. i noticed how big the cookie got.. so now i allow you to choose your deliminator.. i suggest you choose a letter.. cause it takes the smallest space.. (1 byte).. a symbol takes 3 and a number will screw your whole cookie up Smile

when you download it.. it will have A as the deliminator.. just change it to whatever.. if you want.. make it like a lowercase l so it looks like a pipe Smile

or a lowercase o so it looks like a big period.. or x is good too...

also.. keep in mind you should NEVER change your delimeter after you choose it.. all your cookies will be messed if you do..

jerry

[This message has been edited by widgetz (edited November 26, 1999).]
Quote Reply
Re: MY LINKS In reply to
i just found a bug that only appears if you have 3 pages of links... if you downloaded it before this time.. just find

$prev_page

and change it to

$prev

(that's why strict is so useful)

jerry
Quote Reply
Re: MY LINKS In reply to
That's OK. I'm waiting to see it here http://www.widgetz.com/links_mods/ in step by step. I've got too much invested to screw it up know.

Jerry, you're such a talented programmer. When you finally hit college, you're going to be able to teach the instructors a thing or two and I bet you make a gazillion dollors with your skills.



------------------
Will
Webmaster
FishHoo! Search index for Fishermen
www.fishhoo.com
Quote Reply
Re: MY LINKS In reply to
I have it looking good, one question, how did you get the add random links, did you just say rand in perl and made it not go over how many links he has?

[This message has been edited by Bmxer (edited November 26, 1999).]
Quote Reply
Re: MY LINKS In reply to
Are the cookies stored on our servers or are they served on the users' PC?
Quote Reply
Re: MY LINKS In reply to
cookies are stored on users PCs...

bmxer.. it's almost the same thing as how it works with jump.cgi Smile

also.. could you give me your URL?

i'm in the need of nice templates before i release the instructions..

ALSO.. i killed two birds with one stone Wink.. my next lab for my perl college course has to do with cookies Wink something similiar to this.. except the data comes from somewhere else.. i also have to come up with an encrypt/decrypt algorithm to make the size of the cookie smaller.. Wink

jerry

[This message has been edited by widgetz (edited November 26, 1999).]
Quote Reply
Re: MY LINKS In reply to
code changed.. again..

just to get rid of that stupid looking span

< Previous 1 Next >

when there are no links Wink

jerry
Quote Reply
Re: MY LINKS In reply to
  http://lookhard.hypermart.net
Thats cool, that your taking college courses.

[This message has been edited by Bmxer (edited November 26, 1999).]
Quote Reply
Re: MY LINKS In reply to
i went to your site and saw that rotate thingy.. one of the things was

"Nude Beaches in France"..

geez.. 8^P

i think most of those won't return links... cause most are in forms of questions.. like

"how many licks does it take to get to the center of a tootsie roll pop"

hehe

you're templates are pretty much mine Smile

just with your background and stuff.. i think i'll go and pick out all the rate templates from links 2.0 and just change the text..

thanks!

jerry

[This message has been edited by widgetz (edited November 26, 1999).]
Quote Reply
Re: MY LINKS In reply to
Yeah, i was really into looking at how it worked, so i just took the source of your pages, and copied put some things into my templates. I'll probably change them around a bit. It probably is good to start with something somwhat less extravagant then my site. Easier for others to edit.
Quote Reply
Re: MY LINKS In reply to
Bmxer Hi,
is that your site at http://lookhard.hypermart.net ? if it is, tell my how you don't have numlinks on your home page but you have in categories, eg Computes (5) . i beed working hard to get this done but no luck, tell my how to do it ?
thanks
Rimvis
Quote Reply
Re: MY LINKS In reply to
Um, ok, find this in nph-build.cgi
# Store all the category html info in $category.
if ($#{$subcategories{$cat}} >= 0) {
$category = &site_html_print_cat (@{$subcategories{$cat}});
}

Change &site_html_print_cat to &site_html_print_sub_cat

then in site_html_templates.pl, copy and paste your &site_html_print_cat again, so you have two. Rename the second
sub site_html_print_sub_cat {
then on the first one, if you know how to remove numlinks, do so, and on the second one, leave it on. So now you can control the way homepage categories look and subcategories look.
Quote Reply
Re: MY LINKS In reply to
the easiest way is just

Code:
$output .= qq| ($numlinks)| if ($cat m,/,);

hehe.. but that's dumb perl.. Smile

jerry
Quote Reply
Re: MY LINKS In reply to
I did it that way for other reasons, also, Smile I change the url of subcats to and, but on the homepage they are displayed with &
Quote Reply
Re: MY LINKS In reply to
well.. then you can add more dumb perl Smile

Code:
($cat =~ m,^[^/]+$,) and $category_name =~ s,and,&,g;

hehe Smile

saves you a whole subroutine that looks almost the same..

also..

Quote:
Yeah, i was really into looking at how it worked, so i just took the sou

so you wanted to learn cookies, eh? Smile for some reason i got this sense in the back of my head your gonna come out with a mod to do "Personalized Search Results".. Smile or something like that.. well anyways.. i'm gonna do it with Links SQL.. just not using cookies ;P

jerry
Quote Reply
Re: MY LINKS In reply to
No luck Frown
Bmxer's version I could not do it, it looks different on my site_html_templayes.cgi , i’m using non –English links,
And jerry could you tell my where those two lines goes?
Thanks

Quote Reply
Re: MY LINKS In reply to
site_html_templates.pl

this line:

Code:
$output .= qq|<dl><dt><strong><a class="link" href="$url">$category_name</a></strong> <small class="numlinks">($numlinks)</small> |;

change to

Code:
$output .= qq|<dl><dt><strong><a class="link" href="$url">$category_name</a></strong> |;
$output .= qq|<small class="numlinks">($numlinks)</small> | if ($cat =~ m,/,);

you only want it to display on subcategories right?

jerry
Quote Reply
Re: MY LINKS In reply to
Oh, that would be good code for my add from certain categories or get an error mod Smile the cat =~ m,/, part, yeah, I'm looking into cookies. I modded a mediocre guestbook to be a modbook similiar to UGB - Ultimate Guestbook and i am now putting in cookie stuff. Good learning.

[This message has been edited by Bmxer (edited November 26, 1999).]
Quote Reply
Re: MY LINKS In reply to
There seems to be a small bug with the MY Links script. The cookies are pulled and displayed. However, when I delete the links from the or delete all, the URLs are deleted, but the extra stuff, like the description and other tags are still listed.

Check it out for yourself at the following page:

www.anthrotech.com/resources/Applied_Anthro

Click on Bookmark It!. See what happens.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: MY LINKS In reply to
I don't know if you meant this too, but i added two links to mine, and i all of a sudden had 9, unless of course your cookie name is MyLinks, but i only had 2 in from my MyLinks setup too.
Quote Reply
Re: MY LINKS In reply to
I also noticed that duplicate sites are added. I also noticed that sites that I never clicked on are being stored in the cookie file. There seems to be some bugs with this script.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: MY LINKS In reply to
Not on my part. I didn't even know this mod was being developed until the last couple of days. And the installation was smooth. Did you change the file, and if so, can you show an url to some source code?
Quote Reply
Re: MY LINKS In reply to
I did not change the mylinks.cgi script AT ALL.

I also kept the same codes in the site_html_templates.pl file.

If you want to take a look at my templates, here they are:

www.anthrotech.com/cgibin/wwwvl/templates/my_add.html

www.anthrotech.com/cgibin/wwwvl/templates/my_add_error.html

www.anthrotech.com/cgibin/wwwvl/templates/my_home.html

www.anthrotech.com/cgibin/wwwvl/templates/my_link.html

www.anthrotech.com/cgibin/wwwvl/templates/my_delete.html

www.anthrotech.com/cgibin/wwwvl/templates/my_delete_all.html

www.anthrotech.com/cgibin/wwwvl/templates/my_delete_error.html

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: MY LINKS In reply to
eliot..

your site didn't even save the cookie..

which is weird..

try changing some things in the %cookie hash.. make sure you set the domain as

.anthrotech.com

bmxer.. what's up with your mylinks.cgi?

jerry
Quote Reply
Re: MY LINKS In reply to
ok.. eliot.. i figured out one thing you need to change..

the link to mylinks.cgi must have the www. part in it.. yes it is a weird thing.. but i have no clue why cookies require 2 periods..

now that it sets, i can see what it's doing..

what is your deliminater? please print out the WHOLE line.. it's messing the WHOLE thing up.. the reason you are getting a bunch of stars and blank links is cause a bunch of non IDs are in your cookie.. they are all symbols..

jerry
Quote Reply
Re: MY LINKS In reply to
bmxer..

i am having no problems with yours..

if you give me an example of what it's doing and step by step on how to get it to do what it's doing i'll test it out.. Smile

jerry

i think my keyboard is dyng.. cause when i typ it dosn't pint a lot of the ltters that i type and i DO press on thm...

see i lost four "E"s an "I", a "R", and a few spaces that i had to punch hader.. ANOTHER R! and two moe space.. ANOTHER R!! geez..
Quote Reply
Re: MY LINKS In reply to
ok.. eliot.. your deliminator is '|'

right?

change it to a letter [a-zA-Z]

i think it has to do with splitting and joining with symbols.. i might have to add a line like

$delim = quotemeta "|";

or something..

but like i said before.. if you change the delim to a symbol you can't save as many links to the cookie cause a symbol takes 3 bytes
Quote Reply
Re: MY LINKS In reply to
widgetz,

Hi there. I am using | as my delimiter character. Do you mean that in the link.html file, I have to add

Code:
www.anthrotech.com/cgibin/wwwvl/mylinks.cgi

and also add this same URL to all other places in the other template files where I am linking it???

BTW: I did set .anthrotech.com for the domain.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------




[This message has been edited by Eliot (edited November 26, 1999).]
Quote Reply
Re: MY LINKS In reply to
widgetz,

It now seems to work.

I changed three things:

1) I set the delimiter to A.
2) I renamed the name to simply MyLinks.
3) I changed all the URL references to include www.anthrotech.com.

It works now.

Thanks.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: MY LINKS In reply to
i don't think the name should have affected it.. but oh well..

according the CGI.pm documentation it says that netscape requires at least two periods in the domain name.. no clue why.. but i'd say just do it Wink

ok.. i still don't get why your delim "|" did that.. i used "," before and it's practically the same.. | is %7C and , is %2C.. so it shouldn't have had a problem.. it might have been cause of that quote meta thing i mentioned above.. but oh well.. i'm gonna steal your my_link.html template Wink

jerry
Quote Reply
Re: MY LINKS In reply to
No, Widgetz, I was talking about Eliots when i said that. I went to his site, and saw that it did the adding of sites that didn't exist thing. Mines is running nicely.

Oh, can i see the code u used for the random id, I can't get anything to parse out when i do it

[This message has been edited by Bmxer (edited November 26, 1999).]
Quote Reply
Re: MY LINKS In reply to
This code doesn't bring back anything. I don't know why.
Quote Reply
Re: MY LINKS In reply to
Thanks, widgetz.

Feel free to use any of my template files.

Yes...It would be nice to get the random link to work as well.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: MY LINKS In reply to
Hey Widgetz, why don´t you create an HTML page with all the instructions and put it in you links mods pages?

For me it´s a lot confusing this thread....

Thanks....
Quote Reply
Re: MY LINKS In reply to
He said before he's not gonna do anything until he gets good looking templates.
Quote Reply
Re: MY LINKS In reply to
This is a great mod. Wouldn't it be cool if upon entering the site they could enter their name so instead of MyLinks, it would say for example "Jerry's Links"?

--------------------
Just to add a twist, a lot of folks here also have UBB installed, so combining a personalized site for links and UBB at the same time, where they can have their name Jerry's Bulletin Board or Jerry's Links somewhere on the page even if they switch from links to ubb.
Quote Reply
Re: MY LINKS In reply to
I believe that Jerry is working on this for the SQL version. The only thing that I can of that could possibly work with the Standard version of LINKS is to create sub-routines in the mylinks.cgi file that adds names to their cookie file.

How to do this?...I don't know.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: MY LINKS In reply to
i'm actually in the process of making a script that will help me "make" the instructions for all the mods.. it will also have an intro page with requirements so you guys don't email me with your emails about something not working Wink

anyways.. i've gathered all my forum mods and put it into the script that pretty much automates and counts how many times you guys download and stuff.. (yes.. it's Links 2.0).. Smile it has alot of addons though...

i felt like installing it again at hypermart cause i was losing my knowledge of the scripts.. MyLinks.cgi totally looks like it's for Links SQL, cause i've been too attached to Links SQL code Smile

if the random doesn't work.. you can make it into a few more lines.. i did that to try and get all that code onto one line...

Code:
my $r = int rand $#db;
my $random = $db[$r];
my @random = &split_decode ($random);
my %random = &array_to_hash (0, @random);

doh.. i figured it out.. see how links 2.0 illiterate 've become..

retry it with

Code:
my (%random) = &array_to_hash(0, &split_decode($db[int rand $#db]));

jerry
Quote Reply
Re: MY LINKS In reply to
does CGI.pm come with the server? or can you download it?
Quote Reply
Re: MY LINKS In reply to
also.. if you have UBB.. i could make it save the data forever.. just by adding fields to the member file.. and changing the cookies..

jerry
Quote Reply
Re: MY LINKS In reply to
it's usually with every server.. but you can download it.. it's at cgi-resources in the perl libraries and modules..

jerry
Quote Reply
Re: MY LINKS In reply to
Widgetz wrote a really cool module script that checks all your modules located on your server. The script was written in a Thread in the Perl/CGI Forum. If you can't find it, I am sure that Widgetz can give it to you.

You can also download cgi modules at

www.cpan.org

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: MY LINKS In reply to
ok.. i actually just did a rand 7000.. but here is something that will do it based on links.db..

Code:
open DB, $db_file_name;
my @db = <DB>;
close DB;

my (%random) = &array_to_hash(&split_decode($db[int rand $#db]));

and then just add

%random to the hash being sent into site_html_my_home like this

Code:
&site_html_my_home ( { %random, %OUT } );

then you can say like

Code:
ADD <a href="mylinks.cgi?add=<%ID%>"><%Title%></a>!

jerry

[This message has been edited by widgetz (edited November 27, 1999).]
Quote Reply
Re: MY LINKS In reply to
  
Quote:
also.. if you have UBB.. i could make it save the data forever.. just by adding fields to the member file.. and changing
the cookies..

That is a really cool idea for people who are not using SQL. You could just save all the memeber info in there. I think there is a free version of UBB available too.

Is it possible to make so users can add other external links also?

[This message has been edited by socrates (edited November 27, 1999).]
Quote Reply
Re: MY LINKS In reply to
Thanks to your module checker widgetz, i found that i do have the cgi.pm and cgi/carp.

Question: I don't use templates (i guess i'm just old fashioned) so this means that i just have to add more subroutines in site_html.pl right? Would there be anything else that i would have to do? Thanks again, and great work.

-Greg
Quote Reply
Re: MY LINKS In reply to
that module checker counts one less Smile

i forgot that i was working with an array..

right now i'm making a very high bandwidth version of Links 2.0 :^).. i'm gonna use it on hypermart so i don't care.. i'm just making everything into one CGI file.. so all the pages are dynamic rather than building the pages..

jerry
Quote Reply
Re: MY LINKS In reply to
Jerry, i’m with my numlinks problem, sorry about this
I tried you those or lines,
$output .= qq|<dl><dt><strong><a class="link" href="$url">$category_name</a></strong> |;$output .= qq|<small class="numlinks">($numlinks)</small> | if ($cat =~ m,/,);

it is not printing any num links at all, homepage or categories,
Any suggestions?
Quote Reply
Re: MY LINKS In reply to
sorry.. $cat should be $subcat

jerry
Quote Reply
Re: MY LINKS In reply to
I'm looking for CGI/Carp and CGI.PM on my server. Here's the section that I see.
Quote:
CGI::Apache
CGI::Carp
CGI::Cookie
CGI::Fast
CGI::Push
CGI::Switch
CGI
CPAN::FirstTime
CPAN::Nox
CPAN
Carp
I don't see CGI.PM at all. Exactly how is it identified and is it necessary to run mylinks.cgi?

------------------
Will
Webmaster
FishHoo! Search index for Fishermen
www.fishhoo.com
Quote Reply
Re: MY LINKS In reply to
the script cuts out the .pm and changes / to ::

it's sorta how it's written in perl..

use CGI ();
use CGI::Carp qw/fatalsToBrowser/;

so yes.. you do have them.. everyone should..

jerry
Quote Reply
Re: MY LINKS In reply to
Jerry, Thank you thank you !!! Smile Smile
it works Wink
Quote Reply
Re: MY LINKS In reply to
I sure am glad because my sysadmin just about has a stroke every time I ask him to install a new module.

Jerry, please take your time and get this just right. A mod like this could encourage your visitors to stay on your site longer (stickyness) which should be good for advertising sales. That's why I think it could be very important.

------------------
Will
Webmaster
FishHoo! Search index for Fishermen
www.fishhoo.com
Quote Reply
Re: MY LINKS In reply to
bad post

[This message has been edited by Bmxer (edited November 27, 1999).]
Quote Reply
Re: MY LINKS In reply to
Its already right, it works fine, but i guess you want easy instructions.
Widgetz,
The random code works well, thanks.
Quote Reply
Re: MY LINKS In reply to
The random codes work great.

Thanks.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: MY LINKS In reply to
for non-templates, would i need to make the subroutines in site_html.pl? is there anything else i would need to do?
Quote Reply
Re: MY LINKS In reply to
You would have to make the sub-routines mentioned in earlier instructions. Rather than the C++ tags, like <%total%>, you would have to use $total.

Copy the sub site_html_rate_form and use that sub-routine as a "template" for the new sub-routines.

Good luck.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: MY LINKS In reply to
actually.. the code i am using would work the same for non templates.. the thing is that you can't use

$total cause i programed it in strict.. but you can just do like

Code:
sub site_html_my_home {
my $tags = shift;

print qq~
<html>
<head>
<title>title</title>
<body>
${$tags}{'total'}
</body>
</html>
~;
}
Quote Reply
Re: MY LINKS In reply to
Does that mean that for all of the new subroutines I would have to change the way the tags are implemented?
Quote Reply
Re: MY LINKS In reply to
Great, i got part of it to work. One slight problem. What tag do i use to display the link in the site_html_my_add page. For some reason it won't display it when i use ${$tags}{'links'} or $links. However in the site_html_my_home page it will display the link.
Quote Reply
Re: MY LINKS In reply to
Gregario,

You need to use actual link variable tags, like you have in the sub site_html_link routine.

Example:

Code:
sub site_html_my_add {
# --------------------------------------------------------
# This routine is used to display what a link should look
# like. It's a little complex looking just because we have to
# check for blank entries..

my (%rec) = @_;

$build_detailed ?
($output = qq~<ul><li><a class="link" href="$build_detail_url/$rec{$db_key}$build_extension">$rec{'Title'}</a>~) :
($output = qq~<ul><li><a class="link" href="$build_jump_url?$db_key=$rec{$db_key}">$rec{'Title'}</a>~);

if ($rec{'Description'}) { $output .= qq~ <span class="descript">- $rec{'Description'}</span>\n~; }
if ($rec{'isNew'} eq "Yes") { $output .= qq~ <small><sup class="new">new</sup></small>~; }
if ($rec{'isPopular'} eq "Yes") { $output .= qq~ <small><sup class="pop">pop</sup></small>~; }

$output .= qq~ <small class="date">(Added: $rec{'Date'} Hits: $rec{'Hits'} Rating: $rec{'Rating'} Votes: $rec{'Votes'}) <a href="$build_rate_url?ID=$rec{'ID'}">Rate It</a></small>
</ul>
~;

return $output;
}

Hope this helps.

Good luck.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: MY LINKS In reply to
gregorio.. if i wasn't so lazy.. i'd just make the subs for you Wink

i'm planning on doing them tommorrow when i get home from school..

but do this..

Code:
~;

if (${$tags}{'links'}) {
print qq~Links:<br>${$tags}{'links'}~;
}
else {
print qq~No Links!~;
}
print qq~

jerry
Quote Reply
Re: MY LINKS In reply to
new version which hasn't been released yet.. im still in the process of "encrypting" further..

http://www.hexapods.com/...in/links/mylinks.cgi

right now it only saves space for links 1-2000 or something.. everything else is almost the same.. i am trying to get it down to at least 1-3 characters for each link..

you guys know why i'm doing this right?

there is only a limit on cookies. < 2k per cookie

jerry
Quote Reply
Re: MY LINKS In reply to
Take your time, Jerry. We know you want to do this right.

------------------
Will
Webmaster
FishHoo! Search index for Fishermen
www.fishhoo.com
Quote Reply
Re: MY LINKS In reply to
Can somebody E-mail me the procedure to add my links to an existing links setup? I copied the mylinks.cgi but I don't know how to adapt the rest of the links infastructure to mylinks.cgi. My e-mail address is:

jonathan@infoprimer.com

Thanks,

Jonathan
Quote Reply
Re: MY LINKS In reply to
Instructions for setting up the template files are located in another MY LINKS Topic in this forum.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.


Quote Reply
Re: MY LINKS In reply to
hmm mine aint displaying the results for some reasons it says
%link_result% does not exist
Quote Reply
Re: MY LINKS In reply to
<%link_results%>

jerry
Quote Reply
Re: MY LINKS In reply to
Hi looks like a great mod but mine ain't displaying either I have tried

<%links%>

and

<%link_results%>

Help needed please

Thanks

Dc

Smile
Quote Reply
Re: MY LINKS In reply to
You need to use <%links%> in the my_home.html template file.

Most likely you have not configured the sub site_html_my_home routine correctly in your site_html_templates.pl file.

Regards.

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.


Quote Reply
Re: MY LINKS In reply to
Sorry to bother you

but I am using <%links%>

my code in the template file is

sub site_html_my_home {
my $tags = shift;
print &load_template ('my_home.html', {
%$tags,
%globals
});
}


I do not understand perl, but I have changed and checked this, I have checked cookies etc but cannot see what I am doing wrong, going bald pulling my hair out.

Thanks for your help

Dc

Smile
Quote Reply
Re: MY LINKS In reply to
Well, these are the codes I have in that sub:

Code:
sub site_html_my_home {
# --------------------------------------------------------
# This routine shows the layout of the MY Link Home Page

my $my_link;
my $tags = shift;
print &load_template ('my_home.html', {
%$tags,
%globals
});
}

And My LINKS works just fine in my directory.

Wink

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.


Quote Reply
Re: MY LINKS In reply to
Hi!

So, guys, Jerry, I'm LOST!

Can I put mylinks.cgi working on a non SQL Links set up??

Isn't ANY step by step instructions to this great mod??? I've read all the posts and I can only see things like "do this!" "no wait, I just changed it, now do this" "no wait, change this again"....

I'm definetly lost and I wanna use this mod asap, thanks!! ;)



Quote Reply
Re: MY LINKS In reply to
Yes, it definitely works with Links 2.0, and, believe it or not, it's actually pretty easy to install once you figure out all the dialogue.

I can't remember how I did it right now, but read the thread(s) and you should find that you need only a few pieces - the script and the templates, if I recall correctly.

AnthroRules originally posted the templates somewhere in here, and I think I saw another set posted just recently by someone else.

Hope this helps. Smile

Quote Reply
Re: MY LINKS In reply to
Yes...A link to someone's version of the template files was linked twice in the past two days. I moved my My Links template files to a password protected directory because I am using tons of unique tags that were causing problems for people.

Regards,

Eliot Lee
Quote Reply
Re: MY LINKS In reply to
I submitted my version of the MyLinks templates to the resource center yesterday. They haven't been added yet. Meanwhile, just scroll down the page to the thread titled mylinks templates. Hm... I wonder if a link is in there...

--Drew
Quote Reply
Re: MY LINKS In reply to
You can find a link to the templates and script put together in this thread;

http://207.105.53.169/...ust&Number=49644

Jimmy Crow
http://www.homewithgod.com/
Quote Reply
Re: MY LINKS In reply to
hi,
i'm looking for mylinks addon,
n i have serach for a few pages too but still can't find it.
can anybody tell me where can i get?
thanks!:)



Quote Reply
Re: MY LINKS In reply to
The MyLinks mod has been withdrawn from the forum and is no longer available.

Thomas
http://www.japanreference.com
Quote Reply
Re: MY LINKS In reply to
I think I remember widgets (jerrysu), the author of the mod, posting in the forum about a week ago that you could purchase the script from him for $20 which included the install

Jimmy Crow
http://www.homewithgod.com/
Quote Reply
Re: MY LINKS In reply to
i'm so disappoinment.........sigh..................... :(

Quote Reply
Re: MY LINKS In reply to
Its available again, see the following thread:
http://www.gossamer-threads.com/...it=25&Old=3weeks

-Morbius

http://www.mimanet.com