Webmastersite.net
Register Log In

Manage Redirects

Comments on Manage Redirects

rw
Experienced

Usergroup: Customer
Joined: Jul 29, 2005

Total Topics: 30
Total Comments: 65
rw
Posted Dec 17, 2007 - 1:51 PM:

Could not find any info on Manage Redirects - admin > misc > manage redirects

Is there a way to add addition redirects?

Is there a way to add custom redirects for new templates?

Thanks.


Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Dec 18, 2007 - 12:36 PM:

No, what you see is what you get there. I'm not sure I see how redirects could apply to custom templates.
rw
Experienced

Usergroup: Customer
Joined: Jul 29, 2005

Total Topics: 30
Total Comments: 65
rw
Posted Dec 18, 2007 - 1:38 PM:

Is there another way you would suggest to do a custom redirect? With a custom form is there a way to set the destination page in the submit button or something? Thanks.
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Dec 18, 2007 - 7:49 PM:

If I recall, putting <input type="hidden" name="returnto" value="http://yourreturnurl" /> in the form being submitted should do it.
mx3design
Member

Usergroup: Customer
Joined: May 30, 2007

Total Topics: 12
Total Comments: 45
Posted Jul 07, 2008 - 12:10 PM:

is there any update on this subject?

eg. I have a custom search template displayed in a small iframe, if no results I don't want user to be redirected. Instead be able to use <IF {NUMRESULTS} is less than 1> and show no result message. Is there a variable which could be added such as redirect=no
mx3design
Member

Usergroup: Customer
Joined: May 30, 2007

Total Topics: 12
Total Comments: 45
Posted Jul 08, 2008 - 12:03 PM:

Is there a way to get logic to redirects to work with the search function scripts.webmastersite.net/wsnlinks/wsnmanual410/articles/adding-logic-to-redirects-445.html

I've tried a few variations but no joy..
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Jul 08, 2008 - 8:42 PM:

Not possible, since numresults isn't a posted field. The logic only changes redirects anyhow, doesn't remove them.
mx3design
Member

Usergroup: Customer
Joined: May 30, 2007

Total Topics: 12
Total Comments: 45
Posted Jul 09, 2008 - 6:10 AM:

I've come up with a method to bypass system redirect or more correctly create a custom search result redirect. It involves copying search.php creating a customsearch.php and altering a couple of lines in combination with a customsearch.tpl. Do you want me to post here or would you rather I didn't?
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Jul 09, 2008 - 5:08 PM:

Go ahead.
mx3design
Member

Usergroup: Customer
Joined: May 30, 2007

Total Topics: 12
Total Comments: 45
#10 - Quote - Permalink
Posted Jul 10, 2008 - 2:38 AM:

Custom search redirect; in this example if no search result is returned the user receives a message but the method could be used to execute a script or ajax call etc.

Custom search form:

<form action="http://www.somesite.com/wsnlinks/customsearch.php?filled=1&whichtype=links&usewrapper=no&custom=yes&TID=customsearch" method="post" >
<input type="text" name="search" >
<input type="submit" value="search" >
</form>


..............................................................................................

Create a customsearch template and save in your tempate directory:

<!-- BEGIN SEARCH links RESULTS -->
<!-- BEGIN REGULAR -->

<IF {NUMRESULTS} is greater than 0>



<p><a href="http://www.somesite.com/wsnlinks/link.php?action=detail&amp;id={LINKID}" >{LINKTITLE}</a><br >
{LINKDESCRIPTION}</p>



<OTHERWISE>
<p>custom message or action</p>
</IF>


<!-- END REGULAR -->
<!-- END SEARCH links RESULTS -->


...............................................................................................



Copy search.php rename as customsearch.php and save in the same directory, at the top of the file (inside php tag) add this line:

$customaftersearchfail = 'customsearch.php?filled=1&whichtype=links&usewrapper=no&custom=yes&TID=customsearch&search='

then find line no.477 (or thereabouts): $dest = $aftersearchfail; and alter to:

$dest = $customaftersearchfail;

..............................................................................................

Nb.

1. The template above just shows the basic markup needed, you'll probably want to add the custom search form to it etc.

2. Remove all instances of &usewrapper=no if you want to use your existing wrapper.
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.