PDA

View Full Version : Miscellaneous Hacks - Pre-Defined PM Text For each user


Omranic
02-12-2006, 10:00 PM
This Mod isn't supported any more!


hello every one here,

This hack is very simple & effective, it give every user the ability to specify a Pre-Defined PM Text to be shown automatically in PM Sending text area.

simply two profile fields added & one template edit


Ist go to admincp & click "Add New User Profile Field"
Profile Field Type: Single-Selection Radio buttons
click continue
Title: Pre-Defined PM text active or not.
Description: Here you can determine is this option is on or off, if on select yes if not select off.
Options:
No
Yes
Set Default: Yes
Display Order: leave it as it is
Field Required: No
Field Editable by User: Yes
Private Field: No
Field Searchable on Members List: No
Show on Members List: No

leave other options as it is & go to the last option "Display Page" & select the value "Options Messaging & Notification".

Now Press Save

_________________________________________


Now we will add the second Profile field
Ist go to admincp & click "Add New User Profile Field"
Profile Field Type: Multiple-Line Text Box
click continue
Title: Pre-Defined PM text.
Description: Here you can write your Pre-Defined PM text.
Default Value: leave it blank
Max length of allowed user input: 500
Display Size: 63
Text Area Height: 6
Display Order: leave it as it is
Field Required: No
Field Editable by User: Yes
Private Field: No
Field Searchable on Members List: No
Regular Expression: leave it blank

leave other options as it is & go to the last option "Display Page" & select the value "Options Messaging & Notification".

Now Press Save

_________________________________________


No from User Profile Field Manager see the name of each profile field we have added, the first one we added I called it fieldX & the second I called it fieldY So note for this, you must replace X by the number of the first field we have added & Y with the second field we have added in the following template edit

go to template "editor_toolbar_on" & search in it for the following code:
<textarea name="message" id="{$editorid}_textarea" rows="10" cols="60" style="width:$stylevar[messagewidth]; height:{$editor_height}px" tabindex="1" dir="$stylevar[textdirection]">$newpost[message]</textarea>

& replace it by the following code:
<textarea name="message" id="{$editorid}_textarea" rows="10" cols="60" style="width:$stylevar[messagewidth]; height:{$editor_height}px" tabindex="1" dir="$stylevar[textdirection]">$newpost[message]<if condition="THIS_SCRIPT == 'private'"><if condition="$bbuserinfo['fieldX'] == 'Yes'">$bbuserinfo[fieldY]</if></if></textarea>

click save

Now you are done

Known Issues: when forwarding or replying to a PM the Pre-Defined PM text will be written also after the PM quoted

Don't forget to click INSTALL (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=107842)

Snake
02-13-2006, 12:01 PM
Allow me to be your first installer! ;) Thanks man!

lazyseller
02-14-2006, 04:45 AM
Aftermath you must have every hack on vb.org installed on your board..

Omranic
02-14-2006, 05:35 AM
how about you lazyseller
Do you like this hack ?
:)

Luggruff
02-24-2006, 04:44 PM
is this similar to this (https://vborg.vbsupport.ru/showthread.php?t=107857) ? Or does you hack only support one pre-defined PM text?

Omranic
04-24-2006, 12:30 AM
Not exactly as you posted

my hack hanlds only one PRE-Defined PM MSG