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

Re: programing question

Expand Messages
  • dora_ca_2002
    Thank you for your reply MR. Fernandez. I do have different pages. Let s say I have an index_french and an index_english. So my site is already well
    Message 1 of 5 , Apr 15, 2002
    • 0 Attachment
      Thank you for your reply MR. Fernandez.

      I do have different pages. Let's say I have an index_french and an
      index_english. So my site is already well separated. From what you
      say, it seems possible to t_french the french pages and t_english the
      english pages.

      Am I right in thinking I could leave the original set up and add a
      new counter to calculate the french pages vs english ? (If I am
      right, tap yourself on the back because it is thanks to you)

      ex:
      ...
      t_page++; //line 1161 to keep track of total pages
      if (page hit is french) then t_french++;
      if (page hit is english) then t_english++;
      ...

      Once I figure out how to recognise the english VS french all I have
      to do is add
      /* update history */
      hist_f_page[i] = t_french
      hist_e_page[i] = t_english

      in output.c and fix the right fprintf?


      Again, thank you for your reply!

      Dora

      --- In webalizer@y..., Alejandro Fernandez <ale@e...> wrote:
      > Actually, the best place seems to be webalizer.c at line 1161: This
      is where the global variable t_page is incremented. You could put
      an "if page is english" bit here, and just increment your own
      t_english and t_french variables. Again, not sure how you want to
      tell wether the page is english or french...
      >
      > Ale
      >
      > On Fri, 12 Apr 2002 14:34:46 +0000
      > "DW Read" <Dora_Winifred@h...> wrote:
      >
      > > I'm from Montreal Canada and I would like to bring a special
      modification to
      > > the source code and I would like to know how to start.
      > >
      > > I want to modify the 'total pages' and 'visits' fields so I can
      divide them
      > > into French and English hits. Could this be done? Witch file
      should I
      > > start with? I'm running Red Hat 7.1 and my site contains both
      French and
      > > English pages.
      > >
      > > Any help would be greatly appreciated as I am not the most
      experienced
      > > programmer but very willing to make it work.
      > >
      > > Thanks in advance.
      > >
      > > Dora
      > >
      > >
      > > _________________________________________________________________
      > > Get your FREE download of MSN Explorer at
      http://explorer.msn.com/intl.asp.
      > >
      > >
      > >
      > > To unsubscribe from this group, send an email to:
      > > webalizer-unsubscribe@e...
      > > Webalizer homepage: http://www.webalizer.org
      > > Webalizer for NT: http://www.medasys-lille.com/webalizer/
      > >
      > >
      > >
      > >
      > > Your use of Yahoo! Groups is subject to
      http://docs.yahoo.com/info/terms/
      > >
      >
      >
      > --
      > Alejandro Fernandez
      > Electronic Group Interactive
      > --+34-65-232-8086--
    • Alejandro Fernandez
      On Mon, 15 Apr 2002 21:07:34 -0000 ... I m not sure: you might want Total Hits | 123 Total Files | 193 Total Pages | 93 Total Visits| 12 % in French | 20% %
      Message 2 of 5 , Apr 16, 2002
      • 0 Attachment
        On Mon, 15 Apr 2002 21:07:34 -0000
        "dora_ca_2002" <Dora_Winifred@...> wrote:
        >
        > Am I right in thinking I could leave the original set up and add a
        > new counter to calculate the french pages vs english ? (If I am
        > right, tap yourself on the back because it is thanks to you)
        >

        I'm not sure: you might want

        Total Hits | 123
        Total Files | 193
        Total Pages | 93
        Total Visits| 12
        % in French | 20%
        % in English| 80%

        In the "monthly statistics" table, and that's just one value - say french, which you then subtract from the total visits to get the percentage. I've not looked at how these little total values are stored, so there might be some extra work there in making it a global variable... So yes, I'd try it that way.

        Next problem will be the strings: You might get away with working on the log_rec struct and using strncmp creatively to figure out the language based on the url. Either that or you are in the land of pointers.

        Then there's the history: you not only have to add the output bit in output.c, but you need to go into preserve.c and add a bit to the functions there that read and write history info to disk between webalizer runs.

        Good luck, & let me know if you need more help.

        Ale


        --
        Alejandro Fernandez
        Electronic Group Interactive
        --+34-65-232-8086--
      Your message has been successfully submitted and would be delivered to recipients shortly.