solved How to add a contact link to the profile?

Bandwerkstatt
Bandwerkstatt
@bandwerkstatt
9 years ago
224 posts
Hello :)

Contact formular:
How can we setup a contact formular for profile pages?

Guest:
How is it possible for a guest to write comments or make guestbook entries without registration?

Many thanks for your time and help!
Stefan
updated by @bandwerkstatt: 05/03/15 08:53:29AM
paul
@paul
9 years ago
4,326 posts
Quote: Contact formular: How can we setup a contact formular for profile pages?
Not sure what you mean.

Quote: How is it possible for a guest to write comments or make guestbook entries without registration?
You can't. You'll just be opening up your site to spam.


--
Paul Asher - JR Developer and System Import Specialist
Bandwerkstatt
Bandwerkstatt
@bandwerkstatt
9 years ago
224 posts
paul:
Quote: Contact formular: How can we setup a contact formular for profile pages?
Not sure what you mean.

Quote: How is it possible for a guest to write comments or make guestbook entries without registration?
You can't. You'll just be opening up your site to spam.

I´m sorry, i´ll try it again :)
We want to contact the member, directly on his profile page with a contact form!
paul
@paul
9 years ago
4,326 posts
The Private Notes module can be configured so that any user can sent a message to any other user (with email notification).


--
Paul Asher - JR Developer and System Import Specialist
Bandwerkstatt
Bandwerkstatt
@bandwerkstatt
9 years ago
224 posts
paul:
The Private Notes module can be configured so that any user can sent a message to any other user (with email notification).

Paul or something else - any tipps how?

Is there a scripte or something like that, that i can use?

Thanks!
paul
@paul
9 years ago
4,326 posts
The Private Note module will allow your users to send messages to each other, and those users can select to be notified by email when they have received a message.
Is that what you need, or are you asking for something else?


--
Paul Asher - JR Developer and System Import Specialist
Bandwerkstatt
Bandwerkstatt
@bandwerkstatt
9 years ago
224 posts
paul:
The Private Note module will allow your users to send messages to each other, and those users can select to be notified by email when they have received a message.
Is that what you need, or are you asking for something else?

Hi Paul!
Many thanks for your answere.

What we need is help with the contact formular. We don´t know, how we install it on the user profiles, so that other users can wrote a message with the contact formular.

The next, we want an "abuse" button for songs. That mean, when a user has copyrights for his song and with the "abuse" button or the contact formular, other users inform us with a message. So it would be great, if the message include from the system:
- the user id / name
- the song
and a comment field who the user can tell us, whtat is wrong with the song.

Hope you understand and can help :) We don´t find it on documentations.

Thanks. Stefan
updated by @bandwerkstatt: 03/18/15 11:50:20AM
michael
@michael
9 years ago
7,714 posts
You can put this link on their profile where you like:
http://YOUR-SITE.com/note/new/user_id=2

and use the value of the user_id as the person your wanting to contact. That will take them to the private notes form to send the message.
Bandwerkstatt
Bandwerkstatt
@bandwerkstatt
9 years ago
224 posts
michael:
You can put this link on their profile where you like:
http://YOUR-SITE.com/note/new/user_id=2

and use the value of the user_id as the person your wanting to contact. That will take them to the private notes form to send the message.

Hey :)
Many thanks, but directly on the page the contact formular with all the function, that would be perfect.
updated by @bandwerkstatt: 03/21/15 02:07:04PM
michael
@michael
9 years ago
7,714 posts
Form submissions from within the skin is something you'd need to do custom. The Form pages do a lot of checking that the form was sent from the site and not some hacking attempt. When you put the form in the skin, you'd have to implement that yourself.

Not so hard, just need to do know where the form was coming from and was located.
davej56
@davej56
9 years ago
95 posts
michael:
You can put this link on their profile where you like:
http://YOUR-SITE.com/note/new/user_id=2

and use the value of the user_id as the person your wanting to contact. That will take them to the private notes form to send the message.

If you want to put a "send private message" link on all the profiles, what value to you use for the user_id? I'm thinking if I put =2, then it's going to go to user 2 for everyone. Am I wrong?
paul
@paul
9 years ago
4,326 posts
Use http://YOUR-SITE.com/note/new/user_id={$_user_id} (or even {$jamroom_url}/note/new/user_id={$_user_id} ).


--
Paul Asher - JR Developer and System Import Specialist
davej56
@davej56
9 years ago
95 posts
Thanks Paul. Have to go out for a bit, but I'll give this a shot in a little while.

Appreciate your help.
davej56
@davej56
9 years ago
95 posts
Okay Paul, where do I insert the code? I don't know how to put a link on a profile.
Developer Networks
Developer Networks
@developer-networks
9 years ago
566 posts
In your skin directory you will find .tpl files that contail profile templates. You most likely want to edit profile_header.tpl or profile_index.tpl in order to add links on profiles.

Hope that helps!
updated by @developer-networks: 03/31/15 04:53:08AM
Developer Networks
Developer Networks
@developer-networks
9 years ago
566 posts
Heres my code that brings up a contact page contact.tpl
<center>
{assign var="selected" value="contact"}
{assign var="spotlight" value="no"}
{assign var="no_inner_div" value="true"}
{jrCore_lang  skin=$_conf.jrCore_active_skin id="55" assign="page_title"}
{jrCore_page_title title=$page_title}
{jrCore_include template="header.tpl"}
<script type="text/javascript">
    $(document).ready(function(){
        jrSkinInit();
     });
</script>
<br><br>

<div class="container">

    <div class="row">

        <div class="col12 last">
<div class="item">

                <div class="block_content"><span class="title">{jrCore_lang  skin=$_conf.jrCore_active_skin id="55" default="Contact Us"}</span></div>
            <div class="block_content">

            <div class="alert alert-success" role="alert"><strong>{jrCore_lang  skin=$_conf.jrCore_active_skin id="56" default="Please enter the message you would like to send"}{jrCore_lang  skin=$_conf.jrCore_active_skin id="57" default=" and we will get back to you ASAP."}</strong></div>

            <div class="inner">

                {if jrUser_is_logged_in() && jrCore_module_is_active("jrPrivateNote")}
                    {jrCore_module_url module="jrPrivateNote" assign="notesurl"}
                    {jrCore_form_create_session module="jrPrivateNote" option="new" assign="token"}
                    <div class="page_notice_drop">
                        <div id="jrPrivateNote_new_msg" class="page_notice form_notice"></div>
                    </div>
                    <div class="inner">
                        <form id="jrPrivateNote_new" enctype="multipart/form-data" accept-charset="utf-8" method="post" action="{$jamroom_url}/{$notesurl}/new_save" name="jrPrivateNote_new">
                            <input id="jr_html_form_token" type="hidden" value="{$token}" name="jr_html_form_token">
                            <input type="hidden" name="note_to_id" value="1">
                            <div class="left capital bold" style="width:75%;margin:0 auto;">
                                {jrCore_lang skin=$_conf.jrCore_active_skin id="69" default="subject"}:<br><br>
                                <input id="note_subject" class="form_text" type="text" value="" name="note_subject" style="width:100%;">
                            </div>
                            <br><br>
                            <div class="left capital bold" style="width:75%;margin:0 auto;">
                                {jrCore_lang skin=$_conf.jrCore_active_skin id="70" default="message"}:<br><br>
                                <textarea id="note_text" class="form_textarea" name="note_text" style="width:100%;"></textarea>
                            </div>
                            <br><br>
                            <div class="center capital bold" style="width:75%;margin:0 auto;">
                                <input id="jrPrivateNote_new_submit" class="form_button" type="submit" value="{jrCore_lang skin=$_conf.jrCore_active_skin id="58" default="Send Message"}">&nbsp;
                                &nbsp;<input type="button" value="{jrCore_lang  skin=$_conf.jrCore_active_skin id="59" default="Cancel"}" onclick="window.location='{$jamroom_url}'" class="form_button">
                            </div>
                        </form>
                    </div>
                {/if}
           </div>
        </div>
      </div>
    </div>
  </div>
</div>


{jrCore_include template="footer.tpl"}


Hope that helps
Developer Networks
Developer Networks
@developer-networks
9 years ago
566 posts
<input type="hidden" name="note_to_id" value="1">


value here equals the profile ID you would like to send the message to.
derrickhand300
@derrickhand300
9 years ago
1,353 posts
Or you could play with copying the template code from COMMENTS module into the main Profile template...which is what I am about to do here-been on the to do list for awhile.
davej56
@davej56
9 years ago
95 posts
Sorry b360, but you are way over my head. I just want a link to show up just to the right of the profile owner's name (under their picture) that says, "Send Note." And when they click the link, I want it to take them to private notes right to where they would input the note and not have to search for the person they want to send the note to. I want click, enter the note, send.
updated by @davej56: 03/31/15 09:31:44AM
derrickhand300
@derrickhand300
9 years ago
1,353 posts
Dave-see if you are wanting the same button I have here for "posting guidelines" if so i will send you the template location

http://drillingahead.com/drilling-ahead

If so- then its just a matter of going into templaes and typing ZZZZZZZZZZZZZ all over the place then saving and looking at the page...soon as you find the right template/location the ZZZZZZZZZZ will show up - add your button code and link in that location

MOST of these template are located here
Go to your admin profile- click the templates tab- start typing ZZZZZZZZ and viewing the page till you find the location you want

The one template outside this in my skin is profile_index and its in the main skin directory

updated by @derrickhand300: 03/31/15 09:50:33AM
davej56
@davej56
9 years ago
95 posts
Hey Derrickhand300, I don't have the same template, but assuming the variations are relative, I want to put the link where your "x's" are. What template is that in?
derrickhand300
@derrickhand300
9 years ago
1,353 posts
Here I made a video to show you
(adding a new link to a post below)

this works no matter what skins you are using
I dont think you will find any educated self respecting coder sharing something like this...but I am none of those and I have no shame- so ENJOY! and pardon the audio
updated by @derrickhand300: 03/31/15 11:03:39AM
davej56
@davej56
9 years ago
95 posts
I'll have to look at this again when I get home from work. Lunch is over.

Thanks for your help!
derrickhand300
@derrickhand300
9 years ago
1,353 posts
ok great...will have to wait fro it to download to play..its a swf file.

I use voice morphing software to make me sound like an idiot- people find me less intimidating this way :)
Strumelia
Strumelia
@strumelia
9 years ago
3,603 posts
Maybe it's my own fault somehow, but for me your video contained only a static image and no audio. Hmmm, maybe you used the Super Stealth Voice Software that only reveals a voice in high frequency bat sonar range? ;)


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
derrickhand300
@derrickhand300
9 years ago
1,353 posts
Ok let me jet the swf version and try a mp4 version...downloading some software now
derrickhand300
@derrickhand300
9 years ago
1,353 posts
Dang- this video came out a little blurry- if you need a better version let me know

https://youtu.be/O2JSxoQCcBI

Not included in the video- but here I think we have to remember we are editing a module- which could possible be broken with updates-I am not sure in some instances like this- so to be SAFE just make the code I am copying from jrComments module into a template and insert the code that way into your template page

so here is my code

{*Use this for comments under profile image on profile*}
<a id="{$jrComment.unique_id}_cm_section"></a>
<a id="comment_section"></a>

<div id="{$jrComment.unique_id}_comments" class="comment_page_section">

    {* see if profile owners can delete *}
    {assign var="profile_owner_id" value=0}
    {if $_user.user_active_profile_id == $_item._profile_id && $_item.quota_jrComment_profile_delete == 'on'}
        {assign var="profile_owner_id" value=$_item._profile_id}
    {/if}

    {if $jrComment.pagebreak > 0}
        {jrCore_list module="jrComment" search1="comment_module = `$jrComment.module`" search2="comment_item_id = `$jrComment.item_id`" order_by="_item_id `$_conf.jrComment_direction`" profile_owner_id=$profile_owner_id pagebreak=$_conf.jrComment_pagebreak page=1 pager=true pager_template="comment_pager.tpl"}
    {else}
        {jrCore_list module="jrComment" search1="comment_module = `$jrComment.module`" search2="comment_item_id = `$jrComment.item_id`" order_by="_item_id `$_conf.jrComment_direction`" limit="500" profile_owner_id=$profile_owner_id}
    {/if}

