Gossamer Forum
Home : Products : Links 2.0 : Customization :

Why is this

Quote Reply
Why is this
please help me.... I have installed Password Modify for Templates, MOD. But I have this problem when I have modified the page and after pressing the modify resource button that it say
---------------------------------------------------------------------------------------------------
There were the following errors trying to modify your site:
DateAdded (Can not be left blank)Please make any changes and try again!
--------------------------------------------------------------------------
But I don't have Date field (I'm using there modify.html template), and I don't want to give date to modify.
Other things are working fine. I have 3 level graphics installed


Quote Reply
Re: Why is this In reply to
All you have to do is add a hidden field in the modify.html and modify_error.html files:

Code:

<input type="hidden" name="DateAdded" value="< ÚteAdded% >">


Remove the space before and after the % marks.

Regards,

Eliot Lee
Quote Reply
Re: Why is this In reply to
I want to know is that code is correct?
if it is correct then I'm getting same error

Quote Reply
Re: Why is this In reply to
Other than the screwed up tag in the value attribute, YES!

You need to use DateAdded with the hash marks (tag) in the value attribute!

Regards,

Eliot Lee
Quote Reply
Re: Why is this In reply to
I want to know how is the "updated" image works.
because I have three level graphic mod installed but when the user modified his link and after validating it will display
as a "New" one, (look above posts) I have date problem in my modify. I want to know is it effect for this one. For solution to that I have put the following line on my modify.html ,But I don't know is it right or where is this error please let me know how can I correct this one.
------------------------------------------------------------
<td><input type="text" name="DateAdded" size="20" value="<%DateAdded%>"></td></tr>
-----------------------------------------------------------------------------------------------------------------------------
Here is my modify.html file
------------------------------------------------------------------------------------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html>

<head>
<title><%site_title%>: Modify a Resource</title>
<link rel=stylesheet href="<%css%>" type="text/css" title="style sheet">
</head>
<body>

<h1><%site_title%>: Modify a Resource</h1>

<p><small class="menu">|
<a class="menulink" href="<%build_root_url%>">Home</a> |
<a class="menulink" href="<%db_cgi_url%>/add.cgi">Add a Resource</a> |
<a class="menulink" href="<%db_cgi_url%>/modify.cgi">Modify a Resource</a> |
<a class="menulink" href="<%build_root_url%>/New">What's New</a> |
<a class="menulink" href="<%build_root_url%>/Cool">What's Cool</a> |
<a class="menulink" href="<%build_root_url%>/Ratings">Top Rated</a> |
<a class="menulink" href="<%db_cgi_url%>/subscribe.cgi">Email Updates</a> |
<a class="menulink" href="<%db_cgi_url%>/jump.cgi?ID=random">Random Link</a> |
<a class="menulink" href="<%db_cgi_url%>/search.cgi">Search</a> |
</small></p>

<form action="<%db_cgi_url%>/modify.cgi" method="POST">
<INPUT TYPE="Hidden" NAME="ID" VALUE="<%ID%>">
<p>Please enter your changes in the form below:</p>
<div class="margin">
<table border="0" cellspacing="0" cellpadding="0">
<tr><td align="right" valign="top">Title:</td>
<td><input name="Title" value="<%Title%>" size="50"></td></tr>
<tr><td align="right" valign="top">URL:</td>
<td><input name="URL" value="<%URL%>" size="50"></td></tr>
<tr><td align="right" valign="top">Category:</td>
<td><%category%></td></tr>
<tr><td align="right" valign="top">Description:</td>
<td><textarea wrap="virtual" name="Description" rows="3" cols="42"><%Description%></textarea></td></tr><tr><td align=right valign=top>Keywords:</font></td>
<td><INPUT NAME="Key" VALUE="NO" SIZE=50></td></tr>

<tr><td align="right" valign="top">Contact Name:</td>
<td><input name="Contact Name" value="<%Contact Name%>" size="40"></td></tr>
<tr><td align="right" valign="top">Contact Email:</td>
<td><input name="Contact Email" value="<%Contact Email%>" size="40"></td></tr>
<tr><td align="right" valign="top">Password:</td>
<td><input name="Password" value="<%Password%>" size="40"></td></tr>
<tr><td align="right" valign="top">Date</td>
<td><input type="text" name="DateAdded" size="20" value="<%DateAdded%>"></td></tr>
<tr><td></td><td><input type="SUBMIT" NAME="Submit" value="Modify Resource"></td></tr>
</table>
</div>
</form>

<form action="<%db_cgi_url%>/search.cgi" method="GET">
<h2>Search</h2>
<div class="margin">
<table border="0" cellspacing="0" cellpadding="0">
<tr><td><strong class="search">Looking for something in particular?</strong></td></tr>
<tr><td><input type="text" size=15 name="query"> <input type=submit value="Search!"></td></tr>
<tr><td><small class="more"><a href="<%db_cgi_url%>/search.cgi">More search options</a></small></td></tr>
</table>
</div>
</form>

<p><small class="update">Pages Updated On: <%date%> - <%time%>

Links Engine Powered By: <a href="http://www.gossamer-threads.com/">Gossamer Threads Inc.</a></small></p>

</body>
</html>


Quote Reply
Re: Why is this In reply to
Why don't you read the MOD instruction page?

Regards,

Eliot Lee
Quote Reply
Re: Why is this In reply to
I have read MOD instruction page.
But there don't have what I'm looking for I think my problem
is with this date
Can you please explain me how the modification will work normally with the modify.html & date.
How can I get UPDATED.gif Instead of NEW.gif

Quote Reply
Re: Why is this In reply to
I think I will let Bobsie respond to your message since he wrote the Mod...good luck!

Regards,

Eliot Lee
Quote Reply
Re: Why is this In reply to
In Reply To:
I have read MOD instruction page.
But there don't have what I'm looking for I think my problem
is with this date
Well, if you are using the "Updated" & 3-Level "New" Graphic Usage Modification based on my instructions, then you must have missed some steps because, when a user modifies their link, the Date field gets updated but the DateAdded field does not. The Date field is actually the "last modified date" of the link in the database. The DateAdded field is a fixed date and does not change (or should not). The mod instructions for modify.cgi say this:
Code:
Change:

# Print out the modified record to a "modified database" where it is stored until
# the admin decides to add it into the real database.

To read:

# Print out the modified record to a "modified database" where it is stored until
# the admin decides to add it into the real database. Ensure we retain the original
# date the record was added.
$in{$db_cols[$db_dateadded]} = $original{'DateAdded'};
This ensures that the original DateAdded field does not change when a record is modified. No other changes should have been made to modify.cgi when installing this mod. For example. this should have been left intact:
Code:
# Set date variable to today's date.
$in{$db_cols[$db_modified]} = &get_date;
Those two things ensure that only the modification Date gets changed and not the DateAdded (the new field added by the mod).

I hope this helps

- Bobsie
bobsie@orphanage.com
http://goodstuff.orphanage.com/
Quote Reply
Re: Why is this In reply to
Thanks a lot.
Now I know what I have to do.