vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Post Mod Question (https://vborg.vbsupport.ru/showthread.php?t=234559)

patt1293 01-30-2010 05:08 PM

Post Mod Question
 
I have a mod that scans a new thread for something and if it doesn't have that then it will kick back an error

well this is what I used $post['message'] but that is global for new threads and post replies.

Is there something like that but only for new threads like $post['newthread]?

Thanks to whoever help

Lynne 01-30-2010 06:01 PM

The message field for any post is $post['message']. It isn't called something different based on which post it is.

patt1293 01-30-2010 08:32 PM

So then is there any other way of doing what I want to do?

like in a new thread I want the word "Bla", but in a reply I don't care if "Bla" is in there.

Thanks For your help

Lynne 01-30-2010 10:24 PM

I really don't know exactly what you want to do, so I don't know. You can manipulate the first post of a thread when it is being rendered if you want to use a plugin to do so (probably hook location postbit_display_complete). I think you can even manipulate it when they hit the submit button (take a look at the file class_dm_threadpost.php to find the right hook location).

patt1293 01-30-2010 10:42 PM

Ok, this is what I am attempting to do,

Edited: Took out my code

I want for a First post in every thread to have either Link A or Link B. That's what I'm trying to acomplish

Lynne 01-30-2010 10:51 PM

Then you probably need to look into the class_dm_threadpost.php file that I mentioned. That is where the post/thread is created and I think errors are checked in one of the classes there. So, read that page and see what hook location is best for your use (and you may need to change the variable name). You can also probably just add the error to the $errors array too.

patt1293 01-30-2010 11:46 PM

Ok, I got the hook I want but now it always gives me the error and I think it's because of this, $post['message']. The message isn't actually "posting" because it spits back an error before it can "post". I just need something for the stripos to compare against.

Again thanks, I'm not an expert at this stuff but I am learning :D

Lynne 01-31-2010 01:20 AM

Depending on the hook location you picked, that may not be the exact variable name you use. You need to look at the code around the hook you are trying to use to see what variable names are being used.

patt1293 01-31-2010 03:01 AM

OMG!! I got it working, Thanks so much for pointing me in the right direction.


All times are GMT. The time now is 07:27 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00961 seconds
  • Memory Usage 1,716KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete