preg_replace_callback('/"'.preg_quote($scripturl, '/').'\?topic=([0-9]*).*?"/e', $buffer, $temp_topics, PREG_PATTERN_ORDER);
$topic_pattern = $boardurl . '/{B_NAME}{TOPIC_SUBJECT}-t{TOPIC_ID}.{TREST}.html{OTHER}';
if (isset($temp_topics))
{
$temp_topics = array_unique($temp_topics[1]);
foreach ($temp_topics as $index => $value)
{
$temp_topics[$index] = (int) $value;
if ($value == 0)
unset($temp_topics[$index]);
}
}
if (!empty($temp_topics))
{
$request = $smcFunc['db_query']('', '
SELECT m.id_topic, m.id_board, m.subject' . ((!empty($modSettings['seo4smf_topic_board'])) ? ',b.name' : '') . '
FROM {db_prefix}topics as t
LEFT JOIN {db_prefix}messages AS m ON (m.id_msg = t.id_first_msg)
' . ((!empty($modSettings['seo4smf_topic_board'])) ? 'LEFT JOIN {db_prefix}boards AS b ON (t.id_board = b.id_board)' : '') . '
WHERE t.id_topic IN ({array_int:topics_array})',
array
(
'topics_array' => $temp_topics,
)
);
temp_topics
what name did this code take
I can't find that, so if the code is from a mod you'd have to ask in the appropriate support topic
Quote from: Diego Andrés on February 10, 2022, 03:03:32 PMI can't find that, so if the code is from a mod you'd have to ask in the appropriate support topic
php 8 gives an error, the main source of error
preg_match_all('/"'.preg_quote($scripturl, '/').'\?topic=([0-9]*).*?"/e', $buffer, $temp_topics, PREG_PATTERN_ORDER);
preg_match_all this is incompatible with php 8
preg_match_all is not deprecated ???
Quote from: Replikacep on February 10, 2022, 03:09:41 PMpreg_match_all this is incompatible with php 8
Compatible with PHP 4 - PHP 8
https://www.php.net/manual/en/function.preg-match-all.php
Yes, but the /e part has been deprecated since PHP 5.5. The whole thing needs a rewrite to use preg_replace_callback.
I'm with Diego... Can't find that in 2.1. Maybe a mod?
I could find 2 mods with seo4smf in the name but they are deleted from the modsite.
Perhaps you should use a more recent alternative, such as Optimus mod?
They were deleted from the mod site because they had major security flaws.
In any case, PMing me to do free work I didn't agree to do just guarantees I won't touch it.
Quote from: Diego Andrés on February 10, 2022, 03:25:43 PMI could find 2 mods with seo4smf in the name but they are deleted from the modsite.
Perhaps you should use a more recent alternative, such as Optimus mod?
mod gives error in 1 place only
should i change for this
2: preg_match_all(): The /e modifier is no longer supported, use preg_replace_callback instead
Quote from: Arantor on February 10, 2022, 03:28:29 PMThey were deleted from the mod site because they had major security flaws.
In any case, PMing me to do free work I didn't agree to do just guarantees I won't touch it.
:laugh: ok
You should use a mod with current support
Quote from: Kindred on February 10, 2022, 08:13:38 PMYou should use a mod with current support
Is there a mod that translates links and has a sitemap?
https://custom.simplemachines.org/index.php?mod=2659