Best way to use CMS on PC site + mobi site

12 posts by 3 authors in: Forums > CMS Builder
Last Post: April 24, 2009   (RSS)

By Mel - April 16, 2009

Hi,

I am already running CMS on my .com site and want to make some of the data available on a .mobi site

I have the .mobi name registered as well but not sure what is the best course to follow

1. Would you design a standalone site using the .mobi extension and pull data form the existing database on the .com site

or

2. Would you add pages into a folder called for example ' mobile ' and add a link to the folder in the top left hand corner of the index.php page on the existing .com site as I am assuming the page structure below will work even if it is not on a .mobi domain?
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

If I plumped for the first option how would I call the data at the moment it would is like this

require_once "/home/mydomain/public_html/cmsAdmin/lib/viewer_functions.php";

would it then be something like this

require_once "http://mydomain/cmsAdmin/lib/viewer_functions.php";

Or would I have problems accessing the data using this method?

Your thoughts would be appreciated

Mel[:)]

Re: [mel] Best way to use CMS on PC site + mobi site

By ross - April 17, 2009

Hi Mel

I am in the same boat as Kenny. You could run into trouble trying to connect to your data if the two sites are on different servers. That's where we should probably start this one so the main questions for now are:

Are both your sites going to be running on the same web server? Is it a shared host? Will it be setup so the webroot folders for both sites are contained in the same folder like this:

/allMySites/theDotCom
/allMySites/theDotMobile

Let us know and we'll go from there.

Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [sagentic] Best way to use CMS on PC site + mobi site

By Mel - April 17, 2009

Not sure that I understand this reply

You will definitely have problems accessing the data that way


Do you mean that using the xhtml files in a separate folder on the same domain will be a problem

And yes both sites would be on the same server

Mel

Re: [mel] Best way to use CMS on PC site + mobi site

By Kenny - April 17, 2009 - edited: April 17, 2009

Mel,

This statement will not work:

require_once "http://mydomain/cmsAdmin/lib/viewer_functions.php";

Most servers have URL file access disabled so you cannot call from http://

If your sites are on the same server just use the regular statement. It should work, but some server configurations may disallow that,too.

require_once "/home/mydomain/public_html/cmsAdmin/lib/viewer_functions.php";

Let me know if you are going to have uploads or pictures and I will give you the workaround for displaying those on a different domain, as well.

Kenny

Re: [sagentic] Best way to use CMS on PC site + mobi site

By Mel - April 17, 2009

Reply to Ross & Kenny

Server is a dedicated server under my control not shared with any third parties

Both dotcom & dotmobile sites would be on the same server

the require statement for the dotcom site is presently

require_once "/home/mel123/public_html/cmsAdmin/lib/viewer_functions.php";

Note: have substituted mel123 in place of actual name

So are we saying on the dotmobile site I would use the exact same require statement

Yes I would be using images from the dotcom site

Also with regard to images I have a problem with displaying images on my testing server on my PC and will post a new question regarding this as it is not totally related

Thanks

Mel[:)]

Re: [mel] Best way to use CMS on PC site + mobi site

By Kenny - April 17, 2009

Mel,

Then you should have no problems. Use the require statement just as the code generator gives you on both sites - don't change a thing.

On the images & uploads, you will have to put a url in front of the echo statement on the .mobi site like this:

<img src="http://www.yourdomain.com<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" border="0" align="left" />

Kenny

Re: [sagentic] Best way to use CMS on PC site + mobi site

By Mel - April 17, 2009

Thanks for the reply Kenny

Looks like I am going to have a few interesting days next week

If you get a moment can you take a look at the question I have just posted on images not displaying on testing server as it is sort of also related to the new dotmobi site

Thanks

Mel[:)]

Re: [sagentic] Best way to use CMS on PC site + mobi site

By Mel - April 19, 2009

Mel,

Then you should have no problems. Use the require statement just as the code generator gives you on both sites - don't change a thing.

Kenny


Hi Kenny,

Ran a quick test using the dotcom site and another site that I use for testing both on the same server

When I have the require statement on the test page with the exact same coding that is on the master page on the dotcom site the page loads as a blank but no errors just a blank page and when the require statement is taken off then page loads but of course without any data

The only other option that I can see possibly working at the moment is not to actually use the dotmobi name and have a duplicate set of pages coded up with the correct doc type headers for a mobile in a separate folder on the main dotcom site

Do you have any other ideas?

Mel

Re: [mel] Best way to use CMS on PC site + mobi site

By ross - April 20, 2009

Hi Mel

This is going to be something we'll need to take a closer look at. Could you post a copy of the template for me?

Was there any way we can connect through FTP if you sent those details to me in an email?

Let me know and we'll do everything we can. Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/