Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
  #76  
Old 01 Sep 2009, 02:07
todd73nj todd73nj is offline
 
Join Date: Aug 2008
I was wondering if someone could tell me what is wrong with my script. All I am trying to do is post a new message in an existing thread. When I put this script in a php page and hit it from my browser, I don't get any error, but I also don't get a message posted. I don't even see the "save returned" message in my browser. If I change some things (like the path to class_dm_threadpost), I get an error, so I know it is running something.

As for the echo not working, it seems like as soon as I put those require_once at the top of my file, I can't echo any messages anymore. But I only have those echos in there because the message isn't being posted to my thread.


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


Last edited by todd73nj; 01 Sep 2009 at 02:13.
Reply With Quote
  #77  
Old 01 Sep 2009, 08:28
amcd amcd is offline
 
Join Date: Oct 2004
Do you have access to php.ini and/or PHP error log? Check the error log.

If echo does not work, try the PHP error_log() function. You may also find the var_export() function useful.

I have almost the same code working with vb 3.6.1. What is your version?
__________________
eXBii.com - Indian community
no XB no fun know XB know fun !
Reply With Quote
  #78  
Old 01 Sep 2009, 14:12
todd73nj todd73nj is offline
 
Join Date: Aug 2008
I am running 3.7.4 PL1.

If I start with an empty php file and just put an echo statement, I see the message when I hit the page. Anything I echo before the line that includes class_dm_threadpost.php I see output, but anything after I don't. For example:


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

Shows nothing in the page. But

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

Shows "Hello world." on the page.

I am using godaddy, so I don't know how I can access the php error file. I tried using an set_error_handler as described on this page: http://us3.php.net/set-error-handler , to catch any errors, but still I got no output. It is bizarre. It is like including that class_dm_threadpost is killing everything. I have not modified any of my vbulletin files, so it should be whatever came with 3.7.4.

var_export() behaves the same way as echo. Before that require_once line it works, after it, I see nothing.

--------------- Added 01 Sep 2009 at 14:38 ---------------

Doh. I figured it out. I have to include another file as well (class_dm.php). It seems like without it, something in the class_dm_threadpost was unhappy.

This works:


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


Last edited by todd73nj; 01 Sep 2009 at 14:39. Reason: Auto-Merged DoublePost
Reply With Quote
  #79  
Old 07 Oct 2009, 20:12
ewelin ewelin is offline
 
Join Date: Dec 2007
Originally Posted by Evercraft View Post
You need to add the following code, after the post has been created, to update forum counters and last post index etc.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
I have a slight problem.... My code is inserting the post perfectly and everything is working in that respect. The problem is that the last post field is not being updated. I know this has something to do with the timestamp, but I'm not sure why the issue is happening. I'm importing a chat transcript and putting each chat post as a forum post. The import script runs every 5 minutes and uses the chat post's timestamp as the forum post time stamp. The forum posts appear just as they were posted within the chat and the time is dead on... Even with the above code included at the end, it only updates the forum counters, it doesn't update the last post index. Now if I swap the timestamp from the actual chat post time to TIMENOW
it's updated. Anyone have any ideas on how I can resolve this.
Reply With Quote
  #80  
Old 08 Oct 2009, 09:50
amcd amcd is offline
 
Join Date: Oct 2004
Did you try build_thread_counters?
__________________
eXBii.com - Indian community
no XB no fun know XB know fun !
Reply With Quote
  #81  
Old 08 Oct 2009, 10:48
ewelin ewelin is offline
 
Join Date: Dec 2007
I have not, I'm assuming I pass it the thread id correct?

--------------- Added 08 Oct 2009 at 14:59 ---------------

Originally Posted by amcd View Post
Did you try build_thread_counters?
That did the trick!!! Thanks!!!

Last edited by ewelin; 08 Oct 2009 at 14:59. Reason: Auto-Merged DoublePost
Reply With Quote
  #82  
Old 01 Dec 2009, 13:32
CarcaBot CarcaBot is offline
 
Join Date: Feb 2008
Someone tried to do this in version 4 ?

Because i can't build thread information and forum information .

It post the thread but i can see only title without content. How can i build thread information?

Last edited by CarcaBot; 01 Dec 2009 at 13:45.
Reply With Quote
  #83  
Old 01 Dec 2009, 15:14
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Originally Posted by CarcaBot View Post
Someone tried to do this in version 4 ?

Because i can't build thread information and forum information .

It post the thread but i can see only title without content. How can i build thread information?
I just ran it just fine as a quick cron job on my site using the code here - http://www.vbulletin.org/forum/showp...3&postcount=39
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #84  
Old 01 Dec 2009, 15:28
ragtek ragtek is offline
 
Join Date: Mar 2006
Location: austria, croatia
Edit:

It's working for me.
Strange that it first didn't work

Last edited by ragtek; 01 Dec 2009 at 19:55.
Reply With Quote
  #85  
Old 01 Dec 2009, 15:41
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Originally Posted by ragtek View Post
He's right.
In vB4 it's not working this way.
The post is created, but with my code i can't see it in the recent posts widget and also i can't see it in the thread^^
I don't have the cms installed on the site I just tested it on, so I don't know about the recent posts widget thing, but I can definitely see the thread/post on my site and it has the content from the code in it.
Attached Images
File Type: png Picture 2.png (17.5 KB, 43 views)
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #86  
Old 01 Dec 2009, 15:59
ragtek ragtek is offline
 
Join Date: Mar 2006
Location: austria, croatia
Here's a codesnippat how it's working for me
http://ragtek.org/blog/vbulletin/vbu...sch-erstellen/

Last edited by ragtek; 01 Dec 2009 at 16:46. Reason: Auto-Merged DoublePost
Reply With Quote
  #87  
Old 01 Dec 2009, 19:22
CarcaBot CarcaBot is offline
 
Join Date: Feb 2008
@Lynne, i tried all posibilities and no way to work like old coe.
@ragtek i will try this soon, but let me know how to get ID of new thread , if work your code.

thanks.
Reply With Quote
  #88  
Old 01 Dec 2009, 19:46
ragtek ragtek is offline
 
Join Date: Mar 2006
Location: austria, croatia
Strange.
Now it's also working with the damanager
Reply With Quote
  #89  
Old 01 Dec 2009, 19:58
CarcaBot CarcaBot is offline
 
Join Date: Feb 2008
interesting..
i tried with this code:

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

It make a thread on that forumid but i can't see the content.
The content is also showed in alt tag of link but in thread nothing.

--------------- Added 02 Dec 2009 at 09:20 ---------------

awesome ) now is working...
I don't understand why not yesterday

Last edited by CarcaBot; 02 Dec 2009 at 09:20. Reason: Auto-Merged DoublePost
Reply With Quote
  #90  
Old 13 Jul 2010, 14:28
ilbianconiglio ilbianconiglio is offline
 
Join Date: Mar 2006
I'm not using the script into the forum root. I'm using it outside in my site.

Someone can tell me which are the files and defines required to run this script?
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


New To Site? Need Help?

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

Layout Options | Width: Wide Color: