Attention:

Support Rules and Guidelines
Before you post your support topic, please remember to:
  • Read the support forum rules.
  • Check the wiki and use search to see if your problem can be answered there first.
  • Link your board please, and make sure that the problem on your board is visible to guests or provide a test account.
  • Do not post Board Wrappers and CSS unless requested. With a board link, this is not necessary.
  • Be as descriptive as you can and use as many details as possible when describing your problem.
  • Please briefly mark any links to forums that may not be work-safe.
This will help ensure your support issue will be attended to in a quick and efficient manner.

  Add ReplyNew TopicNew Poll

 auth key for main profile?
#
I've been working on a add to friend list link in the main profile html templates but I can't get the link to work.

CODE
<a href="javascript:window.open('index.php?showuser=1<!-- |id| -->&amp;CODE=friends&amp;action=add&amp;friend=<!-- |name| -->&amp;auth_key=x','Friends','width=460,height=460,resizable=yes,scrollbars=yes');void(0);">Add friend</a>

signature
#
There is no auth_key for main profiles.

Put auth key in a javascript var in the wrappers and then reference it in the above statement. Should work.

signature
email: admin@jcink.com :: blog: John C.
#
Not sure if I'm doing this right.
CODE
<script>
document.getElementById("addfriend").innerHTML = "<!-- auth_key| -->";
</script>


CODE
<a href="javascript:window.open('index.php?showuser=1<!-- |id| -->&amp;CODE=friends&amp;action=add&amp;friend=<!-- |name| -->&amp;auth_key=<span id='addfriend'></span>','Friends','width=460,height=460,resizable=yes,scrollbars=yes');void(0);">Add to buddies list</a>


signature
#
Nah, JS selectors only target DOM elements. You'll need to target the anchor itself and modify the href attribute to include the auth_key.

This post has been edited by Dusty: Jan 26 2018, 12:26 AM
PM
#
Ok that makes more sense

signature
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
Share this topic:
« Next Oldest | General Support | Next Newest »

Options Add ReplyNew TopicNew Poll