Pagina 1 van 1
> 20 en wijzigingen search.php
Geplaatst: 09 apr 2006, 12:05
door The Sting
Hallo All,
Heb de upgrade naar 20 gedaan, maar de wijzigingen in de search.php lukten niet echt. Kan dit aan de mod "keep unread flags" liggen en hebben meer mensen dit ondervonden die deze mod ingemod hebben?.
Code: Selecteer alles
MOD Title: keep unread flags
##
## MOD Author: Ptirhiik < ptirhiik@clanmckeen.com > (Pierre) http://rpgnet.clanmckeen.com
## MOD Author, Secondary: Merlin Sythove < N/A > (N/A) N/A
## MOD Author, Secondary: asinshesq < N/A > (N/A) N/A
##
## MOD Description: This mod keeps the unread flags for a topic active until the topic is read.
## It also activates the new post feature for guests.
Geplaatst: 09 apr 2006, 15:06
door Paul
Wat lukt er niet aan?
Geplaatst: 09 apr 2006, 15:20
door The Sting
paul schreef:Wat lukt er niet aan?
Code: Selecteer alles
#-----[ FIND ]---------------------------------------------
# Line 214
if (preg_match('#^[\*%]+$#', trim($search_author)) || preg_match('#^[^\*]{1,2}$#', str_replace(array('*', '%'), '', trim($search_author))))
{
$search_author = '';
}
$search_author = str_replace('*', '%', trim($search_author));
#
#-----[ REPLACE WITH ]---------------------------------------------
#
$search_author = str_replace('*', '%', trim($search_author));
if( ( strpos($search_author, '%') !== false ) && ( strlen(str_replace('%', '', $search_author)) < 3 ) )
{
$search_author = '';
}
#
#-----[ FIND ]---------------------------------------------
# Line 437
if (preg_match('#^[\*%]+$#', trim($search_author)) || preg_match('#^[^\*]{1,2}$#', str_replace(array('*', '%'), '', trim($search_author))))
{
$search_author = '';
}
$search_author = str_replace('*', '%', trim(str_replace("\'", "''", $search_author)));
#
#-----[ REPLACE WITH ]---------------------------------------------
#
$search_author = str_replace('*', '%', trim($search_author));
if( ( strpos($search_author, '%') !== false ) && ( strlen(str_replace('%', '', $search_author)) < 3 ) )
{
$search_author = '';
}
#
#-----[ FIND ]---------------------------------------------
# Line 646
// Finish building query (for all combinations)
// and run it ...
//
$sql = "SELECT session_id
FROM " . SESSIONS_TABLE;
if ( $result = $db->sql_query($sql) )
{
$delete_search_ids = array();
while( $row = $db->sql_fetchrow($result) )
{
$delete_search_ids[] = "'" . $row['session_id'] . "'";
}
if ( count($delete_search_ids) )
{
$sql = "DELETE FROM " . SEARCH_TABLE . "
WHERE session_id NOT IN (" . implode(", ", $delete_search_ids) . ")";
if ( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete old search id sessions', '', __LINE__, __FILE__, $sql);
}
}
#
#-----[ REPLACE WITH ]---------------------------------------------
#
// Delete old data from the search result table
//
$sql = 'DELETE FROM ' . SEARCH_TABLE . '
WHERE search_time < ' . ($current_time - (int) $board_config['session_length']);
if ( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete old search id sessions', '', __LINE__, __FILE__, $sql);
Geplaatst: 19 apr 2006, 10:07
door maico
Op een nieuwe install loop ik ook vast met de
search.php de laatste versie is van 2.0.19.
het heeft iets met de flood funtie te maken die in de 2.0.20 zit schijnbaar

mijn engels is niet wat het zou moeten zijn
Maar hier hebben ze het er ook over maar kom daar niet echt aan uit.
Heb die manieren ook geprobeerd maar lukt nog niet.
http://www.phpbb.com/phpBB/viewtopic.ph ... 58#2082858
Wie heeft er de oplossing?
Was op de site van de mod schrijver maar dat is frans

Geplaatst: 19 apr 2006, 18:00
door Trunks81
Welke versie van keep the unreasds flag heb je gedownload ?
Geplaatst: 19 apr 2006, 18:26
door maico
Uit het eerste bericht uit de bovenstaande link
Download File: keep_unread_version_2-0-3c.zip
geupdated voor 2.0.19 dus
Geplaatst: 19 apr 2006, 18:46
door Trunks81
en dit werkt ook niet bij jouw ?
Code: Selecteer alles
a) change the part of keep unread that says this:
Code:
#
#-----[ FIND ]------------------------------------------------
#
if (preg_match('#^[\*%]+$#', trim($search_author)) || preg_match('#^[^\*]{1,2}$#', str_replace(array('*', '%'), '', trim($search_author))))
{
$search_author = '';
}
$search_author = str_replace('*', '%', trim($search_author));
#
#-----[ REPLACE WITH ]------------------------------------------------
#
$search_author = str_replace('*', '%', trim($search_author));
so that it instead says this:
Code:
#
#-----[ FIND ]------------------------------------------------
#
$search_author = str_replace('*', '%', trim($search_author));
if( ( strpos($search_author, '%') !== false ) && ( strlen(str_replace('%', '', $search_author)) < 3 ) )
{
$search_author = '';
}
#
#-----[ REPLACE WITH ]------------------------------------------------
#
$search_author = str_replace('*', '%', trim($search_author));
and (b) change the part of keep unread that says this:
Code:
#
#-----[ FIND ]------------------------------------------------
#
if (preg_match('#^[\*%]+$#', trim($search_author)) || preg_match('#^[^\*]{1,2}$#', str_replace(array('*', '%'), '', trim($search_author))))
{
$search_author = '';
}
$search_author = str_replace('*', '%', trim(str_replace("\'", "''", $search_author)));
#
#-----[ REPLACE WITH ]------------------------------------------------
#
$search_author = str_replace('*', '%', trim(str_replace("\'", "''", $search_author)));
so that it instead says this:
Code:
#
#-----[ FIND ]------------------------------------------------
#
$search_author = str_replace('*', '%', trim($search_author));
if( ( strpos($search_author, '%') !== false ) && ( strlen(str_replace('%', '', $search_author)) < 3 ) )
{
$search_author = '';
}
#
#-----[ REPLACE WITH ]------------------------------------------------
#
$search_author = str_replace('*', '%', trim($search_author));
Geplaatst: 19 apr 2006, 18:56
door maico
Nee dat is de aandraging van van phpBB.com
Maar die stukjes code staan niet in de searh.php van 2.0.20 nog iets wat daar op lijkt.
Het zal vermoedlijk de code zijn tussen 216 en 224 uit het orginele searh.php, maar ik kan daar toch niets van maken

Geplaatst: 19 apr 2006, 19:28
door Trunks81
Hallo Maico
als ik ga zoeken in mijn search.php (heb gisteren board update gedaan naar 20 !)
en ik zoek hierop
Code: Selecteer alles
#
#-----[ FIND ]------------------------------------------------
#
$search_author = str_replace('*', '%', trim($search_author));
if( ( strpos($search_author, '%') !== false ) && ( strlen(str_replace('%', '', $search_author)) < 3 ) )
{
$search_author = '';
}
#
#-----[ REPLACE WITH ]------------------------------------------------
#
$search_author = str_replace('*', '%', trim($search_author));
Vind ik gewoon 2 keer die code, ik zoek zelf op
plus ik weet niet of je daar naar gekeken hebt maar je moet even die regel
achter deze denken
als de rest van de mod goed verwerkt moet het nu toch lukken
Geplaatst: 19 apr 2006, 20:04
door maico
Hoi
Daar zit nu waarschijnlijk net het probleem jij doet hem updaten van 2.019 -naar 2.0.20
Ik heb dus geen update maar een nieuwe verse instal van 2.0.20 daar komt heel die code niet in voor.

Het enige wat daar op lijkt is dit wat ik hier onder heb.
Code: Selecteer alles
#
#-----[ FIND ]------------------------------------------------
#
if (preg_match('#^[\*%]+$#', trim($search_author)) || preg_match('#^[^\*]{1,2}$#', str_replace(array('*', '%'), '', trim($search_author))))
{
$search_author = '';
}
$search_author = str_replace('*', '%', trim($search_author));
ik heb
Code: Selecteer alles
219 $search_author = str_replace('*', '%', trim($search_author));
220
221 if( ( strpos($search_author, '%') !== false ) && ( strlen(str_replace('%', '', $search_author)) < 3 ) )
222 {
223 $search_author = '';
224 }
moet ik vervangen met dit
Code: Selecteer alles
#
#-----[ REPLACE WITH ]------------------------------------------------
#
$search_author = str_replace('*', '%', trim($search_author));
Stukje 2
Code: Selecteer alles
#
#-----[ FIND ]------------------------------------------------
#
if (preg_match('#^[\*%]+$#', trim($search_author)) || preg_match('#^[^\*]{1,2}$#', str_replace(array('*', '%'), '', trim($search_author))))
{
$search_author = '';
}
$search_author = str_replace('*', '%', trim(str_replace("\'", "''", $search_author)));
ik heb
Code: Selecteer alles
442 $search_author = str_replace('*', '%', trim($search_author));
443
444 if( ( strpos($search_author, '%') !== false ) && ( strlen(str_replace('%', '', $search_author)) < 3 ) )
445 {
446 $search_author = '';
447 }
moet vervangen met:
Code: Selecteer alles
#
#-----[ REPLACE WITH ]------------------------------------------------
#
$search_author = str_replace('*', '%', trim(str_replace("\'", "''", $search_author)));
De rst van de mod klopt feiloos ik zit allen met die searh.php

Geplaatst: 19 apr 2006, 23:04
door maico
hoi,
Zoals ik mijn eerste berich in dit onderwerp zei:
mijn engels is niet wat het zou moeten zijn
Ook het gegeven bericht dat ik daar aan haalde staat wel de goede oplossing
http://www.phpbb.com/phpBB/viewtopic.ph ... 58#2082858
optie 2 want bijna een dag later begrep ik deze zin:
so that it instead says this:
Sorry voor de misverstand.