</div>


{if jrUser_is_logged_in() && $_user.quota_jrComment_allowed == 'on'}

    <div id="comment_form_holder">
    <div id="comment_form_section">

        <div id="{$jrComment.unique_id}_cm_notice" class="item error" style="display:none;">
            {* any comment error loads here *}
        </div>

        {if $_conf.jrComment_threading == 'on' && $_conf.jrComment_editor == 'on'}
        <div id="comment_reply_to" class="item success" style="display:none;">
            {* small note about how you are replying to when editor is enabled *}
            {jrCore_lang module="jrComment" id=18 default="Your Reply To:"} <strong><span id="comment_reply_to_user"></span></strong>
        </div>
        {/if}

        <div class="item" style="display:table">
            <div style="display:table-row">
                <div class="p5" style="display:table-cell;width:5%;vertical-align:top;">
                    {jrCore_module_function function="jrImage_display" module="jrUser" type="user_image" item_id=$_user._user_id size="small" alt=$item.user_name class="action_item_user_img iloutline" _v=$_user.user_image_time}
                </div>
                <div class="p5" style="display:table-cell;width:95%;padding:5px 12px;">

                    <a id="cform"></a>
                    <form id="{$jrComment.unique_id}_form" action="{$jamroom_url}/comment/comment_save" method="POST" onsubmit="jrPostComment('#{$jrComment.unique_id}', 'undefined', 5000, '{$_conf.jrComment_editor}');return false">

                        <input type="hidden" id="{$jrComment.unique_id}_cm_module" name="comment_module" value="{$jrComment.module}">
                        <input type="hidden" id="{$jrComment.unique_id}_cm_profile_id" name="comment_profile_id" value="{$jrComment.profile_id}">
                        <input type="hidden" id="{$jrComment.unique_id}_cm_item_id" name="comment_item_id" value="{$jrComment.item_id}">
                        <input type="hidden" id="{$jrComment.unique_id}_cm_order_by" name="comment_order_by" value="{$_conf.jrComment_direction}">
                        <input type="hidden" id="comment_parent_id" name="comment_parent_id" value="0">

                        {if isset($_conf.jrComment_editor) && $_conf.jrComment_editor == 'on'}
                            {jrCore_editor_field name="comment_text"}
                        {else}
                            <textarea id="comment_text" name="comment_text" cols="40" rows="5" class="form_textarea {$jrComment.class}" style="height:64px;width:98%;{$jrComment.style}"></textarea><br>
                        {/if}
                        <div style="vertical-align:middle">
                            {jrCore_lang module="jrCore" id="73" default="working..." assign="working"}
                            {jrCore_image image="form_spinner.gif" id="`$jrComment.unique_id`_fsi" width="24" height="24" alt=$working style="margin:8px 8px 0px 8px;display:none"}<input id="{$jrComment.unique_id}_cm_submit" type="submit" value="{jrCore_lang module="jrComment" id="2" default="Save Comment"}" class="form_button {$jrComment.class}" style="margin-top:8px;{$jrComment.style}">
                        </div>

                    </form>

                </div>
            </div>
        </div>
    </div>
    </div>

{elseif jrUser_is_logged_in() === false}

    {jrCore_module_url module="jrUser" assign="url"}
    <div class="item"><div class="p5"><a href="{$jamroom_url}/{$url}/login">{jrCore_lang module="jrComment" id="16" default="You must be logged in to post a comment"}</a></div></div>

{/if}

{*End of "Use this for comments under profile image on profile"*}
( Now the code above if you use it- its not going to work right off- when you add a comment and "save" it will give you an error message concerning an invaild module or something- this is where yo have to edit the smarty- sometimes combine it with other smarty in the same module and play with it to make it work---this can be the hardest part ( to me) and where I usually bring stuff like this to the forum to get help. )
When you get the code working correctly then do the below

Open notepad then paste this working code to a blank page in notepad and click "save as" and type the file name - in this instance I am using "jrComments_profile_comment_under_image.tpl" ( always end with .tpl if its a template file) then select "all file types" when saving.

Now go to your FTP and upload this notepad file to SKINS>Templates Folder

