vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   Allow 'Un-logged in User' add Username to "Contact Us" message - helps find account (https://vborg.vbsupport.ru/showthread.php?t=111728)

Quarterbore 03-29-2006 10:00 PM

Allow 'Un-logged in User' add Username to "Contact Us" message - helps find account
 
I have found myself receiving quite a few e-mails from people that can not log into my forums (not activated, forgot password, computer issues, etc.) and often the e-mail I get through the vBulleting "Contact Us" lists the username as "Unregistered".

This very simple template modification allows Members that are not logged in to provide their username making it much easier for me to look at their account and fix any problems. If the user leaves the User Name blank the e-mail comes through with the default "Unregistered". If the user is logged into the system then their real username is always provided.


Requires: One template change
Time required: less then a minute

--------------------------------------------------------------------------

Open Template: contactus

Find:
Code:

                                        <td>
                                                $vbphrase[your_name] :<br />
                                                <input type="text" class="bginput" name="name" value="$name" size="50" />
                                        </td>
                                </tr>

After Add:

Code:

                                <tr>
                                        <td>
                                                $vbphrase[username] on forums :<br />
                                                <input type="text" class="bginput" name="username" value="$username" size="50" />
                                        </td>
                                </tr>

Attached are images that show the before and after for a user that is not logged in.

Following is the e-mail we get from the unmodified page when a user is not logged in:

Quote:

The following message was sent to you via the Forums Contact Us form by NAME.

--------------------------------

I forgot my password. Please email.
Thanks

--------------------------------

Referring Page: http://www.myforums.com/
IP Address: ###.###.###.###
User Name: Unregistered
User ID: 0
Now, if the member types in their User Name into the user name field (When they are not logged in) I get the following:

Quote:

The following message was sent to you via the Forums Contact Us form by NAME.

--------------------------------

I forgot my password. Please email.
Thanks

--------------------------------

Referring Page: http://www.myforums.com/
IP Address: ###.###.###.###
User Name: Quarterbore
User ID: 0
Also note, the system uses the User Name for users that are logged so if they use the Contact Us page and they enter a bogus User Name the e-mail that is received contains the User Name from system, for example:

Quote:

The following message was sent to you via the Forums Contact Us form by Quarterbore.

--------------------------------

I am logged in but I entered User name as "nobody"

--------------------------------

Referring Page: http://www.myforums.com/
IP Address: ###.###.###.###
User Name: Quarterbore
User ID: 1
I added two more screen shots from a second of my forums where I have just added this and sent myself a test e-mail... Obviously my Name in my forums is "Ken" and User Name is "Quarterbore" (See 3rd and 4th screen shots)

Quarterbore 03-30-2006 05:53 PM

I should add... I was trying to get the UserName to self populate in the "User Name" field like "Your Name" and "Email Address" does but I couldn't figure that out yet...

I hope this helps save someone else some time trying to hunt down the unlogged-in members!

p.s. This post is reserved ;)

kall 03-30-2006 11:25 PM

Good idea.. you may want to add 'Un-logged in' to the title somewhere, because Users' names will come thru automatically if they are logged in.

Snake 03-31-2006 06:33 AM

Nice mini hack! :)

manutdvn 03-31-2006 08:43 AM

Very nice. I will install. Thank you.

Ziki 04-17-2006 12:11 PM

Installed!

makaiguy 04-19-2006 12:49 AM

Very nice. Clicks Install. Installed as soon as I saw it.

I modified the code so that it only shows the name-entry box when the user is not logged on, and tweaked the text shown above the box a bit:
Code:

                                <if condition="$bbuserinfo['userid'] ==0">
                                <tr>
                                        <td>
                                                If a registered $vboptions[bbtitle] user, $vbphrase[username] on forums :<br />
                                                <input type="text" class="bginput" name="username" value="$username" size="50" />
                                        </td>
                                </tr>
                                </if>


Quarterbore 10-18-2006 09:58 PM

Someone asked me about this hack... I have not hacked my 3.6.2 forums yet to include this but I will try to verify it still works soon!

navjotjsingh 12-04-2006 11:24 AM

Worked on vb 3.6.4 forums too! Its Great!

BadgerDog 04-11-2007 03:36 PM

Quote:

Originally Posted by makaiguy (Post 953620)
Very nice. Clicks Install. Installed as soon as I saw it.

I modified the code so that it only shows the name-entry box when the user is not logged on, and tweaked the text shown above the box a bit:
Code:

                                <if condition="$bbuserinfo['userid'] ==0">
                                <tr>
                                        <td>
                                                If a registered $vboptions[bbtitle] user, $vbphrase[username] on forums :<br />
                                                <input type="text" class="bginput" name="username" value="$username" size="50" />
                                        </td>
                                </tr>
                                </if>


Installed ......... :)

Thank you......

Regards,
Badger


All times are GMT. The time now is 11:54 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.01019 seconds
  • Memory Usage 1,748KB
  • 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
  • (4)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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