vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   allow users to send new pm's with no title (https://vborg.vbsupport.ru/showthread.php?t=77653)

sabret00the 03-07-2005 10:47 AM

allow users to send new pm's with no title
 
i was gonna do thsi myself thinking it'd be as simple as putting
PHP Code:

    if (!isset($pm['title']))
    {
        
$pm['title'] = "No Subject";
    } 

before the query but then i noticed that theirs some jscript in the template and i have no idea what's going on there so i'm gonna have to request it in the hope that someone else who know jscript wants to have a go :nervous:

Scrub 03-07-2005 12:48 PM

Well, this is what I've got so far, not sure if it is what you are wanting..

Open up private.php

Find:
PHP Code:

if ($pm['title'] == '' OR $pm['message'] == '')
        {
            eval(
'$errors[] = "' fetch_phrase('nosubject'PHRASETYPEID_ERROR) . '";');
        } 

Should be around line: 866-869

Replace the above with:
PHP Code:

        if ($pm['message'] == '')
        {
            eval(
'$errors[] = "' fetch_phrase('nosubject'PHRASETYPEID_ERROR) . '";');
        } 

Find:
PHP Code:

$title addslashes(htmlspecialchars_uni(fetch_censored_text($pm['title']))); 

That should be around line 1065

Below that add:
PHP Code:

                if ($title == ''
                     { 
                          
$title "No Subject"
                      } 

Save private.php.

Now go into your templates and open up pm_newpm

Find:
HTML Code:

formname.title.value
Change to
HTML Code:

0
I tested it out and it does work. :p

sabret00the 03-07-2005 12:56 PM

great work, works on firefox, not sure about ie lol

Scrub 03-07-2005 01:00 PM

IE 6.0 here.

T3MEDIA 03-07-2005 07:33 PM

To make this hack complete how can you set it up so it says No Subject when sent???

Scrub 03-08-2005 12:13 AM

Explain? If you send a message without a subject, it will currently put "No Subject" in the subject line while inserting the values into the database. If that is what you are needing, then it already does that.

Or are you wanting it to do something else?

T3MEDIA 03-08-2005 07:58 PM

Quote:

Originally Posted by Scrub
Explain? If you send a message without a subject, it will currently put "No Subject" in the subject line while inserting the values into the database. If that is what you are needing, then it already does that.

Or are you wanting it to do something else?

oh if it does that alread that is cool. I am on a site that has a poor note system but one thing that is cool is if you send a note (PM for us) and dont have a title or subject... it will say no subject when the user goes to their inbox. The reason this is cool it shows the user the person who sent it didnt put a subject.

Its good to know aparently.

sabret00the 03-13-2005 08:18 PM

3.0.7 this don't work, i can't find "formname.title.value" at all.

sabret00the 03-15-2005 09:42 PM

this worked it was there after all :)


All times are GMT. The time now is 03:45 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.01222 seconds
  • Memory Usage 1,738KB
  • 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
  • (2)bbcode_html_printable
  • (5)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (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