Not logged in. · Lost password · Register
Forum: General Help and Support Templates and Layout RSS
search & multitemplate: unwanted results
Avatar
efege #1
Member since Jun 2007 · 13 posts
Group memberships: Members
Show profile · Link to this post
Subject: search & multitemplate: unwanted results
Hi, I'm doing some initial tests with multitemplate (thanks, tjgrant!), and found an unwanted behavior.

This is my test config:

$multitemplate['playground:playground'] = 'default';
$multitemplate['foobar'] = 'doogiestpl';
$multitemplate[''] = 'monobook';

I visit the start page (monobook template), and I use the search box in both possible ways, using foobar as search term; the query portion of the URL and the resulting page are as follows:

    Search: ?do=search&id=foobar&fulltext=Search  (shows a results page with link to foobar:start)
    Go: ?id=foobar (shows the "This topic does not exist yet" page)

So far so good. But... since both include the parameter id=foobar in the URL, the displayed pages use the doogiestpl template, even though I have not visited the foobar namespace yet.

Edit: same problem using as search term id=foobarwhatever, since function mt_beginsWith(), in meat.php, considers this a match. It seems that the matching criteria should be more conservative...
This post was edited 2 times, last on 2009-02-27, 14:21 by efege.
Avatar
ach (Administrator) #2
Member since May 2006 · 1906 posts · Location: Folkestone, UK
Group memberships: Administrators, Members, Super Mods, Wiki Managers
Show profile · Link to this post
Quote by efege on 2009-02-27, 13:44:
$multitemplate['foobar'] = 'doogiestpl';

    Search: ?do=search&id=foobar&fulltext=Search  (shows a results page with link to foobar:start)
    Go: ?id=foobar (shows the "This topic does not exist yet" page)

since both include the parameter id=foobar in the URL, the displayed pages use the doogiestpl template, even though I have not visited the foobar namespace yet.

I don't know multitemplate, but taking a wild guess, I would try
$multitemplate['foobar:'] = 'doogiestpl';
(with a colon after "foobar").
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-03-20, 02:27:23 (UTC +01:00)