Re: programing question
- 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
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)
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!
--- 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...
> 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
> > 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
> > into French and English hits. Could this be done? Witch file
> > start with? I'm running Red Hat 7.1 and my site contains both
> > English pages.
> > Any help would be greatly appreciated as I am not the most
> > programmer but very willing to make it work.
> > Thanks in advance.
> > Dora
> > _________________________________________________________________
> > Get your FREE download of MSN Explorer at
> > 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
> Alejandro Fernandez
> Electronic Group Interactive
- On Mon, 15 Apr 2002 21:07:34 -0000
"dora_ca_2002" <Dora_Winifred@...> wrote:
>I'm not sure: you might want
> 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)
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.
Electronic Group Interactive