User:Jtraulle/DiscourseMigration: Difference between revisions

m
no edit summary
Tag: 2017 source edit
mNo edit summary
Tag: 2017 source edit
Line 408: Line 408:
To download attachments from previous forum, start by export the URLs from the Kunena database.
To download attachments from previous forum, start by export the URLs from the Kunena database.


<source lang="SQL">
<syntaxhighlight lang="SQL">
SELECT CONCAT('https://www.dolibarr.fr/', folder, '/', filename) AS url FROM gvrsi_kunena_attachments ORDER BY id;
SELECT CONCAT('https://www.dolibarr.fr/', folder, '/', filename) AS url FROM gvrsi_kunena_attachments ORDER BY id;
</source>
</syntaxhighlight>


Put all the URLs into a text file (for example <code>uploads.txt</code>).
Put all the URLs into a text file (for example <code>uploads.txt</code>).
Line 416: Line 416:
Next, use <code>wget</code> to download all attachment preserving the directory structure (yuuup, file names of multiple distinct attachments can be the same ...)
Next, use <code>wget</code> to download all attachment preserving the directory structure (yuuup, file names of multiple distinct attachments can be the same ...)


<source lang="bash">
<syntaxhighlight lang="bash">
wget --no-host-directories --force-directories --input-file=uploads.txt
wget --no-host-directories --force-directories --input-file=uploads.txt
</source>
</syntaxhighlight>


===Permalinks===
===Permalinks===
Line 454: Line 454:
This code is to paste in the <code>Admin → Customize → Themes → Light → Edit CSS/HTML → Common → </head></code> section.
This code is to paste in the <code>Admin → Customize → Themes → Light → Edit CSS/HTML → Common → </head></code> section.


<source lang="HTML">
<syntaxhighlight lang="HTML">
<script type="text/javascript">
<script type="text/javascript">
var urlSplit = document.URL.split("#");
var urlSplit = document.URL.split("#");
Line 461: Line 461:
}
}
</script>
</script>
</source>
</syntaxhighlight>


===Ads===
===Ads===