![]() |
Hi folks!
After my server has had problems last night, so the date was incorrect, an the posts had the dateline of October, I start programming this hack, to change a bit more of the Posting informations if you are an Admin of the board. Now you can change 1. The Userid of this Post (don't know when, but perhaps you'll need it sometimes) 2. The Threadid of the Post (if you want to take this post to another thread) 3. Date and time postet 4. IP Address saved with the Post 5. can make post uneditable for original Author/Mods/Supermods (priority level system) or even editable to the author when timelimit is over... If you like it Please click on install Button Screenshot vB3 Version of this hack can be found here |
nice
|
Thx! I have adjusted it a little bit, so that you don't have to duplicate the whole template editpost, you only have to insert $admineditpost into that template (I made changes in editpost.php for that, you can find it at Step 1.3 in my file).
I have attached my changed instructions! @Xenon Nochmals danke f?r den Hack, bei Fragen zu meinen ?nderungen, wende dich an mich :) Bye, Mystics |
Thx, have updated my Attachment too :)
@Mystics: Hab alle Anderungen gesehn, h?tt ich selber auch draufkommen k?nnen :), so ists nat?rlich um ein St?ck praktischer, danke nochmals Screenshot Version 2.20: |
Have correctet a little bug.
The line which edited the date has had a little bug which changes into a wrong day whe the day is greater 9 |
Yeah!! Infact I got lost!! ;)
Great hack but..... !!! I tried to edit some posts and had the date/time switched before about 9 days and 18hrs !!!! Even without touchin' the date/time field... :) A post made today (CET date format) : 14-01-2002 15.40 went to 04-01-2002 21.40 !!!!! (note: I'm six hours behind my server' time...) Hope your 'patch' fixes it... Doesn't it ? Thanks a lot. |
:( :rolleyes:
Bug is only partially fixed. I applied your new release as of 12jan, but there's still a problem with the time synchro. I think - as said - the local area time. The example above, for instance, now becomes : 14-01-2002 21.40 !!! Infact, cause the substr( ..., 1,2 ) instead of substr( ..., 0, 2 ), before I had the date moved to 4 instead of 14 .... (24... etc...) But it doesn't manage the time zone info, I think. Infact I made a correction on the time of edit setting it to 09.40 and, as output, I got the message dated : 14-01-2002 15.40 .... :) Hope this helps you to fix completely the problem... Thanks again for your work. Bye |
i see to correct it just add the line
$datzeit=$datzeit+4*3600; right after $datzeit=mktime(substr($datzeit,11,2), substr($datzeit,14,2), 0, substr($datzeit,3,2), substr($datzeit,0,2), substr($datzeit,6,4)); and change the 4 to your timeoffset. |
Ok. May thanks... ;)
I think you mean the offset behind the server time, not any other absolute like GMT, do you ? I'd prefer to use a variable environment, for example useing the $timeoffset variable adding the $bbuser[timezoneoffset] ... :) But haven't any idea how to make the global variable be seen in editpost.php... ;) Thanks a lot. Again Bye |
Quote:
the offset you have to set, should be like the one you set in your vb options ;) |
Quote:
Actually I have GMT -5 for Server' time (EST) and GMT +1 for mine and almost users (CET)... :) So I should make the sum of abs... By now a fixed '6' should work great ! Thanks. |
Quote:
If my server is in a timezone 'on the left' of mine (as said, I'm on +1, the server is on -5), I should SUBTRACT 6 and not add it... :) $datzeit is the time string displayed on my page, adjusted to my time... If the server time is six hours 'after' mine, I should resave the edited post with the server time... my case: ---> $datzeit = $datzeit - 6 * 3600; Thanks again for your help. Bye |
hey good hack
but can someone tell me the time for Eastern Time (U.S.A.) PM/AM Clock What should I replace it with? |
It' a RELATIVE value: where are you ?
:supwink: |
Lookin' at vbdate() function source, I found out how to parametrize the admin's offset behind the server:
simply, the users of this hack - with your bugfix - should replace the code PHP Code:
PHP Code:
This way there shouldn't be neither the import of global variables $bbuserinfo and $timeoffset, like functions.php has, as at the top of editpost.php there's a full global variables import. That is !! Bye :stoned: |
Quote:
EST (U.S.A.) because im not good with doing the m-y-d thing, thats all |
Quote:
:greedy: Hwr my solution is not for you... aren't absolutely interested in, I guess.. |
I'm sure this may come in handy!
Thanx! |
Quote:
i just am wondering what to put in for the EST U.S.A. time instead of the german time |
Quote:
Well. Your server is EST (GMT -5). You are in Germany (GMT +1). You definetively can use the hack's default $format : d.m.Y .... with all the substrings as the authod did... Very simple, then... You have to correct the output time with a '-6 hours', just like me. Any case, you can use along everyone the upgrade in Post#15. :up: :up: |
I'd like JUST the time/date stamp change part. Also, is there an English version?
|
Thers no english version, but it isnt hard to make the changes into the english date-time format
just the date/time change you must change following things in my Hack: don't use Step 1.4 in step 1.5 change PHP Code:
PHP Code:
PHP Code:
$datzeit=mktime(substr($datzeit,11,2), substr($datzeit,14,2), 0, substr($datzeit,3,2), substr($datzeit,0,2), substr($datzeit,6,4)); into $datzeit=mktime(substr($datzeit,11,2), substr($datzeit,14,2), 0, substr($datzeit,0,2), substr($datzeit,3,2), substr($datzeit,6,4)); i think and of course the line $datzeit=vbdate("d.m.Y H:i",$postinfo[dateline]); into $datzeit=vbdate("m-d-Y H:i",$postinfo[dateline]); this should be all you need i think |
Thanks! :)
|
Nice hacks thanks :)
A reminder to people who use this hack: If you edit user id or thread id, dont forget to update the counters. |
Has anyone tried this in 2.2.5 and gotten it to work?
I've installed it and everything looks right, but when I try to edit the time... nothing happens. No change in the post at all. Any thoughts? |
Nevermind, I think I see a pattern.
|
I just installed this hack. It was easy to install and answered my prayers [link]
|
:)
you're welcome |
Ok, guys, I'm totally confused here. I'm one of them dumb Americans (although I do have some German Ancestory.) :)
Xenon: Why don't we use Step 1.4 if we are in the USA? Jawelin: If my server is in the UK and I am in the USA, you offset fix will automatically set the time at my offset according to what I have in my time options, right? So i don't have to manually set it? Sorry for the questions guys, but I want to make sure I get it right before I mess anything up. :) |
you have missunderstood something boofo: the don't use 1.4 was for SirSteve because he just wanted to add the datetime functions and nothing else ;)
th only thing you have to change as an american user are these lines: PHP Code:
PHP Code:
|
Ok, I put 1.4 part back in. But what does this mean?
$userid=0; $username="Gast"; And what about Jawelin's auto date part? Will that work for me? |
in english you have to change "Gast" to "guest" ;)
because you can change the Authorid of the post, and when you choose 0, it must have a new Username, i took guest ;) yes Jawelin's auto date part should work for ya |
Thank you very much. I just installed it and think I will leave the name as "Gast". That way I can have more of a German flair to the site (think that will work? :)). Thanks again! :)
|
I ran into a major problem here. This is the date I got on a message I edited that I had just added a few minutes before.
Dec 31, 1969, 11:59 pm Any ideas where I went wrong? :) |
hehe intresting idea to get a german flair in it ;) ^^
huh before 1970? very funny ;) can you paste the two line of your editpost.php which handles the dates, so perhaps i can tell you whats wrong |
I hope these are the lines you wanted. :)
PHP Code:
|
seems to be correct
can you also print your exact time-format? i mean how does this line look in your format: PHP Code:
|
I just changed it to match the time layout I use on the board. Here it is:
PHP Code:
Quote:
|
Ok, there's the problem ;)
by now you can just use numeric time/date formats so for Time you must use something like H:i instead of g:i a and some sort of d.m.Y instead of M j, Y. it must be sure the ammount of bytes in the timestring can't change with another date ;).... its the way mktime() works... |
So, what should I put in there then? And can it be fixed to work with the date like I have it? :)
Quote:
|
All times are GMT. The time now is 04:47 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|