vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   PM user code (https://vborg.vbsupport.ru/showthread.php?t=220919)

medicalforums 08-14-2009 10:49 PM

PM user code
 
What code should I insert so that a link appears to PM the user who posted the message?
Similarly what code to use to email the user?

I want something like this to appear in the users post

"Please PM me if you need help"

Lynne 08-14-2009 11:24 PM

Please PM me if you need help.

Change xxxx to the userid (like $post[userid] if used in a postbit template).

medicalforums 08-15-2009 12:05 AM

Thanks Lynne
That really helped

but let be more specific about my issue

I am trying to add an option to an "easy forms" question that will submit the form as a new thread.

Your code worked perfectly fine in postbit and it shows

but the problem is now users will get to see the code when they submit the form!

Do you know how can I fix that!

Appreciating your help

Lynne 08-15-2009 02:52 AM

It would help if I could understand what it is you are trying to do (and what is wrong with a user seeing the code?).

medicalforums 08-15-2009 04:03 AM

There's a mod called "Easy Forms" here's the thread
https://vborg.vbsupport.ru/showthrea...ght=easy+forms

That mod allows us to create custom forms which when submitted by users will actually post as new thread in a specified forum.

When admin can set up the form by specifying questions and answers(options) (in my example, single selection radio buttons)

In that particular form question users get choose how they want to be contacted in case somebody wanted to respond to their request
Here's how it looks exactly:
How to contact me?
  • Please email me
  • Please PM me

So your code worked just fine after users submitting the form and the output shown in the created thread is OK and the PM link is shown

However, when users are actually filling the form itself (before submitting) they don't see
Please PM me option
instead they see

Please [url=http://www.yoursite.org/forum/private.php?do=newpm&u=xxxx]PM me/url]
PS: I intentionally ruined the closing URL above so that the code doesn't really work and only the link shows up

Lynne 08-15-2009 01:55 PM

Ah, I see. I think you will have to write some php code that looks at the value of the radio button and if they selected "Please PM me" then "Please [url=xxxx etc" gets inserted into the post. I don't know that mod, so you may have to ask for help in that modification thread and see if they know how to do that.


All times are GMT. The time now is 07:29 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.01637 seconds
  • Memory Usage 1,718KB
  • 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)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