L* R*
HOME FORUM DOWNLOADS
Content
  Links
     Browse SVN
     SVN Commit log
     Documentation (Wiki)
  Developers
     Taskmanager
User
Welcome, Guest. Please login or register.
Did you miss your activation email?
October 14, 2008, 10:36:21 AM

Login with username, password and session length
Search



Advanced search
Support GoPHP5.org
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Development > Coding and development discussion > Topic: Conversion from link to text
Pages: [1]   Go Down
« previous next »
Print
Author Topic: Conversion from link to text  (Read 314 times)
0 Members and 1 Guest are viewing this topic.
onekman
Freshman
*
Offline Offline

Posts: 8


Conversion from link to text
« on: May 16, 2008, 10:31:42 AM »

Hi Smiley

small ?, in a custom module of mine, I'm using a parameter after a command. This parameter is the text of an item, which I use in a SQL query in a later process. But if I take the item from inventory and drops it right after the command, it show the text of the item as a link offcourse.

The big ? is then, is it possible to convert the link into pure text, cause when I use the linktext it wont find the item when I run the SQL query.

Weird thing is, if I save the linktext into the sql db, it looks like pure text, but if I choose to print out the parameter which are holding the linktext, it will show up as a link again.

this is probably a small problem, but I havent seen to figure out a solution yet.

thx in advance.

1k
Logged
Blueeagle
Omnipotent
BeBot Developer
Expert
********
Offline Offline

Gender: Male
Posts: 313



Re: Conversion from link to text
« Reply #1 on: May 17, 2008, 11:46:43 AM »

The item references in AO are in the form '<a href="itemref://lowid/highid/ql">name of item</a>'

In the latest svn version of core('tools') you will find two functions; parse_item() and is_item(). parse_item takes a sing itemreference and returns an associative array with both IDs, the ql and the name. is_item() checks to see if the argument passed to it is an item. There is also a make_item() that takes lowid, highid, ql and name and returns an item string.

I hope that helps.
Logged

The only problem that can't be solved by adding another wrapper is having too many wrappers.
onekman
Freshman
*
Offline Offline

Posts: 8


Re: Conversion from link to text
« Reply #2 on: May 17, 2008, 12:43:39 PM »

exactly what I needed Smiley thx alot


« Last Edit: May 17, 2008, 02:08:36 PM by onekman » Logged
Pages: [1]   Go Up
Print
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Development > Coding and development discussion > Topic: Conversion from link to text
« previous next »
 
Jump to:  

Recent
Buddylist for guildbot
by Zacix
[Today at 09:43:40 AM]

Link 2 Guilds via 2 Bots?
by Temar
[Today at 08:42:11 AM]

OnlineOrg
by Karsta
[October 13, 2008, 06:54:20 AM]

!security Levels
by Nytridr
[October 12, 2008, 11:36:45 PM]

Bossloot for 5.2
by Brac
[October 12, 2008, 04:45:17 PM]

Ported Modules
by Jiheld
[October 12, 2008, 09:00:13 AM]

raid/point system suggest...
by Temar
[October 11, 2008, 11:45:40 PM]

!timers suggestions: alts...
by Alreadythere
[October 11, 2008, 03:19:46 PM]

!server does not work
by Alreadythere
[October 11, 2008, 06:54:38 AM]

TWC
by clashbot
[October 10, 2008, 08:52:57 AM]
Stats
Members
Total Members: 989
Latest: Syphae
Stats
Total Posts: 10814
Total Topics: 1459
Online Today: 14
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 2
Guests: 13
Total: 15
Zacix

Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC
TinyPortal v0.9.8 © Bloc | NewDef design by Bloc
Page created in 0.429 seconds with 28 queries. (Pretty URLs adds 0.034s, 4q)
Loading...