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)

version2 02-08-2004 02:44 PM

Quote:

Originally Posted by Wired1
>> $post[postid] is supposed to be $post['postid'] (quotes) correct?
>You can ommit the quotes.

Everywhere, or just within $DB_site->query?



> Hmm, what I was thinking is, a way to do a check on members post count after
> they've done a new post. So the code has to go kinda after their own post sql > query or new post function. Question is, where is the best place to put such a
> code.

oooohhhh I get it now. Hrm... I suppose you'd slap that into the build_new_post function, or right after a call to that function. beats me where the best place would be though.

All right. Here is one for ya. I have my script working great on my test machine. I move it to the production server and boom. Nothing. I get no output. No errors. No posts or threads being created. Nada. Changed the userid and forumid correctly. Everything else is the same.

Anyone got any ideas for me to check out?

Wired1 02-08-2004 06:26 PM

Go back to the last post I made with the full code in it. Does that work on both sites?

version2 02-08-2004 06:39 PM

Quote:

Originally Posted by Wired1
Go back to the last post I made with the full code in it. Does that work on both sites?

Actually, I got it working and I have been doing so many other things...I forgot what I did!

version2 02-08-2004 06:44 PM

Damn. If its not one thing its another. Now, even though I have explicitly names the username and fetched all the bbuserinfo data manually...my script is posting as random members.

Main difference right now is I have vbcron running the script once an hour. Maybe vbcron is the problem.

Wired1 02-09-2004 04:56 AM

I'd copy the code exactly to a test file, run that a couple of times. If it does it correctly each time, then it's probably vbcron.

version2 02-09-2004 06:47 PM

Quote:

Originally Posted by Wired1
I'd copy the code exactly to a test file, run that a couple of times. If it does it correctly each time, then it's probably vbcron.

Using cron has made the user problem disappear. Now my problems are the order in which everything is posted. Here is what I am doing:

Eggdrop bot keeps log of the channel. Every day I am going to pour through that log and post the contents in a specific forum. Now, I didnt want each day to be just one post as that could get quite large, so I am saying every 100 lines post a new post.

Now, the problem is that the posts are not inserted in line! The first post which is the subject post is sometimes located in the middle of the thread created by the script. It should be te first post. Its called before I even start looping through the file and posting the 100 line posts.

I cant figure it out.

Wired1 02-10-2004 04:39 AM

Not sure, perhaps posting some code would help?

Does anyone know of a way of auto-creating a forum, other than a normal mySQL command? Looking for the vB function, if it exists.

version2 02-10-2004 02:03 PM

PHP Code:

$threadinfo['title'] = 'Chatroom Archive Update';
$post['title'] = 'Chatroom Archive Update - ' .  date("F j, Y, g:i a") . ' CST';
$post['message']= 'Chatter from the last hour.';
build_new_post('thread'$foruminfo$threadinfo0$post$errors);
$threadinfo['threadid'] = $post['threadid'];
                                                                                                                                              
$post['title'] = '';
$post['message'] = '';
$lines file('/eggs/mols_pet/logs/mols_pet_talk.log');
$i=0;
for(
$x=0;$x<count($lines);$x++) {
        
$post['message'] .= $lines[$x];
        
$i++;
        if(
$i>=100) {
                
build_new_post('post'$foruminfo$threadinfo0$post$errors);
                
//echo $post['message'];
                
$post['message'] = "";
                
$i=0;
        }
}
if(
$post['message'] != "") {
        
build_new_post('post'$foruminfo$threadinfo0$post$errors);
}
//echo $errors[0];
unset($lines);
$clear fopen('/eggs/mols_pet/logs/mols_pet_talk.log''w');
fwrite($clear'');
fclose($clear); 

This is the test code right now that runs through the file. And for the record, the last 24 hours the script has put the posts in correct order. So this problem is very inconsistent.

And dont make fun of my chicken scratch code! It always look horrible before it is refined! :nervous:

Karri 02-11-2004 04:05 PM

Does any one have a suggestion as to how to use this new method of having an automatic post to a forum to post a welcome message to a new user when the register (preferably after they activate their account)? I was using the hack at https://vborg.vbsupport.ru/showthrea...threadid=35398 for 2.x but haven't been able to modify it for 3.x

Thanks in advance!!!

Wired1 02-11-2004 05:23 PM

You could just set it to a Welcome Forum, and have the script be something like "Welcome ".$username." to this site"


All times are GMT. The time now is 05:30 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.01276 seconds
  • Memory Usage 1,757KB
  • 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
  • (3)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