vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   More Functions in Edit Post if you are an Admin (https://vborg.vbsupport.ru/showthread.php?t=33761)

SirSteve 02-05-2002 01:03 PM

I'd like JUST the time/date stamp change part. Also, is there an English version?

Xenon 02-05-2002 04:24 PM

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:

$DB_site->query("UPDATE post SET ipaddress='".addslashes($ipadd)."',dateline='$datzeit',userid='$userid',threadid='$pthreadid',title='".addslashes(htmlspecialchars($title))."',pagetext='".addslashes($message)."',allowsmilie='$allowsmilie',showsignature='$signature',iconid='$iconid'$editedbysql$attachmentsql WHERE postid='$postid'"); 

to

PHP Code:

$DB_site->query("UPDATE post SET dateline='$datzeit',title='".addslashes(htmlspecialchars($title))."',pagetext='".addslashes($message)."',allowsmilie='$allowsmilie',showsignature='$signature',iconid='$iconid'$editedbysql$attachmentsql WHERE postid='$postid'"); 

and the admineditpost template has only this part:
PHP Code:

<tr>
    <
td bgcolor="{secondaltcolor}" nowrap><normalfont><b>Date and Time:</b></normalfont></td>
    <
td bgcolor="{secondaltcolor}"><normalfont><input type="text" class="bginput" name="datzeit" value="$datzeitsize="40" maxlength="85"></normalfont></td>
</
tr

for englisch time format you have to change

$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

SirSteve 02-05-2002 05:22 PM

Thanks! :)

Logician 02-15-2002 09:56 AM

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.

JBMoney 05-05-2002 04:05 PM

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?

JBMoney 05-05-2002 04:08 PM

Nevermind, I think I see a pattern.

mashby 07-05-2002 01:21 PM

I just installed this hack. It was easy to install and answered my prayers [link]

Xenon 07-05-2002 01:48 PM

:)
you're welcome

Boofo 07-26-2002 05:27 AM

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. :)

Xenon 07-26-2002 10:53 AM

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:

$datzeit=vbdate("d.m.Y H:i",$postinfo[dateline]); 

PHP Code:

$datzeit=mktime(substr($datzeit,11,2), substr($datzeit,14,2), 0substr($datzeit,3,2), substr($datzeit,0,2), substr($datzeit,6,4)); 

it's because you use other date/time formats as we do in german :)


All times are GMT. The time now is 07:53 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01302 seconds
  • Memory Usage 1,756KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete