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)
-   -   Send default PM to all new users (https://vborg.vbsupport.ru/showthread.php?t=34498)

Sparkz 04-23-2002 02:30 PM

Updated the zip with a complete rewrite of the hack.
See first post for details.

JulianD 04-23-2002 09:15 PM

This is one of the most useful hacks installed on my board! Although there were other options and similars hacks, I kept this one! And now I'm getting an updated version :D :p Great work Sparkz

Sparkz 04-23-2002 09:18 PM

Thanks.
This update was due a long time ago. For some reason I just didn't get around to it before.
I am quite convinced that this one is superior to the first version, tho. :)

Sparkz 04-24-2002 12:28 AM

BTW, why isn't this featurea already present in vB?
It is most usefull :)

You don't even have to sex0r me to use it in vB3 ;)

Disclamier to all posts I have made in the last 6 hours:
We are a wee bit drunk today, but we are doing our best :)

Meta 04-24-2002 10:49 AM

Installs softly and works nice.

Well done ... thank you, Sparkz!

tpearl5 04-30-2002 09:38 PM

I'm getting this error when I run the install file:

Database error in vBulletin Control Panel 2.2.5:

Invalid SQL: SELECT @displayorder:=displayorder+1 FROM settinggroup ORDER BY displayorder DESC LIMIT 1
mysql error: You have an error in your SQL syntax near '@displayorder:=displayorder+1 FROM settinggroup ORDER BY displayorder DESC LIMIT' at line 1

mysql error number: 1064

Any idea why?

Mathiau 05-01-2002 07:13 AM

Great hack m8

When i clicked the

[Proceed to fileedit-part]

Part, i didn't think it was doing anything, SO now in my control panel, i got like

8

[Default PM]

In a row, how can i 'uninstall' 7 of them?

And perhaps add some feature so idiots can't do what i did?

Sparkz 05-01-2002 05:09 PM

Quote:

Originally posted by Mathiau
Great hack m8

When i clicked the

[Proceed to fileedit-part]

Part, i didn't think it was doing anything, SO now in my control panel, i got like

8

[Default PM]


In a row, how can i 'uninstall' 7 of them?

And perhaps add some feature so idiots can't do what i did?

I am on the move now, but I will write a script for you later that fixes this.
I will also update the installfile to prevent it from happening to others. It's a known bug.

Sparkz 05-01-2002 05:10 PM

Quote:

Originally posted by tpearl5
I'm getting this error when I run the install file:

Database error in vBulletin Control Panel 2.2.5:

Invalid SQL: SELECT @displayorder:=displayorder+1 FROM settinggroup ORDER BY displayorder DESC LIMIT 1
mysql error: You have an error in your SQL syntax near '@displayorder:=displayorder+1 FROM settinggroup ORDER BY displayorder DESC LIMIT' at line 1

mysql error number: 1064

Any idea why?

What version of MySQL are you running?

tpearl5 05-01-2002 06:07 PM

3.22.32 :( I have had problems with it before.

Sparkz 05-01-2002 09:43 PM

Without having actually checked, I'd guess that your version does not support user variables.
I am about to hit the sack now, but I'll try to make a script you can run instead tomorrow afternoon.

tpearl5 05-01-2002 10:26 PM

Is there any way to get around it?

Sparkz 05-02-2002 08:42 AM

Yeah, it is. I'll write an install script for you later today, or early tomorrow. I just completed an 8 hour trip and had to go straight to work, but as I said, I'll try to whip something up for you this afternoon.

sub 05-02-2002 09:45 AM

Thanks so much of this hack! It's awesome and WORKS GREAT with 2.2.5

Now the hostess don't have to keep PM'ing ppl.
Keep up the good work! :bunny:

Sparkz 05-02-2002 11:19 AM

Quote:

Originally posted by tpearl5
Is there any way to get around it?
Try this script instead. Since I have a much more recent version of MySQL myself, I have no chance to verify that it will work with your version, but it does work with the version I am running.

Droopy 05-03-2002 08:42 AM

Very cool hack, works fine.

tpearl5 05-03-2002 03:28 PM

Thanks Sparkz! It installed this time.

However, when I signed up a test account I did not get the default PM. I'm not getting any errors anywhere and I changed the settings in the control panel. What could be wrong?

You can visit my board at http://degster.com/midi/board/ to take a look.

Sparkz 05-03-2002 03:31 PM

And you have completed the file edits too?

tpearl5 05-03-2002 03:38 PM

yep, there's only one, right?

Sparkz 05-03-2002 10:30 PM

Yeah... I have just tried with a fresh forum/DB - using the file I wrote for you, and it works nicely...

I honestly can't see what is wrong.

Mathiau 05-03-2002 11:44 PM

Hey m8

Just wanted to say thnx for the great support....

I actually am redoing the entire forum, did a few bo'bo's on hacks, and will be reinstalling your hack, but this time i won't press he button 50 million times :)

Sparkz 05-04-2002 12:13 AM

Well, with the updated installfile that is no longer an issue :)

bandersen 05-05-2002 05:37 PM

Cute hack - I installed it. Shows fine in admin panel, but no PM message is actually sent to the new user. I have yes on receive PM, PM activated etc.

for some reason I get an error when clicking on the Agree button in the signup template (line 748 - document.forms.0.avatarset.selectedIndex is NULL or not an object) Win Me, vb 2.2.5. Not sure this is a result of this hack tho.