NOW you can remove ALL THAT code you copied from the "Comments" module and added to the "Online status" template- you wont need it anymore. ( I suppose you could just comment it all out if you wanted using the {* code is in here I want to comment out*}

Then when you get ready to insert it into some code somewhere you do not have to worry about an update breaking it- you can even edit it to display as many comments as you want 1-or 10 or more...just depends on how much space on the page you want to allocate to comments- I think you would insert the above into the place where you just removed all the code you copied over from COMMENTS module

Use something like this to insert it and adjust the variables you want:

{jrCore_list module="jrComment" template="jrComments_profile_comment_under_image.tpl" limit="6" pager="true" order_by="_created numerical_desc" }

That should put ALL that code back where you want it in a way that wont break on updates

That's really all I got for you on this- just MY way of trying to make all this make sense in a way that allows me to work in the platform with so little experience

I know I must have some of this wrong- but I welcome anyone to chime in and correct me so we can ALL learn

I do this stuff and sometimes get lost in it-I know I may have gone a little overboard with this-but forcing myself to actually outline the steps I use has also helped me today to understand exactly what MY process in all this is- so I apologize if there is more here than asked for

:) IF WE ARE LUCKY someone knowledgeable will edit the above code so it works for us :) man I love it when that happens but these guys are like school teachers- they COULD give you the answers BUT they prefer to give you the HINTS to figure out the answers on your own...always disliked that part about teachers :)
updated by @derrickhand300: 03/31/15 12:36:17PM
derrickhand300
@derrickhand300
9 years ago
1,353 posts
ohhh...and another place to edit profiles like 360 said above is in your skins look for something like

profile_index.tpl
profile_header-index.tpl
profile_footer.tpl
profile_video_index.tpl

etc..........

Just type some characters in each and view the page- this will help you find THE CORRECT template to edit AND the place in the correct template to edit
davej56
@davej56
9 years ago
95 posts
Okay, so I found the place to insert the code that Paul said to use above. And what I get, is the code on the profile page. I just want it to be a link that's labeled "Send Private Note." I guess the code above is only partial. No habla code!
derrickhand300
@derrickhand300
9 years ago
1,353 posts
Well I figure you will have to know where to link to but I would imagine it would start something like this
<a href="{$jamroom_url}/{$profile_url}/private_note_stuff">Send Private Note</a>

Sorry- hehe- but this is outside my scope of support....lmao
michael
@michael
9 years ago
7,714 posts
davej56:....Okay Paul, where do I insert the code? I don't know how to put a link on a profile....

How long is a piece of string? (the correct place to insert it is where you want it to go)

The first part is finding somewhere close to where your after. My first guess is if your using Ningja, then try the profile_sidebar.tpl file right at the bottom.

put this in before the last two div closers.

Locate the code that looks like this at the very bottom of that file:
    </div>
</div>

Add some text to know where you are:

WHERE DOES THIS COM EOUT?
    </div>
</div>

Then refresh the caches and go and look at the page. If you like where that comes out and want to put the link there, then swap that out for this code:
<a href="{$jamroom_url}/note/new/user_id={$_user_id}">Send Private Note</a>
    </div>
</div>

updated by @michael: 04/01/15 01:23:36AM
davej56
@davej56
9 years ago
95 posts
Hey Michael, that got me most of the way there. The only thing left, is that they still have to search for the recipient when they get to the private note side. Is there a way to auto-fill the recipient from the profile they are on when they hit the link?
updated by @davej56: 04/01/15 03:39:02AM
Strumelia
Strumelia
@strumelia
9 years ago
3,603 posts
I'm assuming if one put in this kind of send message link on 'all' profile pages, then you'd have to be sure and set your Private Notes module to allow members to send notes to all members, not just to people they are 'following' with.


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
davej56
@davej56
9 years ago
95 posts
Hey there Strumelia. I have mine set open (not to followers only). But I do wonder what kind of message they would receive if I had it set otherwise, and they tried to send a message. Truth is though, having the link there gets them to the notes page faster, but they would get the same result either way if they tried to send (link or no link). I just want to highlight that they can normally send a private note, and make it a little easier for my members to communicate with each other.

Tags