ProfC
10-24-2014, 01:58 PM
Hi there,
I am attempting to trouble-shoot a custom bbcode for my forum which would pre-fill the recipient box of the "newpm" page with the userid of the user which featured in the {option} part of the custom bbcode.
The code is designed to use {option} to determine which profile to link to, and it does this, but we seem to have struck an issue in getting it to pre-fill the recipient box in the newpm page.
We appear to need the userid for this, but as I'm not sure on how to get it - it will be different for every user which uses the code. Such as: admin=admin1, admin=admin2 etc
Is there a way to convert the username of a poster (the contents of {option} in this case) to its userid so it'd work with the newpm page?
The specific line of code we're not sure about is this: (We've added the ____ as a placeholder)
<a href="http://www.alexandria-ns.com/private.php?do=newpm&_____"><img src="http://www.alexandria-ns.com/images/misc/message.png" alt="Send a PM?"></a>Any advice would be appreciated.
~ProfC
Full code:
<table cellspacing="0" style="border: solid #003399 1px; border-left: 0; width: 700px; background-color: #FFFFFF;"><tr><td style="width: 190px; border-left: solid #003399 4px; padding: 10px 15px; background-color: #003399; border-right: solid #003399 4px; border-top: solid #003399 1px; border-bottom: solid #003399 1px;" valign="top"> <h1 style="margin: 0; padding: 0;font-size: 11pt; font-weight: normal;"><a href="http://www.alexandria-ns.com/member.php?do=getinfo&username={option}" target="_blank" onclick="javascript<b></b>:window.open(this.href, 'Profile of: {option}, 'width=800,height=400,resizable=yes, menubar=yes, scrollbars=yes, status=yes, toolbar=yes'); return false;" style="color: #e3dc0b;"><b>{option}</b></a></h1><p style="margin: 0; padding: 0;color: #e3dc0b; font-size: 8pt; padding: 3px 0;">Administrator's Comment</p><div style="margin-top: 10px;"></div><br><a href="http://www.alexandria-ns.com/private.php?do=newpm&_____"><img src="http://www.alexandria-ns.com/images/misc/message.png" alt="Send a PM?"></a> </td><td style="width: 440px; padding: 10px 15px; font-size: 8pt; border-right: solid #003399 4px; border-top: solid #003399 1px; border-bottom: solid #003399 1px;" valign="top"><b>{param}</b></td></tr></table>
I am attempting to trouble-shoot a custom bbcode for my forum which would pre-fill the recipient box of the "newpm" page with the userid of the user which featured in the {option} part of the custom bbcode.
The code is designed to use {option} to determine which profile to link to, and it does this, but we seem to have struck an issue in getting it to pre-fill the recipient box in the newpm page.
We appear to need the userid for this, but as I'm not sure on how to get it - it will be different for every user which uses the code. Such as: admin=admin1, admin=admin2 etc
Is there a way to convert the username of a poster (the contents of {option} in this case) to its userid so it'd work with the newpm page?
The specific line of code we're not sure about is this: (We've added the ____ as a placeholder)
<a href="http://www.alexandria-ns.com/private.php?do=newpm&_____"><img src="http://www.alexandria-ns.com/images/misc/message.png" alt="Send a PM?"></a>Any advice would be appreciated.
~ProfC
Full code:
<table cellspacing="0" style="border: solid #003399 1px; border-left: 0; width: 700px; background-color: #FFFFFF;"><tr><td style="width: 190px; border-left: solid #003399 4px; padding: 10px 15px; background-color: #003399; border-right: solid #003399 4px; border-top: solid #003399 1px; border-bottom: solid #003399 1px;" valign="top"> <h1 style="margin: 0; padding: 0;font-size: 11pt; font-weight: normal;"><a href="http://www.alexandria-ns.com/member.php?do=getinfo&username={option}" target="_blank" onclick="javascript<b></b>:window.open(this.href, 'Profile of: {option}, 'width=800,height=400,resizable=yes, menubar=yes, scrollbars=yes, status=yes, toolbar=yes'); return false;" style="color: #e3dc0b;"><b>{option}</b></a></h1><p style="margin: 0; padding: 0;color: #e3dc0b; font-size: 8pt; padding: 3px 0;">Administrator's Comment</p><div style="margin-top: 10px;"></div><br><a href="http://www.alexandria-ns.com/private.php?do=newpm&_____"><img src="http://www.alexandria-ns.com/images/misc/message.png" alt="Send a PM?"></a> </td><td style="width: 440px; padding: 10px 15px; font-size: 8pt; border-right: solid #003399 4px; border-top: solid #003399 1px; border-bottom: solid #003399 1px;" valign="top"><b>{param}</b></td></tr></table>