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 gkornbluth - January 19

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

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 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.