2011/7/29 Marius Dumitru Florea <[email protected]> > Hi James, > > On 07/28/2011 06:27 AM, 许凌志(Jamesxu) wrote: > > Hi,Marius, I have some problems with the processes of the suggestions. > > > > (1) As we discussed, when "[[" is triggered at first without any > > queries, we should give user some default suggestions like recently > > modified. However I indeed can the recent modified pages now, but I can > > not get recently upload attachments, the question is is the recently > > upload attachments necessary? if so, how can I get it, and can I add it > > to the same wikipage "XWiki.recently modified"? > > You can use something like this to get the list of recently uploaded > attachments: > > ----------8<---------- > {{velocity}} > #set($result = $services.query.hql('select doc.fullName, attach.filename > from XWikiDocument as doc, XWikiAttachment as attach where > attach.docId=doc.id order by attach.date desc').setLimit(5).execute()) > |Document|Attachment > #foreach($item in $result) > |$item.get(0)|$item.get(1) > #end > {{/velocity}} > ---------->8---------- > > (Note: I've written this based on > > http://platform.xwiki.org/xwiki/bin/view/DevGuide/QueryGuide#HUsingtheQueryManager > and > > http://extensions.xwiki.org/xwiki/bin/view/Extension/All+Attachments+Livetable > ) > > You can add your code to the "Recently modified" panel for now, but > return the list of attachments only when a specific request parameter is > present. > > > > > (2) When user keeps typing, then he can trigger some sub link triggers > > like "attach:", ".", "@" and "||" > > > If "attach:" is triggered without any queries, should we give the user > > some default suggestions, if so, what suggestions should we give, till > > now, I give the the attachments start with "a" as default. > > You need to propose something. We can help you make the choice but you > should be the one coming with great ideas. > How about giving the suggestions of attachments which is attached to the user recent modified pages. Just like the default suggestion list for "[[", but without the pages, only attachments left
> > > if "." is triggered, there are two situations: first is under the > > wikipage context, so when it is triggered without any queries, what > > should we give to user as default suggestions, > > Again, you have to propose something. > > If "." is under the page context, then the default suggestion results will be the recent modified pages under the space which is before the trigger "."; if "." is under the attach context, then the default suggestion results will be the attachments which is attached to the recent modified pages under the space before "." > > because when "." is > > trigger, we must narrow the search range to the specific space, for > > example, when user type "[[Main.", then the suggestions and also the > > default suggestions should under the Main space. > > second is under attachment context, like "[[attach:Main.", what should > > be the default suggestions for users? > > Is there really a difference between "[[Main." and "[[attach:Main." with > respect to the list of wiki pages that you could suggest? Yes, they are different, pages under the space "Main" will be suggested to users for "[[Main", however the attachments which is attached to the pages under space "Main" will be suggested to users for "[[attach:Main" > > > if "@" is triggered, we must give the attachment suggestions to users > > under attachment context, like "[[attach:Main.mypage@", so what is the > > default suggestions for this situation? > > What do you propose? > I think, we can suggest all the attachments which is attached to Main.mypage to users. > > > if "||" is triggered, I think we may not query the server, because the > > attributes of link are static, but what attributes are supported? > > First check the syntax help, then try some random parameters and check > what HTML is generated when the page is rendered. > > Hope this helps, > Marius > > > > > On Tue, Jul 26, 2011 at 3:37 AM, Marius Dumitru Florea > > <[email protected] <mailto:[email protected]>> > > wrote: > > > > Hi James, > > > > On 07/24/2011 05:15 PM, 许凌志(Jamesxu) wrote: > > > Hi, Last week I have done following things: > > > 1. Refine the suggest lucene service, and a query "media", which > have > > > two options: "xml" and "json", each gives the xml > > > and json results. > > > 2. Thanks Eduard, Marius and Sergiu, with their help, I finnally > find > > > the right search queries of suggest lucene service to get right > > > suggestion results. > > > 3. The autosuggestion can use the real datas from xwiki now. > > > > > > > > In this week, I am going to do the following things: > > > 1. Implement the whole context for link suggestion, include > > "attach:", > > > "@", "." and "||".( I have done some designations, but still want > to > > > discuss with mentors) > > > 2. Consider to implement the ctrl+space to re-open the suggestion > box > > > according to the different contexts of link suggestion.(after the > > 1 is > > > finished) > > > > Sounds good. Ping me on IRC when you need help. > > > > Thanks, > > Marius > > > > > > > > -- > > > Best wishes, > > > > > > 许凌志(Jame Xu) > > > > > > MOE KLINNS Lab and SKLMS Lab, Xi'an Jiaotong University > > > > > > Department of Computer Science and Technology, Xi’an Jiaotong > > University > > _______________________________________________ > > devs mailing list > > [email protected] <mailto:[email protected]> > > http://lists.xwiki.org/mailman/listinfo/devs > > > > > > > > > > -- > > Best wishes, > > > > 许凌志(Jame Xu) > > > > MOE KLINNS Lab and SKLMS Lab, Xi'an Jiaotong University > > > > Department of Computer Science and Technology, Xi’an Jiaotong University > _______________________________________________ > devs mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/devs > -- Best wishes, 许凌志(Jame Xu) MOE KLINNS Lab and SKLMS Lab, Xi'an Jiaotong University Department of Computer Science and Technology, Xi’an Jiaotong University _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

