Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
  #61  
Old 31 Jul 2007, 17:28
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Add the following to the top of your script:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
Marco van Herwaarden
Ex vBulletin.org Coordinator
Reply With Quote
  #62  
Old 31 Jul 2007, 17:57
RonInMaine RonInMaine is offline
 
Join Date: Jul 2007
Thank you. That worked nicely.

But, now you've got me curious. How did changing the error reporting options fix the problem?

Thanks,
Ron.
Reply With Quote
  #63  
Old 09 Aug 2007, 06:02
psalzmann psalzmann is offline
 
Join Date: Mar 2004
Brilliant! Thanks Novastar!
Reply With Quote
  #64  
Old 12 Aug 2007, 07:40
blogtorank's Avatar
blogtorank blogtorank is offline
 
Join Date: Jan 2006
Real name: Demetrius
I've made it possible for you all to start creating members automatically here in this new hack:

http://www.vbulletin.org/forum/showthread.php?t=154637

I branched differently with all full sources of .NET and PHP using what I seen on the forums here with my .NET, and putting it all to work within XML_RPC I hope this helps others out as well.
Reply With Quote
  #65  
Old 15 Aug 2007, 03:52
psalzmann psalzmann is offline
 
Join Date: Mar 2004
Adding user fine.. how about updating them?

We are using novastar's hack as mentioned above and it's working fine. However, adding users is one thing, updating is another .. which brings me to my next question:

Will this work to actually "update" an existing user, all we're trying to do is update an existing user in the forum to a new usergroup:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

But before I execute and implement that code above, I just want to make sure this won't actually "insert/register or create" a user, I would like to just update.

Any clues? is there a $userdm->update(); instead of save? I noticed a pre_save() option and now it's got me a bit curious

Thanks in advance!

Okay I did some more reading.. would someone be able to verify the following code:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

TIA

Last edited by psalzmann; 15 Aug 2007 at 04:20. Reason: Automerged Doublepost
Reply With Quote
  #66  
Old 15 Aug 2007, 04:22
blogtorank's Avatar
blogtorank blogtorank is offline
 
Join Date: Jan 2006
Real name: Demetrius
We are using novastar's hack as mentioned above and it's working fine. However, adding users is one thing, updating is another .. which brings me to my next question:

Not off hand I don't think there is anything that can make it update without modifying the code to make it UPDATE, unless you make the set work as an update within a sql statement inside your PHP code....

Last edited by blogtorank; 15 Aug 2007 at 04:26. Reason: Took out all them quotes
Reply With Quote
  #67  
Old 06 Sep 2007, 03:06
taras taras is offline
 
Join Date: Nov 2003
Hey novastar
How do you pass varibles from another DB?
we tryed:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

But it's not working...



Originally Posted by novastar View Post
i use a modified version of the code they gave a couple posts back which works great for me.

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I would have taken more time to tinker with it, and possibilly put it in a function, but as there is only 1 place in my scripting but that works fine for me.
Im running it on vBulletin 3.6.2
Reply With Quote
  #68  
Old 08 Oct 2007, 15:33
skattabrain skattabrain is offline
 
Join Date: Apr 2007
novastar ... added user without trouble, thanks!

any ideas on how to add the custom field data?
Reply With Quote
  #69  
Old 13 Oct 2007, 05:16
amatulic amatulic is offline
 
Join Date: Sep 2007
PHP class for user account operations

After much testing and examining vBulletin code, I finally finished my PHP class for performing basic operations on user accounts (create user, modify user, delete user, log on, log off). This has enabled me to integrate the forum into my site. Users who log in to my site are logged in to the forum, users who register on my site automatically get an account on the forum, etc.

Once that was done, I just had to modify all the vBulletin templates that contained a login form, logout link, register link, or user account modification link, and make sure those things use MY code for those functions. Now users can log in either from the forum or from my main site, and user account registration and modification are all handled on my main site, outside of the forum. It all works pretty well, without modifying a single line of the vBulletin source code.

