Mobile and desktop web app with codeigniter - codeigniter

I want to build two versions of my project for mobile and desktop.
Am working codeigniter 2.0.2, am looking for a way for the mobile and desktop versions of the project to share the same model, controllers, libraries, and helpers.
Also i have set up a sub-domain,m.xyz.com to point to folder called "m" on public_html folder,
i want the the mobile to be in the "m" folder and share resources with the desktop app residing in root so i dont create duplicate models, controllers etc.

CodeIgniter allows you to specify the folder that you are loading your views from. Since you want to reuse all of your application code, simply set up CodeIgniter so that it is loading mobile optimized views rather than the default (desktop) views.
Copy the root index.php file into the /m/ folder that you created.
Update the $system_path and $application_folder variables in /m/index.php with the correct paths.
Update the $view_folder variable in /m/index.php with the path to your view folder containing your mobile optimized views.
You mobile site will now mirror your desktop site - it will just be pulling in different views.
Note that the structure of your mobile views folder will need to mirror the structure of your default views folder.
EDIT: The $view_folder option will not be available until version 2.1. Here is the code if you wish to make the change yourself:
https://github.com/EllisLab/CodeIgniter/commit/8eef9c77512d4fad5357d3cbda83b89f844d7d16

Related

Default class folder in Xamarin.Forms

What is the default class folder in Xamarin.Forms?
In web development solution there is App_Code folder, where should I use in Xamarin.Forms ?
You can organize your code however you like. You can place everything in the root folder, or create separate (even nested) folders. Xamarin Forms does not require any special folder structure.
I tend to use a structure like this, but this is solely my preference:
Root
- Model
- View
- ViewModel
- Service
- Data

Extjs projects binding at runtime

I have three different Extjs projects, all the three using MVC architecture. Out of these three one is going to be common to the other two projects. I would want the common project to be controlling and deciding which project to be loaded. But however I also want to separate the project codes and not have them binded together in a single project. is it possible ? if so how ?
Change:
In Simple Words how can i access few js files in extjs which is not inside the app folder.
We can use the Paths{} attribute inside Ext.loader to set a different path apart from the app path to access files outside app folder. The appFolder attribute of app.js is set to app by default. You can also change that to map a different app path. You can verify these in Sencha Docs.

How to upload images to kentico app themes folder

I have just started working for a new company and they have their website created using Kentico. There are images stored at the following location:
App_Themes/companyname/v3/content/call.gif" alt="call us">
How can I access the app themes folder from within Kentico CMS desk so that I can upload new images and replace them with a path similar to what is already there? I can not seem to locate the images already uploaded via the CMS desk
This was locked down to FTP only as I was using version 5.5.
The ~/App_Themes/ is an application folder which is located on the file server. In order to upload images to this folder you need to have access to the server where Kentico is running and manually put the files inside this folder. In Kentico 6 and higher you can manage the files in this folder in the UI in Site manager -> CSS stylesheets -> your stylesheet -> Theme, but this option is not available for version 5.5

My MVC3 app is adding "/Controllers/" folder to all my links

I've inherited an MVC3 .NET web app, which had all the controllers for the site in a separate project to the main web app. Not sure why this was the case. As it's a small app, I decided (for "neatness") to move the controller code back into the main web project, under the usual "Controllers" folder.
"Controllers" project folders:
Admin
Members
Config
Moved above code into main Web project under "Controllers" folder, ie:
Controllers
Admin
Members
Config
The problem now is, all the links generated by the code include "/Controllers/" in the path, assumedly because the controller code is now in a "Controllers" project folder. Is this a simple MVC issue to fix? Or would it likely be a flaw in code itself, in that it relies on where the code files run from to generate links?

Building CMS on top of CodeIgniter

Is it possible to build a CMS on top of CodeIgniter where the CMS files is separate from customization files? What I mean is, like CodeIgniter by default comes with 2 main folder, application and system folder. So, all your own files is placed in application folder so that next time you can easily update CodeIgniter by overriding the system folder and everything will still working fine.
So, can I store my files at custom folder?
E.g.:
system folder - codeigniter
my_system folder - CMS
application folder - All customization on each individual projects
You may use CodeIgniter's native application "Package", you can find the doc here : http://ellislab.com/codeigniter/user-guide/libraries/loader.html
You can store your file where you want expect system folder as you written. best approach is make folder on root named public or you want and put your file.
system folder contains everything codeigniter needs. application folder contains your specific code - it defaults to showing the welcome page.
consider naming your system folder with the codeigniter version number and date
makes it easier when you are upgrading
and you can easily switch to different versions directly from the index.php page by editing the file path to the folders

Resources