I wanted to make a new quick search function in ACP, but I saw that there is no XML search for Mod and Theme Sites.
Community: http://www.simplemachines.org/community/index.php?action=search2&xml
Docs: http://docs.simplemachines.org/index.php?action=search2&xml
Mods: http://custom.simplemachines.org/mods/index.php?action=search2&xml
Thems: http://custom.simplemachines.org/themes/index.php?action=search2&xml
Um, not sure I understand what the problem is?
Each link is a standard SMF search link. Community is valid XML, but not Mod or Theme
Two things - firstly, & in the URL upsets SMF and secondly, throwing a call to action=search2 without any parameters, it's going to baulk.
Quote from: Arantor on May 19, 2010, 05:00:10 PM
Two things - firstly, & in the URL upsets SMF and secondly, throwing a call to action=search2 without any parameters, it's going to baulk.
Sources/Admin.php line 984.
$search_results = fetch_web_data($context['doc_scripturl'] . '?action=search2
&xml', $postVars);
That's why I did like that :) And if you go to the URLs that I gave, you'll see that Community and Docs have an XML search, while Mod and Theme Sites does not.
Then it's a bug cuz I'm pretty sure it's not supposed to be like that...
I am curious as to the necessity of searching the mod and theme sites from the ACP though... doubly so as undoubtedly the structure will change when Dime finishes the overhaul of the Cust sites.
Hmm, ok then my ideas gotta wait a little :P
$search_results = fetch_web_data($context['doc_scripturl'] . '?action=search2&xml', $postVars);
It's posting to search2, which is how it should be...
Mod and theme site currently do not have this functionality. There will be plenty of XML functionality in the new site.
Quote from: SlammedDime on May 22, 2010, 09:30:13 PM
$search_results = fetch_web_data($context['doc_scripturl'] . '?action=search2&xml', $postVars);
It's posting to search2, which is how it should be...
That's not what Arantor was pointing to. It was the "&" between search2 and xml. Shouldn't it be ";"?
Quote from: SlammedDime on May 22, 2010, 09:30:13 PM
Mod and theme site currently do not have this functionality. There will be plenty of XML functionality in the new site.
Ok, thanks again :)
SMF won't choke on &, it will still work just fine with it, rather than ;
example: http://www.simplemachines.org/community/index.php?type=rss&action=.xml
Yeah I know, but SMF never uses "&" in URLs, shouldn't it be changed to ";"?