vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Text Message on PM (https://vborg.vbsupport.ru/showthread.php?t=73205)

yoyoyoyo 02-13-2005 04:43 AM

Quote:

Originally Posted by fiber1
How would I run the queries if I have no table Prefix?

[SQL]ALTER TABLE user ADD `cellnum` TINYTEXT NOT NULL;
ALTER TABLE user ADD `cellprovider` VARCHAR( 8 ) NOT NULL;[/SQL]
[SQL]INSERT INTO phrase (`languageid`, `varname`, `text`, `phrasetypeid`) VALUES (0, 'pmreceived_celltxt', '$touserinfo[username], You have received a new private message at $vboptions[bbtitle] from $bbuserinfo[username].', 3000);
INSERT INTO phrase (`languageid`, `varname`, `text`, `phrasetypeid`) VALUES (0, 'pmreceived_celltxt', 'New Priv Msg at $vboptions[bbtitle]!', 4000);
INSERT INTO phrase (`languageid`, `varname`, `text`, `phrasetypeid`) VALUES (0, 'badcellnum', 'You have provided an invalid cell phone number. Please provide a United States of America cell phone number including area code and a seven digit number.', 1000);
INSERT INTO phrase (`languageid`, `varname`, `text`, `phrasetypeid`) VALUES (0, 'cellnummismatch', 'Your cell phone number provided does not match the confirmation cell phone number you provided, please go back and correctly fill in these fields.', 1000);
INSERT INTO phrase (`languageid`, `varname`, `text`, `phrasetypeid`) VALUES (0, 'cellnumtaken', 'The cell phone number you provided is already in use. If this is your cell phone number please contact your board''s administrator.', 1000);
INSERT INTO phrase (`languageid`, `varname`, `text`, `phrasetypeid`) VALUES (0, 'invalidcellprovider', 'The cell phone provider you have provided does not exist or is not yet supported. Please contact your board''s administrator about this.', 1000);[/SQL]

Vizionz 02-13-2005 03:37 PM

Works with tmobile as well just so you know and with 3.06 of vb

fiber1 02-13-2005 09:52 PM

Thats odd I get the following error when running the first query.

Code:

An error occurred while attempting to execute your query. The following information was returned.
error number: 1064
error desc: 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 ''cellnum' TINYTEXT NOT NULL;
ALTER TABLE user ADD `cellprovide

Anyone have any ideas?

AN-net 02-13-2005 09:54 PM

try running them one at a time

yoyoyoyo 02-13-2005 10:05 PM

Quote:

Originally Posted by fiber1
Thats odd I get the following error when running the first query.

Code:

An error occurred while attempting to execute your query. The following information was returned.
error number: 1064
error desc: 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 ''cellnum' TINYTEXT NOT NULL;
ALTER TABLE user ADD `cellprovide

Anyone have any ideas?

If that is the complete error then it looks to me like you didn't copy all of the syntax, either

fiber1 02-14-2005 01:15 AM

Tried to run one at a time and that was the whole syntax.

:(

Scerina 03-11-2005 10:15 PM

Personally, I would luv this hack on my forum...is it possible for someone who has more advance experince in hackin and coding to install it for me? Cuz I just try to do it and am already recievin error messages...

I mean I luv this hack already...and I know my members would ADORE it!!!

TundraSoul 03-12-2005 01:30 AM

AN-net, could I please get a code revison for this piece of code? I'm using v3.0 and my code is a little different in profile.php

According to the directions I should look for:

Code:

~~~~~~~~~~~~~~~~~~~~~~
Find:
if ($newpassword OR $newemail)
{
$DB_site->query("UPDATE " . TABLE_PREFIX . "user SET $newpassword $newemail usergroupid = " . intval($bbuserinfo['usergroupid']) . " WHERE userid = $bbuserinfo[userid]");
}

But the closest thing I have is this:

Code:

if (!empty($newpassword))
{
// insert record into password history
$DB_site->query("INSERT INTO " . TABLE_PREFIX . "passwordhistory (userid, password, passworddate) VALUES ($bbuserinfo[userid], '" . addslashes($newpassword) . "', NOW())");
$newpassword = "password = '" . addslashes($newpassword) . "', passworddate = NOW(),";
} else {
$newpassword = '';
}
$DB_site->query("UPDATE " . TABLE_PREFIX . "user SET $newpassword $newemail usergroupid = " . intval($bbuserinfo['usergroupid']) . " WHERE userid='$bbuserinfo[userid]'");
if ($newemailaddress)
{
$url = "usercp.php?$session[sessionurl]";
eval(print_standard_redirect('redirect_updatethanks_newemail'));
}
else
{
$url = "usercp.php?$session[sessionurl]";
eval(print_standard_redirect('redirect_updatethanks'));
}
}

Can you provide me with a revised bit of code for this step in your directions?

Thank you very much!

AN-net 03-12-2005 03:24 AM

Quote:

Originally Posted by TundraSoul
AN-net, could I please get a code revison for this piece of code? I'm using v3.0 and my code is a little different in profile.php

According to the directions I should look for:

Code:

~~~~~~~~~~~~~~~~~~~~~~
Find:
if ($newpassword OR $newemail)
{
$DB_site->query("UPDATE " . TABLE_PREFIX . "user SET $newpassword $newemail usergroupid = " . intval($bbuserinfo['usergroupid']) . " WHERE userid = $bbuserinfo[userid]");
}

But the closest thing I have is this:

Code:

if (!empty($newpassword))
{
// insert record into password history
$DB_site->query("INSERT INTO " . TABLE_PREFIX . "passwordhistory (userid, password, passworddate) VALUES ($bbuserinfo[userid], '" . addslashes($newpassword) . "', NOW())");
$newpassword = "password = '" . addslashes($newpassword) . "', passworddate = NOW(),";
} else {
$newpassword = '';
}
$DB_site->query("UPDATE " . TABLE_PREFIX . "user SET $newpassword $newemail usergroupid = " . intval($bbuserinfo['usergroupid']) . " WHERE userid='$bbuserinfo[userid]'");
if ($newemailaddress)
{
$url = "usercp.php?$session[sessionurl]";
eval(print_standard_redirect('redirect_updatethanks_newemail'));
}
else
{
$url = "usercp.php?$session[sessionurl]";
eval(print_standard_redirect('redirect_updatethanks'));
}
}

Can you provide me with a revised bit of code for this step in your directions?

Thank you very much!

ill try to look into this:)

AN-net 03-12-2005 03:26 AM

For those experiencing problems running the following queries:
[sql]
ALTER ~TablePrefix~user ADD 'cellnum' TINYTEXT NOT NULL;
ALTER ~TablePrefix~user ADD `cellprovider` VARCHAR( 8 ) NOT NULL;
[/sql]

use these instead
[sql]
ALTER TABLE ~TablePrefix~user ADD cellnum TINYTEXT NOT NULL;
ALTER TABLE ~TablePrefix~user ADD cellprovider VARCHAR( 8 ) NOT NULL;
[/sql]


All times are GMT. The time now is 10:37 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.01063 seconds
  • Memory Usage 1,753KB
  • 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
  • (6)bbcode_code_printable
  • (3)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
  • (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