BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Age of Conan Archive => BeBot Hyborian modules => Topic started by: Monk4y on March 03, 2009, 06:23:36 am

Title: How to? Itemref link in a php module?
Post by: Monk4y on March 03, 2009, 06:23:36 am
Hello, I'm trying to create a personal for sale module for our guild that lists the items for sale in a php module.

Ive created a base template but I'm having problems inserting the Age of Conan item reference links. I enter them in a normal text block but they all come out as free text and not the nice blue itemlinks.

This is what im doing, encasing the itemlink in a txt line, I'm guessing this is not the correct way to do this? The blue test is the itemlink btw. Would some kind person please help. Many thanks.

$txt.= "##GI_orange##City Recipes:##end##\n";

$txt.= "<a style="text-decoration:none" href="itemref://131088/131088/5/0:0:0:0/0:0:0:0"><font color=html_link_color>[Test Item Link]</font></a>\n";

$txt.= "Insert Item Crafting Requirements\n";
Title: Re: How to? Itemref link in a php module?
Post by: Monk4y on March 06, 2009, 01:38:14 pm
A little bump for help please.

I'd be gratefull if someone could explain how I could do this.

Thankyou :)
Title: Re: How to? Itemref link in a php module?
Post by: Temar on March 07, 2009, 02:27:25 am
basicly its because ur useing " which ur useing for the sides of ur string too
there are lots of ways around
put \" for the inside quotes
use ' instead for inver the inside or the outside
Title: Re: How to? Itemref link in a php module?
Post by: Monk4y on March 12, 2009, 05:23:06 am
Temar thanks for your reply.

I followed your instructions and it displayed the link correctly.
However the link did not work, it was not a clickable link.

Is there another way to do this? Can you call the item directly from the item database?
I would be grateful if anyone could help.

Thank you.

Title: Re: How to? Itemref link in a php module?
Post by: Alreadythere on March 12, 2009, 11:53:28 am
Are you showing the link inside a blob? If yes, then try using different delimiter for the blob and the itemref, like " in the blob definition and ' in the itemref. I think if you use the same one FC's parser gets confused.
Title: Re: How to? Itemref link in a php module?
Post by: Monk4y on March 12, 2009, 02:09:58 pm
Are you showing the link inside a blob? If yes, then try using different delimiter for the blob and the itemref, like " in the blob definition and ' in the itemref. I think if you use the same one FC's parser gets confused.

Hi Alreadythere, you lost me at "Are you".

If you have the time could you give me an example please? This is very new to me.

many thanks.
Title: Re: How to? Itemref link in a php module?
Post by: Alreadythere on March 12, 2009, 02:32:22 pm
Is the itemref directly shown on the output? Or is it inside a blob (aka popup text window)?

Blobs are created with $bot->core("tools")->make_blob($title, $content).

That function replaces all " with &quot; before showing the $content, as otherwise it would break the parser.

So if you want to show an itemref inside a text window you have to use ' instead of " in the itemref definition.

So your line

$txt.= "<a style="text-decoration:none" href="itemref://131088/131088/5/0:0:0:0/0:0:0:0"><font color=html_link_color>[Test Item Link]</font></a>\n";

should be

$txt.= "<a style='text-decoration:none' href='itemref://131088/131088/5/0:0:0:0/0:0:0:0'><font color=html_link_color>[Test Item Link]</font></a>\n";
SimplePortal 2.3.7 © 2008-2024, SimplePortal