Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Re: [SeanP] New Template

Quote Reply
Re: [SeanP] New Template In reply to
Hi Sean,

GForum intentionally doesn't allow you to directly pass in "page=template.html" to parse a template, but it is very easy to add a new do= action that can accomplish the same thing. To do so, go to the Setup -> Actions area of the admin panel, and add a new action by typing a name into the box. This will be the value used - for instance, if you type "my_test_action", .../gforum.cgi?do=my_test_action will display the page. After you hit "Add action" you'll be asked for the action details and permission:

Action Name - this is what you just entered
Description - this is what shows up on the "Who's Online" page when a user is viewing gforum.cgi?do=action_name
Enabled - can be used to disable an action without deleting it
Shown on Who's Online - if set to Hidden, it won't be displayed on the Who's Online page for the user
Page - this is the template that will be parsed, and is the only field that needs to be filled in.
Groups - if you want to restrict this action to certain users, you can do so by adding a new group, assigning the users to the group, then checking this box and selecting the group.
Minimum user status - this allows you to restrict the action to registered users or administrator-status users.

Once the action is added, you can use a link such as:

<a href="gforum.cgi?do=my_test_action;<%hidden_query%>">My Action</a>

to browse to the page (the '<%hidden_query%>' part is necessary for users who choose to log in without cookies).

Jason Rhinelander
Gossamer Threads
Subject Author Views Date
Thread New Template SeanP 2245 Nov 30, 2004, 10:47 AM
Thread Re: [SeanP] New Template
Jagerman 2169 Nov 30, 2004, 3:02 PM
Post Re: [Jagerman] New Template
SeanP 2158 Nov 30, 2004, 11:28 PM