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)

Funkie 03-30-2006 04:23 PM

Ok so why do I get the contents of the template posted everytime I get a new user instead of hi fred welcome blah

fly 04-03-2006 12:00 PM

Try changing $username to $userinfo[username]

Electrohead04 04-03-2006 05:09 PM

For all those having problems with HTML code showing, heres the solution.

Go into styles -> edit templates (for the style(s) of your choice)

You need to find the "welcome_thread" template.

Change this to a post as you would normally post one, using bbcode, etc. Then Save, and it works :)

Funkie 04-03-2006 05:57 PM

Quote:

Originally Posted by Electrohead04
For all those having problems with HTML code showing, heres the solution.

Go into styles -> edit templates (for the style(s) of your choice)

You need to find the "welcome_thread" template.

Change this to a post as you would normally post one, using bbcode, etc. Then Save, and it works :)

Ta m8 I think I'll do that but how do you call the username?

fly 04-04-2006 04:59 PM

Quote:

Originally Posted by Funkie
Ta m8 I think I'll do that but how do you call the username?

Looks like you'll have to add a phrase and call the phrase from the template.

Tralala 04-04-2006 05:53 PM

Quote:

Originally Posted by flypaper
bah, i'll try to look at it more this weekend, unless anyone has any better ideas.


This was in regards to sending the message after email verification and user moderation, if it's turned on. Just hoping you'd get a chance to look at it some more, as that's the one missing piece for many folks who'd like to use this hack. Welcoming someone before they are moderated in could lead to some nasty awkwardness on a forum.



Next question: is it possible for the welcome post/thread to include the name of the referrer? (ie: thanking them for referring the new person.)

j1time 04-04-2006 07:47 PM

I'm using it and it works great!! Thanks:)

alshehi 04-04-2006 08:53 PM

Thank You

alshehi

amykhar 04-05-2006 02:18 PM

You're welcome.

Amy

fly 04-05-2006 06:55 PM

Quote:

Originally Posted by Tralala
This was in regards to sending the message after email verification and user moderation, if it's turned on. Just hoping you'd get a chance to look at it some more, as that's the one missing piece for many folks who'd like to use this hack. Welcoming someone before they are moderated in could lead to some nasty awkwardness on a forum.



Next question: is it possible for the welcome post/thread to include the name of the referrer? (ie: thanking them for referring the new person.)

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.

The referer ID is easy to get, I just can't think of how to change that to a username and I think it would require an extra SQL query anyway.

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!

Dr Steevil 05-15-2006 06:33 PM

Miss Amy, this is gonna be great for my growing forum! I have installed this, however before I activate it on my site I need to know one thing:

I understand changing the forumid to the forum I want the thread started in. But what about this part?

Code:

$postuserid = 1328; // The Userid of the poster
    $postusername = "Justin"; // The username of the poster

How does this work? Do the variables dynamically change? Or am I completely missing something here?

Dr Steevil 05-15-2006 06:42 PM

Oops. Guess I should've TESTED it first! I understand! Thanks for a great hack! ***clicks install***

:banana:

fly 05-15-2006 07:12 PM

Quote:

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!
I believe require_once says not to call it again, if it has already been called, so I don't think that's the issue. There weren't any hooks listed in the area that you pasted the code?

Its getting late, I'll try to look at it again tomorrow in my spare time. It shouldn't be that hard to get going. Odd...

Mark.B 05-16-2006 06:08 PM

Quote:

Originally Posted by flypaper
I believe require_once says not to call it again, if it has already been called, so I don't think that's the issue. There weren't any hooks listed in the area that you pasted the code?

Its getting late, I'll try to look at it again tomorrow in my spare time. It shouldn't be that hard to get going. Odd...

No there's no hooks in that section as far as I can see.

It is very nearly there...I don't much care about the missing header bar in the confirm message as it's purely cosmetic, my worry is what other side effects that is having.

Mark.B 05-23-2006 07:00 PM

Hmmm....another problem with my method...if you approve more than one account at once the second thread contains the text for both threads, the third contains all three, etc etc.

