Loading ...
Sorry, an error occurred while loading the content.

3508RE: [webalizer] Re: Customising the "AllReferrers" page?

Expand Messages
  • Michael Martin
    Apr 17, 2006
    • 0 Attachment

      Thanks for the reply Richard but, unfortunately, your instructions are for people who know what is behind the scenery.

      I’m not one of them.

      Given the expertise that is with you all could you not make the software package so that it can be configured to suit individual tastes?

      For me, and I guess, most users, the most important requirement is the page visited and the number of times.

      Regards,

      Michael

       

       


      From: webalizer@yahoogroups.com [mailto:webalizer@yahoogroups.com] On Behalf Of richard_laxton
      Sent: 17 April 2006 18:45
      To: webalizer@yahoogroups.com
      Subject: [webalizer] Re: Customising the "AllReferrers" page?

       

      --- In webalizer@yahoogroups.com, "richard_laxton"
      <richard_laxton@...> wrote:
      >
      > Hi,
      >
      > I want to make the URLs in the AllReferrers clickable - where do I
      need
      > to edit in the program source to change this?
      >
      > Cheers :)
      >

      After a lot of searching through code (damn I wish I actually knew C)
      I've found the pertinent bit and here it is:

      Edit output.c and replace the entire ALL_REFS_PAGE section on line
      1405 through to approx 1465 with the following. This will make your
      page one line shorter than it was!

      Hope its useful to someone :o)

      /*********************************************/
      /* ALL_REFS_PAGE - HTML page of all refs     */
      /*********************************************/

      int all_refs_page(u_long r_reg, u_long r_grp)
      {
         RNODEPTR rptr, *pointer;
         char     ref_fname[256], buffer[256];
         FILE     *out_fp;
         int      i=(r_grp)?1:0;

         /* generate file name */
         sprintf(ref_fname,"ref_%04d%02d.%s",cur_year,cur_month,html_ext);

         /* open file */
         if ( (out_fp=open_out_file(ref_fname))==NULL ) return 0;

         sprintf(buffer,"%s %d - %s",l_month[cur_month-
      1],cur_year,msg_h_ref);
         write_html_head(buffer, out_fp);

         fprintf(out_fp,"<FONT SIZE=\"-1\"></CENTER><TABLE BORDER=\"0\"
      CELLSPACING=\"0\" CELLPADDING=\"5\" STYLE=\"font-size:x-small;\">\n");

         fprintf(out_fp,"<TR><TD>%12s</TD><TD>&nbsp;</TD><TD>%
      s</TD></TR>\n",msg_h_hits,msg_h_ref);

         /* do groups first (if any) */
         pointer=r_array;
         while(r_grp)
         {
            rptr=*pointer++;
            if (rptr->flag == OBJ_GRP)
            {
               fprintf(out_fp,"<TR><TD ALIGN=\"left\">%-8lu</TD><TD
      ALIGN=\"right\">%6.02f%%</TD><TD><A HREF=\"%s\" TARGET=\"_blank\">%
      s</A></TD></TR>\n",
                  rptr->count,
                  (t_hit==0)?0:((float)rptr->count/t_hit)*100.0,rptr-
      >string,rptr->string);
               r_grp--;
            }
         }

         if (i) fprintf(out_fp,"\n");

         pointer=r_array;
         while(r_reg)
         {
            rptr=*pointer++;
            if (rptr->flag == OBJ_REG)
            {
               fprintf(out_fp,"<TR><TD ALIGN=\"left\">%-8lu</TD><TD
      ALIGN=\"right\">%6.02f%%</TD><TD><A HREF=\"%s\" TARGET=\"_blank\">%
      s</A></TD></TR>\n",
                  rptr->count,
                  (t_hit==0)?0:((float)rptr->count/t_hit)*100.0,rptr-
      >string,rptr->string);
               r_reg--;
            }
         }

         fprintf(out_fp,"</TABLE></FONT>\n");
         write_html_tail(out_fp);
         fclose(out_fp);
         return 1;
      }




    • Show all 5 messages in this topic