[Mediawiki-l] Custom tag within a custom tag

Flip Mozart flipmozart at yahoo.com
Fri Jul 27 08:34:28 UTC 2007


Hi all!

Now, I'm thinking of another custom tag, called ALTVIEW or ALTERNATIVE VIEWER.  The idea is that data (text) in between this tag will be displayed using a user-specified viewer such as an applet or an entire application.

Is there a way to embed a custom tag within a custom tag in Wiki text?  It's something like this:

=== Wiki Editor  =========================================
Article: Country:United States

The past 43 presidents of the United States are: <altview viewer=htmlEnum> <xdata source=US_Presidents></xdata> </altview> 
=====================================================

NOTE: htmlEnum is a custom PHP function that accepts an array of strings, concatenates all array entries into one long string, separating each entry by a comma.

And the output should be:

=== Wiki View ==========================================
The past 43 presidents of the United States are: George Washington, ..., Bill Clinton, and Al Gore.
=====================================================

UNFORTUNATELY.... this is the output:

=== Wiki View ==========================================
The past 43 presidents of the United States are: <altview viewer=htmlEnum> Array </altview>.  
=====================================================

For some reason, the array( "George Washington", ..., "Al Gore" ) is not being passed to the AltView extension function.  

Any ideas on how to make this work?

I'm working on a Biology-related Wiki, and one of the things I want to do is this (second example):

=== Wiki Editor  ===========================================
 Article: Protein:P52
 
 The P52 protein has the following structure: <altview viewer=deepView> <xdata source=P52_Sequence></xdata> </altview> 
 
 More text here... blah... blah...
 ========================================================
 
 And the output could be:
 
 === Wiki View =============================================
 The P52 protein has the following structure: 
 
        ===== deepView Version 2.0 (TM) ==========
        |                                                                    |
        |           00000----0000----|                                 |
        |                                   |                                |
        |                                   |---/\/\/\/\/\/                  |
        |                                                                    |
        |            (some 3-D protein diagram)                 |
        |                                                                    |
        |                                                                    |
        ===================================
 
 More text here... blah... blah...
   
 =====================================================
 
Regards,

Filip
 Send instant messages to your online friends http://uk.messenger.yahoo.com 


More information about the MediaWiki-l mailing list