Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #111  
Old 09-16-2005, 06:47 PM
Rendog Rendog is offline
 
Join Date: Jul 2005
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:
<?php

    $FORUM_ID 
60;

     
chdir('/www/data/website/forums');

    
// Load vB-Backend
    
require_once ('./global.php');
    
// require_once ('./includes/functions_newpost.php')


?>

Test: <?php echo $FORUM_ID?>
forum_id ends up blank... if i comment out the global.php, it prints properly... any ideas?
Reply With Quote
  #112  
Old 09-17-2005, 05:00 AM
Wired1's Avatar
Wired1 Wired1 is offline
 
Join Date: Nov 2003
Location: Orlando, FL, USA
Posts: 1,361
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

1. what version of PHP are you running, 4 or 5?

2. is global.php called from the function?
Reply With Quote
  #113  
Old 09-17-2005, 05:03 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #114  
Old 09-21-2005, 10:05 AM
artonex artonex is offline
 
Join Date: Mar 2005
Location: UK
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #115  
Old 10-02-2005, 03:43 PM
mtrac's Avatar
mtrac mtrac is offline
 
Join Date: Nov 2004
Location: Edgewater, NJ, USA
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Wired1
Yes, I plan to update this when vB 3.5 comes out if it doesn't work
It's not working off a cron job any more but does work when called locally. Compared to the other problems I'm having it's not exactly a catastrophe. Any ideas?
Reply With Quote
  #116  
Old 10-02-2005, 06:41 PM
Wired1's Avatar
Wired1 Wired1 is offline
 
Join Date: Nov 2003
Location: Orlando, FL, USA
Posts: 1,361
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

artonex:
Not a clue if this will work in vB 3.5.0. Gotta get into the code more first.

mtrac:
what vB version?
Reply With Quote
  #117  
Old 10-03-2005, 09:22 AM
mtrac's Avatar
mtrac mtrac is offline
 
Join Date: Nov 2004
Location: Edgewater, NJ, USA
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

3.5.0 (Gold)
Reply With Quote
  #118  
Old 07-31-2007, 06:42 PM
mickmel mickmel is offline
 
Join Date: Feb 2002
Location: Atlanta, GA
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Wired1 View Post
Yes, I plan to update this when vB 3.5 comes out if it doesn't work
I was hoping for an update to this. It still creates threads, but:

- 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.
Reply With Quote
  #119  
Old 07-31-2007, 07:32 PM
Wired1's Avatar
Wired1 Wired1 is offline
 
Join Date: Nov 2003
Location: Orlando, FL, USA
Posts: 1,361
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #120  
Old 12-30-2009, 02:23 AM
norma-aguilera norma-aguilera is offline
 
Join Date: Jul 2006
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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();
?>
Reply With Quote
Reply


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


All times are GMT. The time now is 08:04 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05699 seconds
  • Memory Usage 2,265KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete