Gossamer Forum
Home : Products : Links 2.0 : Installation -- Unix :

Detailed View in 3 easy steps.

Quote Reply
Detailed View in 3 easy steps.
**Note, no disrespect intended to the wonderful people that spend their time helping newbies like me**

I just spent three hours reading threads from innocent people asking for help on configuring the Detail View option in Links 2.0. Most were replied to with obvious hostility because "no one ever searches the forum first". A few were helpful, but they only provided snippets of the modifications. Here is ALL you need to do:

1. Edit links.cfg and turn Detailed View on:

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
# 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";
- - - - - - - - - - - - - - - - - - - - - - - - - - - -

2. Edit site_html_templates.pl:
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
### after the line "css => $build_css_url,"
### add this line:

build_detail_url => $build_detail_url,

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
3. Edit link.html and change your top line to this:


<ul><li><a href="<%build_detail_url%>/<%ID%>.html"><%Title%></a>
- - - - - - - - - - - - - - - - - - - - - - - - - - - -


That is it. That will get the option working. I haven't yet expirimented with changing the styles of anything yet, but by following those steps you will save yourself three hours of reading bickering and exasperation!





| www.meltedmonitor.com |
Quote Reply
Re: [MeltedMonitor] Detailed View in 3 easy steps. In reply to
I found this thread out of many but ... I wanted a bit more of a dynamic solution.
Most likely someone else already has solved this for all but I thought since I ended my searching at this thread I might as well note what I did here. Laugh

follow step one from meltedmonitor above.

step 2.

IN site_html_templates.pl just in sub site_html_link under my %rec=@_;
add:

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

then in the globals declaration for this template change :
Code:
detailed_url => "$build_detail_url/$rec{'ID'}$build_extension",
to
detailed_url => $my_build_detail_url,

step 3.

in link.html

use :
Code:
<%detailed_url%>
instead of or in addtion to :
<a class="link" href="<%db_cgi_url%>/jump.cgi?ID=<%ID%>"><%Title%></a>

notes:
that's it if detailed pages are turned on the link will take to the detailed page instead of jumping directly to the site and if build detailed is turned off it jumps straight to the site.

I borowed this bit of code from site_html.pl ... since I'm not a programmer yet Unsure but it's easy enough to add a few words qq~ HERE < a class="link" to say something like "view the detailed page for : " and for the jump version "go directly to : "

I'm sure somebody with more programming skills could clean this up to build something like:
Code:
<%if my_build_detail_url%>
view detailed page for : <%detailed_url%>
<%endif%>

but ... I failed miserably here since I could figure out what to put after the if Crazy

this solution involves a bit more but like I said the link will change with the on/off setting in links.cfg
and probably doesn't help much either but ... Laugh I'm happy with my accomplishment.

openoffice + gimp + sketch ... Smile
Quote Reply
Re: [MeltedMonitor] Detailed View in 3 easy steps. In reply to
Super easy - thanks.
Quote Reply
Re: [SSmeredith] Detailed View in 3 easy steps. In reply to
Dear MeltedMonitor

Good post it will help the newbie
Megrisoft
Web Hosting Company
India Software Company
SEO Company


Quote Reply
Re: [MeltedMonitor] Detailed View in 3 easy steps. In reply to
Great Help for everybody !!Angelic
====================
http://www.websitedesigningpromotion.com
http://www.bahraichfun.com
http://www.thewebbrains.com
http://www.softwaredevelopmentindia.com