collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18363
  • stats Total Topics: 2500
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: How to? Itemref link in a php module?  (Read 7478 times)

0 Members and 1 Guest are viewing this topic.

Offline Monk4y

  • BeBot User
  • **
  • Posts: 23
  • Karma: +0/-0
How to? Itemref link in a php module?
« 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";

Offline Monk4y

  • BeBot User
  • **
  • Posts: 23
  • Karma: +0/-0
Re: How to? Itemref link in a php module?
« Reply #1 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 :)

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: How to? Itemref link in a php module?
« Reply #2 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

Offline Monk4y

  • BeBot User
  • **
  • Posts: 23
  • Karma: +0/-0
Re: How to? Itemref link in a php module?
« Reply #3 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.


Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: How to? Itemref link in a php module?
« Reply #4 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.

Offline Monk4y

  • BeBot User
  • **
  • Posts: 23
  • Karma: +0/-0
Re: How to? Itemref link in a php module?
« Reply #5 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.

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: How to? Itemref link in a php module?
« Reply #6 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";

 

* Recent Posts
[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm]


0.8.x updates for AoC by bitnykk
[January 30, 2024, 11:16:08 pm]


0.8.x updates for AO by bitnykk
[January 30, 2024, 11:15:37 pm]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am]


Bebot and Rasberry by bitnykk
[November 29, 2023, 11:04:14 pm]

* Who's Online
  • Dot Guests: 542
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal