Gossamer Forum
Home : Products : Links 2.0 : Customization :

info.cgi -- replacement for details.cgi

(Page 1 of 2)
> >
Quote Reply
info.cgi -- replacement for details.cgi
For anyone looking for details.cgi, I have written a new dynamic details script mostly based on pieces of jump.cgi, modify.cgi, and nph-build.cgi that works the same way.

Go here for installation instructions: http://ucmd.virtualave.net/links_mods/info/.

There aren't any instructions for non-templates yet but I'm working on them.

--Drew
Quote Reply
Re: info.cgi -- replacement for details.cgi In reply to
Drew,

Good job!

George

Quote Reply
Re: info.cgi -- replacement for details.cgi In reply to
Thank you Smile.

Hopefully other users will be/have been working on recreating some of the other mods that have been pulled.

--Drew
Quote Reply
Re: info.cgi -- replacement for details.cgi In reply to
Hi

Just wondering has anyone got this to work yet? If so please could you tell me what you did. Cause I've added the code to my website and I just get errors when running it!


Cheers

Glenn

Quote Reply
Re: info.cgi -- replacement for details.cgi In reply to
Glenn,

Would you mind letting me know what kind of errors you're getting and/or posting a link to the files in an unprotected directory in a textfile format so I can look at them? I tested this script for over 4 hours before releasing it in the forum.

--Drew
Quote Reply
Re: info.cgi -- replacement for details.cgi In reply to
When putting in the original script I just got internal errors there was no other error message. I added the template, added the sub_html_error routine, uploaded and chmoded the info.cgi to 755.

I definitly installed the script correctly. Although my links directory has alot of other mods I don't think any of these would cause a conflict.

I took off the unless statement and altered a few bits. It then loaded the template but only recongnised the <%ID%> tag and didn't recongnise any of the others (although the tags were specified in sub_html_detailed).

I'm sorry, I can't remember what I did to get the template to load. I'd been looking for a solution myself before seeing your codes so after not getting anywhere I played around with some other bits myself without success and lost what I did before!


Glenn


Quote Reply
Re: info.cgi -- replacement for details.cgi In reply to
Did you make backups? Download a fresh copy of info.cgi (I have made changes to the script) and try re-installing the mod. Meanwhile I'll backtrack and see if I missed any changes I made.

--Drew
Quote Reply
Re: info.cgi -- replacement for details.cgi In reply to
I tried the new script but it still gives error messages. I'm using the default site_html_detailed and am calling the script using info.cgi?ID=.....


Glenn



Quote Reply
Re: info.cgi -- replacement for details.cgi In reply to
Please post a link to the script at your site so I can see the EXACT errors you are getting.

A few solutions for now:

1)Check that your sub site_html_detailed looks like:
Code:
sub site_html_detailed {
# --------------------------------------------------------
# This routine will build a single page per link. It's only
# really useful if you have a long review for each link --
# or more information then can be displayed in a summary.
#
my %rec = @_;
return &load_template ('detailed.html', {
total => $total,
grand_total => $grand_total,
title_unlinked => $title_unlinked,
title_linked => $title_linked,
%rec,
%globals
} );
}
2)Open info.cgi in an editor and put the full path to links.cfg.
3)Check that you copied site_html_detailed_error exactly and placed in site_html.pl if you use CGI templates or site_html_templates.pl if you use HTML templates.
4)If you get an error 500 or it tries to download, check that the cgi-bin/links directory and info.cgi are both set to 755.
5)If the errors you get are "No link specified." or "Link ### not found." then you are not calling the script correctly or the link really isn't there. It should be "info.cgi?ID=<%ID%>".
6)If you are getting "cannot find lib..." or "undefined subroutine" then I need to see exactly what it says.

--Drew
Quote Reply
Re: info.cgi -- replacement for details.cgi In reply to
Yeah it works fine now. I don't know what I did wrong originally but it works fine now!

Thanks you for all your help and well done for producing such a usefull script.



Cheers


Glenn

Quote Reply
Re: info.cgi -- replacement for details.cgi In reply to
could someone send complete instructions on how to use this mod, most of us dont know the old mod, so we just dont know exactly how to use it. it should go to resources, to replace the curse by widgetz.
regards
klaus

Quote Reply
Re: info.cgi -- replacement for details.cgi In reply to
I will right up a more detailed instruction page and post the link to the resource center soon.

<update>
I have modified my original post to point to new step-by-step instructions.
</update>

--Drew
Quote Reply
Re: [sponge] info.cgi -- replacement for details.cgi In reply to
Can someone PLEASE post the full code for this mod other than info.cgi, specifically this:

3)Check that you copied site_html_detailed_error exactly and placed in site_html.pl if you use CGI templates or site_html_templates.pl if you use HTML templates

As http://ucmd.virtualave.net/links_mods/info/ is down and out for the count and I keep on getting

fatal error: Undefined subroutine &main::site_html_detailed_error

When I run the script as the code is missing from site_html_templates.pl.....

I already have the info.cgi file - but it's the other bits needed to make the mod working that's missing....

I've tried to PM Drew but he's busy....
Quote Reply
Re: [boom] info.cgi -- replacement for details.cgi In reply to
Basically, you need to add the site_html_detailed_error routine in your site_html_templates.pl file. I believe you can copy the site_html_detailed routine and re-name the new routine as site_html_detailed_error.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Stealth] info.cgi -- replacement for details.cgi In reply to
Thanks! That did it and thanks also to ESM for help as well.

