Keyword
Please note that official support for commercial extensions & templates is provided in the Subscriber Help Desk.
Support requests should ONLY be directed there and require an active subscription plan.
This forum board is to be used for archive purposes and knowledge exchange ONLY.

Disable auto labels.txt

More
13 years 7 months ago #40820 by DaveB
Disable auto labels.txt was created by DaveB
Is it possible to disable the automatic creation of labels.txt?

Not all galleries require captioning, and it's maddening to have 'Title' splashed across the thimbs of those that don't along with the text about html on the popup.

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #40821 by DaveB
Replied by DaveB on topic Re: Disable auto labels.txt
Don't worry. Unless I've done something majorly wrong, I think I've worked around it.

For anyone else, what I've done is, in sigpro.engine.php commented out the code

else {
if($showcaptions==2){
// Check if a captions file exists and if not write a new captions file and fill it with the image file list and content placeholders
$captionsfile = fopen($site_absolutepath.$srcimgfolder.$captionFile,'w');
foreach ($found as $filename) {
fwrite($captionsfile,"$filename|$captionDummyTitle|$captionDummyDesc\n");
}
fclose($captionsfile);
// Read the new file
$newcaptionsfile = file($site_absolutepath.$srcimgfolder.$captionFile);
foreach($newcaptionsfile as $caption){
$temp = explode("|",$caption);
if(isset($temp[0]) && file_exists($site_absolutepath.$srcimgfolder."/".$temp[0])) {
$captions[$site_absolutepath.$srcimgfolder."/".strtolower($temp[0])] = @ $temp[1];
$captions[$site_absolutepath.$srcimgfolder."/".strtolower($temp[0])] = @ $temp[2];
}
}
}
}

Seems to work. I expect there's a more elegant solution though.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum