Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
  #41  
Old 02-08-2004, 02:44 PM
version2's Avatar
version2 version2 is offline
 
Join Date: Feb 2003
Location: Philly
Posts: 136
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #42  
Old 02-08-2004, 06:26 PM
Wired1's Avatar
Wired1 Wired1 is offline
 
Join Date: Nov 2003
Location: Orlando, FL, USA
Posts: 1,361
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Go back to the last post I made with the full code in it. Does that work on both sites?
Reply With Quote
  #43  
Old 02-08-2004, 06:39 PM
version2's Avatar
version2 version2 is offline
 
Join Date: Feb 2003
Location: Philly
Posts: 136
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #44  
Old 02-08-2004, 06:44 PM
version2's Avatar
version2 version2 is offline
 
Join Date: Feb 2003
Location: Philly
Posts: 136
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #45  
Old 02-09-2004, 04:56 AM
Wired1's Avatar
Wired1 Wired1 is offline
 
Join Date: Nov 2003
Location: Orlando, FL, USA
Posts: 1,361
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #46  
Old 02-09-2004, 06:47 PM
version2's Avatar
version2 version2 is offline
 
Join Date: Feb 2003
Location: Philly
Posts: 136
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #47  
Old 02-10-2004, 04:39 AM
Wired1's Avatar
Wired1 Wired1 is offline
 
Join Date: Nov 2003
Location: Orlando, FL, USA
Posts: 1,361
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #48  
Old 02-10-2004, 02:03 PM
version2's Avatar
version2 version2 is offline
 
Join Date: Feb 2003
Location: Philly
Posts: 136
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:
Reply With Quote
  #49  
Old 02-11-2004, 04:05 PM
Karri's Avatar
Karri Karri is offline
 
Join Date: Feb 2002
Posts: 98
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!!!
Reply With Quote
  #50  
Old 02-11-2004, 05:23 PM
Wired1's Avatar
Wired1 Wired1 is offline
 
Join Date: Nov 2003
Location: Orlando, FL, USA
Posts: 1,361
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You could just set it to a Welcome Forum, and have the script be something like "Welcome ".$username." to this site"
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 01:46 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04738 seconds
  • Memory Usage 2,277KB
  • 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
  • (3)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
  • (4)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