Tags within tags

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
b0n3m4n

Tags within tags

Post by b0n3m4n »

Hi!

I'm fairly new to CMSMS, but so far I like it a lot!

One thing I am having trouble with now is this:

I am writing a user-defined tag to display database content on a website. Now I would like to place links within this table, but when I use {cms_selflink} then in the resulting html file this tag will not be properly converted to html but instead put in the output file as plain text.

Instead of "linktext" the source code says "{cms_selflink...}"

Is there an easy way to do this?



What I'm trying to do is the following (maybe you can tell me whether this is generally a bad approach or not):

I am making a website for a youth group but the moderators of the site have no computer background so everything needs to be as easy as possible. One part of the moderator's work is to update the program of the group which is created every half year and then put online. So there is one section on the web site which contains the program in tabular form.

To prevent badly formatted content due to the misuse of the WYSIWYG-editor I wanted to write my own moderator section using the front-end users and custom content modules.

So if you are not logged in you can simply see the current program. If you are logged in as a mod however you can see a link after each entry that leads to another page where you use forms to change the entry in case the program had to be changed on short notice. Also there appears a link to insert new program items.

The program will be handled as a MySQL table with specified domains, so the users can't enter incorrect dates or other strange stuff.

I am under the impression that I have to write all that myself, which is okay with me because I can use the PHP practice. But if you know of another, maybe more effective, way to solve this, please let me know.

Anyway, for now I am happy to solve the problem with the {selflink}.

Thanks for reading,
Janbiel
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Tags within tags

Post by calguy1000 »

if you're writing forms, and need an admin section, and store things within a database then your best bet
would be to use a module instead of UDT's. 

The module API has functions for easily creating links, and has a reasonable form API.  it makes things quite easy.

Take a look at the questions module.  it's a pretty good example of how to do some simple form processing, etc, etc, etc. in a module.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
b0n3m4n

Re: Tags within tags

Post by b0n3m4n »

Okay, thanks, I'll try that. I thought for my purposes modules were out of proportion, but if you say so, I'll read up a bit on modules.

Thanks!
Janbiel
Locked

Return to “CMSMS Core”