Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

file containing post action

Quote Reply
file containing post action
What file (in what folder) contains instructions for doing the post? One of mine was changed and I am having trouble finding it.

It is not one of the template files like post_write or post_post.

Thanks
Quote Reply
Re: [tora] file containing post action In reply to
I'm not sure about your question, but i think that you need check this file: post_common_write.html
in this folder: templates/default/local/include_post_common_write.html

Here down the standar code of this template:

<%--

File
====
include_post_common_write.html

Description
===========
This is a common include file used in any situation where
you have to write or edit a post.

--%>
<script language="Javascript">
<!--
function addTag(tag) {
if (document.post.post_message.createTextRange && document.post.post_message.cursorPosition) {
var cursorPosition = document.post.post_message.cursorPosition;
cursorPosition.text = cursorPosition.text.charAt(cursorPosition.text.length - 1) == ' ' ? '[' + tag + '] ' : "[" + tag + "]";
}
else {
document.post.post_message.value += "[" + tag + "]";
}
document.post.post_message.focus();
return;
}

function checkText(text) {
if (text.createTextRange)
text.cursorPosition = document.selection.createRange().duplicate();
return true;
}
// -->
</script>

<%if attachment_error%>
<%body_font%><font color=red>Your attachment did not upload: <%attachment_error%></font><%/body_font%><br>
<%endif%>

<%if post_error_no_subject%>
<%body_font%><font color="red">Unable to post: You must enter a subject</font><%/body_font%><br>
<%endif%>

<%if post_error_bad_guest_username%>
<%body_font%><font color="red">Unable to post: Invalid guest username: <%post_error_bad_guest_username%></font><%/body_font%><br>
<%endif%>

