Gossamer Forum
Home : Products : Links 2.0 : Customization :

LastLink - a new mod

Quote Reply
LastLink - a new mod
I have - thanks to help from Widgetz - released a new mod called LastLink. It is for showing the most recently added link on the homepage.

It has been submitted to the resource center, and can be found at http://www.gotzespace.dk/books/linksmod/ .

Let me know know is there are any problems with it.

John
Quote Reply
Re: LastLink - a new mod In reply to
Sounds like you haven't got the definitions right. Have you added code correctly in site_html_templates.pl? Remember to define the correct set of $db_somethings in the sub site_html_home. These must of course relate to the definitions in your links.def.

Also check in your home.html template for how you call the result. I use this code:
Code:
<a href="<%last_url%>"><%last_title%></A>
- <%last_description%>
But yours might need to look different.

HTH
John
Quote Reply
Re: LastLink - a new mod In reply to
BRAVO! Smile

you made a mistake though...

this:

Code:
last_title => $lastlink[$db_title],

should be

Code:
last_title => $last{'Title'},

it works both way.. but i think you'd prefer it like that Smile
or i think it's possible just to put

%last,

and then you can use

<%Title%>

but that might affect other things..

jerry
Quote Reply
Re: LastLink - a new mod In reply to
yea.. you can just put

%last, Smile

much better cause the main page doesn't have any links already...

jerry
Quote Reply
Re: LastLink - a new mod In reply to
Great MOD- The only problem I had that maybe you can help with is that instead of showing the description it shows the Link ID number.

Kurt Johnston - Team Manager/Webmaster
The Speed-O-Maniacs Jr. Drag Racing Team
http://speedomaniacs.com
EMail: Kurt@speedomaniacs.com
Quote Reply
Re: LastLink - a new mod In reply to
This sounds great! But do you have a non templates version? Thanks.
-Greg
Quote Reply
Re: LastLink - a new mod In reply to
for non templates it's the same.. except in the site_html_home subroutine in site_html.pl you just put

$last{'Title'} , etc

into the html
Quote Reply
Re: LastLink - a new mod In reply to
Widgetz,

Are you sure last_title => $last{'Title'}, will work with templates? It didn't work for me.

I also can't get %last, to work with templates.

My way - as if it was my way ... your way, until a minute ago ... Smile - does work ... Smile

I will play a bit with the %last, ...
Quote Reply
Re: LastLink - a new mod In reply to
i've never tried it and i have no clue how templates work.. SOOO Smile

but i would think %last should work..
Quote Reply
Re: LastLink - a new mod In reply to
Thanks. Works great. But would it be possible to have the link go to the newest addition's detailed view and not their home page? Thanks for the help.
-Greg
Quote Reply
Re: LastLink - a new mod In reply to
Could you also have the last 5 links print?
Quote Reply
Re: LastLink - a new mod In reply to
uh.. the last 5 is a sorta different mod.. i have that on my page..

http://www.pdamania.com

as for the detailed page..

you use

Code:
if ($last{'isDetailed'} eq "Yes") {
$output .= qq~that url Smile~;
}
else {
$output .= qq~jump url~;
}
Quote Reply
Re: LastLink - a new mod In reply to
Thanks. Would it be possible for you to post or e-mail me (benz@op.net) the modifications for showing the last 5 links. This would be great for my site. Thank you.
-Greg
Quote Reply
Re: LastLink - a new mod In reply to
What am I supposed to put in the code instead of the smiley face. I don't think that was intentionaly supposed to be there. Also if at all possible could you share you code for the last 5 links.
Quote Reply
Re: LastLink - a new mod In reply to
in the code.. you put the detailed page stuff..

for last 5 links.. you'd need to wait on that.. cause it's not working properly Smile
Quote Reply
Re: LastLink - a new mod In reply to
Where exactly do I put the following code?

Code:
if ($last{'isDetailed'} eq "Yes") {
$output .= qq~that url ~;
}
else {
$output .= qq~jump url~;
}
Thank you.
-Greg
Quote Reply
Re: LastLink - a new mod In reply to
I've got the same problem Kurt had.. but can't seem to find the issue.

I'm using:
<b><a href="<%last_url%>"><%last_title%></a></b><br>
<%last_description%></font><p></td>
in my html, and then the site_html templates reads:
last_title => $lastlink[$db_title],
last_url => $lastlink[$db_url],
last_description => $lastlink[$db_description],

under the proper sub... doesn't produce an error, the name and URL come up right, just that the description is the ID number.

And I am running other links on my front page (cool links) - so I'd rather leave it like <%last_url%>

any suggestions?