It must be loooping wrongly but I can't seem to fix that either.

GamerJunk.net 05-23-2006 09:22 PM

Mine keeps reverting back to your welcome thing even tho I changed it in the plugin

peterska2 06-12-2006 09:06 PM

It doesn't work for me on 3.6

Locked up my ACP - No error Messages - Had to disable plugins via config.php and remove it.

Annapurna 06-19-2006 03:08 PM

I'm still on 3.5.4

Worked fine!

BUT: stopped working as soon as I changed the forum-id.
Changing back: not working!
uninstall / reinstall: not working!

Any ideas?

Andreas

ab420 07-03-2006 02:35 AM

Thank you SOOOO much for this!!! I've been killing myself trying to say hello to every new member! LOL!

Ski-Whiz 07-10-2006 02:22 AM

Quote:

Originally Posted by peterska2
It doesn't work for me on 3.6

Locked up my ACP - No error Messages - Had to disable plugins via config.php and remove it.


Amy can we get an update for 3.6, AND somehow make this so it can create a thread unpon email verification??

This prevents trolls from creating BS accounts, and spaming our welcome forum..

lil7rocket 07-26-2006 03:29 AM

Hey amy thanks for a great mod I just made some minor modifications to your product so I thought I'd share. Strangely, I only got it to work if i made the mods to the plugin portion before install.
If anyone needs them to get them to work properly on their forum let me know and i can get it working for you.

I am going to work on a version of this with options in the Admin cp using your mod and Sina's mod i think i can hash something together

lil7rocket 07-26-2006 03:35 AM

Quote:

Originally Posted by Ski-Whiz
Amy can we get an update for 3.6, AND somehow make this so it can create a thread unpon email verification??

This prevents trolls from creating BS accounts, and spaming our welcome forum..

if you want this to work only after email verification and/or after they finish registration when email verification is disabled then use the edit i just posted
if you dont want the welcome template changed from what you made it then use the one contained here

PhenomLeader 08-01-2006 03:01 PM

I've a question. My new thread is popping up under the username of the new member, and not the 'general staff' username I created.

In the list of threads it looks like the user has posted a thread to welcome him or herself. Once you open the thread, the username is the 'general staff' username.

I don't know where in here:
Quote:

// Setup Variables
$forumid = 11; // The forum id that you want the thread posted in
$postuserid = 271; // The Userid of the poster
$postusername = "$username"; // The username of the poster
$title = "Welcome new member: " . $username; // The thread title
To fix that?

Should I change $username to the UserID of the 'general staff' that I want to use ?

PhenomLeader 08-02-2006 04:29 AM

I got it, thanks! Great hack!

I||usi0nz 08-02-2006 04:33 AM

great, thanks Amy :)

What's the difference to your minor modifications lil7rocket?

Froggy32701 08-08-2006 08:23 PM

Does this work w/ 3.6 ?

Tyegurl 08-08-2006 08:27 PM

yes it does!

Tralala 08-10-2006 12:38 AM

Quote:

Originally Posted by lil7rocket
if you want this to work only after email verification and/or after they finish registration when email verification is disabled then use the edit i just posted

Can this be made to post a new thread (or a new message in an existing thread) when (and only when) a new user is approved from the moderation queue?

lil7rocket 08-12-2006 06:46 AM

Quote:

Originally Posted by Tralala
Can this be made to post a new thread (or a new message in an existing thread) when (and only when) a new user is approved from the moderation queue?


yeah after you install it you can just move its hook to register_addmember complete and I believe that will trigger it after the user has been approved if not Ill have to go look at it more in depth later

lil7rocket 08-12-2006 06:49 AM

Quote:

Originally Posted by I||usi0nz
great, thanks Amy :)

What's the difference to your minor modifications lil7rocket?

just streamlines it a little bit

#1 should install seamlessly over any old installations and should work perfect with those using a lot of mods and those using none

#2 is the same but wont overwrite your welcome message with a new one


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.01566 seconds
  • Memory Usage 1,845KB
  • 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
  • (3)bbcode_code_printable
  • (14)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
  • (40)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