Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2007-10-10 20:27:12

SkeletonMan
New member
Registered: 2007-10-10
Posts: 3

Help deciphering CreateLink module

Hi all,

I'm trying to decipher how the CreateLink module works so I can duplicate it for a simmilar custom plugin I want to make. I want to create a plugin for a discussion site with a button to automatically add a link to a specific discussion. I want the whole popup window idea, but obviously more code would need to be added and some existing code changed to accomplish what I need.

Basically I'm trying to work out how to a) get the currently selected text, and b) replace this text with something else (ie. a link).

The CreatLink module isn't helpful because all of the variables and params are just numbered _1, _2, _3, etc with no clue as to what they are or what they do.

Does anyone have a guide to writing plugins that explains what arguements the main function should accept, etc ?

Last but not least I must say a big thankyou to the guys that created Xinha !  Very easy to use and thus far very easy to customise. A+ !

Chris

Offline

#2 2007-10-11 04:39:22

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: Help deciphering CreateLink module

You can obtain the source code with proper variable names by either checking out svn from http://svn.xinha.python-hosting.com/trunk/ or downloading the Nightly from the download page

Offline

#3 2007-10-11 14:51:40

SkeletonMan
New member
Registered: 2007-10-10
Posts: 3

Re: Help deciphering CreateLink module

Thanks.. I'll take a look at the copy from SVN

Offline

#4 2007-10-12 12:01:44

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: Help deciphering CreateLink module

Offline

#5 2007-10-16 22:50:32

SkeletonMan
New member
Registered: 2007-10-10
Posts: 3

Re: Help deciphering CreateLink module

Thanks, that helped a lot!

Offline

Board footer

Powered by FluxBB