-
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"notifies-bing-when-you-created": "Underretter Bing om, hvornår du oprettede, ændrede eller slettede indhold fra dit websted.",
|
||||
"notifies-google-when-you-created": "Underretter Google om, hvornår du oprettede, ændrede eller slettede indhold fra dit websted.",
|
||||
"plugin-data": {
|
||||
"description": "Denne udvidelse genererer en sitemap.xml fil, der indeholder en liste over siderne på dit websted. Dette hjælper søgemaskiner med at organisere og filtrere indhold fra deres websted.",
|
||||
"name": "Sitemap"
|
||||
},
|
||||
"sitemap-url": "Sitemap URL"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"plugin-data": {
|
||||
"name": "Sitemap",
|
||||
"description": "Plugin, um eine Datei sitemap.xml mit einer Übersicht aller Seiten zu erstellen. Diese hilft Suchmaschinen dabei, den Aufbau und die Inhalte der Website zu erfassen."
|
||||
},
|
||||
"sitemap-url": "Sitemap-URL",
|
||||
"notifies-google-when-you-created": "Benachrichtigt Google, wenn Sie Inhalte auf Ihrer Website erstellt, geändert oder gelöscht haben.",
|
||||
"notifies-bing-when-you-created": "Benachrichtigt Bing, wenn Sie Inhalte auf Ihrer Website erstellt, geändert oder gelöscht haben."
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"plugin-data": {
|
||||
"name": "Sitemap",
|
||||
"description": "Plugin, um eine Datei sitemap.xml mit einer Übersicht aller Seiten zu erstellen. Diese hilft Suchmaschinen dabei, den Aufbau und die Inhalte der Website zu erfassen."
|
||||
},
|
||||
"sitemap-url": "Sitemap-URL",
|
||||
"notifies-google-when-you-created": "Benachrichtigt Google, wenn Sie Inhalte auf Ihrer Website erstellt, geändert oder gelöscht haben.",
|
||||
"notifies-bing-when-you-created": "Benachrichtigt Bing, wenn Sie Inhalte auf Ihrer Website erstellt, geändert oder gelöscht haben."
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Sitemap",
|
||||
"description": "This plugin generates a sitemap.xml file, which provides the list of pages on your website, this helps search engines organize and filter content from their website."
|
||||
},
|
||||
"sitemap-url": "Sitemap URL",
|
||||
"notifies-google-when-you-created": "Notifies Google when you created, modified or deleted content from your site.",
|
||||
"notifies-bing-when-you-created": "Notifies Bing when you created, modified or deleted content from your site."
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"plugin-data": {
|
||||
"name": "Sitemap",
|
||||
"description": "Este plugin genera un archivo sitemap.xml, el cual provee la lista de páginas de su sitio web, esto ayuda a los buscadores a organizar y filtrar contenido de su sitio web."
|
||||
},
|
||||
"sitemap-url": "URL del sitemap",
|
||||
"notifies-google-when-you-created": "Notifica a Google cuando creas, modificas o eliminas contenido de tu sitio.",
|
||||
"notifies-bing-when-you-created": "Notifica a Bing cuando creas, modificas o eliminas contenido de tu sitio."
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "نقشه سایت",
|
||||
"description": "این پلاگین یک فایل sitemap.xml تولید می کند، که لیستی از صفحات وبسایت شما را ارائه می کند، این پلاگین به موتورهای جستجو کمک میکند تا محتوای شما را سازماندهی و پالایش کند."
|
||||
},
|
||||
"sitemap-url": "آدرس وب نقشه سایت",
|
||||
"notifies-google-when-you-created": "اطلاع رسانی به Google هنگامی که شما محتوایی بر روی وبسایت خود ایجاد، ویرایش و یا حذف می کنید.",
|
||||
"notifies-bing-when-you-created": "اطلاع رسانی به Bing هنگامی که شما محتوایی بر روی وبسایت خود ایجاد، ویرایش و یا حذف می کنید."
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Plan du site",
|
||||
"description": "Ce plugin génère un fichier sitemap.xml, qui fournit la liste des pages de votre site, ce qui aide les moteurs de recherche à organiser et filtrer le contenu de votre site."
|
||||
},
|
||||
"sitemap-url": "URL de votre sitemap.",
|
||||
"notifies-google-when-you-created": "Notifie à Google lorsque vous avez créé, modifié ou supprimé du contenu sur votre site.",
|
||||
"notifies-bing-when-you-created": "Notifie Bing lorsque vous avez créé, modifié ou supprimé du contenu sur votre site."
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"plugin-data": {
|
||||
"name": "Sitemap",
|
||||
"description": "Questo plugin genera un file sitemap.xml, Che offre l'elenco delle pagine sul tuo sito web, questo aiuya i motori di ricerca ad organizzare e filtrare il contenuto del proprio sito web."
|
||||
},
|
||||
"sitemap-url": "URL sitemap",
|
||||
"notifies-google-when-you-created": "Notifica a Google quando crei, modifichi o elimini contenuti dal tuo sito.",
|
||||
"notifies-bing-when-you-created": "Notifica a Bing quando crei, modifichi o elimini contenuti dal tuo sito."
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Sitemap",
|
||||
"description": "This plugin generates a sitemap.xml file, which provides the list of pages on your website, this helps search engines organize and filter content from their website."
|
||||
},
|
||||
"sitemap-url": "Sitemap URL",
|
||||
"notifies-google-when-you-created": "Notifies Google when you created, modified or deleted content from your site.",
|
||||
"notifies-bing-when-you-created": "Notifies Bing when you created, modified or deleted content from your site."
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Sitemap",
|
||||
"description": "Deze plugin genereert het bestand sitemap.xml met daarin de structuur van deze website. Zoekmachines kunnen hiervan gebruikmaken bij het organiseren en filteren van de inhoud."
|
||||
},
|
||||
"sitemap-url": "URL sitemap",
|
||||
"notifies-google-when-you-created": "Stel Google op de hoogte bij het aanmaken, bewerken of verwijderen van inhoud op de website.",
|
||||
"notifies-bing-when-you-created": "Stel Bing op de hoogte bij het aanmaken, bewerken of verwijderen van inhoud op de website."
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"plugin-data": {
|
||||
"name": "Карта сайта",
|
||||
"description": "Этот плагин генерирует sitemap.xml где вы можете перечислить все страницы сайта для удобства индексирования содержимого поисковыми системами."
|
||||
},
|
||||
"sitemap-url": "URL карты сайта",
|
||||
"notifies-google-when-you-created": "Уведомляет Google, когда вы создали, изменили или удалили контент на своем сайте.",
|
||||
"notifies-bing-when-you-created": "Уведомляет Bing, когда вы создали, изменили или удалили контент на своем сайте."
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"plugin-data": {
|
||||
"name": "Site haritası",
|
||||
"description": "Bu eklenti, web sitenizdeki sayfaların listesini sağlayan bir sitemap.xml dosyası oluşturur. Bu, arama motorlarının web sitesindeki içeriği düzenleyip filtrelemesine yardımcı olur."
|
||||
},
|
||||
"sitemap-url": "Site haritası URL",
|
||||
"notifies-google-when-you-created": "Sitenizden içerik oluşturduğunuzda, değiştirdiğinizde veya sildiğinizde Google'ı bilgilendirir.",
|
||||
"notifies-bing-when-you-created": "Sitenizden içerik oluşturduğunuzda, değiştirdiğinizde veya sildiğinizde Bing'i bilgilendirir."
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"plugin-data": {
|
||||
"name": "Карта сайту",
|
||||
"description": "Цей плагін генерує файл sitemap.xml, де перераховані веб-сторінки вашого сайту, щоб повідомити пошукові системи про зміст сайту."
|
||||
},
|
||||
"sitemap-url": "URL карти сайту",
|
||||
"notifies-google-when-you-created": "Сповіщає Google, коли ви створили, змінили або видалили вміст на своєму сайті.",
|
||||
"notifies-bing-when-you-created": "Сповіщає Bing, коли ви створили, змінили або видалили вміст на своєму сайті."
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"author": "Bludit",
|
||||
"email": "",
|
||||
"website": "https://plugins.bludit.com",
|
||||
"version": "3.22.0",
|
||||
"releaseDate": "2026-05-10",
|
||||
"license": "MIT",
|
||||
"compatible": "3.22",
|
||||
"notes": ""
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
<?php
|
||||
|
||||
class pluginSitemap extends Plugin {
|
||||
|
||||
public function init()
|
||||
{
|
||||
$this->dbFields = array(
|
||||
'pingGoogle'=>false,
|
||||
'pingBing'=>false
|
||||
);
|
||||
}
|
||||
|
||||
// Method called on the settings of the plugin on the admin area
|
||||
public function form()
|
||||
{
|
||||
global $L;
|
||||
|
||||
$html = '<div class="alert alert-primary" role="alert">';
|
||||
$html .= $this->description();
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('Sitemap URL').'</label>';
|
||||
$html .= '<a href="'.Theme::sitemapUrl().'">'.Theme::sitemapUrl().'</a>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>Ping Google</label>';
|
||||
$html .= '<select name="pingGoogle">';
|
||||
$html .= '<option value="true" '.($this->getValue('pingGoogle')===true?'selected':'').'>'.$L->get('Enabled').'</option>';
|
||||
$html .= '<option value="false" '.($this->getValue('pingGoogle')===false?'selected':'').'>'.$L->get('Disabled').'</option>';
|
||||
$html .= '</select>';
|
||||
$html .= '<span class="tip">'.$L->get('notifies-google-when-you-created').'</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>Ping Bing</label>';
|
||||
$html .= '<select name="pingBing">';
|
||||
$html .= '<option value="true" '.($this->getValue('pingBing')===true?'selected':'').'>'.$L->get('Enabled').'</option>';
|
||||
$html .= '<option value="false" '.($this->getValue('pingBing')===false?'selected':'').'>'.$L->get('Disabled').'</option>';
|
||||
$html .= '</select>';
|
||||
$html .= '<span class="tip">'.$L->get('notifies-bing-when-you-created').'</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
private function createXML()
|
||||
{
|
||||
global $site;
|
||||
global $pages;
|
||||
|
||||
$xml = '<?xml version="1.0" encoding="UTF-8" ?>';
|
||||
$xml .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">';
|
||||
|
||||
$xml .= '<url>';
|
||||
$xml .= '<loc>'.$site->url().'</loc>';
|
||||
$xml .= '</url>';
|
||||
|
||||
$list = $pages->getList($pageNumber=1, $numberOfItems=-1, $published=true, $static=true, $sticky=true, $draft=false, $scheduled=false);
|
||||
foreach ($list as $pageKey) {
|
||||
try {
|
||||
// Create the page object from the page key
|
||||
$page = new Page($pageKey);
|
||||
if (!$page->noindex()) {
|
||||
$xml .= '<url>';
|
||||
$xml .= '<loc>'.$page->permalink().'</loc>';
|
||||
$xml .= '<lastmod>'.$page->date(SITEMAP_DATE_FORMAT).'</lastmod>';
|
||||
$xml .= '</url>';
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
// Continue
|
||||
}
|
||||
}
|
||||
|
||||
$xml .= '</urlset>';
|
||||
|
||||
// New DOM document
|
||||
$doc = new DOMDocument();
|
||||
$doc->formatOutput = true;
|
||||
$doc->loadXML($xml);
|
||||
return $doc->save($this->workspace().'sitemap.xml');
|
||||
}
|
||||
|
||||
private function ping()
|
||||
{
|
||||
if ($this->getValue('pingGoogle')) {
|
||||
$url = 'https://www.google.com/ping?sitemap='.Theme::sitemapUrl();
|
||||
TCP::http($url, 'GET', true, 3);
|
||||
}
|
||||
|
||||
if ($this->getValue('pingBing')) {
|
||||
$url = 'https://www.bing.com/ping?sitemap='.Theme::sitemapUrl();
|
||||
TCP::http($url, 'GET', true, 3);
|
||||
}
|
||||
}
|
||||
|
||||
public function install($position=0)
|
||||
{
|
||||
parent::install($position);
|
||||
return $this->createXML();
|
||||
}
|
||||
|
||||
public function post()
|
||||
{
|
||||
parent::post();
|
||||
return $this->createXML();
|
||||
}
|
||||
|
||||
public function afterPageCreate()
|
||||
{
|
||||
$this->createXML();
|
||||
$this->ping();
|
||||
}
|
||||
|
||||
public function afterPageModify()
|
||||
{
|
||||
$this->createXML();
|
||||
$this->ping();
|
||||
}
|
||||
|
||||
public function afterPageDelete()
|
||||
{
|
||||
$this->createXML();
|
||||
$this->ping();
|
||||
}
|
||||
|
||||
public function beforeAll()
|
||||
{
|
||||
$webhook = 'sitemap.xml';
|
||||
if( $this->webhook($webhook) ) {
|
||||
$sitemapFile = $this->workspace().'sitemap.xml';
|
||||
$sitemapSize = filesize($sitemapFile);
|
||||
|
||||
// Send XML header
|
||||
header('Content-type: text/xml');
|
||||
header('Content-length: '.$sitemapSize);
|
||||
|
||||
$doc = new DOMDocument();
|
||||
|
||||
// Load XML (external entity loading is disabled by default in PHP 8.0+)
|
||||
$doc->load($this->workspace().'sitemap.xml');
|
||||
|
||||
// Print the XML
|
||||
echo $doc->saveXML();
|
||||
|
||||
// Terminate the run successfully
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user