Note: When you add site_html_detailed_error change the template to load in there to detailed_error.html and create that file and put it in the templates directory (if you are using Templates, of course!) so you can do a custom error page like this ID is not available, for instance.

Code:


sub site_html_detailed_error {
# --------------------------------------------------------
# This routine will build a single page per link. It's only
# really useful if you have a long review for each link --
# or more information then can be displayed in a summary.
#
my %rec = @_;
return &load_template ('detailed_error.html', {
total => $total,
grand_total => $grand_total,
title_unlinked => $title_unlinked,
title_linked => $title_linked,
%rec,
%globals
} );
}
Quote Reply
Re: [Stealth] info.cgi -- replacement for details.cgi In reply to
<a href="<%db_cgi_url%>/info.cgi?ID=$rec{'ID'}" ...

The value is not getting filled in place of $rec{'ID'}

Any idea where I am goofing up?
Quote Reply
Re: [bigpatsu] info.cgi -- replacement for details.cgi In reply to
since you are using templates, you need to use <%ID%>.

Philip
------------------
Limecat is not pleased.
Quote Reply
Re: [fuzzy logic] info.cgi -- replacement for details.cgi In reply to
...instead of $rec{'ID'}


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] info.cgi -- replacement for details.cgi In reply to
Had tried <%ID%> also, but without any success.
The result was <%ID> . the % sign at the end of ID disappeared.
Quote Reply
Re: [bigpatsu] info.cgi -- replacement for details.cgi In reply to
I have this mod working on a site, and the template link.html has this:

Code:

<a href="<%build_info_url%>?ID=<%ID%>"><%Title%></a>

So of course as soon as I posted this, I see that you need build_info_url, not build_root_url. Add this in links.cfg:

# -------------------------------------------------------------
# Extra Paths -- unless you feel the need to rename files, you
# can leave this as is.
# -------------------------------------------------------------
$db_script_url = $db_dir_url . "/admin.cgi"; # Admin script.
$db_header_path = $db_script_path . "/header"; # Place to store header and footers.
$db_footer_path = $db_script_path . "/footer";
$build_search_url = $db_cgi_url . "/search.cgi"; # URL of search script.
$build_add_url = $db_cgi_url . "/add.cgi"; # URL of add script.
$build_modify_url = $db_cgi_url . "/modify.cgi"; # URL of modify script.
$build_jump_url = $db_cgi_url . "/jump.cgi"; # URL of jump script.
$build_email_url = $db_cgi_url . "/subscribe.cgi"; # URL of email update script.
$build_rate_url = $db_cgi_url . "/rate.cgi"; # URL of rate script.
$db_mail_url = $db_dir_url . "/nph-email.cgi"; # URL of admin mass mail script.
$build_css_url = $build_root_url . "/links.css"; # URL to your CSS file.
$build_info_url = $db_cgi_url . "/info.cgi";


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] info.cgi -- replacement for details.cgi In reply to
Thanks. It works perfectly fine. Could you please see the following thread and give a solution:

http://www.gossamer-threads.com/perl/gforum/gforum.cgi?post=259404;sb=post_latest_reply;so=ASC;forum_view=forum_view_collapsed;;page=unread#unread
Quote Reply
Re: [PerlFlunkie] info.cgi -- replacement for details.cgi In reply to
Hey Leonard;

I'm looking for Links 2.0 mods. I have quite a few installed but notice that there were quite a few listed in the forum that are no longer available. I know that you spend allot of time here and have most of the good mods installed. Could you zip me a folder with all the mods you have for links 2.0 and send them to me. I'd be willing to pay you for this.

I have expireator, password protect, bulkload, priority logo, and some span mods, you don't need to include them if you don't want to.

Thanks,

Jake
Quote Reply
Re: [awwa] info.cgi -- replacement for details.cgi In reply to
This site has lots of mods:

http://cgi-resource.co.uk/pages/links2mods.shtml

There are quite a few scattered through these forums, and on other sites around. I do have copies of most of them, as anytime I find something interesting, I save it, whether I plan on using it right away or not. If you have a specific mod in mind, and can't find it, let me know, I may have it stashed away...


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] info.cgi -- replacement for details.cgi In reply to
  

I just wanted some mods to look through to get ideas and hack code that’s all.

I would like the info.cgi and details.cgi, can’t find a link to them that still works.

Also this is another thing I am trying to do.

I wanted to set up a start and end date for a field, so field don’t show until the start date and they stop showing after the end date.

I found half the answer in the forum, but still need to tweak the code below to not show the link until the start date.

Add 2 new fields. Ones an info field and the other an expirory date field. define the info field further down in links.def as $db_info and the expirory as $db_expire. Make the expire field as not required, ie so in some cases there doesn't need to be an expirory date.
Then in nph-build.cgi go to the sub build_update_newpop:
Above
# Check to see if the record is new...
Add:
if ($values[$db_expire]){
$dates = &compare_dates($values[$db_expire], $date);
if ($dates){
$values[$db_info] = "";
print "\tUpdating record: $id, deleting extra info as it has expired.\n";
}
}

The expires field date needs to be in the same format as the Date field. ie like: 23-Jun-2001.

Last edited by:

awwa: Jan 31, 2004, 2:06 PM
Quote Reply
Re: [awwa] info.cgi -- replacement for details.cgi In reply to
Info.cgi (detail.cgi) is here:

http://www.gossamer-threads.com/...i?post=247051#247051

The date thing you want is a bit beyond me, but others here may be able to help ya out...


Leonard
aka PerlFlunkie
> >