Not every PHP/MySQL hosting provider will be able to support Friendica.
Many will.
-But **please** review the [requirements](#1_2_1) and confirm these with your hosting provider prior to installation.
+But **please** review the [requirements](#Requirements) and confirm these with your hosting provider prior to installation.
## Support
If you encounter installation issues, please let us know via the [helper](http://forum.friendi.ca/profile/helpers) or the [developer](https://forum.friendi.ca/profile/developers) forum or [file an issue](https://github.com/friendica/friendica/issues).
Friendica needs the permission to create and delete fields and tables in its own database.
-Please check the [troubleshooting](#1_6) section if running on MySQL 5.7.17 or newer.
+Please check the [troubleshooting](#Troubleshooting) section if running on MySQL 5.7.17 or newer.
### Option A: Run the installer
$lastLevel = 1;
$idNum = [0, 0, 0, 0, 0, 0, 0];
foreach ($lines as &$line) {
- if (substr($line, 0, 2) == "<h") {
- $level = substr($line, 2, 1);
- if ($level != "r") {
- $level = intval($level);
+ $matches = [];
+ foreach ($lines as &$line) {
+ if (preg_match('#<h([1-6])>([^<]+?)</h\1>#i', $line, $matches)) {
+ $level = $matches[1];
+ $anchor = urlencode($matches[2]);
if ($level < $lastLevel) {
for ($k = $level; $k < $lastLevel; $k++) {
$toc .= "</ul></li>";
}
$idNum[$level] ++;
+
+ $href = $a->getBaseURL() . "/help/{$filename}#{$anchor}";
+ $toc .= "<li><a href=\"{$href}\">" . strip_tags($line) . "</a></li>";
$id = implode("_", array_slice($idNum, 1, $level));
- $href = $a->getBaseURL() . "/help/{$filename}#{$id}";
- $toc .= "<li><a href='{$href}'>" . strip_tags($line) . "</a></li>";
- $line = "<a name='{$id}'></a>" . $line;
+ $line = "<a name=\"{$id}\"></a>" . $line;
+ $line = "<a name=\"{$anchor}\"></a>" . $line;
+
$lastLevel = $level;
}
}