Make sure subject exists
Rushian 0
From: -
From: -
Notice
This topic is archived. New comments cannot be posted and votes cannot be cast.Responses to this topic
1 Re: Make sure subject exists
Rushian
OP
0
From: -
From: -
Make sure subject exists
Could go right along with the news preview function I'd imagine...
Could go right along with the news preview function I'd imagine...
1 Re: Make sure subject exists
Philipp
From: Vienna, Austria
Administrator
1340From: Vienna, Austria
Make sure subject exists
Not without some larger modifications. I will add a title check in the next major relase.
Not without some larger modifications. I will add a title check in the next major relase.
1 Re: Make sure subject exists
Rushian
OP
0
From: -
From: -
Make sure subject exists
Ok, that worked. Any way to mod it to warn you BEFORE the item is committed to the database?
Ok, that worked. Any way to mod it to warn you BEFORE the item is committed to the database?
1 Re: Make sure subject exists
Philipp
From: Vienna, Austria
Administrator
1340From: Vienna, Austria
Make sure subject exists
Open cadmin/mod_news in an editor and find in function AddNews():
Replace this with:
This will add a warning in case that the news title is missing. You still need to edit the news under edit/remove.
Open cadmin/mod_news in an editor and find in function AddNews():
MkHeader("_self");
MkTabHeader ("$words[DO]");
echo $words[SA];
MkTabFooter();
MkFooter();
Replace this with:
MkHeader("_self");
MkTabHeader ("$words[DO]");
echo $words[SA];
if (!$newstitle) echo "<br />Warning: News title is missing in this story";
MkTabFooter();
MkFooter();
This will add a warning in case that the news title is missing. You still need to edit the news under edit/remove.
How can I make sure the news title exists before posting it?
Yeah, I know I can edit it later, but sometimes I don't notice.
Hopefully a warning message could be displayed and then you'd be returned to the form without losing anything.
Any ideas?