View Full Version : allow users to send new pm's with no title
sabret00the
03-07-2005, 10:47 AM
i was gonna do thsi myself thinking it'd be as simple as putting 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:
if ($pm['title'] == '' OR $pm['message'] == '')
{
eval('$errors[] = "' . fetch_phrase('nosubject', PHRASETYPEID_ERROR) . '";');
}
Should be around line: 866-869
Replace the above with:
if ($pm['message'] == '')
{
eval('$errors[] = "' . fetch_phrase('nosubject', PHRASETYPEID_ERROR) . '";');
}
Find:
$title = addslashes(htmlspecialchars_uni(fetch_censored_tex t($pm['title'])));
That should be around line 1065
Below that add:
if ($title == '')
{
$title = "No Subject";
}
Save private.php.
Now go into your templates and open up pm_newpm
Find:
formname.title.value
Change to
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
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 :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.