Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Detailed Listing Problem

Quote Reply
Detailed Listing Problem
When I get the listing of my entires, I can click to go to the detailed section. However, when I get there, it says "visit this link" and it gives the url of ../cgi-bin/jump.cgi?ID=6, but when I click on it, it goes to ../cgi-bin/6 and then there is an error page because it says the page does not exist. How do I point the URL in the right direction so that it retreives the data that I had originally submitted? Please help! I need to know where I can configure it so it points to where the data is!
Also, how can I display a specific field when I click on the "visit this link"? . For example, in the links.def, there are fields like "ID" "title" "name"... so on. How can I get to disply the information in the "name" only,or "title" only

This is where the problem is, i think, (links.cfg)

# Detailed View: The script can build a single html page per link. This is
# great if you have a review in your database. To enable, you must set
# the directory where all the pages will be stored, the url to that directory
# and set the enable option.
$build_detailed = 1;
$build_detail_path = "$build_root_path/Detailed";
$build_detail_url = "$build_root_url/Detailed";

# Use Templates: instead of editing site_html.pl, you can edit regular html pages
# encoded with special <%links_tags%>. It's not as flexible as site_html.pl, but it
# may be easier.
$build_use_templates = 0;

I changed the option from 1 to 0 where it says $build_use_templates. when it is at 1, it makes you download the jump.cgi file and it says "Error including libraries: (Maybe you didn't strip carriage returns after a network transfer?)Make sure they exist, permissions are set properly, and paths are set correctly."

PLEASE HELP! Thanks in advance.

Kimmer

Quote Reply
Re: Detailed Listing Problem In reply to
1) Please save a copy of links.cfg, links.def, detailed.html and links.html to publicly accesible directory on your site so we can look at it, as well as a .txt copy of jump.cgi.
2) Any field defined in %db_def (ID, Name, etc.) can be used in links.html, detailed.html, add_*.html, rate_*.html, among others, so long as it is spelled ExAcTlY the same. If a field is called "Foo" then you can use the tag <%Foo%>. Simply add or remove the correspond tag from the template.
3) When you turn templates off (0), then Links attempts to access site_html.pl for templates. You did not upload site_html.pl in ASCII mode.

Happy Coding,

--Drew
http://www.FindingHim.com
Quote Reply
Re: Detailed Listing Problem In reply to
Thank you Drew!
1. This is the "detaied.html" where I've changed:

<h2><%Title%></h2>
<p><%Description%></p>
<p><small>Submitted by: <%Contact Name%> -- <a href="mailto:<%Contact Email%>"><%Contact Email%></a>
Hits: <%Hits%></small></p>
<p><a class="link" href="<%db_cgi_url%>/jump.cgi?ID=<%Lyrics%>">Visit this link</a>.


I've changed %ID% to %Lyrics%

2.in the link.cfg, I've changed to these:
# PATH and URL of Admin CGI directory. No Trailing Slash.
$db_script_path = "/custs/home/t/two7422/public_html/cgi-bin/links/admin";
$db_dir_url = "http://twoace.com/cgi-bin/links/admin";

# URL of User CGI directory. No Trailing Slash.
$db_cgi_url = "http://twoace.com/cgi-bin";

# PATH and URL of Pages to be built. No Trailing Slash.
$build_root_path = "/custs/home/t/two7422/public_html/cgi-bin/links/pages";
$build_root_url = "http://twoace.com/cgi-bin/links/pages";


and in the middle of same file:
# Build Options
# --------------------------------------------------------
# Setting for popular cutoff, can either be a percent (i.e. top 3%), or
# a fixed value (i.e. top 10). Enter 0.03 or 10 respectively.
$db_popular_cutoff = 0.03; # Top 3%
# Number of days a link is considered New.
$db_new_cutoff = 14; # 14 days old.
# Return search results bolded (1 = yes, 0 = no).
$search_bold = 1;
# The name of an index file.
$build_index = "index.html";
# The extension to use for non index files:
$build_extension = ".html";

# Should your add.cgi automatically select what category the user
# is adding his link into?
$db_single_category = 1;

