Fixed thumbnail support
This commit is contained in:
parent
09e7cd8708
commit
fd1235d007
@ -6,6 +6,8 @@ v0.61.4 11-Aug-2004
|
|||||||
upgrade:
|
upgrade:
|
||||||
If you have BBBS uplinks and use automatic uplink requests then
|
If you have BBBS uplinks and use automatic uplink requests then
|
||||||
change the setup of these nodes in screen 7.10.
|
change the setup of these nodes in screen 7.10.
|
||||||
|
Run "mbfile check" and then "mbfile index". This fixes the
|
||||||
|
thumbnails if supported by your system.
|
||||||
|
|
||||||
libnodelist.a:
|
libnodelist.a:
|
||||||
Removed some debug logging.
|
Removed some debug logging.
|
||||||
@ -29,6 +31,12 @@ v0.61.4 11-Aug-2004
|
|||||||
mbfile:
|
mbfile:
|
||||||
The html index now uses html named character entities on the
|
The html index now uses html named character entities on the
|
||||||
area names on the main index page.
|
area names on the main index page.
|
||||||
|
With html index creation if the convert program for the
|
||||||
|
thumbnails failed, the html pages were wrong.
|
||||||
|
The thumbnails were created from the 8.3 name but the url was
|
||||||
|
created to the LFN. Depending on the settings of your apache
|
||||||
|
server you would see the thumbnails or not.
|
||||||
|
The check for wrong thumbnails changed from LFN to 8.3 names.
|
||||||
|
|
||||||
mbindex:
|
mbindex:
|
||||||
Fixed compiling pointlists where on the Boss line there is no
|
Fixed compiling pointlists where on the Boss line there is no
|
||||||
|
@ -430,12 +430,12 @@ void CheckArea(long Area)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* It could be that there is a thumbnail made of the LFN.
|
* It could be that there is a thumbnail made of the 8.3 filename
|
||||||
*/
|
*/
|
||||||
tname = calloc(PATH_MAX, sizeof(char));
|
tname = calloc(PATH_MAX, sizeof(char));
|
||||||
sprintf(tname, "%s/.%s", area.Path, fdb.LName);
|
sprintf(tname, "%s/.%s", area.Path, fdb.Name);
|
||||||
if (file_exist(tname, R_OK) == 0) {
|
if (file_exist(tname, R_OK) == 0) {
|
||||||
Syslog('+', "Removing thumbnail %s", tname);
|
Syslog('+', "Removing wrong 8.3 thumbnail %s", tname);
|
||||||
iErrors++;
|
iErrors++;
|
||||||
unlink(tname);
|
unlink(tname);
|
||||||
}
|
}
|
||||||
|
@ -499,7 +499,7 @@ void HtmlIndex(char *Lang)
|
|||||||
{
|
{
|
||||||
FILE *pAreas, *fa, *fb = NULL, *fm, *fi = NULL;
|
FILE *pAreas, *fa, *fb = NULL, *fm, *fi = NULL;
|
||||||
unsigned long i, iAreas, KSize = 0L, aSize = 0;
|
unsigned long i, iAreas, KSize = 0L, aSize = 0;
|
||||||
int AreaNr = 0, j, k, x = 0;
|
int AreaNr = 0, j, k, x = 0, isthumb;
|
||||||
int aTotal = 0, inArea = 0, filenr;
|
int aTotal = 0, inArea = 0, filenr;
|
||||||
char *sAreas, *fn;
|
char *sAreas, *fn;
|
||||||
char linebuf[1024], outbuf[1024], desc[6400], namebuf[1024];
|
char linebuf[1024], outbuf[1024], desc[6400], namebuf[1024];
|
||||||
@ -632,20 +632,30 @@ void HtmlIndex(char *Lang)
|
|||||||
* check if a thumbnail file exists. If not try to
|
* check if a thumbnail file exists. If not try to
|
||||||
* create a thumbnail file to add to the html listing.
|
* create a thumbnail file to add to the html listing.
|
||||||
*/
|
*/
|
||||||
|
isthumb = FALSE;
|
||||||
if (strstr(fdb.LName, ".gif") || strstr(fdb.LName, ".jpg") ||
|
if (strstr(fdb.LName, ".gif") || strstr(fdb.LName, ".jpg") ||
|
||||||
strstr(fdb.LName, ".GIF") || strstr(fdb.LName, ".JPG")) {
|
strstr(fdb.LName, ".GIF") || strstr(fdb.LName, ".JPG")) {
|
||||||
sprintf(linebuf, "%s/%s", area.Path, fdb.Name);
|
sprintf(linebuf, "%s/%s", area.Path, fdb.LName);
|
||||||
sprintf(outbuf, "%s/.%s", area.Path, fdb.Name);
|
sprintf(outbuf, "%s/.%s", area.Path, fdb.LName);
|
||||||
if (file_exist(outbuf, R_OK)) {
|
if (file_exist(outbuf, R_OK)) {
|
||||||
if ((j = execute_str(CFG.www_convert, linebuf, outbuf,
|
if (strlen(CFG.www_convert)) {
|
||||||
|
if ((execute_str(CFG.www_convert, linebuf, outbuf,
|
||||||
(char *)"/dev/null", (char *)"/dev/null", (char *)"/dev/null"))) {
|
(char *)"/dev/null", (char *)"/dev/null", (char *)"/dev/null"))) {
|
||||||
Syslog('+', "Failed to create thumbnail for %s, rc=% d", fdb.Name, j);
|
Syslog('+', "Failed to create thumbnail for %s", fdb.LName);
|
||||||
|
} else {
|
||||||
|
chmod(outbuf, 0644);
|
||||||
|
isthumb = TRUE;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
chmod(outbuf, 0644);
|
Syslog('+', "No convert program to create thumbnail %s", outbuf);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
isthumb = TRUE;
|
||||||
}
|
}
|
||||||
sprintf(outbuf, "%s/%s%s/%s", CFG.www_url, CFG.www_link2ftp,
|
}
|
||||||
area.Path+strlen(CFG.ftp_base), fdb.LName);
|
sprintf(outbuf, "%s/%s%s/%s", CFG.www_url, CFG.www_link2ftp,
|
||||||
|
area.Path+strlen(CFG.ftp_base), fdb.LName);
|
||||||
|
if (isthumb) {
|
||||||
sprintf(linebuf, "%s/%s%s/.%s", CFG.www_url, CFG.www_link2ftp,
|
sprintf(linebuf, "%s/%s%s/.%s", CFG.www_url, CFG.www_link2ftp,
|
||||||
area.Path+strlen(CFG.ftp_base), fdb.LName);
|
area.Path+strlen(CFG.ftp_base), fdb.LName);
|
||||||
MacroVars("fghi", "dsss", 1, outbuf, fdb.LName, linebuf);
|
MacroVars("fghi", "dsss", 1, outbuf, fdb.LName, linebuf);
|
||||||
|
Reference in New Issue
Block a user