The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#111
|
|||
|
|||
Hey guys, I'm having a very fundamental issue getting this to work.
As soon as I do the require global.php line, my varibles don't work... by that i mean the php page below prints only Test: $FORUM_ID is blank even though its decalred... if i remove the require global.php line its fine.... what gives? PHP Code:
|
#112
|
||||
|
||||
1. what version of PHP are you running, 4 or 5?
2. is global.php called from the function? |
#113
|
||||
|
||||
I guess you got register_globals=on
For the sake of security, vBulletin unsets all global variables created by register_globals=on, and there is no way (well ... except changing some basic internal functions would be necessary) to stop it from doing that Best suggestion: Code without relying on register_globals |
#114
|
|||
|
|||
I need to take this rss feed and use it for auto new threads.
http://news.google.com/news?q=mariju...F-8&output=rss I use vb3.5 rc3. how would i do this? |
#115
|
||||
|
||||
Quote:
|
#116
|
||||
|
||||
artonex:
Not a clue if this will work in vB 3.5.0. Gotta get into the code more first. mtrac: what vB version? |
#117
|
||||
|
||||
3.5.0 (Gold)
|
#118
|
|||
|
|||
Quote:
- They're created under the username of the person that pushes the "create" button, rather than the user specified by the script. - The threads automatically go into the moderation queue, rather than appearing on the site for other users to respond to. Thanks. |
#119
|
||||
|
||||
blast from the past
Could've sworn there's a couple of plugins now that auto-create threads now, could be wrong. If you can't find them, I'll dig into the code (maybe this weekend) and see what I can come up with. As you can see from this thread, I pretty much grabbed some vBulletin functions and slapped them together. I'm guessing these functions have changed, and so this broke. Probably have to re-smush the vBulletin code together Yeah, that last thought didn't make much sense to me either. |
#120
|
|||
|
|||
OK. In case anyone else needs this code....
This worked for me with vBullentin version 3.5.4 The new thread was created successfully -even when I was not loggin in. <?php require_once('./global.php'); require_once('./includes/functions_newpost.php'); require_once('./includes/class_dm.php'); require_once('./includes/class_dm_threadpost.php'); require_once('./includes/functions_databuild.php'); $forumid = 19; $userid = 1; $title = 'The first autopost!'; $pagetext = 'More details here.'; $threaddm =& datamanager_init('Thread_FirstPost', $vbulletin, ERRTYPE_ARRAY, 'threadpost'); $foruminfo = fetch_foruminfo($forumid); $threaddm->set_info('forum', $foruminfo); $threaddm->set('forumid', $forumid); $threaddm->set('userid', $userid); //$threaddm->set('user', 'SGD DESIGNS'); $threaddm->set('title', $title); $threaddm->set('pagetext', $pagetext); $threaddm->set('allowsmilie', 1); $threaddm->set('visible', 1); $threaddm->set('dateline', TIMENOW); $threaddm->save(); ?> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|