Webmastersite.net
Register Log In

Custom Suggest Link

Comments on Custom Suggest Link

babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Dec 30, 2005 - 12:07 AM:

I have a custom suggest link template for specific categories. All works well until I attach a file. After attaching the file the form refreshes to the original suggest link template.

How do I get it to refresh back to the template it was using?


Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Jan 01, 2006 - 5:11 PM:

Try hidden input fields in the form:
<input type="hidden" name="custom" value="yes">
<input type="hidden" name="TID" value="templatename">

Hopefully that works.
babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Jan 01, 2006 - 11:59 PM:

Well, it worked to return to the correct form after attaching a file nod

BUT upon submitting, instead of moving on it returns to the form with {INCOMPLETE} at the top. It did submit the link to the category


Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Jan 03, 2006 - 1:37 AM:

Hm. I suppose there's not much practical value to being able to set a custom template for the redirect page, so that utility can be hijacked... open edit.php and change both instances of
   if (!$template) $template = new template('redirect.tpl');
to
   $template = new template('redirect.tpl');
. This change will be applied to future versions.
babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Jan 05, 2006 - 10:38 PM:

In this particular instance I call the custom suggest link from a custom display form so I don't require any conditions. I uploaded the custom file by ftp and to call it I simply have...

<a href="suggest.php?action=addlink&catid={CATID}&custom=yes&TID=suggestadvert">Submit New Advert </a>

The piece in red is the bit you add to the normal code (of course substituting suggestadvert for the name of your template.
babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Jan 07, 2006 - 11:24 PM:

Paul wrote:
Hm. I suppose there's not much practical value to being able to set a custom template for the redirect page, so that utility can be hijacked... open edit.php and change both instances of
   if (!$template) $template = new template('redirect.tpl');
to
   $template = new template('redirect.tpl');

. This change will be applied to future versions.



Hi Paul - this doesn't seem to have been included in 3.3.4
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Jan 08, 2006 - 8:24 AM:

Oh, I thought I'd said suggest.php. It was applied to suggest.php. I suppose custom 'edit' pages are a more useful possibility than changing the redirect page after edit too though so I'll apply it to edit.php now too.
babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Jan 08, 2006 - 10:01 AM:

LOL! and I thought I was the only one with a bad memory <G>
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.