(03-17-2011 11:21 AM)jim7777 Wrote: [ -> ]but i dunno why but when a new thread reply is added, the sort options is being disregarded.. as seen on my forum where 3-08-11 comes first before 3-12-11 then 2-24-11 .. the first date (3-08-11) contains a new reply
it is arrange on how the new replies are postedis that a bug?
What is the setting in the [Default Sort By:] setting for that forum?
Does \r\n or \r get replaced with \n anywhere before the value is stored in the database?
Edit:
Nevermind, after looking closely at XThreads, it seems that all fields get sanitized using xthreads_sanitize_disp(...) which will call xthreads_sanitize_disp_field(...) and then xthreads_sanitize_disp_string(...) which calls the parser which will convert new lines to <br />
(03-19-2011 10:33 PM)Pirata Nervo Wrote: [ -> ]I've got one question regarding text areas. (multi line text boxes)From memory, not for the multiline textbox, but for some things, it will strip out \r's.
Does \r\n or \r get replaced with \n anywhere before the value is stored in the database?
Function xthreads_get_xta_cache(&$tf, &$tids, $posthash='')
What's the point in accepting a list of tids if (when more than one are provided) it just puts the last one in the array, overriding the others?
|
(03-24-2011 08:45 AM)ZiNgA BuRgA Wrote: [ -> ]aid is the primary key of the table, in other words, guaranteed to be unique, so it won't overwrite.
The problem, it's overriding. I can assure you the three thread id's provided in $tids as 1,5,7 are unique (they're 1,5,7..).
I'm kinda lost because it's only getting one attachment when the three threads have different attachments.
EDIT: are you modifying the $xta_cache yourself, at all?
|
6 and 7 are the real thread IDs.
In case you want to look at my code, here it is: (the following function hooks into showthread_start, after XThreads is run)
|
I think I'm doing it correctly, but probably not.
|
This will only grab one thread's thread fields. The code I used for showthread_start hook assumes one result, since there's only one thread being displayed. You cannot make the same assumption here.
|
I don't know why you're using escape string here.
|
$threadfields isn't global'd - the second line won't get anything.
As for your issue, I'm guessing that xthreads_get_xta_cache has already run before your function does. Note that xthreads_get_xta_cache forces a one-call-per-page policy (see the static $done_attach_dl_count variable in the function), so if it already has been called by xthreads_showthread, it will ignore your code.
You'll need to either get your function to be called before xthreads_showthread is called (and hope that it doesn't affect xthreads_showthread in any way) or manually pull the attachments across.
I'll admit that it isn't a tidy function, but then again, it isn't really meant to be used by others. I only made it to save myself some typing with various checks etc. Manually pulling xtattachment info isn't very difficult.
|