vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Must Have First Posters Username In Your reply form (https://vborg.vbsupport.ru/showthread.php?t=45653)

BigJohnson 11-12-2002 09:28 AM

Must Have First Posters Username In Your reply form
 
I was wondering if someone can help me with this. I am looking for a feature for my message board.

People post information about quads and other 4 wheel and 2 wheel vehicles on my forum.

I was wondering if only in these forums this feature can work

13, 17, 19, 20, 26, 27, 33, 34, 44, 45, 51, 52, 58, 59

For ever reply in these forum ids you need to have the FIRST POSTERS username somewhere in your reply box. If not then you are taken to a template that I will make as an error screen. I hope someone can help me out. Thanks.

This is just for the reason that no one notices the people that post information and just read the posts. This helps them understand that this person has posted this info to help you out. Thanks s much.

Xenon 11-12-2002 04:10 PM

open newreply.php find this:
PHP Code:

  // check for subject and message
  
$message=trim($message);
  if (
$message=="") {
    eval(
"standarderror(\"".gettemplate("error_nosubject")."\");");
    exit;
  } 

after that add:
PHP Code:

if (in_array($threadinfo['forumid'], array(1317192026273334444551525859))) {
    
$getfirst=$DB_site->query_first("SELECT postid,post.userid,dateline,user.username FROM post LEFT JOIN user USING(userid) WHERE threadid='$threadid' ORDER BY dateline LIMIT 1");
  if(!
strstr($message,$getfirst['username'])) {
  eval(
"standarderror(\"".gettemplate("error_nofirstusername")."\");");
}




then create a template error_nofirstusername and write your message there ;)

BigJohnson 11-12-2002 10:42 PM

thanks works like a charm.

Xenon 11-13-2002 09:38 AM

:)

you're welcome as always ;)

BigJohnson 11-24-2002 05:40 PM

One more thing. How can I make this so it is not capitalization sensative. Like if someone name is UsErNaMe all i can type in the reply box is username instead of the other way. Please help thanks.

Xenon 11-24-2002 06:48 PM

instead of this
PHP Code:

if(!strstr($message,$getfirst['username'])) { 

use this
PHP Code:

if(!strstr(strtoupper($message),strtoupper($getfirst['username']))) { 


BigJohnson 11-26-2002 09:14 AM

Works like a charm amazing. Your god. I love ya. keep up the great work man.

Xenon 11-26-2002 06:28 PM

:)
i'll do my best.

you're welcome

BigJohnson 01-26-2003 03:16 PM

Xenon I just foudn a prob. When u reply more than once in those forums u have to say there username in ever reply u make. How do u make it that they only have to do it on the first reply and then the rest they don't have to at all.

BigJohnson 01-27-2003 07:59 AM

bump


All times are GMT. The time now is 05:23 AM.

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.01081 seconds
  • Memory Usage 1,742KB
  • 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
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete