vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Miscellaneous Hacks - Pre-Defined PM Text For each user (https://vborg.vbsupport.ru/showthread.php?t=107842)

Omranic 02-12-2006 10:00 PM

Pre-Defined PM Text For each user
 
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:
Code:

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:
HTML 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:
HTML 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

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 ? 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


All times are GMT. The time now is 06:07 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.01041 seconds
  • Memory Usage 1,731KB
  • 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)bbcode_code_printable
  • (2)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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