Hello,

I am using Drupal 4.6.5 and weblink module. In weblink there is small link at bottom, which says "visit
" and only if you click on that link you can visit the site.

How do I modify this so users can click on the title of the weblink to visit the website. Please help as all I have on my new site is a link directory.

Thanks

Comments

taherk’s picture

Anyone ...??

taherk’s picture

Anyone done that before???

AstaC’s picture

I used a php-snippet and put all the links in one page instead of showing every weblink as a node. If you don't understand what I mean you can se it here.

http://astas.org/Drupal/lankar/webb
(it's in swedish but you will atleast se the links)

I have used categories and terms so when I submit a weblink it will automatically show up in my linkpages.
I never publish my weblinks, only use the module to get my links in to the database.

taherk’s picture

Thanks, if you dont mind can you send the code snippet. But I would still like to know how to make users visit by clicking on title

Since my site is only links directory, this is very important for me.

_________________________________________

Cheap domains @whiz.in

AstaC’s picture

I created a page for each type of links I wanted. Then i categorized the pages. So on each page I have more than one snippet, atleast if you se more than one Subtitle. Like Allmänt - HTML etc

comment is your description of the link. And tid is where you change the term id.

h3>Title</h3>
<div id="lankar">
<ul class="lankar">
<?php
$query = "SELECT a.title, b.url, a.body FROM {node} a INNER JOIN {weblinks} b INNER JOIN {term_node} c INNER JOIN {weblinks_node} d WHERE c.tid='61' AND c.nid = a.nid AND c.nid = d.nid AND d.lid = b.lid";

$queryResult = db_query ($query);
while($row = db_fetch_array($queryResult)) {

$titel = $row["title"];
$url = $row["url"];
$comment = $row["body"];

print "<LI><a href='$url' target='blank'>";
print "$titel</a> ";
print "- $comment</LI>";

 }

?></UL>
</div>




AstaC’s picture

the link should be to this adress instead.