Go Back   vb.org Archive > Community Central > Community Lounge
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-14-2003, 07:42 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Default PM Subject Line

I made a little 2 line hack (I guess you could almost call it that) that will input a default subject line in a new PM. I always get tired of having to redo all of my new PMs because I preview it or try to send it and get the error that I didn't fill out all of the information. This way, it will always be there, preview or not. What I would like to ask is this: Does anyone have any good ideas for a default line that will work for the entire board? [high]Any[/high] ideas will be appreciated and welcomed.
Reply With Quote
  #2  
Old 03-14-2003, 10:51 AM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can't you just edit the PM templates?
Reply With Quote
  #3  
Old 03-14-2003, 11:00 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I did the same thing for my forums a long time ago.

What I used as a subject when none is entered is "No subject entered".
Reply With Quote
  #4  
Old 03-14-2003, 03:10 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 06:51 AM filburt1 said this in Post #2
Can't you just edit the PM templates?
@filburt1 - I thought of that, but if you do a preview private message, then it will always put the subject from the template in there (if I hardcode it that way). This way, I only have it default to a hardcoded title if there isn't one already. If you change it when writing the message, it will stay with the new title.

@ Erwin - LOL I never thought of that one. Thanks. Right now I have "Just a note to say hello" and thought about "From the desk of xxx (the username of the poster would go here).

On the forums, I have it default to "Re ; threadtitle" if there is no post title. If they change it, it will stay at the new title.
Reply With Quote
  #5  
Old 03-14-2003, 04:43 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well you could use conditionals in templates (the hack)...
Reply With Quote
  #6  
Old 03-14-2003, 04:47 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's true, I never even thought of that. I have Logician's hack already installed. Maybe I'll play with it and see what I can come up with. Thanks.
Reply With Quote
  #7  
Old 03-14-2003, 05:06 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@filburt1 - Here's what I came up with. The code in the php is only 3 small lines and this is what I need to do in the template to get the same thing. Which is better?

Quote:
[[($subject=="")]]
<td bgcolor="#13486D"><normalfont><input type="text" class="bginput" name="title" value="Just a note to say hello" size="40" maxlength="85" tabindex="2"></normalfont></td>
[[/($subject=="")]]
[[($subject!="")]]
<td bgcolor="#13486D"><normalfont><input type="text" class="bginput" name="title" value="$subject" size="40" maxlength="85" tabindex="2"></normalfont></td>
[[/($subject!="")]]
Reply With Quote
  #8  
Old 03-14-2003, 05:15 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Actually, it can be done in the javascript in the send pm template. There is a check when the submit button is clicked. If the subject is blank, a box pops up. You can add a check right before that line so that if the title is blank, the title is set to "No Subject Entered"

I did it the PHP way as well in both private.php and private2.php, but I am pretty sure the javascript is all that is required.

Amy
Reply With Quote
  #9  
Old 03-14-2003, 05:22 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You lost me here. Where would you do the check for that at? Just before the submit button? And I don't think it would work there for a private message preview, though, would it?
Reply With Quote
  #10  
Old 03-14-2003, 05:33 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In priv_sendprivmsg

Find:

Code:
if (theform.touser.value=="" || theform.message.value==""|| theform.title.value=="" ) {
Code:
Add Above:
if(theform.title.value=="") {
   theform.title.value="No Subject Entered";
}
and I forgot about preview cause I never use it I'll go peek at that too.

Amy
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:24 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.06185 seconds
  • Memory Usage 2,252KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete