Is there an update to the wiki tutorial for 1.1. I pretty much figured out everything, except that ereg_replace has been deprecated. I haven't figured out how to exchange it for preg_replace.
The code in the wiki example doesn't work with php 5.3. It's not actually in QCubed, it's in the wiki 1st example for translating WikiWords to a link. Probably there should be a separate wiki example (tutorial) for QCubed 1.1 with php 5.3. So, the problem isn't with QCubed so much as it's using a deprecated php function. It works fine with php 5.2.9-11.
Removal of ereg_replace is not a QCubed 1.1 thing. It's a PHP 5.3 thing - see details here and here.
Google "preg tutorial" to learn about perl regular expressions.
Thanks Alex. It was the leading and trailing slashes (/) that I didn't get before.
Basically, just change it from:
$contents = ereg_replace("( ){1}(([A-Z][a-z0-9]+){2,})", " \\2",
to:
$contents = preg_replace("/( ){1}(([A-Z][a-z0-9]+){2,})/", " \\2",
Thanks again!
Just to clarify: you had to make that change in your own code, not in QCubed framework code, right?
The code in the wiki example doesn't work with php 5.3. It's not actually in QCubed, it's in the wiki 1st example for translating WikiWords to a link. Probably there should be a separate wiki example (tutorial) for QCubed 1.1 with php 5.3. So, the problem isn't with QCubed so much as it's using a deprecated php function. It works fine with php 5.2.9-11.
Can you point me to the URL of the example that's broken? On http://examples.qcu.be?
Sure, it's in Building a Wiki, part1. Look for:
FindWikiWords
Got it! Makes sense. Feel free to make the edits yourself - it's a wiki! :)