close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

PowerCMS path confusion new version

Thread began 3/28/2010 8:12 pm by admin140217 | Last modified 3/30/2010 8:09 pm by Eric Mittman | 1277 views | 8 replies |

admin140217

PowerCMS path confusion new version

Hi All,

I'm a little confused. I just updated to the latest PowerCMS version and the output path has changed when saving a new area.

Example:

I just inserted new information to a new page and the output PowerCMS is giving me to place into the site is

<?php
include('C:/xampp/htdocs/daddyshome/CMS/WA_CMS/addtosite.php');
echo WA_getCMSContent($database_localhost, $localhost, 'Home' , 'local_groups');
?>

Although this works locally, this is an absolute path and I thought PowerCMS wroked with reletive paths?

Previous output used to be:

<?php echo WA_getCMSContent($database_localhost, $localhost,"Links", "General_Links"); ?>

Can someone explain this to me?

Thanks

Sign in to reply to this post

neilo

What directory are your PowerCMS files and folders in on your remote site?

If it is in a folder called 'CMS' in the root of your remote site, then your WA_Globals.php would look like:

<?php
$WAGLOBAL_Site_Name = "Your Site Store Name" ;

$WAGLOBAL_localRoot = "/WA_CMS/"; //relative path to your PowerCMS files on your local testing server.
$WAGLOBAL_remoteRoot = "/CMS/"; //relative path to your PowerCMS files on your remote server.

// Admin Settings
$WAGLOBAL_Admin_UserName = "yourAdminName" ;
$WAGLOBAL_Admin_Password = "yourAdminPassword" ;
?>



On the WA_Globals.php file uploaded to your remote server, you may as well put your remote CMS folder name as both the $WAGLOBAL_localRoot and $WAGLOBAL_remoteRoot names.

The globals file is the same in Version 102 as it was in 101.

Sign in to reply to this post

admin140217

Neilo.

Right now the site is only local until I am done deveolping it and the CMS folder called "CMS" is in the root of the site directory...

/mysitedir/CMS/

I have both localroot and remoteroot set to this path currently.

Is this incorrect?

Thanks for the reply!

Sign in to reply to this post

neilo

Hi Admin,

No, not at all - if 'CMS' is in the root of both local and (eventually) remote sites, then that is spot-on.

Sign in to reply to this post

admin140217

Thanks Neilo,

I am still a little confused at the CMS output string and why it is in an absolute form instead of relative.

Are the relative paths only for setup purposes in the WA_Globals.php file only while the output string on the CMS is absolute?

Doesn't this mean that the path will need to be changed once everything including the database is uploaded?

Sign in to reply to this post

neilo

I'm absolutely the last person to be talking about this, but no, you shouldn't have to update the paths when you upload to the remote server.

The localroot and remoteroot globals are indeed relative to the site root, but that is (I think) determined by the (__FILE__) (and realpath) functions in the addtosite.php file.

When you use the same globals file on your remote server, it will also create an absolute path based on the realpath + (__FILE__) + global root values, so your include code will turn into something like:

<?php
include('/home/users/ukr86294/html/yoursite.co.uk/CMS/WA_CMS/addtosite.php');
echo WA_getCMSContent($database_localhost, $localhost, 'Home' , 'local_groups');
?>


depending on how your remote server paths are cofigured.

But hopefully an expert will add to that.

Sign in to reply to this post

Eric Mittman

When you view the cms pages in the admin area the code that you see to add it to a page will be specific to the server you are on. So if you upload this to your live server it should adjust the paths to work for your server without having to make any edits. I confirmed this with a test where I went from my local testing environment and uploaded to my live linux server, I just ported the db over and all was fine.

Sign in to reply to this post

admin140217

Neilo,

Thanks for your replies, I'm a novice when it comes to PHP and although I can work my way into understanding things, sometimes it's just to confusing.

Eric,

This is good to know, hopefully when I am ready to upload all this, I won't have an issue. Right now with the exception of one issue I'm having with viewing images in the CMS, everything is working as it should.

P.S. I already have a support ticket in for the image issue.

Sign in to reply to this post

Eric Mittman

Ok, if you have any other questions in the mean time let us know.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...