Move source code files to CodeIgniter folders - codeigniter

I am starting to work on some incomplete stuff in codeigniter. I had to install codeigniter on my machine. I have the source code files from the previous work, however I am confused how to move these files to CodeIgniter folder to access them as usual and start working on them.
I am not sure which files go to which folder in the CodeIgniter Folders available when downloaded.

Download and install Codeigniter on your machine first. Check out in which folders the controllers/models/views/configs reside.
Then you will have an idea which files reside where, if you still have some problems take a peek in the documentation.

CodeIgniter have and system a application folder.
I'd recommend a new download.
I doubt some change was made on system folder, so I think you can ignore it from your project and use the new downloaded one
The project is on the application and there you have some folders, as mentioned by gopi1410, that you need to take care, maybe there are libraries, models, controllers, configurations files, autoload, etc.
And tell us what it the version of you application. If it is a old version, there will be some problem using the new version system folder.

Related

How can I manually update Joomla core files without overwriting third-party extensions?

When you install Joomla extensions, they may put files into the Components, Modules, Plugins, Media, Images, and possibly other directories. Also, they may save configuration information in some or all of these directories.
In other words, Joomla does not have a clean separation of Core, Third Party, and Local files. This makes it impossible to manually overwrite a Joomla installation, because you don't want to stomp on any of these files. (Coming from Drupal, this is craaazy-not-best-practice!)
Is there a way to manually update JUST the Joomla core files?
Is there a way to manually update JUST the 3rd-Party extension files? (Yeah, they might be all over the place!)
I'm presently cleaning up a bunch of sites infected with a base64_decode hack. Mixing core files with 3rd-Party with configuration, makes it very difficult to clean things up.
There is nothing wrong with the process of installing extension in Joomla. Each type of extension is separated as it should be to make life easier, not harder. Core files are not to be touched in any way, shape or form, so it simply does not matter of core components are in the same directory as 3rd party component (same goes for modules and plugins).
As for you question regarding manually updating core Joomla files, you can simply :
download a copy of the same Joomla version you're using from the official site,
remove the configuration.php file and "installation" folder from the zip
Upload the zip to the root of your site and extract.
This will replace all core files.
To update 3rd party extensions, all you have to do is download the extension from the developer's site and install it again. You do not have to uninstall them first.
The hacked sites you are cleaning up were most likely hacked due to the owner or webmaster not keeping Joomla itself and it's extension update to date.
You see, not that hard :)
Hope everything works out.

deploying an open source code igniter application

If i've built a web app using code igniter, what's the proper way to deploy it? Should my install only include my files, or do I also package all the codeigniter code with it?
I'm just entering into the world of open source so I'm not so sure what protocol is.
Thanks.
This is a good question and I've seen it done both ways. There's definitely reasons Not to include the CI files. Like any potential in the future license changes. And it seems like with the projects that are shared by more experienced developers that is how they do it.
Because if you are sharing your project for other CI developers, then the reality is they will not use the copy of CI you include - they will fold your files into their version of CI. So including JUST the files needed for your app - actually makes much it easier. Its certainly what I would prefer. Just keep the standard application folder structure: config controllers models etc. but only include the folders that you have files for. And make it clear what version of CI you have tested it on. If you can say it will work on the release version (not the beta) then people on PHP 5.2 will know they can use it.
Of course you need to include all the CodeIgniter files, or else how would it run?
Most people tend to rename the application and system files and place them outside of the web root for security reasons. "After moving them, open your main index.php file and set the $system_folder and $application_folder variables, preferably with a full path, e.g. '/www/MyUser/system'".

Linking files one solution to another solution is not working-- ASp.net MVC3

