Skip to content

Commit

Permalink
News: Add support for minisprites
Browse files Browse the repository at this point in the history
  • Loading branch information
KrisXV committed Nov 24, 2024
1 parent e4c54ac commit e4f09d0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pokemonshowdown.com/news/manage.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ function saveNews() {
$summary = str_replace("[/url]", '</a>', $summary);
$summary = str_replace("[b]", '<strong>', $summary);
$summary = str_replace("[/b]", '</strong>', $summary);
$summary = preg_replace('/\[psicon (pokemon|item|type|category)="([^\]]+)"\]/', '<psicon $1="$2" />', $summary);
$summary = preg_replace('/\[psicon (pokemon|item|type|category)=([^\]]+)\]/', '<psicon $1="$2" />', $summary);
$summary = '<p>'.$summary.'</p>';

$newsCache[$topic_id]['summary_html'] = $summary;
Expand All @@ -88,6 +90,8 @@ function saveNews() {
$details = str_replace("[/url]", '</a>', $details);
$details = str_replace("[b]", '<strong>', $details);
$details = str_replace("[/b]", '</strong>', $details);
$details = preg_replace('/\[psicon (pokemon|item|type|category)="([^\]]+)"\]/', '<psicon $1="$2" />', $details);
$details = preg_replace('/\[psicon (pokemon|item|type|category)=([^\]]+)\]/', '<psicon $1="$2" />', $details);
$details = '<p>'.$details.'</p>';
$newsCache[$topic_id]['details_html'] = $details;
} else {
Expand Down

0 comments on commit e4f09d0

Please sign in to comment.