# Directory Permissions. Do NOT put quotes around it. Set to 0777
# for world writeable. If you put this at 0755, you might need a
# script to remove any directories created as they will be owned
# by the web server or user nobody. Better solution might be to
# run the nph-build routine from the command shell.
$build_dir_per = 0777;

# The script can now break up category pages that have more then x
# number of links in it. It will also create next and previous links
# to help navigate. Set this to 1 if you want to break up pages or 0 if
# you want to have only one page per category.
# Setting this to one, will also break up the What's New pages into
# per day sections (not affected by number of links per page).
$build_span_pages = 1;

# Number of links per page.
$build_links_per_page = 10;

# Detailed View: The script can build a single html page per link. This is
# great if you have a review in your database. To enable, you must set
# the directory where all the pages will be stored, the url to that directory
# and set the enable option.
$build_detailed = 1;
$build_detail_path = "$build_root_path/Detailed";
$build_detail_url = "$build_root_url/Detailed";

# Use Templates: instead of editing site_html.pl, you can edit regular html pages
# encoded with special <%links_tags%>. It's not as flexible as site_html.pl, but it
# may be easier.
$build_use_templates = 0;


3. in the links.def, i've changed:

# Definition of your database file.
%db_def = (

ID => [0, 'numer', 5, 8, 1, '', ''],
Artist => [ 1, 'alpha', 20, 75, 1, '', ''],
Album => [ 2, 'alpha', 20, 75, 1, '', ''],
Title => [ 3, 'alpha', 20, 75, 1, '', ''],
Lyrics => [ 4, 'alpha', '40x30', 8000, 0, '', ''],
Date => [5, 'date', 15, 15, 1, \&get_date, ''],
Category => [6, 'alpha', 0, 150, 1, '', ''],


Hits => [7, 'numer', 10, 10, 1, '0', '\d+'],
isNew => [8, 'alpha', 0, 5, 0, 'No', ''],
isPopular => [9, 'alpha', 0, 5, 0, 'No', ''],
Rating => [10, 'numer', 10, 10, 1, 0, '^[\d\.]+$'],
Votes => [11, 'numer', 10, 10, 1, 0, '^\d+$'],
ReceiveMail => [12, 'alpha', 10, 10, 1, 'Yes', 'No|Yes']

);

# Database file to use -- defined in links.cfg.
$db_file_name = $db_links_name;
# Counter file to use -- defined in links.cfg.
$db_id_file_name = $db_links_id_file_name;
# The column name for the database key.
$db_key = 'ID';
# Database delimeter.
$db_delim = '|';
# Title used in admin output.
$html_title = 'Links Database';
$html_object = 'Link';

# Field Number of some important fields. The number is from %db_def above
# where the first field equals 0.
$db_category = 6; $db_artist= 1; $db_album= 2;
$db_hits = 7; $db_isnew = 8; $db_ispop = 9; $db_title = 3;
$db_votes = 11; $db_rating = 10; $db_mail = 12;

# Field number to sort links by:
$db_sort_links = 1;

# Field names you want to allow visitors to search on:
@search_fields = (1,2,3);


4. I DID not changed in jump.cgi nor links.html
5. And I did upload these in ASCII mode
6. I'd like to display Lyrics in the links.def where it says Lyrics => [ 4, 'alpha', '40x30', 8000, 0, '', ''], when I clicked "visit this link".

Please help me. Thank you in advance.

Kimmer





Quote Reply
Re: Detailed Listing Problem In reply to
Uh...these codes are incorrect and will not work with the jump.cgi script:

Code:

<p><a class="link" href="<%db_cgi_url%>/jump.cgi?ID=<%Lyrics%>">Visit this link</a>.


You MUST use <%ID%> RATHER than <%Lyrics%> since that is the field that pulls the URL values into the jump.cgi script.

Regards,

Eliot Lee
Quote Reply
Re: Detailed Listing Problem In reply to
In Reply To:
<p><a class="link" href="<%db_cgi_url%>/jump.cgi?ID=<%Lyrics%>">Visit this link</a>.
You can't use that - it has to be ID!!

<p><a class="link" href="<%db_cgi_url%>/jump.cgi?ID=<%ID%>">Visit this link</a>.

You then put <%Lyrics%> in your detailed.html templates (that is if I understood what you meant correctly)