I am working on ASP.MVC3 project. I created a base project where I will have all common files / pages like Master Page, Global.asax, Web.Config, Script files, CSS files, and images. And I have another solution which will contain module related stuff and I am linking common files / pages from first solution with “Add As Link” (Add  Existing Item  Add As Link ) option (I am working with VS.net 2010 IDE).
After linking all the files are coming into second solution and looking fine.
But when I run, the application is not running. Getting the message enable debut which already there.
when i clilck OK i am getting the error “the operation could not be completed. Unexpected error” (i think its expecting the physical file in the second solution location only).
After some R & D I placed the web config and global.asax directly (which is normal) in the second solution then the application started running. The same case for images / css / script files.
Please let us know the issue what we are doing wrong or is there any other way to share/link files from another solution.
Thanks in Advance.
You're probably better off doing it the other way around - create a website project and link your libraries / base classes to your project by adding a reference to them. This way you add all your images, css files etc direct into the website.
That's the more usual way of doing it in my experience, hope it helps.
The reason it doesn't work is because the linked files aren't copied to your working directory. To make your solution work you simply publish it to some other folder and it would re-create the site with copies of all linked files. There's no need to re-organize your solution as it would deploy all linked files once you publish it.

Where to put content, in Installer project (WiX) or in code project

So I see two solutions to my current problem, but I was wondering what the pros and cons are, or if there is a defacto best practices approach.
So my current project has a number of configuration files, help files, and other external content. I need this content local to run and debug the application. Currently we duplicate this content in a standard windows installer project. This clearly is a bad idea. We are moving to a new setup that uses the WiX installer, and I'm currently setting the project up next to the code project and trying to figure the best way to share resources. I see two solutions.
One is that I can put all the resources in the WiX project and then add them as links in the code project. This way I know what I'm debugging is installer.
The other option would be to leave the content in the code project and path into it in the installer using the reference variables.
Right now it seems 6 one way, half dozen the other. Any persuasive arguments for either method?
Assuming that these configuration and help files are going to be installed in the same directory as the executables then definitely put them in the code project, mark them as Content, and add a reference to the code project to the installer project. If you're using WiX 3.5 the files will be automatically included in the installer along with the executables, which makes writing simple installers much easier.
For earlier versions of WiX or more complex deployment scenarios (where the content files could be going into different directories) you would still put them in the code project but then you'd use File elements with a relative path or reference variable in the Source attribute to include the the content files from the code project directory.
I don't believe that putting the content files in the WiX installer project directory instead of the code project directory will do anything to ensure that the version you use to debug will be the same as the version installed. That can only be ensured by thinking through the process of how your application finds these content files and making sure the right versions are found.
So going back to the simple case where the content is in the code project and marked as Content, and it will be installed and loaded from the same directory as the executables, then it is only a matter of setting "Copy to Output Directory" to "Copy always" or "Copy if newer" and then you can be sure the versions used in debugging and the version installed will match.

external libraries in codeigniter

I have my directory structure set up as follows:
application
controllers
models
libraries
views
etc
library
codeigniter_1_7_2
codeigniter_1_7_1
public_html
images
scripts
This has worked well for me, and I like having the codeigniter "master" files off in their own library. A quick switch in the index.php file and I can swap between different versions.
One thing that I WANT to do is when using something from Zend (like the search/lucene class) is to put the Zend directory under the main "library" folder. It's recommended that it go in my application/libraries folder, but then often when I search for a piece of code in my application I get a huge set of results from the large Zend library that I have to scroll through. It also really doesn't belong there given how I've set up my directory structure.
My problem is that if I try and put zend in the /library folder, I have to use php's require_once (I assume) and then I get permission errors.
If the zend library is at /application/libraries/Zend, this works:
$this->load->library('zend', 'Zend/Search/Lucene');
$this->load->library('zend');
$this->zend->load('Zend/Search/Lucene');
If the zend library is at /library/Zend this does NOT work:
require_once('../library/Zend');
The directory route is correct there, I just get a "permission denied" error.
Has someone else had this problem or figured out a nice easy way to set up their external libraries similar to how I'd like to do it?

Resources