Make file html index more SEO friendly

This commit is contained in:
Michiel Broek 2011-06-28 13:13:47 +02:00
parent 6506969d1d
commit 45fc298440
2 changed files with 25 additions and 36 deletions

View File

@ -4,6 +4,9 @@
Added some IPv6 configurations to the manual.
Changed META description lines in the manual.
mbfile:
Each html file index page now has an unique name to help
search engines.
v0.95.12 22-May-2011

View File

@ -1,10 +1,9 @@
/*****************************************************************************
*
* $Id: mbfindex.c,v 1.50 2007/02/26 21:02:31 mbse Exp $
* Purpose: File Database Maintenance - Build index for request processor
*
*****************************************************************************
* Copyright (C) 1997-2007
* Copyright (C) 1997-2011
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@ -64,22 +63,6 @@ static char *months[]= {(char *)"Jan",(char *)"Feb",(char *)"Mar",
/*
* Translate a string from ANSI to safe HTML characters
*/
/*
char *To_Html(char *);
char *To_Html(char *inp)
{
static char temp[1024];
memset(&temp, 0, sizeof(temp));
strncpy(temp, chartran(inp), sizeof(temp) -1);
return temp;
}
*/
void tidy_index(Findex **);
void tidy_index(Findex **fap)
@ -259,6 +242,9 @@ FILE *newpage(char *Path, char *Name, time_t later, int inArea, int Current, FIL
if ((fa = fopen(linebuf, "w")) == NULL) {
WriteError("$Can't create %s", linebuf);
} else {
if (Current)
snprintf(linebuf, 1024, "%s page %d", Name, (Current / CFG.www_files_page) + 1);
else
snprintf(linebuf, 1024, "%s", Name);
html_massage(linebuf, outbuf, 1024);
MacroVars("ab", "ss", rfcdate(later), outbuf);