vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Automatically Start a Welcome Thread in the Forum of Your Choice (https://vborg.vbsupport.ru/showthread.php?t=91887)

fly 10-19-2005 12:27 AM

Quote:

Originally Posted by chatbum
anyone?

Can you explain a little better what you're looking for?

WildSharky 10-19-2005 09:51 AM

You know what would make this hack nicer would be to send a pm to the user when theey sign up telling them they have a welcome post and a link in the pm to the post..


Think you can do that???

jluerken 10-19-2005 10:07 AM

Is this version not working with the welcome PM hack?

WildSharky 10-19-2005 10:09 AM

It might be as i havnt looked at all the addons on this forums so im not sure i will look for the welcome pm addon and try it thanks..

amykhar 10-19-2005 11:33 AM

Quote:

Originally Posted by WildSharky
You know what would make this hack nicer would be to send a pm to the user when theey sign up telling them they have a welcome post and a link in the pm to the post..


Think you can do that???

In my version on my board, I had it hacked so that it redirected new users directly to their welcome thread after registration. But that took a file mod.

WildSharky 10-19-2005 11:36 AM

can you give us that mod?

fly 10-19-2005 11:55 AM

Quote:

Originally Posted by WildSharky
You know what would make this hack nicer would be to send a pm to the user when theey sign up telling them they have a welcome post and a link in the pm to the post..


Think you can do that???

This is how I did that.

PHP Code:

// Start thread create 
    
$threaddm = new vB_DataManager_Thread_FirstPost($vbulletinERRTYPE_STANDARD); 

    
$username htmlspecialchars_uni($username);  
    
$allowsmilie '1'
    
$visible '1'
    
$sig '1';  //show signature 1/on 0/off 
    
eval('$pagetext .= "' fetch_template('welcome_thread') . '";');  

// Insert thread 
    
$threaddm->do_set('forumid'$forumid); 
    
$threaddm->do_set('postuserid'$postuserid); 
    
$threaddm->do_set('userid'$postuserid); 
    
$threaddm->do_set('username'$postusername); 
    
$threaddm->do_set('pagetext'$pagetext); 
    
$threaddm->do_set('title'$title); 
    
$threaddm->do_set('allowsmilie'$allowsmilie); 
    
$threaddm->do_set('visible'$visible); 
    
$threaddm->do_set('showsignature'$sig); 
    
$tid $threaddm->save();  

// Now let's send a PM notifying the user of their thread
    
$userdata->save(); 
    
$fromuser '1'
    
$username unhtmlspecialchars($userinfo['username']); 
    
$registry =& $vbulletin;

// create the DM to do error checking and insert the new PM 
    
$pmdm =& datamanager_init('PM'$vbulletinERRTYPE_SILENT); 
    
$pmdm->set('fromuserid'$fromuser['userid']); 
    
$pmdm->set('fromusername'$fromuser['username']); 
    
$pmdm->set_info('receipt'false); 
    
$pmdm->set_info('savecopy'false); 
    
$pmdm->set('title'"Important information regarding your registration!"); 
    
$pmdm->set('message'"[center][b]AUTOGENERATED PM[/b][/center] \n Pending your full approval to xxxx Forums, we have created a thread for you.  The thread is located [url=http://xxxxxforums.com/showthread.php?t=" $tid "]here[/url].  This will be the only thread you can post in until an administrator approves your membership.  If you have any questions that you'd rather not post, feel free to reply to this private message. \n \n [url]http://xxxxxxforums.com/showthread.php?t=" $tid "[/url] \n [b]Note: You may have to log in again when clicking on the thread link above[/b]"); 
    
$pmdm->set_recipients($userinfo['username'], $fromuser['permissions']); 
    
$pmdm->set('dateline'TIMENOW); 
    
$pmdm->save();

// Fin 

There is some rough code in there. If that doesn't work, I'll check back later and help ya out. Right now busy w/ work...

amykhar 10-19-2005 12:22 PM

It's better to use the mod that was released for private messages already - do a search WildSharky. It's a plugin. That code has been thoroughly tested and used by hundreds of people.

fly 10-19-2005 01:48 PM

Quote:

Originally Posted by amykhar
It's better to use the mod that was released for private messages already - do a search WildSharky. It's a plugin. That code has been thoroughly tested and used by hundreds of people.

But if you want to link to the thread created, it needs to be in the same plugin, afaik...

Xplorer4x4 10-19-2005 06:15 PM

This is working for me BUT it starts the thread by the person who registered....not me! I have filled out the proper variables in the XML file.


All times are GMT. The time now is 12:09 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.01345 seconds
  • Memory Usage 1,762KB
  • 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
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (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