Loading...
 
Skip to main content

Custom Share Module 0.1dev

Themes

Themes


displaying php scripts in center column

United States

I have a great turn-key script that adds a feature we need at our site written in php. I would like for the "index.php" of this script set to show up in the center column of tiki.

How do I go about this? Is there a way to include the output from another php script in an "html page" in tikiwiki (parsed by smarty) or no?

Would I have to write some kind of module or extension to tikiwiki to call this script set in the center column?

If I wanted to control access to this feature by tikiwiki user perms, how would I go about it?

I'm just looking for suggestions on how to best go about integrating this stand-alone php script set (a personal ad system actually) with tikiwiki html pages (or something else that displays content in the center column).

Thanks for any ideas,

Kelly

Japan

Would this appear on just one page of your site, and not on every one? If not on every page, one way is to use an iframe. The php script can be called as the page source for the iframe. This way there is no Tiki restriction on the script. You can get an iframe wikiplugin here.

As I recall, there is a "Group" wikiplugin that will only display content to specified groups. This plugin could surround the iframe in your page.

I haven't experimented with PHP in Tiki's HTML pages for a while so am not sure what's possible now.

-- Gary

Hi Kelly,

It boils down to what Gary asked in his response. I have been toying with this idea myself to add "dynamism" to a wiki or article page. What I found so far is this. If t it is to appear in all pages. and want it to be the "first feature" to appear, in the "Main Center Column", I found that adding it to:

  • tiki-read_article.tpl (Articles)
  • tiki-show_page.tpl (Wiki Pages)


will work. You may place them also at the "bottom" (play with the placement location) of the said pages.

I use "tables" only for a quick layout trial, but may divs for layout placement would be better. I can insert the script (shown below) into either "tpl" pages. Since the aforementioned pages are general, whatever is added will be in everypage of either the "Articles" or "wiki" pages.

The script may be added to some other "php" and "tpl" pages too. I have tried but I was not successful to enter the script below in either the Dynamic Content System (DCS) or the "Banner" modules, the system erases the script. I do not know anyway how a PHP can be added directly to an HTML page.

Which brings me back to Gary's response.


Hi Gary,

I have thought of posting a similar thread about our on-going discussion on "randomization" of content in individual pages. I was planning to post my findings above in my previous thread, but with your response here, the issues raised by Kelly are similar to those I am asking.


You responded:


> ... If not on every page, one way is to use an iframe. The php script can be called as the page source for the iframe. This way there is no Tiki restriction on the script. You can get an iframe wikiplugin here.
>
> As I recall, there is a "Group" wikiplugin that will only display content to specified groups. This plugin could surround the iframe in your page.



Do you have any sample page showing an application of this plug in? I could not find (documentation) on th eiFrame. Is there a possibiliity of a having simple tutorial on the use of this plug in that you created?

It would indeed be a way to introduce other scripts (such as the one below) to individual pages qne place the insert "iFrame" in a location of each page.

I have another related question, but I will post it as a separate thread so that this one will focus on the main topic that Kelly was asking.

cgc0202


Script


(! - begin insert -)
(TABLE width="150" ALIGN="left" BORDER="0" CELLSPACING="2" CELLPADDING="5")(TR)(TD ALIGN="center")
(script type="text/javascript")
var zg_person_scope = 2;
(/script)
(script src="http://www.flickr.com/fun/zeitgeist/badge.js.gne" type="text/javascript")(/script)
(/TD)(TD ALIGN="center")

(script type="text/javascript")
var zg_nsids = '87368315@N00';
(/script)
(script src="http://www.flickr.com/fun/zeitgeist/badge.js.gne" type="text/javascript")(/script)
(TR)(TD COLSPAN="2" ALIGN="center")(SPAN STYLE="font-size: 80%;")Click on any of the photos to expand them.(/SPAN)(/TD)(/TR)
(/TD)(/TR)(/TABLE)

(! - end insert -)


where "(" and ")" are the "less than" and "greater than", respectively.

Japan

> ---
> > ... If not on every page, one way is to use an iframe. The php script can be called as the page source for the iframe. This way there is no Tiki restriction on the script. You can get an iframe wikiplugin here.
> >
> > As I recall, there is a "Group" wikiplugin that will only display content to specified groups. This plugin could surround the iframe in your page.
> ---
>
> Do you have any sample page showing an application of this plug in?

Do you mean the Group plugin? No, I've never used it. I have restricted viewing of an iframe's content by putting it in a page that has restricted viewing permissions. But this is actually a form of "security through obscurity" since the file/page that appears in the iframe isn't really blocked from viewing if anyone finds its URL.

> I could not find (documentation) on th eiFrame. Is there a possibiliity of a having simple tutorial on the use of this plug in that you created?

http://zukakakina.com/tiki-index.php?page=wikiplugin_iframe. No need for a tutorial, I think. Just use the plugin in the wiki page like any other. There are the usual iframe parameters to specify when inputting the plugin, but that's it.
> ....

-- Gary - themes.tw.o


Upcoming Events

1)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3) 
Tiki birthday
4)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting