vBulletin Modifications

trigger query after user replys

Welcome to vBHackers.com! - vBHackers Updates:

Go Back   vBulletin Modifications > General vBulletin Section > General vBulletin Support

Reply
 
LinkBack Thread Tools
Old 09-07-2005, 07:32 PM   #1
Charter Member
Join Date: Jun 2004
Hakkie is on a distinguished road

Default trigger query after user replys

Hiya,

I want to trigger a query when a user replys to a specific forum.
The stuff below is to make sure the query only gets triggered once per thread, thats what I was thinking to do with $result.

Currently I have in hook "newpost_complete":

You must first be a registered member to view any code.
Also, what is the difference between:
$vbulletin->db->query_first
and
$db->query_first
?

(the last one gives some weird redirect error about a duplicate thread/post, wich it clearly isn't, while the first one does process allright, but it still doesn't do what I want).

Last edited by Hakkie; 09-09-2005 at 12:29 PM..




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 09-08-2005, 03:27 AM   #2
Advanced Coder
Niels's Avatar
Join Date: Jun 2004
Real Name: Niels
Location: NL
Niels is on a distinguished road

Default

I assume it's with vbulletin 3.5? Then I'm going to hide had no time to test it yet




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-08-2005, 05:23 PM   #3
Coder
Join Date: Aug 2004
Fury is on a distinguished road

Default

niels dont hide, you're right.. hehe.. they decided to change the whole base. its kinda weird that they decided to change the basics which ****es the coders off

but eventually there's no diffrent between their actions, except for the way you write them.

and i didnt really understand what you are trying to do here, sorry.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-08-2005, 05:26 PM   #4
Advanced Coder
Niels's Avatar
Join Date: Jun 2004
Real Name: Niels
Location: NL
Niels is on a distinguished road

Default

Well in the previous vbulletin versions for forum specific actions OR make it admincp controlled or do it like this:
You must first be a registered member to view any code.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-08-2005, 06:19 PM   #5
vBulletin Guru
Ken Iovino's Avatar
Join Date: Mar 2004
Real Name: Ken Iovino
Location: Miami, Florida
Ken Iovino is on a distinguished road

Default

You first have to create a new option in the admincp/forum.php file. I wrote a tutorial about how to do something like this: http://www.vbulletin.org/forum/showthread.php?t=93445




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-09-2005, 12:24 PM   #6
Charter Member
Join Date: Jun 2004
Hakkie is on a distinguished road

Default

Livewire, that code works flawlessly. (thats the 'specificforum' stuff), thanks for the good tutorial btw, worked great.

However, it breaks when I enter this code:
You must first be a registered member to view any code.
And, honestly, I can't see what I am doing wrong there.

Fury, this is a breakdown of the code above:

if ($type !='thread') == if its not a thread, its a reply
if ($foruminfo['specificforum'] == 1) == its a reply, is this the right forum to do this action?

$query.... it is (trying to) find out if the user has already replyed to this thread or if it was the threadstarter.

If all of the above is true, execute the query, if not, do nothing.

Last edited by Hakkie; 09-09-2005 at 12:29 PM..




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-15-2005, 01:44 PM   #7
Charter Member
Join Date: Jun 2004
Hakkie is on a distinguished road

Default

Hmmz, nobody who could help me with this?




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[How To] Run a Query Ken Iovino vBulletin Modification Tutorials 9 07-30-2008 03:29 AM
User Notes xfile vBulletin Modification Requests 5 05-28-2006 07:02 PM
Max Post Replys per user pes day Akoylini vBulletin Modification Requests 1 02-10-2005 09:30 PM
[vB 3.0.0] - Max replies per week per user in specified forums Arcade General vBulletin Support 0 06-07-2004 01:12 PM


All times are GMT -3. The time now is 02:12 AM.

Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc. (Patent Pending)