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)

Tralala 04-13-2006 06:14 PM

Thanks so much flypaper; I've been busy traveling and didn't get a chance to see your mod till just now. I will give it a whirl and report back ASAP.

Tralala 04-17-2006 10:39 PM

Quote:

Originally Posted by flypaper
Try this. I checked out how Andreas did his Welcome PM hack and changed this accordingly. All credit goes to Amy and Kirby (LOL). Lemme know if it works.

Unfortunately this didn't work. :(

I previously was using your edit that allowed for a new post in a preexisting thread (instead of an entirely new thread.) So I uninstalled that one first.

Then I changed the forum number, userID and name variables accordingly on this one, just to test, installed it, and started the registration for a new user.

When the admin finally goes to moderate in the new user, however, this error comes up:
Fatal error: Call to a member function on a non-object in /home/.odell/mydir/myforumname/forums/global.php on line 22

Thanks for the effort, flypaper. I'm still very interested to see if this can be made to work. Seems like it makes a lot of sense and is a nice way to give a welcome to every new member ... so long as they are verified and moderated inside properly! :cool: (As I'm sure you know, not every board has an open-door policy, some are decidely restricted or "invite only," and the vibe is enhanced when members are greeted properly when they finally are able to login. Of course this whole mechanism falls apart if they are welcomed publicly... before they are fully validated and approved by an admin.)

Thanks again for the attempt and the attention.

haytham 05-02-2006 12:40 PM

Thanks. Clicked install. Took some time from me to translate into my language ( only because I am poor at these codes ) Clicked install. Realy nice. Thanks

rolliet 05-07-2006 06:25 AM

I can't seem to find if this has been asked before. Everything works fine and the body of the message is perfect, but the title doesn't give the new user name it gives me this: "This just in: joins our Forums..." So how do I get the title to reflect the new user name?

Thanks for the hack I really like it.

Edit: Got it fixed had to change title to :$userinfo[username]

5wayshosting 05-08-2006 03:35 AM

can someone confirm this hack is right to install.

cheers:banana:

coffee 05-08-2006 07:16 PM

Thank you amykhar.

Mark.B 05-14-2006 09:42 PM

Has anyone managed to get this to work on approval of the account rather than email verification? Flypaper's edit doesn't work, I've tried troubleshooting this but it's beyond me.

It seems to be something to do with the different hook location not working with a particular function, that's about the best I can come up with. I can't fix it. :(

Mark.B 05-14-2006 09:46 PM

UPDATE: I can make it work by manually adding the code to admincp/user.php. I was rather hoping to do it with a plugin, but it seems not.

Tralala 05-14-2006 09:57 PM

Quote:

Originally Posted by Mark.B
UPDATE: I can make it work by manually adding the code to admincp/user.php. I was rather hoping to do it with a plugin, but it seems not.

As you've read in this thread, I've been testing flypaper's code modifications all along, to no avail. Really eager to get it working as you have, as it's the only thing keeping me from using this excellent idea/hack on my forum.

Would you be able to share the code additions? I'd appreciate it.

Mark.B 05-14-2006 10:10 PM

Well I did this.

In admincp/user.php find:
Code:

}
                        else if ($status == -1)

Add above (changing the variables of course)
Code:

// Backend Files
                                    require_once('./global.php');
                                    require_once('./includes/class_dm.php');
                                    require_once('./includes/class_dm_threadpost.php');

                                // Setup Variables
                                    $forumid = 174; // The forum id that you want the thread posted in
                                    $postuserid = 101; // The Userid of the poster
                                    $postusername = "Mark.B"; // The username of the poster
                                    $title = "Welcome, " . $username; // The thread title

                                // Don't change below this line

                                // Start thread create
                                    $threaddm = new vB_DataManager_Thread_FirstPost($vbulletin, ERRTYPE_STANDARD);

                                    $username = htmlspecialchars_uni($username);
                                    $allowsmilie = '1';
                                    $visible = '1';
                                    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);
                                    $tid = $threaddm->save();

                                // Update last post stuff on forumdisplay
    require_once('./includes/functions_databuild.php');
    build_forum_counters($forumid);

The only slight issue I have found is this. When you approve an account, the message that says 'User accounts validated and users notified" is missing the sort of "silver header bar" it normally has. If you comment out:
require_once('./global.php');
then the header bar reappears, but then the post that is created is blank, it does not contain any text.

I am guessing that using global.php twice is causing the header bar to vanish. This itself is not a problem, however I worry about what other side effects this is having.

Perhaps an expert coder could point us in the right direction as we are NEARLY there!


All times are GMT. The time now is 07:43 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.01241 seconds
  • Memory Usage 1,756KB
  • 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
  • (2)bbcode_code_printable
  • (2)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