jag provar just nu modden Single Quote Hack.
En enda enkel instruktion:
Funkar inte!#
#-----[ OPEN ]------------------------------------------------
#
posting.php
#
#-----[ FIND ]------------------------------------------------
#
$message = '';' . $quote_username . ' skrev:' . $message . '
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//----[START: Single Quote Mod by Jeremy Biffis]---------------------------------
//----[Add]----------------------------------------------------------------------
//This takes the text of the message to be quoted and searches to see if there is
//a quote within it. IF there is, then it eliminates the stuff between the start
//Quote and the end quote tags
$message_copy = $message;
$start_find = '[quote'; //The opening quote
$end_find = '[/ quote]'; //Closing Quote
$start_pos = strpos($message_copy, $start_find); //Find the start point of the first Quote - usually 0, but some people reply, then quote
$end_pos = strpos($message_copy, $end_find); //Start point of the end quote
//This replaces the stuff between and including the two quotes tags
if(!($start_pos===false) && !(end_pos===false)) {
$message_copy = substr_replace($message, '', $start_find, ($end_pos+strlen($end_find) ) );
}
//----[END: Single Quote Mod]-----------------------------------------------------
Varför inte?
Nu ser mitt $message ut så här:
Kod: Markera allt
$message = '[quote="' . $quote_username . '";p="' . $post_id . '"]' . $message . '[/quote]';
Koden som ska infogas ger ingen skillnad als, man får fortfarande t.ex. tre citat ihopsnörda.
/Holger