Test meme rendering
This commit is contained in:
parent
9f1cfc2ed4
commit
6e824ffafd
@ -16,7 +16,7 @@ function addMeme(string $memeText, int $imageID): bool
|
|||||||
function renderMeme(string $title, string $textContent, string $createdAt, string $filePath, string $userNickname): string
|
function renderMeme(string $title, string $textContent, string $createdAt, string $filePath, string $userNickname): string
|
||||||
{
|
{
|
||||||
global $routerConfig;
|
global $routerConfig;
|
||||||
$meme_template = file_get_contents($routerConfig->template_dir . "meme.html");
|
$meme_template = file_get_contents($routerConfig['template_dir'] . "meme.html");
|
||||||
|
|
||||||
$meme_out = str_replace('__TEMPLATE_MEME_TITLE__', htmlspecialchars($title), $meme_template);
|
$meme_out = str_replace('__TEMPLATE_MEME_TITLE__', htmlspecialchars($title), $meme_template);
|
||||||
$meme_out = str_replace('__TEMPLATE_MEME_AUTHOR__', htmlspecialchars($userNickname), $meme_out);
|
$meme_out = str_replace('__TEMPLATE_MEME_AUTHOR__', htmlspecialchars($userNickname), $meme_out);
|
||||||
|
Loading…
Reference in New Issue
Block a user