Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-08-14 23:44:53

Ruhh
Member
From: dakota dunes
Registered: 2008-01-20
Posts: 305

integration?

If I want to integrate a script into Textpattern, how would I do that? I’m assuming a plugin would have to be created for it’s integration to work…


<txp:Ruhh />

Offline

#2 2008-08-14 23:47:12

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 707

Re: integration?

You can include a script as a plugin or from the cache directory. Is it a php script?

Offline

#3 2008-08-14 23:49:07

Ruhh
Member
From: dakota dunes
Registered: 2008-01-20
Posts: 305

Re: integration?

Hm? How am I able to accomplish that as a plugin? Yes it is a PHP script.


<txp:Ruhh />

Offline

#4 2008-08-14 23:54:22

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 707

Re: integration?

If you simply need to include the script as is I would compile it as a plugin, it is simpler than using the cache directory and easier to set it on or off. Need a hand doing that?

Offline

#5 2008-08-14 23:57:53

Ruhh
Member
From: dakota dunes
Registered: 2008-01-20
Posts: 305

Re: integration?

Well, it’s not as easy as it sounds. The script contains three files: the config.php, the admin.php, and the index.php? I’m not quite sure how to put all that together as a plugin.


<txp:Ruhh />

Offline

#6 2008-08-15 00:05:23

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 707

Re: integration?

No, not as easy as it sounds. If your file names reference one another you will have conflicts with same named files. It would be hard to say how that could be avoided without seeing them. Tough to integrate the index file if it’s assumed that it will be called as such.

Can you run what you need from a sub-directory beside or inside the textpattern directory?

Last edited by rsilletti (2008-08-15 00:13:09)

Offline

#7 2008-08-15 00:15:27

Ruhh
Member
From: dakota dunes
Registered: 2008-01-20
Posts: 305

Re: integration?

Well as of now, I use a PHP include (to show index.php) and smd_if (for pagination) plugin to make the script work in Textpattern.

What you mean? The script is running in a subdirectory, not in Textpattern folder.

Last edited by Ruhh (2008-08-15 00:16:22)


<txp:Ruhh />

Offline

#8 2008-08-15 00:24:39

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 707

Re: integration?

I’m not sure I can help you improve on what you have, in any case I would have to see it to tell for sure.

? using a separate directory, not files in the textpattern directory solves the file conflict problems.

Last edited by rsilletti (2008-08-15 00:26:52)

Offline

#9 2008-08-15 00:29:56

Ruhh
Member
From: dakota dunes
Registered: 2008-01-20
Posts: 305

Re: integration?

Well, it works well. I thought it wouldn’t work since it contains a HTML form but it sends successfully.

Probably compiling the script as a plugin would be a lot easier and just inserting a tag called by the plugin.


<txp:Ruhh />

Offline

#10 2008-08-15 00:40:34

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 707

Re: integration?

If, by making a single function call, you can make this script work; you can include that function as a plugin and call it as a tag that way.

Offline

#11 2008-08-15 00:52:26

Ruhh
Member
From: dakota dunes
Registered: 2008-01-20
Posts: 305

Re: integration?

? I’m not sure if I understand clearly.. My brain is in on snooze or something for now.

Uh say I include smd_if tags in the plugin code.. Well that makes no sense since a person would install the script in wherever they want so the url to include would be different…


<txp:Ruhh />

Offline

#12 2008-08-15 01:00:58

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 707

Re: integration?

I’m groping in the dark a little, I would have to see it.

Offline

Board footer

Powered by FluxBB