vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   New Users Create their own Welcome thread During Registration (https://vborg.vbsupport.ru/showthread.php?t=55287)

ap0c 07-14-2003 10:00 PM

New Users Create their own Welcome thread During Registration
 
Since I didn't find this exact hack around, here you go.

This hack creates a new welcome thread in the users name after email conformation in the forum of your choice,
and is the new forum user's first post on your board.
Since the new forum user has 1 post, it is easier for admins to check for banned members.
Depending on the admincp settings this is either required to be filled in during the registration process,
or a default reply will be inserted.
You also have the ability to redirect the new user to their post if you want.
The new thread and post will appear on the forums after they reply to the activation email.

Things to do:
-------------------
9 mysql queries to run
1 File ( 6 edits)
1 Template edit
2 new templates to create
Set vboptions


Time to install:
-----------------
a few minutes

pics to follow

edit: updated to include allowing users to create thier own thread title, see instructions for upgrade information

ap0c 07-14-2003 11:21 PM

registration page pic

ap0c 07-14-2003 11:22 PM

new thread and post created with a default message

ap0c 07-14-2003 11:28 PM

user created message

Kenji Wing 07-15-2003 07:08 AM

very nice apoc this iwll go great with my new members section ^_^

Dean C 07-15-2003 11:05 AM

Very nice idea :)!

- miSt

ap0c 07-15-2003 09:01 PM

thanks for the comments Kenji and Mist

Bulleh 07-15-2003 10:16 PM

whats it like for bugs? safe enough to install and use?

Bulleh 07-15-2003 10:32 PM

seeems ok Very nice hack, summut i wanted :)

Bulleh 07-15-2003 10:43 PM

actually, now i got a database error :|

ap0c 07-15-2003 10:51 PM

what kind of error?

Bulleh 07-15-2003 10:56 PM

i donno, it just Says theres an Error With the Database, Please Contact Admin

So i reverted to the backup register.php for now.....mite have a mistake in the register.php somewhere tho im guessing around...
PHP Code:

 // homepage doesn't match the [url]http://-style[/url] format in the beginning -- possible attempted exploit
      
$homepage ''
    }
  }
 
$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,regthread) 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')");
     
$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,country) 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','".addslashes($country).",".addslashes($regthread)."')"); 

as i couldnt copy and paste straight over cus i got other hack code there, u see the prob?

ap0c 07-15-2003 11:29 PM

try 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,country,regthread) 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','".addslashes($country).",".addslashes($regthread)."')"); 


Bulleh 07-16-2003 02:56 PM

i still get some Database error, can i send you my register.php some how and u Do it for me please? :) wud be appreciated ta

Hoffi 07-16-2003 03:09 PM

A very nice Idea.

But I don't Hack my Board even more till 3 is released.

KISS 07-17-2003 02:25 PM

Anyway it could be made to force user to fill in the welcome thread during registration instead of using a default one?

Ian Cunningham 07-17-2003 03:46 PM

Are the users automatically taken to that thread once they have registered?

ap0c 07-17-2003 09:54 PM

@KISS - yes, maybe I'll have time tomorrow night to write it. It's not hard, move the welcome thread box to the top of the page under email and change the code to, if nothing is inserted give a standard required field error


@Ian - no not presently, but by changing the redirection link they could be:)

Dean C 07-18-2003 10:47 AM

ap0c - at KISS's question i suggest a nice admin cp option :) And the same with Ian's :)

- miSt

ap0c 07-18-2003 10:13 PM

Quote:

Today at 07:47 AM Mist said this in Post #19
ap0c - at KISS's question i suggest a nice admin cp option :) And the same with Ian's :)

- miSt

see post below, done

KISS 07-21-2003 11:56 PM

Quote:

07-17-03 at 04:54 PM ap0c said this in Post #18
@KISS - yes, maybe I'll have time tomorrow night to write it. It's not hard, move the welcome thread box to the top of the page under email and change the code to, if nothing is inserted give a standard required field error


@Ian - no not presently, but by changing the redirection link they could be:)



Any update on this. I really like this option and would love to have it.

ap0c 07-22-2003 12:26 AM

For requiring this during registration,done update soon.

ap0c 07-23-2003 12:12 AM

Quote:

07-18-03 at 07:47 AM Mist said this in Post #19
ap0c - at KISS's question i suggest a nice admin cp option :) And the same with Ian's :)

- miSt


Is there anything else anyone can think of that needs to be added to the admincp? (see pic)

KISS 07-23-2003 01:14 AM

Nope, that looks great. Can't wait to try it out.. Awesome work!

Oblivion Knight 07-23-2003 06:13 AM

