Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #76  
Old 16 Jan 2005, 22:27
lowspeed lowspeed is offline
 
Join Date: Jun 2004
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

Last edited by lowspeed; 16 Jan 2005 at 23:09.
Reply With Quote
  #77  
Old 17 Jan 2005, 18:20
lowspeed lowspeed is offline
 
Join Date: Jun 2004
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 17 Jan 2005, 20:38
lowspeed lowspeed is offline
 
Join Date: Jun 2004
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 17 Jan 2005, 21:58
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Real name: Andreas
Use a different dbuser/pass for your application
Reply With Quote
  #80  
Old 18 Jan 2005, 00:00
lowspeed lowspeed is offline
 
Join Date: Jun 2004
doesnt work

I decided to use URL stream instead.
Reply With Quote
  #81  
Old 22 Jan 2005, 10:39
SnitchSeeker's Avatar
SnitchSeeker SnitchSeeker is offline
 
Join Date: Sep 2004
Is there a way to pass the last thread's id from build_new_post? I currently have this: (just a snippet)

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

It's not passing the $threadinfo[threadid] variable. I used to insert it directly into the database, but I want a cleaner version. So I modified build_new_post function and added a new variable. So now it would say:

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

Then an if news exist check, and my previous sql code. However I'm not very sure if this won't bug current posting? Because previously with build_new_post code it'd post, now it just gives a blank page. I need to add the $news variable or it won't work. Regular posting and topic creating is working as far as I can see, but I want to be sure if this is in fact going to work... (did that make sense? )
Reply With Quote
  #82  
Old 23 Jan 2005, 12:32
SnitchSeeker's Avatar
SnitchSeeker SnitchSeeker is offline
 
Join Date: Sep 2004
Bump. Anyone?
Reply With Quote
  #83  
Old 16 Feb 2005, 07:09
Wired1's Avatar
Wired1 Wired1 is offline
 
Join Date: Nov 2003
Just checking into my baby

Been busy for forever, but IF I get a chance, I'll try to delve into the code again.

Only way I'll release it as a hack is if I can somehow figure out how to put a module in the admin / mod CP for it, gotta be user friendly and all.
Reply With Quote
  #84  
Old 16 Feb 2005, 19:30
fly fly is offline
 
Join Date: Oct 2003
Thanks guys. I set mine up to combine the Contact Us page with this 'hack' so that users could submit news stories to our News admin forum without giving them access to it. Thanks!

Any function and/or example for sending PMs?
Reply With Quote
  #85  
Old 17 Feb 2005, 05:29
Wired1's Avatar
Wired1 Wired1 is offline
 
Join Date: Nov 2003
Originally Posted by flypaper
Thanks guys. I set mine up to combine the Contact Us page with this 'hack' so that users could submit news stories to our News admin forum without giving them access to it. Thanks!

Any function and/or example for sending PMs?
Do the submissions go into a moderation queue or just straight in? Got a link?

Automating sending PMS to one person or a certain amount? Can't see reasoning behind this ATM though, but I'll put it on the list of things to check into.
Reply With Quote
  #86  
Old 17 Feb 2005, 05:44
trafix's Avatar
trafix trafix is offline
 
Join Date: Dec 2002
WTF .... 85 posts just to try to explain how to auto generate a new thread.

I have used this often .... it only requires like about 6 lines

PS .. i havnt read the thread, there is tooooooooooo much and i dont have that much time
Reply With Quote
  #87  
Old 17 Feb 2005, 07:42
Wired1's Avatar
Wired1 Wired1 is offline
 
Join Date: Nov 2003
Then by all means, post your way of doing it. FYI, this thread is a year old. The first 2 pages are mainly myself and some others working it out, the rest are about others using the code.

Also, counted the lines, it's about 8 after trimming non-essential stuff, so your code would probably look similar.
Reply With Quote
  #88  
Old 17 Feb 2005, 14:19
Hoffi's Avatar
Hoffi Hoffi is offline
 
Join Date: Nov 2001
Real name: Christian
I just found this Thread. That helps me figuring out how to build a Thread.

Did someone know how to add a Poll to the created Thread?
Reply With Quote
  #89  
Old 18 Feb 2005, 12:14
fly fly is offline
 
Join Date: Oct 2003
Originally Posted by flypaper
The threads go straight into the forum. Link to the hackjob is http://uselessforums.com/submitnews.php

And I was talking in the Ucash/Ushop forum yesterday and someone mentioned PMing a member after they were 'theifed'. I liked the idea and tried to poke around and see if there was a function to send PMs like creating threads, but couldn't find one.
Hmmm. Looks like there isn't a function to do it, but these DB queries do:


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


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


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

Can anyone explain how I pass whatever is needed in these queries and/or what the queries are exactly doing?

edit: I should probably start a new thread.

Last edited by fly; 18 Feb 2005 at 16:19. Reason: Automerged Doublepost
Reply With Quote
  #90  
Old 23 Feb 2005, 07:46
zeropaid's Avatar
zeropaid zeropaid is offline
 
Join Date: Nov 2004
Ok I had this working, but am now trying to implement on a new machine running a version of 3.0.7 and php5. I am getting an odd error,

Fatal error: Call to undefined method stdClass::query_first() in /usr/local/www/htdocs/bbs/includes/functions.php on line 938

Here is my code. As far as I can tell everything is being included fine, no errors there.


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

Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Administrative and Maintenance Tools Mass User Creation and Auto Posting alexgeek vBulletin 3.6 Add-ons 102 10 Mar 2015 06:34



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

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


New To Site? Need Help?

All times are GMT. The time now is 01:15.

Layout Options | Width: Wide Color: