Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Template diffs

Quote Reply
Template diffs
Hi,

Can anyone give me a heads up about the syntax gossamer uses for template diffs? With the new release I'll have to update the templates but am unsure of what the provided diffs mean.

Thanks.

cdkrg

Able2Know :: Ajooja Directory
Quote Reply
Re: [cdkrg] Template diffs In reply to
I haven't seen the new upgrade but if they are using a similar style to the Forum templates like:

--- default/message_list.html 31 Jan 2004 00:32:19 -0000 1.28.2.3
+++ default/message_list.html 29 Apr 2004 20:06:59 -0000 1.28.2.4

I believe this means
--- has been taken out and
+++ has been added

Regards

minesite
Quote Reply
Re: [cdkrg] Template diffs In reply to
The template diffs look something like:

Code:
Index: default/add.html
===================================================================
RCS file: /cvs/gossamer/lsqldev/cgi/admin/templates/default/add.html,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- default/add.html 17 Dec 2003 02:26:12 -0000 1.16
+++ default/add.html 5 May 2004 18:14:46 -0000 1.17
@@ -43,7 +43,6 @@
<form action="<%db_cgi_url%>/add.cgi" enctype="multipart/form-data" method="POST">
<table border="0" cellspacing="0" cellpadding="0">
<%include include_form.html%>
- <%if user_may_upload_attachments%> <%include include_attachment_form.html%> <%endif%>
<tr><td>&nbsp;</td><td><%body_font%>
<input type="SUBMIT" name="add" value="Add Link"></font></td></tr>
</table>
Basically, the way to read this is as follows:
Code:
Index: default/add.html
- this is the filename
Code:
retrieving revision 1.16
retrieving revision 1.17
- these are simply the internal CVS versions being compared; you don't need to do worry about them.
Code:
diff -u -b -r1.16 -r1.17
- this is the "diff" command used to generate the diff
Code:
--- default/add.html 17 Dec 2003 02:26:12 -0000 1.16
+++ default/add.html 5 May 2004 18:14:46 -0000 1.17
- these are the file stats for the old (---) and new (+++) files
Code:
@@ -43,7 +43,6 @@
- this indicates the line numbers for the section following it. The -43,7 indicates that the section below occurs in the old file at line 43, and contains 7 lines. The +43,6 indicates that in the new file this occurs at line 43, and covers 6 lines.
Code:
<form action="<%db_cgi_url%>/add.cgi" enctype="multipart/form-data" method="POST">
<table border="0" cellspacing="0" cellpadding="0">
<%include include_form.html%>
- <%if user_may_upload_attachments%> <%include include_attachment_form.html%> <%endif%>
<tr><td>&nbsp;</td><td><%body_font%>
<input type="SUBMIT" name="add" value="Add Link"></font></td></tr>
</table>
- The black lines are simply the context of the change - they haven't change, but are there to help you locate the section of the template that has changed. The purple lines starting with - indicate lines that have been removed, and the turqoise lines starting with + indicate lines that have been added. In this case, it indicates that a line has been removed from the template.

In some cases, you may see something like:

Code:
@@ -66,7 +65,7 @@
<%endif%>

<!-- Links in this category. -->
- <%if links%>
+ <%if links_count%>
<%header_row%><td width=200>
<%header_font%>LINKS:<%/header_font%></td>
<td bgcolor="white"><img src="<%build_images_url%>/default/ClearShim.gif" border=0 width="540" height=1></td></tr>

When you have a - and + next to each other like this, it usually indicates that a line has changed - in this case, the <%if links%> line has changed to <%if links_count%>.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [Jagerman] Template diffs In reply to
Very helpful. Thanks.

cdkrg

Able2Know :: Ajooja Directory