Anyone have an idea... the latter is really more urgent than the first.

Oh, I installed it May 1st. Will the new version sort out the above?
Thanks!

Sparkz 05-05-2002 06:33 PM

I have been unable to reproduce the bug where no PM is sent, so I can't really say what to do about it. If/when I can reproduce it, I can start debugging. Sorry for not being able to help here.

Sparkz 05-05-2002 06:51 PM

I will however look into the problem asap.
For all I know it might be because of some general forum setup *wild guess*.

bandersen 05-05-2002 07:03 PM

thank you - appreciate it!!

vbf.Falco171 05-06-2002 07:52 PM

Hello, I have the same problem...
I have install your hack but i never receive default pm !
I have only an error on line +- 527 in the register.php file...
eval("\$subject = \"".gettemplate("emailsubject_activateaccount",1,0 )."\";");

I have translate this hack in french (version of 05-02-2002), if you change something, can you say me what ?

Sparkz 05-07-2002 08:46 AM

I never bothered to sort out that email-thingy, so I removed it like 10 minutes after posting it. :)

I could probably check it out a bit later today, tho.
I think the only thing I really changed was the install-procedure, and the removal of the mail-thingy.

vbf.Falco171 05-07-2002 10:36 AM

It's probably a problem from the code top in the register.php file...

If I find a solution, i'll send it to you or give it here...

Sparkz 05-07-2002 10:39 AM

Have any of you done other hacks in your register.php which might affect this hack?

I have reinstalled my hack at least 10 times on completely fresh copies of vB 2.2.5, and it works like a charm every single time.

For the life of me, I can't figure out what is wrong.

bandersen 05-07-2002 02:23 PM

I have no other hacks in the register.php.
I even tried a clean install of the original file just in case... included the code again... but still nothing. I made sure everything was checked "yes" if to receive PMs or not....

vbf.Falco171 05-07-2002 03:39 PM

Yes, same for me...

Sparkz 05-07-2002 04:00 PM

If at least I was able to reproduce the problem, I could try to solve it. Sorry for not being able to help you guys :/

vbf.Falco171 05-07-2002 08:07 PM

I've a first correction for this hack...

In php file of the hack, replace on line 17 and 18, $username by \$username, because with $username you can't see this text in admin panel...

Sparkz 05-07-2002 08:18 PM

I actually knew about that one. Just forgot to update the file :)

bonnmac 05-08-2002 05:34 PM

Thank You very much for this hack. I've installed it and it works great. Will make for a nice friendly atmosphere of a board to be welcomed.

vbf.Falco171 05-09-2002 07:28 PM

Ouhhh I've the solution, from Nicolas2000 a moderator of vBulletin-France Team...

The new code to insert into register.php :
PHP Code:

// Sparkz - Send Default PM to new users
   
if ($defpmactive && ($defpmadminmail || $adminemail)) {
      
$DB_site->query ("INSERT INTO privatemessage
                        (privatemessageid,userid,touserid,fromuserid,title,message,dateline,messageread,folderid)
                        VALUES (NULL,
$userid,$userid," $defpmuserid ",'" addslashes (htmlspecialchars (str_replace ('$username'$username$defpmsubject))) . "','".addslashes (htmlspecialchars (str_replace ('$username'$username$defpmbody))) . "',".time().",0,0)");
      if (
$pmpopup) {
         if (
$noshutdownfunc) {
            
$DB_site->query("UPDATE user SET pmpopup=2 WHERE userid='$userid'");
         } else {
            
$shutdownqueries[]="UPDATE user SET pmpopup=2 WHERE userid='$userid'";
         }
      }
   }
// Sparkz - Send Default PM to new users 

Modifications in php file :
PHP Code:

         $optionstemplate=generateoptions();
         
$DB_site->query("UPDATE template SET template='$optionstemplate' WHERE title='options'"); 

Put that on line 34 after } and on line 71 after } .

I test it and it run ! But the installation and un-installation don't work

bandersen 05-09-2002 08:41 PM

Vive la France!!!!

Can you pls. tell what's on line 34 and 71... just in case we do not have the same? then I'll try it out. thanks.

vbf.Falco171 05-09-2002 09:25 PM

Ouais vive la Belgique, vive la France, vive les pays Francophones :)

And for answer you :
On line 34 after
PHP Code:

       } elseif ($result['total'] > 1) {
            echo 
'<tr class="'.getrowbg().'" valign="top"><td><p><font size="1">Les param&egravetres existent d&eacuteja ' $result['total'] . ' fois</font></p></td></tr>';
            echo 
'<tr class="'.getrowbg().'" valign="top"><td><p><font size="1">Essayez de modifier vos param&egravetres.</font></p></td></tr>';
         } 

and on line 71 after
PHP Code:

            }
         } else {
            echo 
'<tr class="'.getrowbg().'" valign="top"><td><p><font size="1">Impossible de trouver des param?tres ? supprimer.</font></p></td></tr>';
         } 


Sparkz 05-09-2002 10:08 PM

I will look at it and update the files tomorrow... I've already had a few beers, so I'm not gonna mess with any code now :)


All times are GMT. The time now is 05:05 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.02749 seconds
  • Memory Usage 1,827KB
  • 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
  • (4)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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