Well, I'm embarrassed, and a bit confused.
I rewrote the _website_init so that it was 1 block of php code, changed the placement of the if (!$CURRENT_USER) { websiteLogin_redirectToLogin(); } and everything seems to work.
The confusing part is that I use the same _website_init file on many of my sites and never seemed to have the same issue.
Oh well, better go back and check all the other sites again...
I've not used the shorthand code below before, and just to be on the safe side, could you tell me if I've formatted it correctly?
Thanks,
Jerry
list($faqRecords, $faqMetaData) = getRecords(array(
'tableName' => 'faq',
'loadUploads' => true,
'allowSearch' => false,
));
$masterurl = $common_informationRecord['master_url'];
if ($image_libraryRecord['image_1']){
foreach ($image_libraryRecord['image_1'] as $index => $upload):
$image1 = $upload['thumbUrlPath2'];
endforeach;}
if ($image_libraryRecord['image_2']){
foreach ($image_libraryRecord['image_2'] as $index => $upload):
$image2 = $upload['thumbUrlPath2'];
endforeach;}
if ($image_libraryRecord['image_3']){
foreach ($image_libraryRecord['image_3'] as $index => $upload):
$image3 = $upload['thumbUrlPath2'];
endforeach;}
if ($image_libraryRecord['image_4']){
foreach ($image_libraryRecord['image_4'] as $index => $upload):
$image4 = $upload['thumbUrlPath2'];
endforeach;}
if ($image_libraryRecord['image_5']){
foreach ($image_libraryRecord['image_5'] as $index => $upload):
$image5 = $upload['thumbUrlPath2'];
endforeach;}
if ($image_libraryRecord['image_6']){foreach ($image_libraryRecord['image_6'] as $index => $upload):
$image6 = $upload['thumbUrlPath2'];
endforeach;}
if ($image_libraryRecord['image_7']){
foreach ($image_libraryRecord['image_7'] as $index => $upload):
$image7 = $upload['thumbUrlPath2'] ?><?php endforeach;}
if ($image_libraryRecord['image_8']){foreach ($image_libraryRecord['image_8'] as $index => $upload):
$image8 = $upload['thumbUrlPath2'];
endforeach;}
if ($image_libraryRecord['image_9']){ foreach ($image_libraryRecord['image_9'] as $index => $upload):
$image9 = $upload['thumbUrlPath2'];
endforeach;}
if ($image_libraryRecord['image_10']){foreach ($image_libraryRecord['image_10'] as $index => $upload):
$image10 = $upload['thumbUrlPath2'];
endforeach;}
if ($image_libraryRecord['image_11']){ foreach ($image_libraryRecord['image_11'] as $index => $upload):
$image11 = $upload['thumbUrlPath2'];
endforeach;}
if ($image_libraryRecord['image_12']){
foreach ($image_libraryRecord['image_12'] as $index => $upload):
$image12 = $upload['thumbUrlPath2'];
endforeach;}
$placeHolders = array("*img1*", "*img2*", "*img3*", "*img4*", "*img5*", "*img6*", "*img7*", "*img8*", "*img9*", "*img10*", "*img11*", "*img12*");
$replaceWith = array(@$image1, @$image2, @$image3, @$image4, @$image5, @$image6, @$image7, @$image8, @$image9, @$image10, @$image11, @$image12 ); ?>
The first CMS Builder reference book is now available on-line!
Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php