, Guest!
Already a Member? Login or Register.

Menu



Showcase


Due to the volume of spam happening on our forums, posting is now restricted to verified members only.  If you're not verified, drop us a note with your username.

Home > FlexCMS Support Forum > User Help > General Support Requests > Developing in domain subdir

FlexCMS Support Forum


Developing in domain subdir
Started February 25, 2005 @ 4:23pm by rvdc2005
Post Message 
rvdc2005


Posts: 17
 
Developing in domain subdirFebruary 25, 2005 @ 4:23pm
I currently set up FlexCMS in www.mydomain.com/flexcms. This allows me to develop the new website without interrupting the existing one.
When I'm ready to go online with FlexCMS, can I simply copy all files from the flexcms subdirectory to the domain root? Will everything work then, or should I use a different procedure?
 
otter
Administrator



Posts: 177
 
February 25, 2005 @ 4:29pm
Hi rvdc2005,

Yes you are on the right track!

However, first go into the site settings section and change the base url and images url to point to your root. And then click on the submit button. You'll get an error after doing that but that is okay.

Then move the files to root and it should be good to go!

Let us know if you have any other questions.

Otter


ONLINE TRAINING CLASSES FOR FLEXCMS IN MAY: FlexCMS Basics (101), Sat., May, 15, 2010 & FlexCMS Blocks (Mon., May 10, 2010).
 
Guest
 
CommentApril 19, 2005 @ 11:42am
This certainly works - but there are a couple of things I have found.

If you have PAGES with graphics you will have to either edit the database (phpadmin) to amend the URL or re-link the images on each page using the edit pages options.

Also if you are using photo gallery, it seems that the old URL for the uploaded images is retained and needs to be changed manually. This is in table pg-Settings.
 
DCSun
Administrator



Posts: 625
 
April 19, 2005 @ 4:25pm
Gordon:

Yes, unfortunately there are a few little things that get left behind. We hope to have an automated process for our next version that moves the files and cleans up the loose ends, so stay tuned for that.

In the meantime, there are a couple things we have that will help. The script below can be pasted into a new php-enabled page, update the first two lines to match your site, then run, and that will replace any of the old urls in the pages, blocks, and forum messages. As always, you should backup the database before running this just in case.


Code

$StringToFind = 'yourdomain.com/flex';
$ReplacementString = 'yourdomain.com';


// pages
$query = "select * from `".$Settings['DBPrefix']."core-Pages` where PageLink!='".$Arguments2."'";
$result = mysql_query($query) or die (mysql_error());
while ($row = mysql_fetch_array($result)) {
if (strpos($row['PageContents'],$StringToFind) !== false) {

$row['PageContents'] = str_replace($StringToFind,$ReplacementString,$row['PageContents']);

$PageReplacements++;

$query2 = "update `".$Settings['DBPrefix']."core-Pages` set PageContents='".addslashes($row['PageContents'])."' where RecordNumber='".$row['RecordNumber']."' limit 1";
$result2 = mysql_query($query2) or die (mysql_error());

}
}

// blocks
$query = "select * from `".$Settings['DBPrefix']."core-Blocks`";
$result = mysql_query($query) or die (mysql_error());
while ($row = mysql_fetch_array($result)) {
if (strpos($row['BlockContents'],$StringToFind) !== false) {

$row['BlockContents'] = str_replace($StringToFind,$ReplacementString,$row['BlockContents']);

$BlockReplacements++;

$query2 = "update `".$Settings['DBPrefix']."core-Blocks` set BlockContents='".addslashes($row['BlockContents'])."' where RecordNumber='".$row['RecordNumber']."' limit 1";
$result2 = mysql_query($query2) or die (mysql_error());

}
}

// forum messages
$query = "select * from `".$Settings['DBPrefix']."mb-Messages`";
$result = mysql_query($query) or die (mysql_error());
while ($row = mysql_fetch_array($result)) {
if (strpos($row['Message'],$StringToFind) !== false) {

$row['Message'] = str_replace($StringToFind,$ReplacementString,$row['Message']);

$ForumReplacements++;

$query2 = "update `".$Settings['DBPrefix']."mb-Messages` set Message='".addslashes($row['Message'])."' where RecordNumber='".$row['RecordNumber']."' limit 1";
$result2 = mysql_query($query2) or die (mysql_error());

}
}


print '<br><b>Search and Replace Complete.<br><br>Replacements:<br></b>Pages: '.$PageReplacements.'<br>Blocks: '.$BlockReplacements.'<br>Forum Posts: '.$ForumReplacements;



As for the photo gallery, yes that needs to be adjusted too, however you don't need to go into the database. You can find those settings in the 'Modify Photo & Gallery Preferences' link in the Control Panel.


David


FlexCMS v3.2 Has Been Released!
 

Last Edit: April 19, 2005 @ 4:27pm by DCSun
Guest
 
Great.April 20, 2005 @ 3:37am
Smashing little script.

I am learning a lot from studying the scripts posted in the various forums.

I agree that hacking the database can be rather dangerous - but it is also useful for the learning curve.

I have noticed various references in the forums to a new version. Any idea when and what it will contain ?

Keep up the good work.

The development of my new site - http://www.gbtamc.co.uk/amc2005 in case you are interested - is progressing well, and I hope to go "live" within the next week or so.

-- Admin Edit: Fixed URL
 

Last Edit: April 20, 2005 @ 4:59pm by DCSun
otter
Administrator



Posts: 177
 
April 20, 2005 @ 2:27pm
Thanks for the 'kudos' on our product!

We do not have a date for our next release at this time as we are busy gearing up for our first language pack (Dutch) release. We generally try to put a new release out every 3-6 months, so that's the best time frame I can give you for now. Just keep an eye on our forums for any updates.

Your site is coming together quite nicely!

otter


ONLINE TRAINING CLASSES FOR FLEXCMS IN MAY: FlexCMS Basics (101), Sat., May, 15, 2010 & FlexCMS Blocks (Mon., May 10, 2010).
 

Post Message 




Try & Buy FeedForAll - Easy to use RSS Feed Creator - great for iTunes users!

MEMBERS




All Contents, Code, Scripts and Technologies Copyright 2003-2009 FlexCMS.
All Rights Reserved. Software License Agreement

Processing Time: 0.07407 seconds.
 
Management Login

Powered By FlexCMS
Powered By FlexCMS