Seite 1 von 2
Edit date
Verfasst: Do 10.Feb, 2005 11:32
von Blisk
Is there a working mod for editing a post date?
I need that because some post with older date I like to show it again on portal!
Verfasst: Do 10.Feb, 2005 12:45
von oxpus
Verfasst: Do 10.Feb, 2005 14:18
von Blisk
I had this MOD installed, but doesn't work, it does not change date.
I check the author and he said he will not support this MOD anymore.
Verfasst: Do 10.Feb, 2005 14:56
von oxpus
Hm yes I see, this mod is really old
I'll code a new one, because this mod isn't compatible to phpbb 2.0.11 or plus 1.5.2. Changing into a compatible one will be the same work as creating a new one...
Verfasst: Do 10.Feb, 2005 15:02
von Blisk
If you have some spare time, because it is usefull, for portal news, or maybe you have some other idea how to put old news on portal again.
Verfasst: Fr 11.Feb, 2005 02:15
von oxpus
Verfasst: Fr 11.Feb, 2005 08:06
von Blisk
I installed it, but doesn't work, it doesn't edit post and a line on post is like on pic.
Verfasst: Fr 11.Feb, 2005 08:46
von oxpus
Attach your viewtopic.php and viewtopic_body.tpl to take a look.
Here is the error. You can't open the popup until the error there isn't fixed.
Verfasst: Fr 11.Feb, 2005 12:11
von Blisk
OK, let me know if I did some mistake.
Verfasst: Fr 11.Feb, 2005 13:37
von modbo
::little offtopic::
I use this simple script for it, saved as a single php-file.
The only disadvantage is, you have to change the date in mysqladmin by hand.
Code: Alles auswählen
<?
echo "<form action=\"$PHP_SELF\" method=\"post\">
<input type=\"text\" name=\"t\" maxlength=\"2\" size=\"2\">.
<input type=\"text\" name=\"mo\" size=\"2\" maxlength=\"2\">.
<input type=\"text\" name=\"j\" size=\"4\" maxlength=\"4\"> -
<input type=\"text\" name=\"h\" size=\"2\" maxlength=\"2\">:
<input type=\"text\" name=\"m\" size=\"2\" maxlength=\"2\">:
<input type=\"text\" name=\"s\" size=\"2\" maxlength=\"2\">
<input type=\"submit\" name=\"Abschicken\" value=\"Umrechnen\">
</form><br><br><br><br>";
if($t || $m || $j) {
$timestamp = mktime($h,$m,$s,$mo,$t,$j);
echo "<b>".date("d.m.Y",$timestamp)."</b>: ". $timestamp;
}
echo "<br><br><hr><br><br>
<form action=\"$PHP_SELF\" method=\"post\">
<input type=\"text\" name=\"ts\" size=\"14\">
<input type=\"submit\" name=\"Abschicken\" value=\"Umrechnen\"></form>
<br><br><br><br>";
if($ts) {
echo "<b>$ts:</b> ".date("d.m.Y - H:i",$ts);
}
?>
Verfasst: Fr 11.Feb, 2005 14:14
von Blisk
Sorry didn't understand!
What can I do with this file convert_date_time.php.txt?
Verfasst: Fr 11.Feb, 2005 14:29
von oxpus
The only disadvantage is, you have to change the date in mysqladmin by hand.
Very helpfull for beginners

But usefull for advanced users, too, sure.
At the otherside my script displays the timeformat like the userformat (as possible) for a better time editing. And the script will not only save the timestring for the post time. It also checks the post edit time and the topic time!
Not easy to find it manually in the database

Verfasst: Fr 11.Feb, 2005 14:55
von Blisk
aha, Sorry my mistake I thought that you sended this file (OXPUS), but it was someone else

didn't know what to do, I thougth that have something with files I sended (viewtopic.zip)
Verfasst: Fr 11.Feb, 2005 15:55
von oxpus
Okay. Nothing wrong, you've just insert the code in viewtopic_body.tpl at the wrong place.
Here the fixed file:
Verfasst: Fr 11.Feb, 2005 16:09
von Blisk
Wau this looks very cool.
Nice MOD.
But on my forum in some topics works in some i get this error.
No post ID was specified
Verfasst: Fr 11.Feb, 2005 17:37
von oxpus
Wau this looks very cool.
Nice to read this ^b
For the error please an example...
The script will read the post id from the url which is created by javascript.
If here are errors on the js you will be get errors. Or the post id will not be set in several topics.
When you have a bug in your viewtopic.php like here:
http://www.povej.net/forum/viewtopic.php?t=3165
The post id is here alltimes "0"! Opening the topic with this link:
http://www.povej.net/forum/viewtopic.php?p=30245#30245 , the post id will be set.
Here your fixed viewtopic.php...
Verfasst: Mo 14.Feb, 2005 12:22
von Blisk
TNX, for fix.
This is really great mod, now I can show on portal some old news.
now I did tested, it is interesting thing.
When I change date, it happends something but at the top of the post, where the edit link is, date doesn't change?
Only when I click Edit date again it is strange date and time which I didn't setted.
Verfasst: Mo 14.Feb, 2005 15:22
von oxpus
Refresh your browser after editing the time.
This should be done automatically by the mod but not all browsers will do it correctly.
Verfasst: Mo 14.Feb, 2005 15:27
von Blisk
I did refreshed, but still the same.
Verfasst: Mo 14.Feb, 2005 15:34
von oxpus
Okay, I think there's a litte bug in the popup. I think I know where. I just must test it out...
I'll check it as soon as possible.
Verfasst: Mo 14.Feb, 2005 15:37
von Blisk
OK, you do not need to hurry.

Verfasst: Mo 14.Feb, 2005 19:32
von oxpus
No, I don't hurry, because the error was to ... {no comment}
Here the fixed file.
The mod also will be fixed.
Verfasst: Di 15.Feb, 2005 09:26
von Blisk
Great, now it works OK.
You should release this mod now.

Verfasst: Di 15.Feb, 2005 09:38
von oxpus
You should release this mod now.
Already done

Verfasst: Fr 25.Mär, 2005 08:59
von Blisk
I notice 1 thing.
When I change date of post it moves to the top, but on portal still doesn't move at the top. The idea of changing date of post is to move post to the top!