Gossamer Forum
Home : Products : Links 2.0 : Customization :

New MOD : Banners on the top on vising links.

Quote Reply
New MOD : Banners on the top on vising links.
Hi,
Heres a MOD that I just made. It putsup banners or any header when a visitor visits a link just like how it works on ask.com. The top frame will be your banner/header and the bottom frame will contain the actually webpage. This wont annoy your visitors because you can put a "Remove Frame" link in your header. This MOD works perfectly as tested, you can see how it works at : http://www.siteskool.com/

Now here are a few simple steps to install this MOD.
First there are actually 3 frames used in this MOD, there are 2 header frames, one on the top and a very small frame just below it containing the text "Remove Frames" and all the other stuff. Dont worry about all that, you can copy the HTML for that directly from here and use it on your site. Here goes, backup jump.cgi so you can get back to your normal ways if you fail to install this MOD.

Open jump.cgi in a text editor (like notepad).

STEP 1 : Search for this text

sub main {
# --------------------------------------------------------
my %in = &parse_form();
my ($goto, $id, $delim, $time);

$id = $in{$db_key};
$delim = quotemeta($db_delim);
$time = time();

and replace it with

sub main {
# --------------------------------------------------------
my %in = &parse_form();

$linksmenu = $in{'linksmenu'};
$id = $in{$db_key};
$delim = quotemeta($db_delim);
$time = time();

----------
STEP 2 : Now search for the text

# Now let's send the user to the url..
$goto ?
print "Location: $goto\n\n" :
&error ("Record not found ($in{$db_key})");

and replace it with

# Print the Links Menu in the frames..
if ($linksmenu == 1) { &linksmenu; exit; }

# Now let's send the user to the url..
$goto ?
print "<HTML><HEAD><TITLE>Visiting a link</title></HEAD><FRAMESET ROWS=\"21%,4%,75%\" frameborder=0 framespacing=0 border=0><NOFRAME>This site uses Frames but your browser doesn't support it.<a href=\"$goto\">Click here</a> to see a non-frame version of this site</NOFRAME><FRAME NAME=\"header\" SRC=\"http://www.yoursite.com/header.shtml\" scrolling=\"no\" noresize><FRAME NAME=\"linksmenu\" SRC=\"/cgi/links/jump.cgi?ID=$id&linksmenu=1\" marginheight=0 marginwidth=0 scrolling=\"no\" noresize><FRAME NAME=\"website\" SRC=\"$goto\" noresize></FRAMESET></HTML>" :
&error ("Record not found ($in{$db_key})");

That code contains all the HTML for the main frame when a visitor clicks on a link. Just remember to replace http://www.yoursite.com/header.shtml with the URL of the header file that should be in the top most frame above the links. ALL THE CODE ABOVE STARTING WITH "print" SHOULD BE ON ONE LINE!

--------------
STEP 3 : Now add the following text possibly preferably just above "sub error" :

sub linksmenu {
print<<EndHTML;
<HTML>
<HEAD>
<TITLE>Links Menu</TITLE>
</HEAD>
<BODY>

<center>
<font face="verdana,arial" size=2><a href="/sites" target="_parent"><<< Back to Links</a></font>

<font face="verdana,arial" size=2><a href="http://www.yoursite.com/cgi/links/rate.cgi?ID=$id" target="_parent">Rate this Link</a></font>

<font face="verdana,arial" size=2><a href="$goto" target="_parent">Remove Frames</a></font>
</center>

</BODY>
</HTML>
EndHTML
}

That contains the HTML of the the second small frame that contains the text "Rate this Link", "Remove frames" etc.

Now make sure that you customized the HTML according to your site's design and that you uploaded header.shtml.
Thats it! Upload jump.cgi replacing the orignal one in ASCII and 755 permission. Do a test and see how it worked out.

If you like this MOD, want to give any suggestions to improve it or need any support with this MOD, Email me at : joel@siteskool.com

Joel.

Quote Reply
Re: New MOD : Banners on the top on vising links. In reply to
This MOD has been done before...

Search this forum for frameset...

Regards,

Eliot Lee
Quote Reply
Re: New MOD : Banners on the top on vising links. In reply to
But it is slightly different, cant they accept this MOD as an alternative?

Joel.

Quote Reply
Re: New MOD : Banners on the top on vising links. In reply to
Yes anyone is free to make any mod they want.

If you want to make a mod and make it available and add it to the resource center then go ahead. You don't need permission.


Installs:http://wiredon.net/gt
FAQ:http://www.perlmad.com

Quote Reply
Re: New MOD : Banners on the top on vising links. In reply to
Yea, people could "accept" your MOD as an alternative. However, the semantics of your Thread title are incorrect. It is not necessarily a "NEW MOD", much like others that have been posted in the forum recently...they are "ENHANCED MODS" OR "ALTERNATIVE MODS", but not new...

And you could also use SUBROUTINE calls in the site_html_templates.pl file in your "MOD" and then use templates with GLOBAL tags rather than raw HTML code that you would have to edit all the time.

Regards,

Eliot Lee
Quote Reply
Re: New MOD : Banners on the top on vising links. In reply to
You could use print qq| |; instead of print "" so you don't have to escape every " like \"

Nice mod though overall!

Simple but effective.


Installs:http://wiredon.net/gt
FAQ:http://www.perlmad.com

Quote Reply
Re: [joey_thedude] New MOD : Banners on the top on vising links. In reply to
Does anyone know if it would be possible to add to this mod to include an add to favourites/bookmark button in the top frame which will actually bookmark the jump.cgi?ID=xxx rather than the url of the linked site so that in future when the bookmark/favourite is selected the link site jump.cgi will always be used again and record another visit?