Webmastersite.net
Register Log In

Custom Edit Article Pages

Comments on Custom Edit Article Pages

AutumnWindz
Member

Usergroup: Customer
Joined: Oct 01, 2004

Total Topics: 14
Total Comments: 46
Posted Feb 10, 2008 - 1:22 AM:

With a custom suggest article page there also needs to be a custom edit article page. When using the default detail template, if the member can edit the article, then the edit.gif is shown and the url to the default edit article page is linked to the image, however, I cannot seem to find a workaround to correctly link to a custom edit article page.

By using:
<IF {ARTICLEADMIN}> <a href="edit.php?action=link&field=id&condition=equals&fieldvalue={ARTICLEID}&custom=yes&TID=cemedit">{ARTICLEADMIN}</a> </IF>
I end up with two of the edit.gif with the symbol > between them and only the second edit.gif has a link which goes to the default edit template, not the custom edit template.

By using:
<IF {ARTICLEADMIN}> <a href="edit.php?action=link&field=id&condition=equals&fieldvalue={ARTICLEID}&custom=yes&TID=cemedit">Edit</a> </IF>
I end up with the edit.gif followed by the symbol > and the word Edit which will link to the custom edit page.

By using just:
<a href="edit.php?action=link&field=id&condition=equals&fieldvalue={ARTICLEID}&custom=yes&TID=cemedit">Edit</a>
Then anyone, including guests, can access the custom edit page.

I do not know what else to try to to get the edit link to appear only if the member is allowed to edit the article and then taking the member to the correct edit article template instead of the default.

--------------------------

Next issue on custom suggest article and edit article page is that when reloading the page, it defaults to the default edit page. Now I did try the suggestion in the manual titled "Custom Suggest Article Pages' and placed:
<input type="hidden" name="custom" value="yes">
<input type="hidden" name="TID" value="cemedit">

However, when the above is added and you click on 'Save Changes', the changes do take effect, but the user would not know that because the edit page simply refreshes and the {INCOMPLETE} message appears near the top of the custom edit page which would indicate an error, instead of being sent back to the category listing. This same thing happens when refreshing on the custom suggest article template - the article posts but the page refreshes with the {INCOMPLETE} message.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7867
Paul
Posted Feb 11, 2008 - 10:55 AM:

It'd be
<IF{ARTICLECANEDIT}><a href="edit.php?action=link&field=id&condition=equals&fieldvalue={ARTICLEID}&custom=yes&TID=cemedit"><img src="{IMAGESURL}/edit.gif"></a></IF>


Checking on part 2.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7867
Paul
Posted Feb 14, 2008 - 3:08 AM:

Fixed part 2.
AutumnWindz
Member

Usergroup: Customer
Joined: Oct 01, 2004

Total Topics: 14
Total Comments: 46
Posted Feb 21, 2008 - 8:54 PM:

Part 2 - I added:
<input type="hidden" name="custom" value="yes">
<input type="hidden" name="TID" value="cemedit">

This took care of the {INCOMPLETE} message, however, it still reloads the default edit template instead of the custom edit template when the page is reloaded when using the attach or delete files portion of the custom template.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7867
Paul
Posted Feb 23, 2008 - 7:25 AM:

Any sort of incomplete, editor switch or attachment brings me to the custom template.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.