Here is the code for class.forumops.php, with extensive usage comments:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

As you can see, most of the operations above are pretty simple, except for the user deletion function. Also, to update user account information, see the first post of this thread for options you can use.

The wordwrapping above looks funny, but if you quote this message as if to reply, the wordwrapping will be correct when you copy and paste it.

I hope this helps some people.
-Alex

Last edited by amatulic; 29 Jun 2008 at 16:28. Reason: added password date update code
Reply With Quote
  #70  
Old 14 Oct 2007, 20:47
Lordy Lordy is offline
 
Join Date: Oct 2002
When using your code (amatulic), I get
Fatal error: Call to a member function query_first() on a non-object in /home/lordy/domains/animefill.com/public_html/project/forum/includes/class_dm_user.php on line 380
I'm passing the variables this way


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

line 380 is

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #71  
Old 15 Oct 2007, 03:20
amatulic amatulic is offline
 
Join Date: Sep 2007
Originally Posted by Lordy View Post
When using your code (amatulic), I get "Fatal error: Call to a member function query_first() on a non-object in /home/lordy/domains/animefill.com/public_html/project/forum/includes/class_dm_user.php on line 380"
Odd. It's working for me. Try this hard-coded example, in the same directory where you have class.forumops.php. You can run it from the commandline:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

You can go to the admin control panel "Prune / Move Users" and verify the user account 'test_user' got created. I just did a diff of what I posted vs what I have, and the only difference I see is that I am now passing the username by reference to delete_user(). That shouldn't make any difference. I'll update my source in my previous message anyway.
-Alex

Last edited by amatulic; 15 Oct 2007 at 03:30.
Reply With Quote
  #72  
Old 17 Oct 2007, 21:16
Lordy Lordy is offline
 
Join Date: Oct 2002
Yup, seems that that does work. Can't seem to figure out how to do.

I tried putting

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

in my config file, and just including it. I think i'll probably have to code around that as it seems its setting some issues

I'll have to debug this on my end it seems.

I think I may have figured it out.

thanks =) I'll post back when I have a definite answer.
Reply With Quote
  #73  
Old 19 Oct 2007, 01:26
Lordy Lordy is offline
 
Join Date: Oct 2002
Recoded my reg form and it works fine now. Can't seem to work out the login form, so I looked at your login script.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

which i'm assuming is that? if so, passing as $forum->login($userdata) is not working for me, but looking through your code, I also don't know if that does work.
Reply With Quote
  #74  
Old 20 Oct 2007, 01:06
A58676333470 A58676333470 is offline
 
Join Date: Apr 2007
Weee! EXACTLY what im looking for @amatulic ! Works Perfect! Thx!
Reply With Quote
  #75  
Old 24 Nov 2007, 06:32
SolidSlug SolidSlug is offline
 
Join Date: Oct 2007
amatulic,

Your code works great from a PHP page that has no other includes, but as soon as I plugged it into my own CMS, I got the dreaded:

PHP Fatal error: Call to a member function query_first_slave() on a non-object in /var/www/html/papatangopapa.com/forums/includes/functions.php on line 1194

My CMS has its own session management stuff and also uses a custom __autoload function, I wonder if that breaks things in some weird way.

--------------- Added 24 Nov 2007 at 16:36 ---------------

I think it's due to vBulletin's insane reliance on global variables.

When you have:

A.php including init.php and functions.php directly,

there is no problem.

When you have:

a function in B.php including including C.PHP, which includes init.php and functions.php,

you get:

PHP Fatal error: Call to a member function query_first_slave() on a non-object in /var/www/html/papatangopapa.com/forums/includes/functions.php on line 1194

--------------- Added 24 Nov 2007 at 16:43 ---------------

That's also how and why you might end up using cURL in order to keep your application and the namespace polluting vBulletin back-end completely separate.

Last edited by SolidSlug; 24 Nov 2007 at 16:43. Reason: Auto-Merged DoublePost
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 05:05.

Layout Options | Width: Wide Color: