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-creation of threads? (https://vborg.vbsupport.ru/showthread.php?t=61030)

Gryphon 11-16-2004 05:35 PM

Uhhh...no...

zeropaid 11-16-2004 07:26 PM

no, I just copied code from earlier in this thread.. still getting that wierd error even with test data.. still workin on it though.

StefanS 11-25-2004 09:28 AM

Hi,

just tested the following code:

PHP Code:

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

works for me with 3.03 without problems ...

sabret00the 11-25-2004 09:43 AM

Quote:

Originally Posted by StefanS
Hi,

just tested the following code:

PHP Code:

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

works for me with 3.03 without problems ...

is there a form to add the threads you want and create the conditions under which their added?

Wired1 11-30-2004 12:14 AM

Sorry for the delay guys, never did release this as an official hack due to the lack of interest, seemed everyone except for me knew how to do this at the time. Man trying this stuff in the early RCs was a pain! Just switched to a newer license that won't expire, so I'll get all of the updates on the thread from now on :)

I'll have to re-read through the thread later (in class atm), but it sounds like at least sabret00the would like a variable system to set up to do this?

I'll have to dig up the custom forms/code I made that used this function. Worked well, but the project went to ASP so I haven't looked at it in a while. Would've stayed in PHP if I knew how to radically customize the board templates.

Would you guys want me to work this up and release it as an "official" hack?

Undertoad 12-01-2004 05:22 PM

That would be great.

Wired1 12-02-2004 05:41 AM

Ok, just re-read everything and looked at my code. Looks like I made the code at the end of page 2 into a function, as well as a function that auto-creates forums.

To release this as a hack, I'd like to put some safety features in it, e.g. some way of making a simple admin CP module for it (NO CLUE), and a way to enter it into group policies so that to have access to it you have to be in a special group. Perhaps it would show up in the User CP if said user is in this secondary group?

So far, these are the requests for it that I have seen:
Quote:

if posts on the forums in XX hours < XX then create thread
Don't quite understand that. Do you mean "If user X posts every y amount of hours then create a thread?

Quote:

A form to add the threads you want and create the conditions under which they are added
What types of conditions would you like, or would you like them to be user editable conditions?

Comments please! :) I'm about to fall asleep, so tomorrow afternoon (EST) I'll post the code as a beta hack.

sabret00the 12-02-2004 09:49 AM

regarding the last bit, basically you'd have a form with

Code:

THREAD TITLE
 
  FORUM ID THREAD TO BE CREATED FOR
 
  THREAD BODY TEXT
 
  CONDITIONS TO CREATE THREAD; __ POST < __ hours
 
  USERID OF THREAD CREATOR

wouldn't that form in the admincp by the safety measure btw?

Quote:

Don't quite understand that. Do you mean "If user X posts every y amount of hours then create a thread?
what that means is that if theirs less than 100 posts on the forums in the past 5 hours then create a new thread in order to stimulate activity.

Wired1 12-02-2004 02:25 PM

Quote:

Originally Posted by sabret00the
wouldn't that form in the admincp by the safety measure btw?

what that means is that if theirs less than 100 posts on the forums in the past 5 hours then create a new thread in order to stimulate activity.

Gotcha. Think I can release just the functions as a beta hack, then later work on the form code? I'd really only want to release it formally if I could make an admin module though.

sabret00the 12-02-2004 03:26 PM

what do you mean by admin module?


All times are GMT. The time now is 09:15 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.01085 seconds
  • Memory Usage 1,746KB
  • 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_code_printable
  • (2)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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