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

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

Expand Messages
  • Michael Martin
    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
    Message 1 of 5 , Apr 17, 2006

      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;
      }




    • Brian Quinn
      Is there a way to delete a few days of data from the Webalizer.current file so i can re-run all the logs from that day till today? or do i have to just
      Message 2 of 5 , Apr 25, 2006
        Is there a way to delete a few days' of data from the Webalizer.current file so i can re-run all the logs from that day till today?  or do i have to just delete the file and run the whole month?

        Also, if i have to run the whole month, what is the easiest way to do that? i have 2 files per day (i rotate at midnight and noon) so they are in chronological order, but i wasn't sure if i can tell Webalizer to read them all like that or not. 

        I've always had them run once a day and never thought much about it, but one of the servers in our farm got replaced and when i did that it didn't run on that log cause my crontab was messed up and now there is a HUGE drop for that day (the 24th)


        Thanks

      • Bradford L. Barrett
        ... No. ... Yes. ... If they are named correctly, you can run the whole batch with something like the following: for i in ; do webalizer $i; done
        Message 3 of 5 , Apr 26, 2006
          > Is there a way to delete a few days' of data from the
          > Webalizer.current file so i can re-run all the logs from that day
          > till today?

          No.

          > or do i have to just delete the file and run the whole month?

          Yes.

          > Also, if i have to run the whole month, what is the easiest way to do
          > that? i have 2 files per day (i rotate at midnight and noon) so they
          > are in chronological order, but i wasn't sure if i can tell Webalizer
          > to read them all like that or not.

          If they are named correctly, you can run the whole batch with something
          like the following:

          for i in <match_string>; do webalizer $i; done

          Replace <match_string> with whatever matches the log files you wish
          to process.

          --
          Bradford L. Barrett brad@...
          A free electron in a sea of neutrons DoD#1750 KD4NAW

          The only thing Micro$oft has done for society, is make people
          believe that computers are inherently unreliable.
        Your message has been successfully submitted and would be delivered to recipients shortly.