What to use in place of EtherPad? Using php and mySql - php

I came across EtherPad but found out shortly afterwards that it has been shelved by Google.
Is there something else that I could use that allows people to collaborate on an online document? It must have version control.
Should I redevelop something instead?
Andre

Try Etherpad Lite, its much leighter than the original Etherpad

TypeWithMe is a slightly modified version of Etherpad. It's pretty darn good. Oh but, you need to view the document every once in a while or itll get wiped.

I'd recommend Google Docs. You can create new, upload existing, and collaborate online on files like documents, spreadsheets, presentations and drawings. Take a look at their Youtube page for a demonstration.

It seems like MobWrite http://code.google.com/p/google-mobwrite/ is a good solution. Just wish it had the versioning information etc that EtherPad had. Does anyone agree or have something better to embed in a PHP and mySQL website?

EtherPad is still available for buidling and deploying and it even have some seldom commits. If you want to use as an user, there are a few deployments of Etherpad (or perhaps modified versions of it) such as:
PiratePad
MoPad
Besides that, there is a quite comprehensive list of possibilities in this wikipedia entry for collaborative text editing software

Related

Using PHP, how can I identify, (decompress if applicable), and extract the files from .tar, .gz, .tar.gz, .zip files?

I know that \Phar and \PharData exist, but I'm having some trouble with the methods they supply so far. I'm still having to detect the mime-type / file type by whatever means, before determining which Phar*::method() to use in an attempt to extract the archive and do work on the files it contains.
Is there a go-to, "easy-button" class that I could include (maybe some package available via composer) that handles this at a very high level? Or am I failing to use the Phar and friends properly or in need of re-RTM so far?
Basically, I want to do the following (it's a CLI script that I control for now, so security, while important with this type of thing, is on the backburner for now):
Detect that a file might be an archive of some kind.
Validate that it seems to be one of the following: .tar, .gz, .tar.gz, or .zip.
If so, attempt to extract the archive and then parse the content of it's actual files.
Is there an "easy-button" for this that I'm unaware of, or do I need to build some logic that guesses as best it can as to what type of archive it might be, and then try to use the appropriate Phar* method to attempt to extract it's files and do whatever work I need to on them?
I hope that makes sense the way I wrote it. I'm trying to avoid re-inventing the wheel for a mini-project here if someone has already figured all of this out basically.
So, while continuing to research this I ended up seeing my own (this) SO question in google search results, which annoys me for some reason. So just in case someone stumbles upon this looking for a good solution, I've since found a couple by searching https://packagist.org/search/?q=archive (go figure):
Here's a few of them that seem promising.
wapmorgan/UnifiedArchive:
wapmorgan/UnifiedArchive (packagist)
wapmorgan/UnifiedArchive (github source)
Features (at first glance):
Only has one requirement of pear/archive_tar (which includes a few
more utility classes also from pear).
It attempts to detect the filetype for you, so it could eliminate the need to do that on your own.
alchemy/zippy:
alchemy/zippy (packagist)
alchemy-fr/Zippy (github source)
Features (at first glance):
Code looks to have been very well designed.
Seems to integrate with Laravel and guzzle\guzzle (the popular php http client) in some way so that might be an advantage for some.
zetacomponents/Archive
zetacomponents/Archive (packagist)
zetacomponents/Archive (github source)
Features (at first glance):
It seems to be a pure php implementation? If so that's just awesome.
Last updated 15 days ago, so it's the most active of the three I mentioned.
Seems to be maintained by an organization as opposed to a single person.
It has the most downloads by far on packagist (when searching for "archive"), and though I haven't played with it yet, that's usually a good sign.
Disclaimer: I have only actually tried wapmorgan/UnifiedArchive as of this writing, and so far it's exactly what I was looking for.
Anyway, I hope this helps anyone who might stumble upon this question.
If you don't need pure php and if your code is running on a linux machine, a
exec('uncompress [-cfv] [file...]');
or a
exec('unzip filename.zip -d destination');
will extract the file and make it usable for php.
Of course you need to check the extension (zip, tar, etc) in order to call the right command

How to copy a complete php/mysql website with php?

I have a typo3 website with no user genrated or dynamic content.
So it is unnecessary to use php and the database.
Is it possible (with php) to clone the hole website and store every page as an html page?
I have only a normal webspace, so i cant install tools like "eAccelerator".
My idea:
- grab every link from the sitemap
- file_get_contents -> store as html
But i think this is not a clean solution? Or?
Thanks in advance!
james
you can use a simple software called HTTRACK., here is the link:
httrack.com
Why you need to use php to copy it? Did you consider using a command line tool like wget? wget allows you to create an "offline" copy of a website which you can of course host somewhere else. Sounds to me exactly like the thing you want to do.
In case you are really stucked to php, you will need an HttpRequest, call the site, parse all links and resources, download the resources, follow the links and do the same again. This is the most simple solution, without any checking for conflicting resources or other stuff which could go wrong.
Sitesucker http://sitesucker.us is an excellent tool you can run from any mac. It works very well, I use it all the time.
But don't forget that by creating a static copy of your site, you will lose your templating functionality. So if you really want to make your website static, I strongly recommend to - at least - put the identical parts of each page into php-includes. Mostly head, page header, footer, navigation. So you're ready for future changes.
If it's just because your TYPO3 is too slow, look at the nc_staticfilecache extension which can speed it up very well.
Using TYPO3 where you need just a simple HTML is a huge overflow, invest in DreamWeaver and code all things 'manually'.

Library/tools in PHP for wiki-style diff and history

Background
I'm looking to create a wiki-style website.
First I took a look at http://en.wikipedia.org/wiki/List_of_wiki_software
Wanting to use PHP and being sceptic about using plain file storage the choice was lijited down to three alternatives:
Tiki Wiki CMS Groupware
PhpWiki
MediaWiki
Correct me if I'm wrong but all of these felt very heavyweight and pretty much overkill for a rather small project.
The question
My idea was then to use some kind of existing libraries and/or tools for the history, diff and markup parts but implementing the rest myself.
Do you know of any (good) libraries and/or tools like these?
Use an existing library like Markdown for marking up wiki text. Extend it if you have to. A diff algorithm for a wiki can be as trivial as you want it to be. First result on google for php diff showed an extremely simple algorithm that will probably get you started in the right direction.
PHP Diff Algorithm
PHP Markdown
Also don't forget about Github! There are all kinds of wiki projects written in PHP on there. Like this one!

Does a PHP library exist to work with PRC/.mobi files?

I'm writing a WordPress plugin to create an eBook from a selected category in most major eBook formats. I would like to support MobiPocket since that's the format used by the Kindle but I'm not sure how to go about it. From what I've read .mobi files are actually Palm Resource Databases (PRC) but I haven't been able to find a PHP class to work with these.
I thought about using exec along with KindleGen but that would be undesirable as it would complicate initial setup. I've also thought about hosting a web service somewhere and using XML-RPC to accomplish this but that also complicates things.
My question is: is there a PHP class/library (PHP-only preferred) that can work with PRC or even better, a class that specialises in creating MobiPocket ebooks? (needs to be open source since I'm releasing under the GPL)
I've tried searching but haven't been able to find anything.
I don't know whether you're still looking for this PHP library, but just in case: https://github.com/raiju/phpMobi. This is a library that creates mobi files from html files.
It's should still be seen as an experimental version, but it should work without a problem for basic document with a few images.
Unfortunately not; however, the binary compiled format is an open specification available at:
http://www.mobipocket.com/dev/article.asp?BaseFolder=prcgen
The only direct way of transforming the uncompiled format is using the native XML functionality of PHP to create them and then invoking a compiler with exec, which I understand you don't want to do. If you go with this route, the link above also has details about this XML format.
You might want to try the mobiperl tools,
https://dev.mobileread.com/trac/mobiperl/wiki
Please note I haven't tested them yet. But they have been
around since at least 2007 so they should work well by now.
google "Mobiperl - Perl tools for handling MobiPocket files" to
find a thread on mobileread board discussing it. As a new
poster I can't put 2 hyperlinks into my reply.
Another tool I have recently found (but not yet tested), is: http://www.phpclasses.org/package/8173-PHP-Generate-Kindle-ebook-file-in-mobi-format.html#files
It is based upon KindleGen, and looks pretty straight forward to implement.

Is there any sites where users share custom PHP code?

Do you know of any websites that allow users to share there custom PHP functions and code snippets other then? It would be nice to compile a list of a few good resources
http://www.phpclasses.org
Might be obvious to some, but don't forget to include http://pear.php.net/ in your list. ;-)
There is Snipplr.com - A public source code repository for sharing code snippets.
Back in the day when I built some PHP3 sites,
PHP Builder was the place to go. They are still live, but URL shows a number instead of domain name :)
http://63.236.73.209/snippet/
Hot Scripts is one of the biggest sites to my knowledge. There is commercial and free code (easily sortable).
And you should probably make this Community Wiki.

Categories