Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)

Reply
 
Thread Tools Display Modes
  #1  
Old 06-15-2005, 01:38 PM
LeeWicKeD LeeWicKeD is offline
 
Join Date: Jan 2005
Location: Germany
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 06-15-2005, 03:08 PM
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
Posts: 1,551
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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...
Reply With Quote
  #3  
Old 06-21-2005, 12:17 PM
LeeWicKeD LeeWicKeD is offline
 
Join Date: Jan 2005
Location: Germany
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

: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
Reply With Quote
  #4  
Old 06-21-2005, 12:29 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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).
Reply With Quote
  #5  
Old 06-21-2005, 12:42 PM
LeeWicKeD LeeWicKeD is offline
 
Join Date: Jan 2005
Location: Germany
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

tried 1119383100 (for 06/21/05 15:45) instead of TIMENOW, but it still creates the topic instant ?!
Reply With Quote
  #6  
Old 06-21-2005, 12:44 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 06-21-2005, 12:46 PM
LeeWicKeD LeeWicKeD is offline
 
Join Date: Jan 2005
Location: Germany
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ah i though it's possible to change the poststarttime so that it will create a topic on a specified date+time ?
Reply With Quote
  #8  
Old 06-21-2005, 12:47 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No, that's certainly not possible.
Reply With Quote
  #9  
Old 06-21-2005, 01:03 PM
LeeWicKeD LeeWicKeD is offline
 
Join Date: Jan 2005
Location: Germany
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

..
Reply With Quote
  #10  
Old 06-21-2005, 01:16 PM
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
Posts: 1,551
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:36 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.04493 seconds
  • Memory Usage 2,252KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete