ID:795484
 
(See the best response by A.T.H.K.)
Code:
mob/Topic(href,href_list[])
switch(href_list["action"])
if("VC")
src<<output("[Code_About]","output1")
else
return ..()
mob/verb/Share_Code(t as message)
world<<output("[src] Has Shared an <a href='?src=\ref[src];action=VC'>Code</a> with the sever.","output1")
Code_About="[syntax(t)]"
return ..()


Problem description: Using Topic's is new to me, When ever the person shares a code the code shows up in the world(correctly), But Then When a person who did not share the code click on "Code" Then the code shows up in the person who shared the codes output rather than the person who wants to view the code.

What is Code_About? It looks (in this example) to be a global variable that is redefined every time someone shares a new code. Which is not very convenient at all.

As for the error, use usr instead of src. You should probably change it to client/Topic() instead of mob/Topic(), but I guess it's a matter of preference. The client is the one processing the link, not the mob, so I believe that you shouldn't put it under the mob tree.
In response to Albro1
Just a correction: in this case, usr is equal to src in all instances.
In response to Murrawhip
Would you mind explaining why using src sends it to the link's ref but usr sends it to the one who clicked it?
In response to Albro1
Albro1 wrote:
Would you mind explaining why using src sends it to the link's ref but usr sends it to the one who clicked it?

world<<output("[src] Has Shared an <a href='?src=\ref[src];action=VC'>Code</a> with the sever.","output1")


This line is going to call the specified src's mob/Topic regardless of whether you set it to src or usr, because they're one and the same.
Edit: the link in this line* rather.
I used his code (In a roundabout way) and hosted it in Dream Daemon. I logged on with this key and as a Guest, and the results were as I described. When using src, the Topic() outputted to the link's src. When using usr, the Topic() outputted to the person who clicked the link.
This is my code:
var/Code_About

mob/Topic(href,href_list[])
switch(href_list["action"])
if("VC")
src<<"[Code_About]"
else
return ..()
mob/verb/Share_Code(t as message)
world<<"[src] Has Shared an <a href='?src=\ref[usr];action=VC'>Code</a> with the sever."
Code_About="[t]"
return ..()


Logged in with two keys. Whoever uses Share_Code is the person who gets the popup, regardless of whether I use usr or src. What's your code?
var/Code_About = "test?"
mob/Topic(href,href_list[])
switch(href_list["action"])
if("VC")
usr<<"[Code_About]"
else
return ..()

mob/Login()
..()

world<<"[src] Has Shared an <a href='?src=\ref[src];action=VC'>Code</a> with the sever."
In response to Albro1
Because your mob/Login() is called for everyone, meaning that their src ref points to their own mob. Whereas OP's code forms the link only once, when Share_Code is called, which is only ever going to point to the caller.

Replacing src with usr or vice versa in any of the code you posted just now would not change the result.
usr<<"[Code_About]"


Changing that to src changed the result.
I was going to turn code_about into a list and which ever is null or "" use that 1 for new codes, is there a more efficent way for this ?
Best response
Honestly I would just use - http://www.byond.com/developer/Cbgames/CBtextbin

Simple to use, integrate and will do what you need.