vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Auto-create topic? (https://vborg.vbsupport.ru/showthread.php?t=83138)

LeeWicKeD 06-15-2005 01:38 PM

Auto-create topic?
 
hi there,

i'm looking for a hack, that can create topics on a specified time/date. i want to create the topic before and set the time when it should be posted into a forum.i hope you understand what i mean ;)

is there already any released hack?

i already tried the search, but just got this hack:

https://vborg.vbsupport.ru/showthread.php?t=80770

but this won't work and does not seem to be the hack i need.

Lee

edit: just found this one: https://vborg.vbsupport.ru/showthread.php?t=61030

but i'm not able to create my own phpfile/hack because i don't know anything about php ;)

Colin F 06-15-2005 03:08 PM

Quote:

Originally Posted by LeeWicKeD
but i'm not able to create my own phpfile/hack because i don't know anything about php

Try it ;)
It's not that hard and we all started once.
We'll even help you if you have specific questions...

LeeWicKeD 06-21-2005 12:17 PM

:ninja:

ok i got this code from the other topic:

PHP Code:

<?
require('./global.php');
require('./includes/functions_newpost.php');
$userid = 4703;
$forumid = 84;
$foruminfo = fetch_foruminfo($forumid);
$bbuserinfo = fetch_userinfo($userid);
$post[title] = 'Testtopic';
$post[message] = 'Just a Test';
$post[poststarttime] = TIMENOW;
$post[posthash] = md5($post[poststarttime] . $bbuserinfo['userid'] . $bbuserinfo['salt']);
build_new_post('thread', $foruminfo, array(), 0, $post, $errors);
?>

i put all this into a .php file and uploaded it to my webspace.
ok when i run the .php file in my browser i get a blank page, and the topic was created in forum with id 84.
ok so far it's ok ;)

but i want to change the userid,forumid,$post[title],$post[message] and $post[poststarttime] through a form in the adminpanel. so that ONLY administrators can pre-create their topics.

what's the format for the $post[poststarttime]? instead of TIMENOW i want to use a specified date and time.

thanks for help :)
Lee

Andreas 06-21-2005 12:29 PM

Quote:

Originally Posted by LeeWicKeD
but i want to change the userid,forumid,$post[title],$post[message] and $post[poststarttime] through a form in the adminpanel. so that ONLY administrators can pre-create their topics.

Then you must create a CP file for this.

Quote:

what's the format for the $post[poststarttime]? instead of TIMENOW i want to use a specified date and time.
It's a UNIX Timestamp, eg. the seconds since the epoch (01.01.1970 00:00:00).

LeeWicKeD 06-21-2005 12:42 PM

tried 1119383100 (for 06/21/05 15:45) instead of TIMENOW, but it still creates the topic instant ?!

Andreas 06-21-2005 12:44 PM

It will always create the Thread instantly, no matter what poststarttime is set to - it will just show up to be created at this time.

If you want it to be hidden until a certain point in the future, you will have to set it to be hidden and have a cron-job to make invisible threads show up when the time has passed.

LeeWicKeD 06-21-2005 12:46 PM

ah i though it's possible to change the poststarttime so that it will create a topic on a specified date+time ?

Andreas 06-21-2005 12:47 PM

No, that's certainly not possible.

LeeWicKeD 06-21-2005 01:03 PM

but i already saw it in a forum ;) ok but i could try it with a vbcron ;)

..

Colin F 06-21-2005 01:16 PM

Quote:

Originally Posted by LeeWicKeD
but i already saw it in a forum ;) ok but i could try it with a vbcron ;)

..

Yes.

You'd basically save it in a different table and copy it to the thread table with vBCron


All times are GMT. The time now is 07:33 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
  • Page Generation 0.01339 seconds
  • Memory Usage 1,736KB
  • 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
  • (1)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (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