Make file html index more SEO friendly
This commit is contained in:
parent
6506969d1d
commit
45fc298440
@ -4,6 +4,9 @@
|
|||||||
Added some IPv6 configurations to the manual.
|
Added some IPv6 configurations to the manual.
|
||||||
Changed META description lines in 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
|
v0.95.12 22-May-2011
|
||||||
|
@ -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
|
* Purpose: File Database Maintenance - Build index for request processor
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2007
|
* Copyright (C) 1997-2011
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* 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 **);
|
||||||
void tidy_index(Findex **fap)
|
void tidy_index(Findex **fap)
|
||||||
@ -248,25 +231,28 @@ void pagelink(FILE *fa, char *Path, int inArea, int Current)
|
|||||||
FILE *newpage(char *, char *, time_t, int, int, FILE *);
|
FILE *newpage(char *, char *, time_t, int, int, FILE *);
|
||||||
FILE *newpage(char *Path, char *Name, time_t later, int inArea, int Current, FILE *fi)
|
FILE *newpage(char *Path, char *Name, time_t later, int inArea, int Current, FILE *fi)
|
||||||
{
|
{
|
||||||
char linebuf[1024], outbuf[1024];
|
char linebuf[1024], outbuf[1024];
|
||||||
static FILE* fa;
|
static FILE* fa;
|
||||||
|
|
||||||
lastfile = Current;
|
lastfile = Current;
|
||||||
if (Current)
|
if (Current)
|
||||||
snprintf(linebuf, 1024, "%s/index%d.temp", Path, Current / CFG.www_files_page);
|
snprintf(linebuf, 1024, "%s/index%d.temp", Path, Current / CFG.www_files_page);
|
||||||
else
|
else
|
||||||
snprintf(linebuf, 1024, "%s/index.temp", Path);
|
snprintf(linebuf, 1024, "%s/index.temp", Path);
|
||||||
if ((fa = fopen(linebuf, "w")) == NULL) {
|
if ((fa = fopen(linebuf, "w")) == NULL) {
|
||||||
WriteError("$Can't create %s", linebuf);
|
WriteError("$Can't create %s", linebuf);
|
||||||
} else {
|
} else {
|
||||||
snprintf(linebuf, 1024, "%s", Name);
|
if (Current)
|
||||||
html_massage(linebuf, outbuf, 1024);
|
snprintf(linebuf, 1024, "%s page %d", Name, (Current / CFG.www_files_page) + 1);
|
||||||
MacroVars("ab", "ss", rfcdate(later), outbuf);
|
else
|
||||||
pagelink(fa, Path, inArea, Current);
|
snprintf(linebuf, 1024, "%s", Name);
|
||||||
MacroRead(fi, fa);
|
html_massage(linebuf, outbuf, 1024);
|
||||||
return fa;
|
MacroVars("ab", "ss", rfcdate(later), outbuf);
|
||||||
}
|
pagelink(fa, Path, inArea, Current);
|
||||||
return NULL;
|
MacroRead(fi, fa);
|
||||||
|
return fa;
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user