<? DEW-CODE.COM  

Downloads

Assorted scripts  (1)
DewNewPHPLinks  (9)





Lost Password?
No account yet? Register

Dew-Code Newsfeed

Resources


 USdigitalcable.com

Dew-Code
Welcome, Guest
Please Login or Register.    Lost Password?
Followup page links redirect back to index (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Followup page links redirect back to index
#1012
bbeyond (User)
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
Followup page links redirect back to index 2 Years, 6 Months ago Karma: 0  
I have searched this forum but I couldn't find a similar post so I decided to ask it myself. I'm sorry if in fact it has been asked before.

I have pretty much figured everything out, mostly by the help of this forum, but there are 2 things I can't seem to fix nor find a solution too.

Problem 1:

The "Add Website" link only seems to work from the main website page. As soon as I'm browsing a category and then click the "Add Website" button it goes back to the main page first.

Problem 2:

An even bigger problem is that my followup pages don't work. If I click a category I get 25 websites. No issue's here. But If I click on the second or third page link I find myself back on the main page.

So links like: new.html?sr=25&pp=25&cp=2 don't work as they are supposed to go to the next page.

The same counts for category links like: 524.html?sr=25&pp=25&cp=2
Once I click [2] or [3] I get redirected to the main page.

Can anybody help me on these 2 issues?

Thanks a million,

Andrew.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#1013
Dewed (Admin)
Admin
Posts: 603
graph
User Online Now Click here to see the profile of this user
Dew-Code.com
Re:Followup page links redirect back to index 2 Years, 6 Months ago Karma: 9  
Sounds like you have a slightly older version, and your server has register globals off.

Recent versions have this near the top of the "directory" file

Code:

if ($_POST['submit_add']){$show="add";} if (empty($PATH_INFO)){$PATH_INFO = $_SERVER['PATH_INFO'];} if (empty($PATH_INFO)){$PATH_INFO = $_SERVER["ORIG_PATH_INFO"];} if (empty($PATH_INFO)){$PATH_INFO = $HTTP_SERVER_VARS['PATH_INFO'];} if (empty($PATH_INFO)){$PATH_INFO = $_SERVER["REQUEST_URI"];}
You certainly need the top line, but from your description, not the $PATH_INFO lines. Also, in the directory file near lines 49 you should see
Code:

$logic = $_POST['logic'];if (empty($logic)){$term = $_GET['logic'];} $term = $_POST['term'];if (empty($term)){$term = $_GET['term'];} if (!empty($_GET['sr'])){$sr = $_GET['sr'];} if (!empty($_GET['pp'])){$pp = $_GET['pp'];} if (!empty($_GET['cp'])){$cp = $_GET['cp'];}
If you are missing the bottom 3 lines, add them Finally, I recall there being an error in the navbar_top.php file for many of the themes, like /original/navbar.top.php Around line 55 locate
Code:

if ($usesession == "yes"){$html .= $and . session_name() . '='. session_id() ;$and = '&';} if ($PID > 0){$html .= $and . 'PID=' . $PID ;}
Multiple ways to fix that, probably the easiest is to just define $and above these lines
Code:

$and = '?'; if ($usesession == "yes"){$html .= $and . session_name() . '='. session_id() ;$and = '&';} if ($PID > 0){$html .= $and . 'PID=' . $PID ;}
 
Report to moderator   Logged Logged  
 
Nothing to it but to Dew it !
Dew-Code.com
  The administrator has disabled public write access.
#1015
bbeyond (User)
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
Re:Followup page links redirect back to index 2 Years, 6 Months ago Karma: 0  
I already had all the modifications you described concerning the Directory file. Those modifications were the first I've done when I installed the script a few weeks ago. So that isn't going to change the problems I'm experiencing.

I did however add the code you gave me for the navbar.top.php but unfortunately that did not fix my errors.

Thanks for your input though, if you have any other suggestions, I'd be glad to hear them.

Andrew.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#1017
Dewed (Admin)
Admin
Posts: 603
graph
User Online Now Click here to see the profile of this user
Dew-Code.com
Re:Followup page links redirect back to index 2 Years, 6 Months ago Karma: 9  
Ok.. Without actually looking at the site, I'm not likely to get any new ideas. If you'd care to use the compose link to the left, send me the URL of your install. I can often spot the cause of the problem

I was pretty sure about the navbar top edit, possibly I'm just getting old and have forgotten the exact cause of the problem. Looking at your installation will give me a refresher course.
 
Report to moderator   Logged Logged  
 
Nothing to it but to Dew it !
Dew-Code.com
  The administrator has disabled public write access.
#1019
Dewed (Admin)
Admin
Posts: 603
graph
User Online Now Click here to see the profile of this user
Dew-Code.com
Re:Followup page links redirect back to index 2 Years, 6 Months ago Karma: 9  
Are you sure you are editing the files, and then uploading them?, other than the navbar top edit. which I was fuzzy on.. it looks like these steps should fix it.....

So pretending this was a completly new post, I write the following


Ensure you have *** ALL *** these lines in the directory file

Code:

// grab the values from the search form // $logic = $_POST['logic'];if (empty($logic)){$term = $_GET['logic'];} $term = $_POST['term'];if (empty($term)){$term = $_GET['term'];} if (!empty($_GET['sr'])){$sr = $_GET['sr'];} if (!empty($_GET['pp'])){$pp = $_GET['pp'];} if (!empty($_GET['cp'])){$cp = $_GET['cp'];}
And a little further down, you should have
Code:

if (is_numeric (ereg_replace (".html", '', $url_array[1]))){ $PID = (ereg_replace (".html", '', $url_array[1])); } } else {$PID ="";} if ($_POST['submit_add']){$show="add";}
Also, note the add link at the top ends with directory/add.html=558 and doesn't work The link in the bottom navbar ends with directory/add.html?PID=558 .. and works So, in /themes/X/navbar.top.php I think you have
Code:

if ($PID > 0){$html .= $and . '=' . $PID ;}
It should be
Code:

if ($PID > 0){$html .= $and . 'PID=' . $PID ;}
 
Report to moderator   Logged Logged  
 
Nothing to it but to Dew it !
Dew-Code.com
  The administrator has disabled public write access.
#1020
bbeyond (User)
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
Re:Followup page links redirect back to index 2 Years, 6 Months ago Karma: 0  
Concerning the second code, I have:

if (is_numeric (ereg_replace (".html", '', $url_array[2]))){
$PID = (ereg_replace (".html", '', $url_array[2]));
}
} else {$PID ="";}

// ////////$here = "$gl[BaseURL]$gl[BasePath]";

Which shows I'm missing this line:

if ($_POST['submit_add']){$show="add";}

Plus I have and extra line, namely:

// ////////$here = "$gl[BaseURL]$gl[BasePath]";

Also I find that you posted $url_array[1] where I have &url_array[2]

What should the final code be like?



Now, concerning the navbar.top.php code, I do have the correct code in there: if ($PID > 0){$html .= $and . 'PID=' . $PID ;}
 
Report to moderator   Logged Logged  
 
Last Edit: 2009/07/19 03:28 By bbeyond.
  The administrator has disabled public write access.
Go to top Post Reply
get the latest posts directly to your desktop
Outsource your projects to thousands of programmers at
ScriptLance.com
Newsflash
Interested in
advertising?

This space for rent!

Sign up for PayPal and start accepting credit card payments instantly.
Copyright Dew-Code 2008