EasyCFM.COM ColdFusion Forums / Tutorial Requests! / Tutorial Request...

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: Tutorial Request...

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

jruiseco
12-16-2002 @ 2:25 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 28
Joined: Dec 2002

I'd like to see a tutorial for creating a link managment system. Basically, I want to have links on my site but rather than have users click those links and go away, I want to have the system log the click and then re-direct the user. This would allow me to view my link stats for those external links.

maquiladoras
12-16-2002 @ 7:36 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Moderator
Posts: 2073
Joined: Dec 2002

http://webdev.webleicester.co.uk/test/links/index.cfm

is that what you are looking for?

has
Public links listing
admin section to Add/Edit/Remove links
with Link, Short Description, and Full description of links, and a stats page , listing the page, ordered by How many hits its got and allows you to reset the page

just writing the bar chart part of it

but a very quick answer to you question
is say you have a links.cfm on your page
just have a link saying

<a href="links.cfm?id=#link_id#" target="_blank">#short_desc#</a>

this will link back to your page, and at the top of the
page after your cfquery you have

<cfif isdefined("url.id")>
<cfset visits = visits + 1>
<cfquery name="UpdateLink" Datasource="#application.dsn#">
UPDATE Links
SET visits=#visits#
WHERE link_id=#url.id#
</cfquery>
<CFOUTPUT QUERY="GetLinks">
<html>
<head>
<meta http-equiv=refresh content="0;URL=#link#">
</head>
<center>
<table width=700>
<tr>
<td bgcolor=##000000>
<font color=##AAAA77 face=verdana,arial size=2>
If your browser does not support javascript page redirection, click <a href="#link#">here</a>.
</font>
</td>
</tr>
</table>
</center>
</html>
</CFOUTPUT>
</cfif>


then continue with the rest of the links page you got going

maquiladoras
12-16-2002 @ 8:31 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Moderator
Posts: 2073
Joined: Dec 2002

that code is wrong, thanks for whoever added testing.com to it, cos i made a very stupid mistake in the code. sorted it now

maquiladoras
12-17-2002 @ 6:17 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Moderator
Posts: 2073
Joined: Dec 2002

I've just posted a tutorial to pablo, so hopefully you'll have what you are looking for soon, you can get it now from

http://webdev.webleicester.co.uk/test/links/links.zip

the tutorial is in an RTF file in the zip file
hope it helps!! Smile

Webmaster
12-18-2002 @ 12:50 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Administrator
Posts: 4542
Joined: Jan 2002

Tutorial is accessible here:
http://tutorial69.easycfm.com

:)

Thanks,
Pablo Varando
EasyCFM.COM, LLC.

This message was edited by Webmaster on 12-18-02 @ 1:11 AM


Website Designed and Developed by Pablo Varando.