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

Reply
 
Thread Tools Display Modes
  #1  
Old 12-03-2001, 07:08 PM
Joe Joe is offline
 
Join Date: Oct 2001
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would like to start a new thread in a private forum each time a new member registers on the forums, the title would be the new users username, and the post would have same type of information as the new member email i recieve.

Anyone know how to set this up, or create this hack for me?
Reply With Quote
  #2  
Old 12-03-2001, 08:54 PM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah, i'll whip that up.

I'll add a bit in the admin options to turn it on or off and what forumid to post it to.

Last question is it to do it on register or when they click the activate link in the email?
Reply With Quote
  #3  
Old 12-03-2001, 09:35 PM
Joe Joe is offline
 
Join Date: Oct 2001
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

On registration would be awesome! thanks for your help
Reply With Quote
  #4  
Old 12-05-2001, 06:05 PM
Joe Joe is offline
 
Join Date: Oct 2001
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Let me know if you need help testing this
Reply With Quote
  #5  
Old 12-05-2001, 06:15 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Joe,
If he doesn't get back to you, I can tell you right now how to do this.

Go to releases and get the robot moderator hack. Modify it so that it posts to the forum of your choice, and change the subject line and message. Note: You can pass parameters to the script and include them in the message.

Then, open up registration.php

Find this:

PHP Code:
$DB_site->query("INSERT INTO user (userid,username,password,email,".$newstylefield."parentemail,coppauser,homepage,icq,aim,yahoo,signature,adminemail,showemail,invisible,usertitle,joindate,cookieuser,daysprune,lastvisit,lastactivity,usergroupid,timezoneoffset,emailnotification,receivepm,emailonpm,options,birthday,maxposts,startofweek,ipaddress,pmpopup,referrerid,nosessionhash,avatarid) VALUES (NULL,'".addslashes(htmlspecialchars($username))."','".addslashes(md5($password))."','".addslashes(htmlspecialchars($email))."',".$newstyleval."'".addslashes(htmlspecialchars($parentemail))."','$coppauser','".addslashes(htmlspecialchars($homepage))."','".addslashes(htmlspecialchars($icq))."','".addslashes(htmlspecialchars($aim))."','".addslashes(htmlspecialchars($yahoo))."','".addslashes($signature)."','$adminemail','$showemail','$invisible','".addslashes($usertitle)."','".time()."','$cookieuser','".addslashes($prunedays)."','".time()."','".time()."','$newusergroupid','".addslashes($timezoneoffset)."','$emailnotification','$receivepm','$emailonpm','$options','".addslashes($birthday)."','".addslashes($umaxposts)."','".addslashes($startofweek)."','".addslashes($ipaddress)."','$pmpopup','".addslashes($testreferrerid['userid'])."','$nosessionhash','$avatarid')");
  
$userid=$DB_site->insert_id(); 
Right after that, insert a call to the robot moderator script., passing it parameters such as $username, etc.

That SHOULD do it for you.

Amy
Reply With Quote
  #6  
Old 12-05-2001, 07:43 PM
Joe Joe is offline
 
Join Date: Oct 2001
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks! I'll give it a try tonite
Reply With Quote
  #7  
Old 12-07-2001, 04:17 AM
Joe Joe is offline
 
Join Date: Oct 2001
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm, i cant figure this out... im a total php newbie, and none of this makes sense...

PPN, any word on this hack? thanks!
Reply With Quote
  #8  
Old 12-15-2001, 06:19 PM
Joe Joe is offline
 
Join Date: Oct 2001
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

bump?
Reply With Quote
  #9  
Old 12-28-2001, 07:26 PM
Joe Joe is offline
 
Join Date: Oct 2001
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i'll donate $20 to your forum / website if you make this for me PLEASE!!
Reply With Quote
  #10  
Old 12-28-2001, 11:48 PM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This hack was done in about 10mins before i went to bed so hope it works ok, worked fine on my test forums.

run these two sql queries, they will create two fields under user and registration options.

INSERT INTO setting (settingid, settinggroupid, title, varname, value, description, optioncode, displayorder) VALUES (NULL, '6', 'New Thread on Registration', 'newregthread', '1', 'Post a new thread to the forum identified below when a user registers', 'yesno', '18')
INSERT INTO setting (settingid, settinggroupid, title, varname, value, description, optioncode, displayorder) VALUES (NULL, '6', 'Forum to post to for a new registration', 'newregthreadforumid', '1', 'The Forumid to post a new thread to when a user registers', '', '19')

you should immediately go change the forumid specified via the admin panel so new users won't have problems when registering

Open register.php go to line 489
look for

PHP Code:
  $DB_site->query("UPDATE session SET userid=$userid WHERE sessionhash='".addslashes($session['dbsessionhash'])."'"); 
below it add

PHP Code:
  //Start Hack to Post userinfo to a forum
  
if($newregthread) {
    
$DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,postusername,postuserid,lastposter,dateline,iconid,visible,attach) VALUES (NULL,'".addslashes(htmlspecialchars("$username"))."','".time()."','$newregthreadforumid','1','0','".addslashes("Auto Poster")."','0','".addslashes("Auto Poster")."','".time()."','0','1','0')");
    
$threadid=$DB_site->insert_id();
    eval(
"\$message = \"".gettemplate("email_newuser")."\";");
    
$message=parseurl($message);
    
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars("$username"))."','".addslashes("Auto Poster")."','0','".time()."','0','".addslashes($message)."','0','','','0','1')");
    
$postid=$DB_site->insert_id();
    
$foruminfo=getforuminfo($newregthreadforumid);
    
$DB_site->query("UPDATE forum SET replycount=replycount+1,threadcount=threadcount+1,lastpost='".time()."',lastposter='".addslashes("Auto Poster")."' WHERE forumid IN ($foruminfo[parentlist])");
  }
  
//End Hack to post userinfo to a forum 
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:22 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.09739 seconds
  • Memory Usage 2,276KB
  • 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
  • (3)bbcode_php
  • (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