From e4f09d0a079d1b2e6e5aed7eb364941d8245a911 Mon Sep 17 00:00:00 2001
From: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
Date: Sat, 23 Nov 2024 21:12:51 -0700
Subject: [PATCH] News: Add support for minisprites
---
pokemonshowdown.com/news/manage.php | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/pokemonshowdown.com/news/manage.php b/pokemonshowdown.com/news/manage.php
index 883b875068..8e11e0b222 100644
--- a/pokemonshowdown.com/news/manage.php
+++ b/pokemonshowdown.com/news/manage.php
@@ -69,6 +69,8 @@ function saveNews() {
$summary = str_replace("[/url]", '', $summary);
$summary = str_replace("[b]", '', $summary);
$summary = str_replace("[/b]", '', $summary);
+ $summary = preg_replace('/\[psicon (pokemon|item|type|category)="([^\]]+)"\]/', '
'.$summary.'
'; $newsCache[$topic_id]['summary_html'] = $summary; @@ -88,6 +90,8 @@ function saveNews() { $details = str_replace("[/url]", '', $details); $details = str_replace("[b]", '', $details); $details = str_replace("[/b]", '', $details); + $details = preg_replace('/\[psicon (pokemon|item|type|category)="([^\]]+)"\]/', ''.$details.'
'; $newsCache[$topic_id]['details_html'] = $details; } else {