<? 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?
Add A Site from within a category (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Add A Site from within a category
#245
jnasta (User)
Senior Boarder
Posts: 70
graphgraph
User Offline Click here to see the profile of this user
Gender: Male John Nasta Photography Location: Brooklyn, NY
Add A Site from within a category 3 Years, 11 Months ago Karma: 1  
I just noticed that if I am within a category and I click "Add A Site", the URL I am taken to is ...directory/add.html=CATCODE

CATCODE is the category number. This page looks exactly like the "Browse" or "Top" page and there is no form to add a site. I have to click Add A Site again from that page in order to get the form.

This is happening on both of the sites that I've installed DewNewPHPLinks on.

I noticed that on Fatty Matty's site the link comes up as ...directory/add.html?PID=CATCODE and you do get the form right away although it does not pre-select the category that you clicked from.

It seems to me that in a perfect world if someone were to click "Add A Site" from within a category, it should be assumed by default that they want to add the site within that category, but I'll settle for getting the form to appear on the first click if someone can direct me as to what's wrong.

Thanks
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#250
Dewed (Admin)
Admin
Posts: 606
graph
User Online Now Click here to see the profile of this user
Dew-Code.com
Re:Add A Site from within a category 3 Years, 11 Months ago Karma: 9  
You appear to have the version with a slight glitch in the top navigation menu, I think you'll see the bottom add site link works..

Edit /themes/X/navbar.top.php where X is the theme you use , note the subtle change made below to the "if ($PID" line

Code:

$html .= "href=\"$gl[BasePath]/directory/add.html"; if ($usesession == "yes"){$html .= "$and" . session_name() . "=". session_id() . "";$and ="&";} if ($PID > "0"){$html .= $and."PID=" . $PID . "\"";} $html .= "\">Add A Site</a></td>";
The preselected category issue.. well thats just stupidity on my part Edit include/add.php Locate the lines that read ...
Code:

$htmlsrc .= drop_cats($PID, 0, "", $cats); $htmlsrc .= $cats;
There are 2 "if { }" blocks above that, just remove them, or comment them out. If it still doesnt work, make sure you have this line, near the top of the file
Code:

$PID = mysql_escape_string($_GET['PID']);
 
Report to moderator   Logged Logged  
 
Nothing to it but to Dew it !
Dew-Code.com
  The administrator has disabled public write access.
#292
fattymattybrewing (User)
Support Your Local Brewer
Expert Boarder
Posts: 117
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Fatty Matty Brewing Location: Southwestern Wisconsin Birthdate: 1974-11-05
Re:Add A Site from within a category 3 Years, 11 Months ago Karma: 3  
QUOTE:
I noticed that on Fatty Matty's site the link comes up as ...directory/add.html?PID=CATCODE and you do get the form right away although it does not pre-select the category that you clicked from.


yep - I did have to make this change back in 2005 or 2006. I remember that one now.
 
Report to moderator   Logged Logged  
 
Lifes Too Short To Drink Crappy Beers
fattymattybrewing.com
  The administrator has disabled public write access.
#294
jnasta (User)
Senior Boarder
Posts: 70
graphgraph
User Offline Click here to see the profile of this user
Gender: Male John Nasta Photography Location: Brooklyn, NY
Re:Add A Site from within a category 3 Years, 11 Months ago Karma: 1  
Both of those changes worked perfectly. I only had to comment out the 2 blocks. Did not have to add the other code. Thanks!
 
Report to moderator   Logged Logged  
  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