Quote from: LFK at Nov 14, 2008, 06:44 AM
I tried, but anyway snippet doesn’t work correctly... Smth wrong... but what?! 
hum hum .. we cannot really help you with this kind of sentences
try to change the [[ to [!
CTRL+SHIFT+U - Clear Cache
CTRL+SHIFT+H - Hiding Heft Panel
CTRL+SHIFT+N - Fast Create Resource
CTRL+ALT+P - Preview Recource (in edit resorce window)
CTRL+ALT+S - Save
Hello,
I think I’ve found a bug on line 330 in the file fdm.class.inc.php:
[tt]
foreach ($out[0] as $word){
if (strlen($word)>3)
{
$rest = substr($word, 1, strlen($word)-2);
$val= $docObj->Get($rest);
$newalias=str_replace($word,$val, $newalias);
} else {
$rest = substr($word, 0, strlen($word)-1);
$val=strftime ( $rest ,$datefield);
$newalias=str_replace($word,$val, $newalias);
}
[/tt]
I assume $datefield contains a string (’createdon’, ’publishedon’ and so forth..) when it in fact needs to contain a timestamp.
A simple work around solution is to just remove the , $datefield part, but then it will always insert the current time (essentially ’createdon’, plus some milliseconds)
edit: possible fix?
[tt]
$newalias=$_SESSION[’fdm’][’aliastype’]; // ie:%pagetitle_le%d-%m-%y
$datefield=$_SESSION[’fdm’][’aliasdate’]; // ie:editedon ,createdon, publishedon or deletedon
$dateval = $docObj->Get($datefield);
preg_match_all(’/%[^%]+%/’,$newalias,$out);
if (is_array($out))
{
foreach ($out[0] as $word){
if (strlen($word)>3)
{
$rest = substr($word, 1, strlen($word)-2);
$val= $docObj->Get($rest);
$newalias=str_replace($word,$val, $newalias);
} else {
$rest = substr($word, 0, strlen($word)-1);
$val=strftime ( $rest ,$dateval);
$newalias=str_replace($word,$val, $newalias);
}
}
[/tt]
Hey I’m working with FDM and when I use it via IE6 or 7 the PHP session is not working. Anyone else have this experience.... ie: when I go to add a page it just reloads without submitting anything. It really looks like the session is not going through but it’s hard to tell since IE gives no feedback and there is not a firebug type app to see the post/response data.
I’ve checked all the usual problems with IE and session data, ie: no underscores in my host name, the server time is set properly and it’s using the ModX session so all the headers are set properly.... Iv’e got no idea and just want to make sure that I’m the only one or not... so anyone else have issues with IE and this snippet?
After back reading I’m still a little confused.
Is it possible to make an upload field that drops the file into a predetermined folder, that cannot be seen by the user? It looks like people are using tiny mce, is it possible to create a tiny mce instance that just has an upload form in it, with no file browsing capabilities? Obviously this needs to be accessible by web users rather than just managers. Apologies if this has allready been covered, Friday afternoon and all that.
Ahh where are my manners; thanks very much to soda and everyone involved for making this awesome snippet, could be very influential in pushing modx (even further) forward.
Hey all, just replying to my own post, see a few back.... I was having trouble with IE and FDM.... well I solved my problem and I’m posting now to help others avoid this issue and possibly receive a workaround suggestion.
SO I had been using an IMAGE input, ie: input type="image" which apparently does not ’just work’ in IE. I believe it needs to send the x/y coordinates for IE to utilize it correctly though I had thought this only applied to .Net postbacks in ASP applications - not PHP sessions.
In any case as soon as I switched my submit button to an input type="submit" everything worked perfectly. I finally turned on debug to see what the session array was being set to and seeing the same results in IE as other browsers made me question my initial hypothesis, which reminded me of the x/y thing with image inputs and prompted me to try changing to a standard input. Thank goodness, cause my app is due for functional review next wednesday and I’ve been looking for the fix for 2 weeks now.
Any Microsoft familiar developers know what specific quirks IE needs to allow PHP session data to be posted using an image input? Do I need to add in variables to hold the x/y of the click (which BTW happens automatically with a GET) or what?