wiki inside php application? - php

Is there any way to embed a wiki inside a PHP application? My specific use is inside a CakePHP framework app. I also need to be able to add custom tags. Anyone have an idea to which direction I should be taking?

I am not aware of a wiki plugin that is easy to integrate in a CakePHP project.
If I were you I would try to install this: http://bakery.cakephp.org/articles/adael/2011/08/27/adawiki2_an_easy_to_use_wiki_made_in_cakephp and integrate it within the original application.
EDIT
Pear wiki could be a solution.
You can see the following thread about the resolution of this issue: how to use Pear Text_wiki.

Related

How reuse custom code among projects using PHP natively?

I am not familiar with PHP and having a background in C#.
I would like to know if PHP offers a way to share custom code among projects natively in the language (targeting the latest version of PHP)?
As in C# there is the possibility to create a custom DLL, that can be included in other projects when needed in order to reuse some code.
Does PHP offer a similar feature?
Does PHP packages related on that?
Can PHP namespace be useful in this scenario?
What bout the use of include?
If PHP does not offer this support, which project/library can be used?
I understand there is the possibility to share common code from a versioning system such SVN and checkout sharedcode in each related project (as described in other answer on SO), but I am interested in the possibility in the language itself.
I think with phar archives and composer you get as close to assemblies and nuget as you can get.
You should try a php framework like Laravel or Zend Framework. If you don't want to try a framework, there are couple of ways.
You can create a class of functions and then you can include that class wherever you want in your scripts. This is a simplest example.
namespaces are your friends. I highly recommend yo to have a look at here for PHP and here for a PHP framework.
You can share code with composers packages, more on:
https://packagist.org/
https://getcomposer.org/

Using PHP, how can I determine which CMS or framework is used?

Using PHP, can I find out which CMS or framework is used on a particular website. Eg Wordpress, Magento or Codigniter, Laravel.
I've tried this approach: http://dailyblogging.org/internet/detect-cms-and-scripts-of-websites/
This is what I actually want, but in code form, not as an online service: http://onlinewebtool.com/cmsdetector.php This should be a PHP script that does not run as an online service.
What will it take to do this, or at least give me a hint?
Update 2018
Github repo moved:
https://github.com/AliasIO/Wappalyzer/blob/master/src/apps.json
There is a Chrome extension called Wappalyzer.
You can see some regexp which are included in the wappalyzer project for detecting servers, cms and frameworks.
Maybe you can include this and write a php script that uses this:
https://github.com/ElbertF/Wappalyzer/blob/master/share/apps.json
For Drupal, view source
And if you find
/sites/all
/sites/
For including image/javascript/css, its Drupal based site.
Same way, if you find wp_content, its wordpress.
For MVC ftameworks, its difficult to determine as url routing is same for all.

What is basic setting for create magento module?

I have been working on Magento for the last few months. I want to develop modules in Magento but my question is how can I start to develop for it?
1) What are some of the basic needs to create a module?
2) What type of xml files settings need to develop module and why?
If someone could also provide a diagram of the overall architecture of a Magento module, that would be great.
You can find here a nice tutorial: http://www.smashingmagazine.com/2012/03/01/basics-creating-magento-module/.
This one is nice also: http://code.tutsplus.com/tutorials/magento-custom-module-development--cms-20643.
There are a lot of resources like this online. If only there was a tool to search for them...
If you are a beginner, you can use a module creator.
You will use it even if you are an advanced magnento developer because you don't want to do the same thing over and over again.
I can recommend you this one: https://github.com/tzyganu/UMC1.9. It's pretty advanced and does a lot of stuff, not just a simple module.
Or this one. http://www.silksoftware.com/magento-module-creator/. This has the advantage of being on online and you don't have to install anything to use it.

php-maven repository is not available?

I am trying to build up project for php using php-maven using zend framework which has embedded jetty server.
Looked at various option on web but did not find anything useful.
With the lot of information available on web I tried configured php-maven but seems like php-maven (http://repo1.php-maven.org/release, http://repos.php-maven.org/release) repo is down. Can anyone provide any further information on this? Is php-maven out of development?
I followed few links but did not get anything out of it:
../php-zend-5min.html
I am looking for if there are any other way through which I can mavenized my php web project and run through embedded jetty? Including my php-unit tests.
Thanks in advance.

Is there any technique to use Yii within Wordpress?

I am familiar with WordPress environment and wp developement.
Now I want to extend my knowledge with YII framework of PHP and I am learning things over YII.
I want to know if any technique or trick exist to use YII within WordPress for theme and plugin development.
Looking for your answers :)
Yes, it's quite doable. Read my article about it here: http://www.yiiframework.com/wiki/322/integrating-wordpress-and-yii-still-another-approach-using-yii-as-the-router-controller/
Note: it isn't that straightforward, so if you are new to Yii it may get complicated fast. But feel free to ask on the forums and we'll see if we can get you going.
I'm also going to put up a base Yii/Wordpress setup on Github at some point. If you subscribe to that article, you should get a notice when I do.
Edit: GitHub repo here: https://github.com/acorncom/yii-wordpress-integration
Not easily. WordPress is not written using the Yii framework, and most of the tasks that Yii would implement (database abstraction, request routing, caching, etc.) are already handled by WordPress in totally incompatible ways.
As others have noted, it's possible to integrate the two, but it's an awkward fit. You may want to consider first whether it would make more sense to use either Yii or WordPress alone.
Yes. You can read Using Yii in 3rd-Party Systems section from the Definite guide to Yii for more information:
Yii can also be used as a self-contained library to support developing and enhancing existing 3rd-party systems, such as WordPress, Joomla, etc. To do so, include the following code in the bootstrap code of the 3rd-party system:
require_once('path/to/yii.php');
Yii::createWebApplication('path/to/config.php');
The above code is very similar to the bootstrap code used by a typical Yii application except one thing: it does not call the run() method after creating the Web application instance.

Categories