Page 4 of 4

Posted: Tue Jun 26, 2007 8:06 pm
by stm999999999
pico is the editor which is used by the mai-program pine - I think it must be part of a normal linux installation.

But for the moment I have make a question in de.comp.gnu - perhaps a solution

Posted: Wed Jul 04, 2007 1:15 am
by stm999999999
ok, I do not know what is the problem; but until we figure it out, I will give you the whole files, as you mentioned before:


lang_de.inc.php
http://nopaste.ch/c7bfe16ddc1078a.html

lang_en.inc.php
http://nopaste.ch/f2ea57571626ec6.html

utf8-lang_de.inc.php
http://nopaste.ch/eea4182b0f509d7.html

functions_images.inc.php
http://nopaste.ch/050ca8210385d46.html

serendipity_event_staticpage.php
http://nopaste.ch/60fdd5799d5c92a.html


and, because I found this alternative nopaste, perhaps this time the diffs work?

functions_images.inc.php.diff
http://nopaste.ch/c87f035d544d7c8.html


serendipity_event_staticpage.php.diff
http://nopaste.ch/cb100699f76dfcb.html

Posted: Wed Jul 04, 2007 10:25 am
by garvinhicking
Hi!

Hm, the functions_images patch won't work. $renameValues is only defined after the IF-query, but it is required within the "if $type == file" area. So it needs to be put earlier.

Sadly I won't have the time to dive into this the next few days/weeks, because I'm working on something else pretty hard right now...so this will have to be delayed a bit. :(

But I committed the staticpage thing. ;)

Regards,
Garvin

Posted: Wed Jul 04, 2007 12:21 pm
by stm999999999
garvinhicking wrote:Hm, the functions_images patch won't work. $renameValues is only defined after the IF-query, but it is required within the "if $type == file" area. So it needs to be put earlier.
"won't work" as "the patch does not apply" or "the new code will not work"?


ah, I see: renameValues is even used in "type==filedir - ok, I will change this, so every if-clause gets this renameValues-definition.

But, wondering: I tried it many times at home, for renaming an image, for renaming a folder and for moving an image to another folder - and everthing worked fine!?

Posted: Wed Jul 04, 2007 12:34 pm
by garvinhicking
Hi!
"won't work" as "the patch does not apply" or "the new code will not work"?
Since it's not a patch anymore, it doesn't need to apply anymore ;-)

So, it's "the new code will not work".
But, wondering: I tried it many times at home, for renaming an image, for renaming a folder and for moving an image to another folder - and everthing worked fine!?
The backend_rename hook is not required for the usual renaming, but it is required for the plugins that use this hook. I believe the imageselectorplus or some other plugin support to create multiple thumbnails for a file, and they would all need to move any subsequent thumbnail properly...

HTH,
Garvin

Posted: Wed Jul 04, 2007 12:52 pm
by stm999999999
"won't work" as "the patch does not apply" or "the new code will not work"?
Since it's not a patch anymore, it doesn't need to apply anymore ;-)
I thought, the patch-files on the new nopaste-service at the bottom are perhaps useable to you.


for the renameValues-problem:

I will restore the occurrence of renameValues in the if-clauses, so this will be like before.

for the problem and solution in http://board.s9y.org/viewtopic.php?t=9939#56339 ff. I will make a $renameValueBackend at the end instead of my other newcode - because the serendipity_plugin_api::hook_event('backend_media_rename', $renameValues); must get a non empty $oldDir/NewDir:
$oldDir and $newDir are allways with the right and needed content - because the sql-statement for the entries gets the same values! It has the folder when moving an entire folder. It has the folder+filename if only a file is moved or renamed.

Posted: Sat Jul 07, 2007 12:26 am
by stm999999999
OK, I did it:

functions_images.inc.php.diff
http://nopaste.ch/07062131512319f.html

or if it does not work:

functions_images.inc.php
http://nopaste.ch/782fd3d4b2eff6b.html

the changes in staticpages are already included, right? And then the lang-files?


BTW, is there any reason to use $file in the one if-clause and $pick in the other (in serendipity_moveMediaDirectory)?

Posted: Tue Jul 10, 2007 11:32 pm
by stm999999999
Is there still a problem with my code? Or is it a lack of time only? :lol:

Posted: Wed Jul 11, 2007 12:15 pm
by garvinhicking
Hi!

I wasn't aware of that extra patch, sorry. Still lacking time, but now I'll put it on my todo list :)

Regards,
Garvin

Posted: Wed Jul 11, 2007 4:44 pm
by garvinhicking
Hi!

Just made a small review: Also this patch won't work, because $renameValues can be modified by plugins. The "foreach" loop after the former hook_event call would then also rename any files that the plugins pushed into the $renameValues array!

In your patch, this foreach-loop is no longer executed, leaving the plugin modifications without any action.

Could you, in a few sentences, tell me what modifications were required for what to get the result you want with this patch? You can switch to german, if you prefer. But I'm lacking the time to reread through this whole thread, it definitely is confusing me :)

Best regards,
Garvin

Posted: Wed Jul 18, 2007 12:09 am
by stm999999999
sorry, I hope for the next weekend