Discussion
comment problem(back to index)When somebody goes to my photolog, this looks like:
http://www.jowra.de/photos/
or
http://www.jowra.de/photos/index.php
Anyway, if you write a comment immediately after this, the comment is saved as:
_com.txt, since if you call the index.php there is no image-name at this moment. When you move foreward and back through the images this is no problem, but when you call index.php as the main entry-page for the log, the image-name is not part of the link and therefore the comment ist not saved as:
imagename_com.txt Belongs this problem only to me or is it a general one?
posted by
jowra on 27 Jun 05 at 6:18 AM
btw. as you can see, I'm not using the template_comments.php file nor a popup window. The comment-code is directly integrated in the template_main.php. could this be the problem?
posted by
jowra on 27 Jun 05 at 7:49 AM
Nobody?
Why does it work in fb 2. Whats the difference? In fb.php it is this line I guess:
$file = fopen("$comments_directory{$image}_com.txt", "a");
Is $image not defined when you call the latest image via fb.php/index.php?
posted by
jowra on 27 Jun 05 at 12:58 PM
Looking at the rendered source code for your site, it might be that you're missing a fb3 tag in action attribute for the form tag:
<form method="post" action="">
It should be:
<form method="post" action="<#fbcommentslink#>">
This will, when rendered, produce something like this:
<form method="post" action="/folderblog/fb.php/image/myimage/comments/">
In my templates, I include a 'template_comments.php' file, which is identical to the 'template_main.php' file in every respect. This might also be why it's working (almost) fine for me.
Another tip is to make a page called 'index.php' with this in the <head> section:
<script type="text/javascript">
top.location.replace("fb.php")
</script>
This will redirect the user to the 'fb.php' file, which makes for a shorter URL.
My problems with the comment form is that it never remembers who I am when the 'Remember me' box is checked, and when in post mode I can't delete checked comments. Any ideas why that should be, anyone?
posted by
Elwing on 27 Jun 05 at 1:46 PM
You're adorable! That helped me again. Putting the <#fbcommentslink#> in and making a copy of *_main.php called *_comments.php.
Thank you, Elwing.
posted by
jowra on 27 Jun 05 at 3:39 PM
Jowra, you're exactly right about what the problem was (the image is not set when commenting from the main template page). I'll release a fix tonight or tomorrow, though Elwing seems to have provided you with an alternative in the meantime.
Elwing, no idea why that would happen (after reading about your bug a few threads back, I tried to duplicate it in the demo blogs, but no luck). The post interface works fine for you? Do you have a link to your fb3 install? Anyone else having cookie or comment deletion problems?
posted by
donald on 27 Jun 05 at 5:11 PM
Actually, I just tried out and couldn't get the cookie to save on your demo Relaxation template. I'll look at the code tonight.
posted by
donald on 27 Jun 05 at 5:16 PM
That would be great, Donald! I haven't touched fb3b07's files at all (in fact, the demo shown will always use untouched Folderblog builds), and you can grab the source code for the template here.
The post interface works fine for adding and changing captions (Update button), but although it displays a check box by posted comments it won't actually delete them (Delete Checked button). At least I know it's not a browser issue, if you're getting the same problem.
posted by
Elwing on 27 Jun 05 at 6:49 PM
A little more poking about, and I discovered that fb2.02 sets the cookie just fine and remembers me, but fb3.07 kills the cookie fb2.02 creates as soon as you visit it, which makes both versions forget who I am. Both are installed on the same server, and neither have been altered.
posted by
Elwing on 29 Jun 05 at 5:54 PM
Thanks, Elwing. I haven't looked over the code, but I have a hunch it's related to the other bugs that crop up when the comments appear on the template_main page. I'll check it out tonight but probably won't release the fix until Friday.
posted by
donald on 30 Jun 05 at 1:35 AM
Donald wrote:
"Jowra, you're exactly right about what the problem was (the image is not set when commenting from the main template page). I'll release a fix tonight or tomorrow, though Elwing seems to have provided you with an alternative in the meantime."
Donald, if you have the time, could you get this working? I want to release my new theme in the next days. The workaround posted by Elwing works fine, but if the users want to change something in the main.php template file, it might be confusing that they always must create an exact copy of it and rename it to comments.php...
Thanks,
John
posted by
jowra on 2 Jul 05 at 4:06 PM
John, sorry about the delay. It was a holiday weekend here, and the time I wasn't picnicking I spent rewriting
photoblogring from scratch.
I'll really crack down on this tomorrow, but expect my next release to be very similar to Elwing's work around (except you won't need the duplicate file).
posted by
donald on 5 Jul 05 at 1:14 AM
No stress Donald. :) And such an solution is quite okay if the file ducplication is dropped out. Thanks.
posted by
jowra on 5 Jul 05 at 4:55 AM
Donald, if there's any way you could find it in your heart to look at the cookie problem as well, I'd be very gratefull. It's making my brain melt at the moment...
posted by
Elwing on 5 Jul 05 at 12:57 PM
Of course.
posted by
donald on 5 Jul 05 at 2:08 PM
Elwing, try changing your cookie checkbox to name="cookie" [etc] value="
1", and let me know if it works.
posted by
donald on 6 Jul 05 at 7:59 PM
(Fix for the other bugs will be posted tonight.)
posted by
donald on 6 Jul 05 at 8:00 PM
Okay, adding 'value="1"' works superbly in fb3b07, where it also fixes the problem of not being able to delete comments in post mode. This actually makes fb3b07 a stable build. There's new problems with fb3b08, though. I'll mention them under the thread about that version.
posted by
Elwing on 7 Jul 05 at 11:27 AM
Post a Reply:
(back to index)