Is it possible to somehow use CodeIgniter functionality inside Wordpress ?
I have this setup :
localhost
-myProject(CodeIgniter)
-Wordpress
-wp-content
-themese
-myTheme
Although most of the functionality of CodeIgniter app and the Wordpress blog are independent, yet there are certain statistics which I need to show on the header and sidebar all the pages be it app pages or the blog pages. These statistics come from a remote server's database and CodeIgniter is what I am using to connect and retrieve the database entries. At this stage of development, I can not change my blog software, so I need to find a way to use them in conjunction.
Related
I have been recently working on a new site for a small business named Stick'em Stickers.
Right now the site is set up so that the front end that the uses see is a static webpage. In the background I have a WordPress instance running that we use to load dynamic content onto our site.
For a better understanding, you can just visit the website here.
My problem is that any pages or content that is trying to load that are WordPress related, will not load correctly or all the way.
I have a wordpress site, foo.com. For various reasons, mainly caching, I need to move the wp-admin area to a subdomain admin.foo.com which is hosted on a separate server.
What's the best way to approach this, would a straight .htaccess rewirte work? I've seen that you can set WP_ADMIN_URL in wp-config.php but how do you separate the site in such a way that the amin sits on a different server than the rest of the site.
You can make use of two different installation of wordpress but the database will be same. One for staging and another for live
There isn't a way to separate the frontend and admin area of a Wordpress site onto two different servers. Wordpress is a web application. You get the whole thing as a package.
If you've seen something like this before, the site owner is doing one of two things:
They are running Wordpress on the admin site only, then using a plugin or some other technique to generate static HTML snapshots of the pages that form the public website.
They are using a staging site plus live site type architecture. Many of the new WP-specific hosting services include a staging site and a simple synchronization option.
I have a shop already developped as a Wordpress site. My company has another website based also on WP to which they want to transfer that shop.
How can I move my shop based on WooCommerce to a different WordPress installation? We want the second WP website to incorporate that shop in a sub-domain.
If the only integration you plan to do is access to the e-commerce subdomain from the main site, then you don't need to move anything. Just create the subdomain on your DNS administration panel (Route53, Cloudflare, etc) point it to where the site is, then change the site URL in the table wp_options.
Your main site can remain untouched, except for incorporating links to the ecommerce one.
You can export products and other information from old wordpress instance.
In the backend, Tools > Export > Wordpress. Choose products, posts and any other data you want to export.
On the new word press instance, you can import from Tools > Import. If you have Woocommerce installed in the new instance, the products will be imported with ease (along with images)
Hope this helps.
This might help you its a official WP walkthrough for moving a site with or without domain and URL change. Be sure to backup your db. Hope it helps.
http://codex.wordpress.org/Moving_WordPress#Moving_WordPress_Within_Your_Site
I am tasked with writing a relatively small and simple PHP web app which will use a small database. Authentication for this will be through randomly generated hex keys in the query string which are generated by an administration page and emailed to desired users.
This is all fine so far, but here's the catch:
For various political reasons, we are forced to make this app a Moodle module. I can use the Moodle database in MySQL, but I will be working with my own tables which do not interact with Moodle, and Moodle will not interact with my tables. I must also to use the Moodle database abstraction rather than direct PHP->MySQL access.
I do not want my users to know they are operating within Moodle. They shouldn't need to log in to Moodle to access my web app, and they probably won't have access to Moodle anyway. Those users who do have access to Moodle shouldn't see this web app in their list of Moodle functions.
I've thrown together a few small PHP pages, included some Moodle libs, and placed the code in the moodle/mods directory. Accessing the PHP pages on the server with the URLs directly result in a Moodle error, since I'm not accessing the module through proper channels. I get the "Incorrect access detected" error.
Is what I'm tasked to do even possible? If so, how is the best way to accomplish it? Do I need to write an authentication module and then an activity module? Is there any way to bypass all of Moodle's authentication and simply use the database abstraction without editing the core Moodle configuration files? (I know it's possible by modifying the Moodle code, but that is sadly not an option).
I have plenty of PHP experience, but I only have about 4 hours of Moodle experience and I'm getting nowhere fast.
It sounds to me that you might be trying to access the script while coming in from a host other than what poodle has specified in its config file. You could try dumping you http_host and noodles wwwroot to see if the line up. I'm less familiar with 2 than 1.9 but you might be able to define abort_after_config then include config then change the cfg wwwroot then define abort_after_config_cancel then include setup. Otherwise you could spoof the host otherwise you can delete the check in Tue lib/setup.pup file
Not sure quite what you are trying to achieve here but any of the following may work.
(1) If you have a stand-alone platform you want delivered within an LMS framework then you might offer a counter proposal of developing it in your preferred environment but wrapping it in LTI. Moodle can then deliver it via the External Tool plugin and you can get two-way communications between the two for authentication and tracking.
(2) Doing it in Moodle
Create an authentication with a login_hook and make sure this is is moved to the top of the authentication plugins list so that it is checked first before the others. Use the hook to process the hex key (as GET or POST parameter) or take you to an alternate process and return true (or create session). You could also use the 'alternative login page' in the authentication settings alongside this plugin hook. This should take of authentication.
If enrolment is not an issue then create your plugin as a local plugin (not mod) and use the above hook to redirect to this page after login. This gives you a bit more flexibility in the libraries you use and you can still use front-page enrolments if necessary as a workaround. If you really need enrolments, course roles, and gradebook then use a mod to leverage these. There is a single activity course format in the latest Moodle that gives you a format to run just your bespoke activity on its own.
Finally develop your own layout type in the theme for the local plugin if using that or for the course and incourse layouts if using courses so that you can control what of the standard Moodle navigation and structure you want.
If the plugin is sharing a Moodle already being used for other activities then you'll need to be sensitive to this. If you're just running your own thing then it will be much easier.
(3) Use Web Services to get what you want from Moodle in your own App.
I was working on a site of Cakephp which was successfully delivered.But recently Client again appered and asked me to put the Wordpress blog in it,to cover up the Blogging thing in his site.He wants to share the authentication between the Cakephp and WP.Whoever registers in his site,then Logins in it and if he clicks on the Blog Tab,he must be redirected to the WP blog with the session still there.After some googling I have installed it in /app/webroot/blog folder but I am not able to edit the .htaccess file.
Please help me in the right direction,that how to share the authentication betwenn Cake Php and Wordpress, and the second one how to customize the .htaccess file so that URL's look good.
Thanks in advance..!
Here is one way of doing it. In CakePHP you can have access to multiple databases. Why not configure cake to have access to WP and use their login on the entire website? You can link the user information to the ID in the WP database and tie it to the content in the CakePHP specific database. Since you are using CakePHP, this should actually be quite simple too.