mirror of
https://github.com/kevachat/webapp.git
synced 2025-01-22 20:44:59 +00:00
add room name to meta title
This commit is contained in:
parent
01516f4423
commit
d96a55cb77
@ -53,11 +53,31 @@ class RoomController extends AbstractController
|
|||||||
$this->getParameter('app.kevacoin.password')
|
$this->getParameter('app.kevacoin.password')
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Set title
|
||||||
|
$name = $request->get('namespace');
|
||||||
|
|
||||||
|
foreach ((array) $client->kevaListNamespaces() as $namespace)
|
||||||
|
{
|
||||||
|
// Get current room namespace (could be third-party)
|
||||||
|
if ($namespace['namespaceId'] == $request->get('namespace'))
|
||||||
|
{
|
||||||
|
$name = $namespace['displayName'];
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Get room feed
|
// Get room feed
|
||||||
$feed = [];
|
$feed = [];
|
||||||
|
|
||||||
foreach ((array) $client->kevaFilter($request->get('namespace')) as $post)
|
foreach ((array) $client->kevaFilter($request->get('namespace')) as $post)
|
||||||
{
|
{
|
||||||
|
// Skip values with meta keys
|
||||||
|
if (false !== stripos($post['key'], '_KEVA_'))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Set identicon if not anonymous user
|
// Set identicon if not anonymous user
|
||||||
if ($post['key'] === 'anonymous')
|
if ($post['key'] === 'anonymous')
|
||||||
{
|
{
|
||||||
@ -84,12 +104,6 @@ class RoomController extends AbstractController
|
|||||||
$icon = $identicon->getImageDataUri('webp');
|
$icon = $identicon->getImageDataUri('webp');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Skip values with meta keys
|
|
||||||
if (false !== stripos($post['key'], '_KEVA_'))
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get more info
|
// Get more info
|
||||||
if ($transaction = $client->getRawTransaction($post['txid']))
|
if ($transaction = $client->getRawTransaction($post['txid']))
|
||||||
{
|
{
|
||||||
@ -126,6 +140,7 @@ class RoomController extends AbstractController
|
|||||||
return $this->render(
|
return $this->render(
|
||||||
'default/room/index.html.twig',
|
'default/room/index.html.twig',
|
||||||
[
|
[
|
||||||
|
'name' => $name,
|
||||||
'feed' => $feed,
|
'feed' => $feed,
|
||||||
'request' => $request
|
'request' => $request
|
||||||
]
|
]
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>{% block head_title %}{{ 'KevaChat' | trans }}{% endblock %}</title>
|
<title>{% block head_title_content %}{{ 'KevaChat' | trans }}{% endblock %}</title>
|
||||||
<link rel="stylesheet" type="text/css" href="/css/default.css?{{ app.version }}"/>
|
<link rel="stylesheet" type="text/css" href="/css/default.css?{{ app.version }}"/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{% extends 'default/layout.html.twig' %}
|
{% extends 'default/layout.html.twig' %}
|
||||||
|
{% block head_title_content %}{{ name }} - {{ 'KevaChat' | trans }}{% endblock %}
|
||||||
{% block main_content %}
|
{% block main_content %}
|
||||||
{{
|
{{
|
||||||
render(
|
render(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user