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 06, 2008, 09:07:54 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 304 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
!items database
by cthulhu
[October 05, 2008, 11:36:16 AM]

Supplies needed module
by viper
[October 05, 2008, 11:11:13 AM]

Assist
by Foxy
[October 05, 2008, 05:09:02 AM]

How's 0.5.x coming? Wonde...
by Hyde
[October 04, 2008, 04:59:20 PM]

TWC
by Elesar1
[October 04, 2008, 12:55:59 PM]

Org in AoC
by Alreadythere
[October 04, 2008, 04:50:00 AM]

OnlineOrg
by Slacklin
[October 04, 2008, 03:06:00 AM]

Learning .NET, Mono, C#, ...
by Vhab
[October 04, 2008, 02:39:03 AM]

guild taxes module for ag...
by Elesar1
[October 03, 2008, 09:06:09 AM]

MediaControl
by Elesar1
[October 03, 2008, 08:38:18 AM]
Stats
Members
Total Members: 983
Latest: Titerris
Stats
Total Posts: 10740
Total Topics: 1448
Online Today: 15
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 3
Guests: 38
Total: 41
Sudoka
cthulhu
Karsta

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.172 seconds with 28 queries. (Pretty URLs adds 0.034s, 4q)
Loading...