Scoop -- the swiss army chainsaw of content management
Front Page Everything News Code Help! Wishlist Project Scoop Sites Dev Notes Latest CVS changes Development Activities
Scoop Box Exchange - Show Box: Domain-Only Referer View 1.00

Author: envygreen [Info]


An update of janra's useful referer_view box. Just a minor Perl hack, this one snips the referring URL down to just the domain name part of the referer. It still links to the full referring URL, but can help clean up your referrer box when you're getting those 80 character long URL's. I also took out the UL and LI tags, preferring to put just my |dot| macro in at box entry time. But that's up to you. :)

Box Code:

## START referer_view ##
# This box displays the referer information
# collected by referer_catch. It requires a
# table called 'referer' in your database;
# please see the comments in referer_catch.

my $title = "External links in";
my $content = "";

my ($rv, $sth) = $S->db_select({
WHAT => '*',
FROM => 'referer',
ORDER_BY => 'hits DESC'

while ( my $referers = $sth->fetchrow_hashref ) {;

# now to format and print them
#foreach my $ref ( %$referers ) {
# my $url = $ref->{url};
# my $hits = $ref->{hits};
my $url = $referers->{url};
my $hits = $referers->{hits};
my $chopped_url = substr( $url, 7);
my $end_of_url = index ($chopped_url, "/" );
$chopped_url = substr ($chopped_url,0, $end_of_url);

if ( $url =~ /^-$/ ) {
$content .= qq{no referer ($hits)<br>};
} else {
$content .= qq{<A href="$url">$chopped_url</A> ($hits hits)<br>};

$content .= "<br>";
return $title, $content;

## END referer_view ##

Display: Sort:
Reader (none / 0) (#1)
by Lindsayack on Sat Feb 17, 2018 at 02:15:50 AM PST

Coding which we saw is the coding of the scoop box exchange.Hope this is the best coding and also have some easy tags for our essay service thinking.May be we just solve this and find some good note which is good for us.

Hi (none / 0) (#2)
by annajohnsn on Sat Apr 27, 2019 at 07:16:08 AM PST

Scoop is good to explore the information. As a student, is very helpful for me. engagement rings There are lots of sites, projects, notes, codes are available here. Also, they provide news, articles, etc's a great floor to learn many things. Thanks a lot for that.   

textual analysis essay (none / 0) (#4)
by alicehalls on Wed Jul 24, 2019 at 08:32:05 AM PST

Do not forget that the introductory part of the textual analysis paper bears the maximum significance. If you don't know how to write the best textual analysis, use a textual analysis essay example and write your essay by looking at it, so your analysis will be better rather if you were writing it alone.

create account
report bugs
Scoop Administrators Guide
Scoop Box Exchange

Scoop Site Scroller: Get one yourself!
Almost there...

Make a new account

Hosted by Powered by Scoop
All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest 1999 The Management

create account | faq | search