Images in a subdomain

8 posts by 3 authors in: Forums > CMS Builder
Last Post: January 27, 2021   (RSS)

Hi, All.

I've set up a site on a subdomain, with a separate CMSB install. However, the images that were added via CMSB aren't showing up on the live page.

This is the live page: http://stmarys.wilmotpost.ca/news/index.php

And this is the CMSB code:

<?php header('Content-type: text/html; charset=utf-8'); ?>
<?php
/* STEP 1: LOAD RECORDS - Copy this PHP code block near the TOP of your page */

// load viewer library
$libraryPath = 'cmsb/lib/viewer_functions.php';
$dirsToCheck = ['','../','../../','../../../','../../../../']; // add if needed: '/home/zl3wq8s6pz9q/public_html/stmarys.wilmotpost.ca/'
foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }

// load records from 'banner_ad_top'
list($banner_ad_topRecords, $banner_ad_topMetaData) = getRecords(array(
'tableName' => 'banner_ad_top',
'limit' => '1',
'loadUploads' => true,
'allowSearch' => false,
));

?>

===

<?php foreach ($banner_ad_topRecords as $record): ?>
<?php foreach ($record['artwork'] as $index => $upload): ?>
<img src="<?php echo htmlencode($upload['urlPath']) ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="">
<?php endforeach ?>
<?php endforeach ?>

===

Any suggestions, please?

Hi,

I see an image on that page (screenshot attached)

but I do get a MySQL Error on all other pages: Unknown column 'free_article' in 'where clause'

If the image in the screen shot is the one you're looking for, then try clearing your browser cache

Jerry Kornbluth

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
Attachments:

homepage1.jpg 105K

I guess I'm not totally understanding what you aren't seeing.

There's an ad for 'Sobeys', to the right of the words 'St Marys Independent', is there supposed to be another or a different one?

maybe a picture would clarify the prolem

BTW: there's another error message right above the image code in the page source code "Notice: Undefined index: web_address in /home/zl3wq8s6pz9q/public_html/stmarys.wilmotpost.ca/news/index.php on line 118"

Jerry

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

Well, that's weird. The ad shows up in Edge, but not Chrome. Might be an overzealous ad blocker.

Thanks for checking, Jerry. I think I can work my way through figuring this out now that I have a sense of direction.

Glad to help.

Jerry Kornbluth

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

By Jenna - January 27, 2021

Hi CommonSenseDesign,

Is this still an issue for you, or did you arrive at a solution?

Please let me know if you still need assistance.

Thanks!

Jenna Cooke - PHP Programmer
interactivetools.com

Hi, Jenna.

Thank you so much for checking in. It turns out that I was running an ad blocker in Chrome that was blocking elements of my own site! In other words, this was a local problem, rather than a global one.

Thanks again for asking.