Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
  #71  
Old 12-02-2004, 09:20 PM
Wired1's Avatar
Wired1 Wired1 is offline
 
Join Date: Nov 2003
Location: Orlando, FL, USA
Posts: 1,361
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

One of the side menus in the admin section, a dropdown accessible only within that area.
Reply With Quote
  #72  
Old 12-02-2004, 09:26 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Wired1
One of the side menus in the admin section, a dropdown accessible only within that area.
oh that i thought for the form it would've been admincp based anyway, it's not too hard to add a new page, the hardest bit comes when trying to add something to an existing page.
Reply With Quote
  #73  
Old 01-14-2005, 06:00 PM
lowspeed lowspeed is offline
 
Join Date: Jun 2004
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I used this code, IT actually adds the thread but i get the following warning

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in \global.php on line 329

Warning: Invalid argument supplied for foreach() in \includes\functions.php on line 2177


Also if the subject in the forum ID is send again then it just exits it doesn't flow through the code.



Help

Thanks,
LOW LOW.


Quote:
Originally Posted by StefanS
Hi,

just tested the following code:

PHP Code:
<?
require('./global.php'); 
require('./includes/functions_newpost.php'); 
$userid = 10;
$forumid = 100;
$foruminfo = fetch_foruminfo($forumid); 
$bbuserinfo = fetch_userinfo($userid); 
$post[title] = 'subject'; 
$post[message] = 'message'; 
$post[poststarttime] = TIMENOW; 
$post[posthash] = md5($post[poststarttime] . $bbuserinfo['userid'] . $bbuserinfo['salt']); 
build_new_post('thread', $foruminfo, array(), 0, $post, $errors); 
?>
works for me with 3.03 without problems ...
Reply With Quote
  #74  
Old 01-14-2005, 11:51 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

that's a problem with php5

before the require global.php add these lines:

PHP Code:
// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array();

// get special data templates from the datastore
$specialtemplates = array();

// pre-cache templates used by all actions
$globaltemplates = array();

// pre-cache templates used by specific actions
$actiontemplates = array(); 
Reply With Quote
  #75  
Old 01-15-2005, 01:10 AM
lowspeed lowspeed is offline
 
Join Date: Jun 2004
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the quick help !

I have a small follow up. I know how to get the threadid, but how would i post a reply to that ID ?

Do i put instead of the 0, you put the threadid (lets say 3212) ? example:

build_new_post('thread', $foruminfo, array(), 3212, $post, $errors);
Reply With Quote
  #76  
Old 01-16-2005, 09:27 PM
lowspeed lowspeed is offline
 
Join Date: Jun 2004
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried doing something like this ...

build_new_post('reply', $foruminfo, array(), 3212, $post, $errors);

where 3212 is the thread i'm replying to, but it didn't work
Reply With Quote
  #77  
Old 01-17-2005, 05:20 PM
lowspeed lowspeed is offline
 
Join Date: Jun 2004
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok i found how to do it

You need these added:

$threadid=1091; // the thread you want to reply to
$threadinfo = fetch_threadinfo($threadid);

build_new_post('reply', $foruminfo, $threadinfo, $_POST['postid'], $post, $errors);
Reply With Quote
  #78  
Old 01-17-2005, 07:38 PM
lowspeed lowspeed is offline
 
Join Date: Jun 2004
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Guys,

It works fine when called independently from the rest of my code.

I have a feeling that because my php site uses a database as well it gets confused to which database its refering to.

How can i make sure that when i run the post thread section it looks at the VB db and after it reverts back to my db. ??
Reply With Quote
  #79  
Old 01-17-2005, 08:58 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Use a different dbuser/pass for your application
Reply With Quote
  #80  
Old 01-17-2005, 11:00 PM
lowspeed lowspeed is offline
 
Join Date: Jun 2004
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

doesnt work

I decided to use URL stream instead.
Reply With Quote
Reply

Thread Tools
Display Modes

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:49 PM.


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.04212 seconds
  • Memory Usage 2,257KB
  • 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
  • (2)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
  • (4)pagenav_pagelink
  • (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