Paul Wilson.
http://www.wiredon.net/gt/
Coming soon => www.perlmad.com
Quote Reply
Re: Detailed Listing Problem In reply to
lol...we gotta stop answering these posts together Smile

We wrote almost identical answers!

Paul Wilson.
http://www.wiredon.net/gt/
Coming soon => www.perlmad.com
Quote Reply
Re: Detailed Listing Problem In reply to
Hello every one. thank you very much for the help.
I've changed again as you said:
<p><a class="link" href="<%db_cgi_url%>/jump.cgi?ID=<%ID%>">Visit this link</a>. but still not working as I decribed in the first page of my question.
In the home page, I have a one catagory for the test(http://twoace.com/cgi-bin/links/pages/). when I click on catagory "lyrics"(http://twoace.com/.../links/pages/Lyrics/) it displays links(I have 3 links for the test.Click on the first link(http://twoace.com/...ages/Detailed/5.html)and then it shows the "title" submited by... Hits:12 "Visit this link" with hyperlinked. Here is the problem. When I move mouse over to "visit this link",it says http://twoace.com/cgi-bin/jump.cgi?ID=5. But When I clicked, it gose to http://twoace.com/cgi-bin/5 and give me a error sign says "this page can't not be found" What was I did wrong???
Also,what code should I edit or add to disply the "Lyrics" page which I've add in links data using links.def configureration as I've described in the earlier questions. Please Help!

Thank you.

Kimmer

Quote Reply
Re: Detailed Listing Problem In reply to
..as I said put the <%Lyrics%> tag in your detailed template.

Find the link with ID 5 in links.db and see what url is has

Paul Wilson.
http://www.wiredon.net/gt/
http://www.perlmad.com/
Quote Reply
Re: Detailed Listing Problem In reply to
Hello Paul!
This is what I did in detailed.html:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html>

<head>
<title><%site_title%>: Detailed View</title>
<link rel=stylesheet href="<%build_root_url%>/links.css" type="text/css" title="<%site_title%> style sheet">
</head>

<body>

<p><strong class="title"> <%title_linked%> </strong></p>

<h1><%site_title%>: Detailed View!</h1>


<p><small class="menu">|
<a class="menulink" href="<%build_root_url%>">Home</a> |
<a class="menulink" href="<%db_cgi_url%>/add.cgi">Add a Site</a> |
<a class="menulink" href="<%db_cgi_url%>/modify.cgi">Modify a Site</a> |
<a class="menulink" href="<%build_root_url%>/New">What's New</a> |
<a class="menulink" href="<%build_root_url%>/Cool">What's Cool</a> |
<a class="menulink" href="<%build_root_url%>/Ratings">Top Rated</a> |
<a class="menulink" href="<%db_cgi_url%>/jump.cgi?ID=random">Random Link</a> |
<a class="menulink" href="<%db_cgi_url%>/search.cgi">Search</a> |
</small></p>


<h2><%Title%></h2>
<p><%Description%></p>
<p><small>Submitted by: <%Contact Name%> -- <a href="mailto:<%Contact Email%>"><%Contact Email%></a>
Hits: <%Hits%></small></p>
<p><a class="link" href="<%db_cgi_url%>/jump.cgi?ID=<%ID%>">Visit this link:<%Lyrics%></a>.

<form action="<%db_cgi_url%>/search.cgi" method="GET">
<h2>Search</h2>
<div class="margin">
<table border="0" cellspacing="0" cellpadding="0">
<tr><td><strong class="search">Looking for something in particular?</strong></td></tr>
<tr><td><input type="text" size=15 name="query"> <input type=submit value="Search!"></td></tr>
<tr><td><small class="more"><a href="<%db_cgi_url%>/search.cgi">More search options</a></small></td></tr>
</table>
</div>
</form>


<p><small class="update">Pages Updated On: <%date%> - <%time%>

Links Engine 2.0 By: <a href="http://www.gossamer-threads.com/">Gossamer Threads Inc.</a></small></p>
</body>
</html>


In Reply To:
Find the link with ID 5 in links.db and see what url is has
You mean where the ID 5 in links.db located?
This links.db is in ../cgi-bin/links/admin/data/links.db. In the links.db it saved as follow:
5|Creed|Creed|Are You Ready|...(Lyrics)....

Thank you again.

Kimmer




Quote Reply
Re: Detailed Listing Problem In reply to
So what are you saying about detailed.html?......It worked or not?

In Reply To:
You mean where the ID 5 in links.db located?
This links.db is in ../cgi-bin/links/admin/data/links.db. In the links.db it saved as follow:
5
No I am not saying that...I meant what is the URL associated with ID 5

Paul Wilson.
http://www.wiredon.net/gt/
http://www.perlmad.com/
Quote Reply
Re: Detailed Listing Problem In reply to
No It's not working. Still the same problem. I changed as you said in detailed.html, but still the same. all the url I described above, it still the same way. After I clicked on "visit this link", it goes to ../cgi-bin/5 and giving me a errar page "This page could not be found"

Thank you

Kimmer


Quote Reply
Re: Detailed Listing Problem In reply to
Did you check the URL for LINK ID 5??

Paul Wilson.
http://www.wiredon.net/gt/
http://www.perlmad.com/
Quote Reply
Re: Detailed Listing Problem In reply to
I do not know where the URL associated with ID 5 is located. It is NOT in links.db.

Please fix this line of code to work properly:
<p><a class="link" href="<%db_cgi_url%>/jump.cgi?ID=<%ID%>">Visit this link<%Lyrics%></a>


Also please tell me which file the associated URL is in, and where I need to go to configure it so it will automatically point to the correct path from now on.

Also, in the same file (detailed.html), the link for "Random Link" has the same problem. Please fix this error as well: <a class="menulink" href="<%db_cgi_url%>/jump.cgi?ID=random">Random Link</a>

I am not sure if these lines of coding are incorrect along with the associated URL or if just the URL is. Please help!

Kimmer

Quote Reply
Re: Detailed Listing Problem In reply to
In Reply To:
Please fix this line of code to work properly:

Also please tell me which file the associated URL is in, and where I need to go to configure it so it will automatically point to the correct path from now on.

Please fix this error as well: <a class="menulink" href="<%db_cgi_url%>/jump.cgi?ID=random">Random Link</a>
Steady on....I am TRYING - I can't spend all my time helping you.

Look for the URL for ID 5 in links.db.

Have you modified jump.cgi?



Paul Wilson.
http://www.wiredon.net/gt/
http://www.perlmad.com/
Quote Reply
Re: Detailed Listing Problem In reply to
Hello Paul!
I am greatly appreciated for your help.
It dosen't have any url in links.db. It look like this:
5|Creed|Creed|Are You Ready|``! Creed``! Are You Ready from the album Human Clay``````Hey, Mr. Seeker Hold on to this advice``If you keep seeking you will find``Don't want to follow``Down roads been walked before``It's so hard to find unopened doors``Are you ready? Are you ready?``Hey, Mr. Hero Walking a thin, fine line``Under the microscope of life``Remember your roots, my friend``They're right down below``Cuz heroes come and heroes go``Count down to the change in life that's soon to come``Ten, nine, eight, seven, six, five, four, three, two, one``Count down to the change in life that's soon to come``Your life has just begun|10-Mar-2001|Lyrics|21|No|Yes|0|0|No
6|Creed|Creed|With Arms Wide Open|``! Creed``! With Arms Wide Open from the album Human Clay``````Well I just heard the news today``It seems my life is going to change``I closed my eyes, begin to pray``Then tears of joy stream down my face``With arms wide open``Under the sunlight``Welcome to this place``I'll show you everything``With arms wide open``Well I don't know if I'm ready``To be the man I have to be``I'll take a breath, take her by my side``We stand in awe, we've created life``With arms wide open``Under the sunlight``Welcome to this place``I'll show you everything``With arms wide open``Now everything has changed``I'll show you love``I'll show you everything``With arms wide open``If I had just one wish``Only one demand``I hope he's not like me``I hope he understands``That he can take this life``And hold it by the hand``And he can greet the world``With arms wide open...|10-Mar-2001|Lyrics|5|No|No|0|0|No
7|creed|human clay|higher|higher asdfsdf|10-Mar-2001|Lyrics|1|No|No|0|0|No


And I did not changed anything in the jump.cgi except pathway for links.cfg


Thank you for your help

Kimmer