It's looking good ap0c, especially now with admin panel integration :)

Keep up the good work!

ap0c 07-26-2003 06:45 PM

Update to this hack

updated the first post to include the new instructions.
Every thing should work :cool: Make sure you update the admincp options!!!


New options added in the admincp for:
-requiring this to be filled during registration
-admin decides to redirect to the new thread created or not
-default title can be changed through the admincp
-default post can be changed through the admincp

let me know if you find any bugs.
apoc

KISS 07-26-2003 09:53 PM

I have email verification turned on during regisrtation, when I test this out with it. I get a database error during the email verification part. And I get 5 Welcome posts that are Identical from that which I think is one per time I clicked the verification link.

With it turned off I get no welcome message at all.

Any clues?

ap0c 07-26-2003 11:02 PM

what are the lines around the db error line?
Did you install the first beta version?

KISS 07-27-2003 12:21 AM

Invalid SQL: UPDATE user SET usergroupid=, usertitle='' WHERE userid='684'
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ' usertitle='' WHERE userid='684'' at line 1

mysql error number: 1064

And yes I used the first database version.. If I uninstall this version the old one still works.

But thats the exact error I get. When Installed.

ap0c 07-27-2003 01:10 AM

KISS, check your pm

PHP Code:

around line 375 find and remove:

  
//registration hack
  
if ($regthread=="") {
    
$regthread="Hi, Im your newest member. I look forward to being part of this community";
$regthread=censortext($regthread);


see if removing this helps

KISS 07-27-2003 12:55 PM

Thanks for you help ap0c, got it all worked out with what you suggested.

Maybe a few more suggestions if you plan on updating it again as after you fixing my problem I discovered or more like realised some other things that could be added to this hack.

1) The Thread Title, maybe add another line to the registration above the welcome thread area with thread title so they can give it there own title.

2) Minimum Characters requirement, I see you have a maximum characters to it, but whats to stop someone from just typing any one letter to by pass it?

3) Just a thought, maybe add the smilie box there to? Or is that just overdoing it? Yea maybe so.

Forgive me just talking to myself.

Thanks again ap0c

ap0c 07-28-2003 12:44 AM

@KISS glad we found the extra} from the previous version:D
I look forward to seeing your forum when it goes live.



can a mod move this thread to full releases as I'm confident no bugs remain, thanks

NuclioN 08-08-2003 07:46 AM

Clicked 'Install' :) Working great. It's stimulating new members to participate smooth in your forum. If you have the quick registration hack with fields above the threads in every subforum it needs the code in that template(s) as well or registration from that point will not work.

NuclioN 11-10-2003 08:29 AM

Is it possible to use the Dos bot hack https://vborg.vbsupport.ru/showthread.php?t=58124 so when someone has registered and the welcome thread appears, it contains already a command as for example !help and a list of shortcuts to forumfunctions will emerge?

Gio Takahashi 11-10-2003 05:31 PM

Quote:

Originally Posted by NuclioN
Is it possible to use the Dos bot hack https://vborg.vbsupport.ru/showthread.php?t=58124 so when someone has registered and the welcome thread appears, it contains already a command as for example !help and a list of shortcuts to forumfunctions will emerge?

The dos bot only runs on "replies" It doesn't run on threads for some reason =/

NuclioN 11-10-2003 08:57 PM

?? When a new member is registering it is required to make at least 1 word for an openingstopic otherwise it is impossible to proceed. If it is possible to push the command !help as a sort of prefix in this topic then the bot will reply immediatly after the welcometopic with a whole list of botcommands to help the new member finding the way in the huge amount of functions and hacks for your forum. :)

ap0c 11-13-2003 10:02 PM

Quote:

Originally Posted by NuclioN
Is it possible to use the Dos bot hack https://vborg.vbsupport.ru/showthread.php?t=58124 so when someone has registered and the welcome thread appears, it contains already a command as for example !help and a list of shortcuts to forumfunctions will emerge?

off hand I would say yes if the proper check coding was added to the post creation part of the hack. Ie, $regthread I think it's called. Having never seen the vbdos bot hack in action, it's a guess but it should work.

Rampag33 11-14-2003 03:05 AM

This is a great hacc, plain on installing it tonight

***installed***

VAN 11-18-2003 07:34 PM

I can't get this to work with 2.3.3. I'm not getting any DB errors--the thread just isnt being created. I've installed and re-installed it about 5 times now, but I'm not having any luck.

Any ideas?

ap0c 11-19-2003 03:30 AM

did you set the admin cp options in settings?


All times are GMT. The time now is 01:45 AM.

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.02829 seconds
  • Memory Usage 1,863KB
  • 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_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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