Concurrent Development of PHP Standalone & Wordpress-plugin version. Possible? - php

I am trying to develop a specific PHP script and wanted to release it as both standalone and as Wordpress plugin. I wanted to generate the standalone and WP-plugin version from the same codebase if possible. Please pardon me if I come across as naive :-)
I wanted to know if anybody has ever tried or knows any guide on how to do this?
Please toss in your 2 cents.
I have searched high and low on the internet but there seems to be very limited information on this topic.
Thanks in advance for your insight!

Related

Tools for analyse code usage on production enviroment

I develop online shopping system. Currently it runs few hundreds different online stores (on different machines).The code base is developed as one release but each shop instance has own plugins and configuration to adjust system to their custom business needs. The system is being developed for 7 years and it became really big. Due to its age there is a lot of legacy code. I want to figure out which modules/classes are supposed to be deleted. The unnecessary code muddy the water.
I came up with an idea to build "super easy dynamic analysing code usage tool" based on file access time. I assumed that including file in PHP touches it some how. It would be extreamly easy to find out which part of code (whole classes) are not used for years. This woudn't need any libraries integration as xdebug and wouldn't cause any performance hit. Also we have access to historical data (filesystem). But I came accross some difficulties (Why does PHP include() not change file access time?)
Maybe I am inventing the wheel? Maybe there are existing solutions on the market to achieve my goals? I would apprecieate any suggestion. Thanks you in advance.

How do we start implementing HipHop for our web servers?

I want to use HipHop but I've got no idea how do I go about doing that. Does anyone know of any tutorials that teach us how to implement HipHop for our websites?
Is there alot of configuration to do or is it more like sort of a change a config file and everything just works sort of thing?
It appears that there are several examples in the documentation:
https://github.com/facebook/hiphop-php/wiki/Running-HipHop

What's the fastest way to get started with Kohana PHP framework?

I have been reading that Kohana is good for my project. So now I want to get started. My PHP knowledge is 2 years old and very limited now. But I am experienced with object oriented programming and other patterns, since I develop in Objective-C. I know a little bit about databases.
People told me the Kohana documentation is horribly poor. So, where do I start as a newcommer?
this might not be the best way but
1. i watched the 2 tutorial videos on the codeignitor framework and tried a small example
2. i switched to kohana and tried the same thing and haven't looked back
i am quite familiar with php, so your mileage may vary
You'll definately want to start from the Kohana 101 wiki.
You may find it here.
As mentioned by petsagouris, the 101 wiki is a good resource for seeing examples of how to use the framework. It's also worth reading the docs as well. Even though they aren't as good as CI's they still contain a lot of useful information.
However if you want to get the most from the framework I recommend you invest a couple of hours looking through the code of the classes that you use (e.g. Kohana, ORM and if you're feeling brave, Database).
The files are very well documented and the experience will help you solve problems more quickly as you will know how Kohana works, and where to look if something isn't quite working as you expected.
If you want to avoid the pain of setting up the initial environment, I have released a vagrant dev environment with a base checkout of Kohana 3.3.1. Jumping right into the code is usually the best way to go. Hopefully this helps.
Intro to Vagrant with Kohana and Zen Kommerce

PHP Newbie question - CMS / Templating

We're planning on setting up a website for student group - most of the content is fairly static but certain portions such as events and members would turn up from the database. I've never worked with PHP much, and was wondering would a CMS system like Drupal or PHP Nuke be appropriate for this kinda work?
Is there anything else that would allow me to go about creating a template and then reusing it across the website?
Drupal would be a very good choice for this. It has its learning curve, - anything you choose will. But eventually the light bulb will go off and you'll see how logically its organized and how flexible it is to extend.
And there are vast resources available to help you get up to speed quick. Tutorials and videos touching all angles of how Drupal works. And then there are uncountable quantity of themes, hundreds of add-on modules of every kind.
With a handful of additional modules added to the core distribution (cck certainly, maybe views and taxonomy too) you can configure basically everything and not ever touch a line of PHP code.
It is extremely simple to install and get started with. I have both Drupal 5 and 6 running under xampplite on a lil MSI netbook! .. Downoad and be up and running in under 15 mins.
You can try out all of the CMS available # http://php.opensourcecms.com.
I've never used PHP Nuke before, but Drupal can easily do the job.
Check out the Calendar module in Drupal for the event function.
Try out Joomla! works the best not just in content management but also theres extensions that you can use to allow users to book meetings and schedule events. Easy and simple.
Try out the +Joomla! instalation and hosting and just worrie about contents! They will put the rest working for you for super cheap price.
I recommend Joomla 1.5. It is easy to use and tons of resources on the web. Good for newbie.

How do I edit contacts from the front end in Joomla 1.5x?

I'd have thought this would be a native feature (seeing as joomla allows you to connect contacts with user accounts) but we can't find any way to do this!
Does anyone know of any extensions/modules that would allow this?
I'm not so hot on PHP so i'd really love to not have to code this by hand!
This is an old thread, but since it is still opened maybe you haven't found a solution yet. I faced the same problem myself and I think having the ability to manage contacts from the frontend is an essential feature for Joomla! to become more usable as a simple webapp creation tool.
Anyway, there are a couple of extensions that might help you out. However, both are commercial and don't support Joomla! 1.6. Here they are:
Front-edit address book: simple
interface. Note, however, that there
might be a security issue with
it. Google "front-edit address book exploits" and you shall find it (sorry, stackoverflow lets me post a max of 2 links per thread since I'm a new user). I emailed the developer and he assured me that the problem was already fixed, though.
Grumpy contacts: on the demo site (there's a link at the page I pointed you to), it looked a little messy to my taste. In the Joomla! Extensions Directory, however, it has good reviews.
I never used any of those since all my projects are already migrated to Joomla! 1.6.
If you found another alternative in the meantime or even developed something yourself, please let me know.
Do you try in the user menu?
Another option would be install Community Builder.
Good luck!
Contacts in Joomla are handled by the builtin com_contacts compoment which provides basic functionality for adding contacts and some basic info from the back-end.
QContacts is a wonderful extension which gives you some more control over the data you can provide, but still no front-end support.
Unfortunately I am tackling this issue as well and it turns out there are no real out-of-the-box options for supporting front-end editing of contact details.

Categories