<input type="hidden" name="temp_id" value="<%temp_id%>">
<input type="hidden" name="basic_editor" value="1">
<table border="0" cellspacing="0" cellpadding="4" width="100%" bgcolor="<%odd_color%>">
<%top_row%>
<td width="125" align="right">
<%top_row_font%>
Subject:
<%/top_row_font%>
</td>
<td>
<input class="button" type="text" name="post_subject" tabindex=1 size="50" value="<%post_subject%>">
</td>
</tr>
<%if this_do eq post_edit%>
<tr>
<td align="right">
<%body_font%>
Reason for edit:
<%/body_font%>
</td>
<td>
<input type="text" name="edit_reason" class="button" tabindex="2" size="50" value="<%if edit_reason%><%edit_reason%><%endif%>">
</td>
</tr>
<%endif%>
<%ifnot current_user_id%>
<tr>
<td align="right">
<%body_font%>
Guest Username:
<%/body_font%>
</td>
<td>
<select name="anon_id" class="button" tabindex=2 size=1>
<% loop anonymous%>
<option value="<%user_id%>"<%if selected%> selected<%endif%>><%nbsp user_username%></option>
<% endloop%>
</select>
<%GForum::Config::tpl_get('post_guest_custom_username')%>
<% if post_guest_custom_username%>
<input type="text" name="guest_username" class="button" tabindex=2 size=20 value="<%if guest_username%><%guest_username%><%endif%>">
<% endif%>
</td>
</tr>
<tr>
<td align="right">
<%body_font%>
E-mail address:
<%/body_font%>
</td>
<td>
<%body_font%>
<input type="text" class="button" name="post_anonymous_email" tabindex=3 size="50" value="<%if post_anonymous_email%><%post_anonymous_email%><%endif%>">
<%/body_font%>
</td>
</tr>
<%endifnot%>
<tr>
<td align="right">
<%body_font%>
Post Style:
<%/body_font%>
</td>
<td>
<%if forum_style%>
<select class="button" name="post_style" size="1" tabindex=4>
<% if forum_style == 1%>
<option value="1"<%if forum_style_selected == 1%> selected<%set selected=1%><%endif%>>
<%GForum::language(FORUM_STYLE_MARKUP)%>
</option>
<% elsif forum_style == 2%>
<option value="2"<%if forum_style_selected == 2%> selected<%set selected=1%><%endif%>>
<%GForum::language(FORUM_STYLE_HTML)%>
</option>
<% elsif forum_style == 3%>
<option value="3"<%if forum_style_selected == 3%> selected<%set selected=1%><%endif%>>
<%GForum::language(FORUM_STYLE_BOTH)%>
</option>
<option value="2"<%if forum_style_selected == 2%> selected<%set selected=1%><%endif%>>
<%GForum::language(FORUM_STYLE_HTML)%>
</option>
<option value="1"<%if forum_style_selected == 1%> selected<%set selected=1%><%endif%>>
<%GForum::language(FORUM_STYLE_MARKUP)%>
</option>
<% endif%>
<option value="0"<%if not selected%> selected<%endif%>>
<%GForum::language(FORUM_STYLE_PLAIN)%>
</option>
</select>
<% if forum_style == 1 or forum_style == 3%>
&nbsp;&nbsp;&nbsp;&nbsp;
<%body_font%><a href="gforum.cgi?do=markup_help;<%hidden_query%>" target="_blank">Get Markup Help</a><%/body_font%>
<% endif%>
<%else%>
<%body_font%>
<%GForum::language(FORUM_STYLE_PLAIN)%>
<%/body_font%>
<%endif%>
</td>
</tr>
<%GForum::Post::icons('with blank')%>
<tr>
<td align="right" valign="top">
<%body_font%>
Icon:
<%/body_font%>
</td>
<td>
<table border="0" cellspacing="0" cellpadding="4">
<tr valign="middle" align="center">
<%set icon_cols = 10%>
<script language="Javascript">
<!--
// This handles the tabing - if you change the selection, the tabIndex needs to
// be changed as well so that we don't have to tab through all of the icons if
// going through the page with tab
function updateTab (selected_val) {
var col = document.getElementsByName("post_icon");
for (i = 0; i < col.length; i++) {
if (selected_val == col.value)
col.tabIndex = 5;
else
col.tabIndex = 0;
}
}
// -->
</script>
<%loop icons%><% -- The first loop contains nothing - it is used for a "none" option -- %>
<td><table border=0 cellspacing=0 cellpadding=0><tr valign="middle">
<td align=right><input type="radio" name="post_icon" onActivate="updateTab(this.value)"<%if first%> tabindex=5<%endif%> value="<%unless first%><%icon_filename%><%endunless%>"<%if not first and post_icon eq $icon_filename%> checked<%elsif first and not post_icon%> checked<%endif%>></td>
<td align=left><%if first%><%body_font%><small>none</small><%/body_font%><%else%><img src="<%image_url%>/<%icon_filename%>"><br><%endif%></td>
</tr></table></td>
<% unless last or row_num % $icon_cols%>
</tr>
<tr valign="middle" align="center">
<% endunless%>
<% if last and row_num % $icon_cols%>
<td colspan="<%row_num ~ $icon_cols%>">
&nbsp;
</td>
<% endif%>
<%endloop%>
</tr>
</table>
</td>
</tr>
<tr>
<td align="right" valign="top">
<%body_font%>
Post:<br>
<%/body_font%>
<%if forum_style_selected % 2%><%-- Only show the smilies if something with markup is set --%>
<%include include_smilies_write.html%>
<%endif%>
</td>
<td>
<textarea class="button" name="post_message" tabindex=6 cols="<%if current_user_cols%><%current_user_cols%><%else%>60<%endif%>" rows="<%if current_user_rows%><%current_user_rows%><%else%>10<%endif%>" onChange="checkText(this)" onclick="checkText(this)" onFocus="checkText(this)" wrap=soft>
<%post_message%></textarea><br>
<input type="button" class="button" name="markup_tag_code" tabindex=30 value="code" onClick="javascript: addTag(this.value); this.value = (this.value == 'code' ? '/code' : 'code');">
<input type="button" class="button" name="markup_tag_reply" tabindex=30 value="reply" onClick="javascript: addTag(this.value); this.value = (this.value == 'reply' ? '/reply' : 'reply');">
<input type="button" class="button" name="markup_tag_quote" tabindex=30 value="quote" onClick="javascript: addTag(this.value); this.value = (this.value == 'quote' ? '/quote' : 'quote');">
<input type="button" class="button" name="markup_tag_b" tabindex=30 value=" b " onClick="javascript: addTag(this.value == ' b ' ? 'b' : '/b'); this.value = (this.value == ' b ' ? ' /b ' : ' b ');" style="font-weight: bold">
<input type="button" class="button" name="markup_tag_u" tabindex=30 value=" u " onClick="javascript: addTag(this.value == ' u ' ? 'u' : '/u'); this.value = (this.value == ' u ' ? ' /u ' : ' u ');" style="text-decoration: underline">
<input type="button" class="button" name="markup_tag_i" tabindex=30 value=" i " onClick="javascript: addTag(this.value == ' i ' ? 'i' : '/i'); this.value = (this.value == ' i ' ? ' /i ' : ' i ');" style="font-style: italic">
<input type="button" class="button" name="markup_tag_email" tabindex=30 value="email" onClick="javascript: addTag(this.value); this.value = (this.value == 'email' ? '/email' : 'email');">
<input type="button" class="button" name="markup_tag_url" tabindex=30 value="url" onClick="javascript: addTag(this.value); this.value = (this.value == 'url' ? '/url' : 'url');">
<br>
<%if forum_style % 2 and is_ie and ie_version >= 5.5%>
<br>
<input type="submit" class="button" name="do=<%this_do%>;advanced_editor=1;advanced_editor_switch=1" value="Switch to Advanced Editor">
<%endif%>
<%if current_user_id%>
<br>
<%body_font%>
&nbsp;<input type="checkbox" name="post_append_signature" tabindex=7 value="1"<%if post_append_signature%> checked<%endif%>>
&nbsp;Append signature to post<br>
&nbsp;<input type="checkbox" name="post_reply_notify" tabindex=8 value="1"<%if post_reply_notify%> checked<%endif%>>
&nbsp;Send e-mail notification on reply<br>
<%/body_font%>
<%endif%>

</td>
</tr>

<% --
The following loops through attachments that are either going to be added with the
post, or, when editting, the new ones to add AND the ones that already exist.
The following variables are available:
- att_id - the attachment ID of the post
(in either post attachment or temp attachment directories)
- att_filename - the filename of the attachment
- att_size - the size of the attachment in bytes. Use
<%GForum::Attachment::friendly_size($att_size)%> to get a "friendly" size such as "66.3 KB" instead of "67890". (66.3 KB is how the size is usually displayed for a 67890 byte file)
- att_content - the content type of the file (such as text/html for .html files). Use
<%GForum::Attachment::icon($att_content, $att_filename)%> to get the web path to the appropriate icon.
- att_type - usually 'temp', but will be 'post' for posts that already exist
(when editting a post)
-- %>
<%loop attachments%>
<% if first%>
<tr>
<td colspan="2">
<%list_table%>
<% endif%>
<tr bgcolor="<%if odd%><%light_beige%><%else%><%even_color%><%endif%>">
<td style="border-right:1px solid <%dark_beige%><%unless first%>; border-top:1px solid <%dark_beige%><%endunless%>">
<img src="<%GForum::Attachment::icon($att_content, $att_filename)%>">
</td>
<td style="border-right:1px solid <%dark_beige%><%unless first%>; border-top:1px solid <%dark_beige%><%endunless%>">
<%body_font%>
<%att_filename%>
<%/body_font%>
</td>
<td style="border-right:1px solid <%dark_beige%><%unless first%>; border-top:1px solid <%dark_beige%><%endunless%>">
<%body_font%>
<%GForum::Attachment::friendly_size($att_size)%>
<%/body_font%>
</td>
<td <%unless first%>style="border-top:1px solid <%dark_beige%>" <%endunless%>align="right">
<input type="submit" class="button" tabindex=12 name="do=post_attachment_delete;att_type=<%att_type%>;att_id=<%att_id%>;redo=<%this_do%>" value="Delete attachment">
</td>
</tr>
<% if last%>
</table>
</td>
</tr>
<% endif%>
<%endloop%>

<%if can_attach%>
<tr bgcolor="<%medium_beige%>">
<td colspan=2 style="border-top:1px solid <%dark_beige%>">
<%body_font%>
&nbsp;Attachment:
<input class="button" type="file" tabindex=12 name="post_attachment">
<input class="button" type="submit" tabindex=12 name="do=post_attachment_upload;redo=<%this_do%>" value="Upload attachment">
<%/body_font%>
</td>
</tr>
<%endif%>
</table>


Please, let me know if that is what you want need.

Cya




http://www.webconferencia.net/
Quote Reply
Re: [webconferencia] file containing post action In reply to
Thank you so very much. It is just what I needed. I just saw your reply now.

Smile Smile Smile