Images in a subdomain

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

By CommonSenseDesign - January 19

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?

By CommonSenseDesign - January 19

Hey, Jerry.

This site is based on another one I created (with help from IT - https://wilmotpost.ca/), but this new one doesn't have the same sections as the first. I haven't deleted all of the extra sections yet, hence the error message.

There should be a banner ad to the right of the logo (St Marys Independent), but it isn't showing up.

After I posted in this forum, I added a news article ("Haysville's Frances Westley..."), and that image appears, but not the banner ad, which is uploaded via a different section.

I have no idea why an image in one sections would show up, but not one from a different section.

By gkornbluth - January 19

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

By CommonSenseDesign - January 19

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.

By gkornbluth - January 19

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

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

By CommonSenseDesign - January 27

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.