Thread Tools Display Modes
05-27-09, 07:52 PM   #1
theshadow
A Defias Bandit
 
theshadow's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 2
Help with links and textstrings

This is from a thread on WoWAce i made:
If I set:
Code:
Alchemy_text = [[ texthere [linkhere] texthere [linkhere] endoftext ]];
Do I need to break it up like in php:
Code:
Alchemy_text = [[texthere ]].function getlink(linkdata).[[ more text ]] .getlink(linkdata).[[ endoftext ]]
How do i go about that even? Because I can't seem to do it like php. I hope I giving a good enough description... perhaps pictures are needed...
In the guide click link:

when link clicked get info like in chat:
  Reply With Quote
05-29-09, 12:41 AM   #2
Sythalin
Curse staff
 
Sythalin's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 680
Originally Posted by theshadow View Post
This is from a thread on WoWAce i made:


How do i go about that even? Because I can't seem to do it like php. I hope I giving a good enough description... perhaps pictures are needed...
In the guide click link:

when link clicked get info like in chat:
Images aren't showing up in your post, nor do they show up when I copy/paste the links (they show up when you quote).

You'll have to pull the data before you assemble the string.

Code:
local function X_OnClick(linkdata)
    local link = getlink(linkdata)
    print("Blah blah blah ".. link.. " blah blah blah ".. link)
end
3 things to consider about this though:

1) Pseudo-code. I have doubts that copy/paste will actually work.
2) I know NOTHING about PHP, so can't really make a good cross-reference. This is just how I do it in my projects.
3) It's 1:40a here and I'm quite tired.

Last edited by Sythalin : 05-29-09 at 12:42 AM. Reason: *SLAP* STOP TRYING TO CODE WHILE TIRED
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Help with links and textstrings


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off