fix "Top/" issues in breadcrumb etc.
This commit is contained in:
@ -515,7 +515,7 @@ void Categories::printPathFromId ( SafeBuf *sb ,
|
||||
long catIndex;
|
||||
// get the index
|
||||
catIndex = getIndexFromId(catid);
|
||||
if (catIndex < 1) return;
|
||||
//if (catIndex < 1) return;
|
||||
printPathFromIndex(sb, catIndex, raw, isRTL);
|
||||
}
|
||||
|
||||
@ -530,10 +530,10 @@ void Categories::printPathFromIndex ( SafeBuf *sb ,
|
||||
long catid = m_cats[catIndex].m_catid;
|
||||
|
||||
// include Top now. in newer dmoz it is catid2.
|
||||
if ( catid == 2 ) {
|
||||
sb->safePrintf("Top");
|
||||
return;
|
||||
}
|
||||
//if ( catid == 2 ) {
|
||||
// sb->safePrintf("Top");
|
||||
// return;
|
||||
//}
|
||||
|
||||
// . print the parent(s) first
|
||||
// . the new dmoz data dumps signify a parentless topic by
|
||||
@ -590,7 +590,7 @@ void Categories::printPathCrumbFromId ( SafeBuf *sb ,
|
||||
long catIndex;
|
||||
// get the index
|
||||
catIndex = getIndexFromId(catid);
|
||||
if (catIndex < 1) return;
|
||||
//if (catIndex < 1) return;
|
||||
printPathCrumbFromIndex(sb, catIndex, isRTL);
|
||||
}
|
||||
|
||||
@ -604,10 +604,12 @@ void Categories::printPathCrumbFromIndex ( SafeBuf *sb,
|
||||
long catid = m_cats[catIndex].m_catid;
|
||||
|
||||
// include Top now. in newer dmoz it is catid2.
|
||||
if ( catid == 2 ) {
|
||||
sb->safePrintf("Top");
|
||||
return;
|
||||
}
|
||||
// seems to already be included below... because you made it
|
||||
// parentId>1 not parentId>2
|
||||
//if ( catid == 2 ) {
|
||||
// sb->safePrintf("Top");
|
||||
// return;
|
||||
//}
|
||||
|
||||
// . print the parent(s) first
|
||||
// . the new dmoz has Top has parentid 2 now, and Top/World is
|
||||
|
@ -834,7 +834,7 @@ bool gotResults ( void *state ) {
|
||||
if ( ! xml ) {
|
||||
sb.safePrintf("\n<font size=4><b>");
|
||||
if ( rtl ) sb.safePrintf("<span dir=ltr>");
|
||||
sb.safePrintf("<a href=\"/Top\">Top</a>: ");
|
||||
//sb.safePrintf("<a href=\"/Top\">Top</a>: ");
|
||||
}
|
||||
// put crumbin xml?
|
||||
if ( xml )
|
||||
|
146
PageRoot.cpp
146
PageRoot.cpp
@ -952,131 +952,131 @@ bool printTopDirectory ( SafeBuf& sb ) {
|
||||
return sb.safePrintf (
|
||||
"<center>"
|
||||
"<table cellspacing=\"4\" cellpadding=\"4\"><tr><td valign=top>\n"
|
||||
"<b><a href=\"/Arts/\">Arts</a></b><br>"
|
||||
"<b><a href=\"/Top/Arts/\">Arts</a></b><br>"
|
||||
"<small>"
|
||||
"<a href=\"/Arts/Movies/\">Movies</a>, "
|
||||
"<a href=\"/Arts/Television/\">Television</a>, "
|
||||
"<a href=\"/Arts/Music/\">Music</a>..."
|
||||
"<a href=\"/Top/Arts/Movies/\">Movies</a>, "
|
||||
"<a href=\"/Top/Arts/Television/\">Television</a>, "
|
||||
"<a href=\"/Top/Arts/Music/\">Music</a>..."
|
||||
"</small>\n"
|
||||
"</td><td valign=top>"
|
||||
"<b><a href=\"/Business/\">Business</a></b><br>"
|
||||
"<b><a href=\"/Top/Business/\">Business</a></b><br>"
|
||||
"<small>"
|
||||
"<a href=\"/Business/Employment/\">Jobs</a>, "
|
||||
"<a href=\"/Business/Real_Estate/\">Real Estate</a>, "
|
||||
"<a href=\"/Business/Investing/\">Investing</a>..."
|
||||
"<a href=\"/Top/Business/Employment/\">Jobs</a>, "
|
||||
"<a href=\"/Top/Business/Real_Estate/\">Real Estate</a>, "
|
||||
"<a href=\"/Top/Business/Investing/\">Investing</a>..."
|
||||
"</small>\n"
|
||||
"</td><td valign=top>"
|
||||
"<b><a href=\"/Computers/\">Computers</a></b><br>"
|
||||
"<b><a href=\"/Top/Computers/\">Computers</a></b><br>"
|
||||
"<small>"
|
||||
"<a href=\"/Computers/Internet/\">Internet</a>, "
|
||||
"<a href=\"/Computers/Software/\">Software</a>, "
|
||||
"<a href=\"/Computers/Hardware/\">Hardware</a>..."
|
||||
"<a href=\"/Top/Computers/Internet/\">Internet</a>, "
|
||||
"<a href=\"/Top/Computers/Software/\">Software</a>, "
|
||||
"<a href=\"/Top/Computers/Hardware/\">Hardware</a>..."
|
||||
"</small>\n"
|
||||
"</td></tr><tr><td valign=top>"
|
||||
"<b><a href=\"/Games/\">Games</a></b><br>"
|
||||
"<b><a href=\"/Top/Games/\">Games</a></b><br>"
|
||||
"<small>"
|
||||
"<a href=\"/Games/Video_Games/\">Video Games</a>, "
|
||||
"<a href=\"/Games/Roleplaying/\">RPGs</a>, "
|
||||
"<a href=\"/Games/Gambling/\">Gambling</a>..."
|
||||
"<a href=\"/Top/Games/Video_Games/\">Video Games</a>, "
|
||||
"<a href=\"/Top/Games/Roleplaying/\">RPGs</a>, "
|
||||
"<a href=\"/Top/Games/Gambling/\">Gambling</a>..."
|
||||
"</small>\n"
|
||||
"</td><td valign=top>"
|
||||
"<b><a href=\"/Health/\">Health</a></b><br>"
|
||||
"<b><a href=\"/Top/Health/\">Health</a></b><br>"
|
||||
"<small>"
|
||||
"<a href=\"/Health/Fitness/\">Fitness</a>, "
|
||||
"<a href=\"/Health/Medicine/\">Medicine</a>, "
|
||||
"<a href=\"/Health/Alternative/\">Alternative</a>..."
|
||||
"<a href=\"/Top/Health/Fitness/\">Fitness</a>, "
|
||||
"<a href=\"/Top/Health/Medicine/\">Medicine</a>, "
|
||||
"<a href=\"/Top/Health/Alternative/\">Alternative</a>..."
|
||||
"</small>\n"
|
||||
"</td><td valign=top>"
|
||||
"<b><a href=\"/Home/\">Home</a></b><br>"
|
||||
"<b><a href=\"/Top/Home/\">Home</a></b><br>"
|
||||
"<small>"
|
||||
"<a href=\"/Home/Family/\">Family</a>, "
|
||||
"<a href=\"/Home/Consumer_Information/\">Consumers</a>, "
|
||||
"<a href=\"/Home/Cooking/\">Cooking</a>..."
|
||||
"<a href=\"/Top/Home/Family/\">Family</a>, "
|
||||
"<a href=\"/Top/Home/Consumer_Information/\">Consumers</a>, "
|
||||
"<a href=\"/Top/Home/Cooking/\">Cooking</a>..."
|
||||
"</small>\n"
|
||||
"</td></tr><tr><td valign=top>"
|
||||
//"<b><a href=\"/Kids_and_Teens/\">"
|
||||
//"<b><a href=\"/Top/Kids_and_Teens/\">"
|
||||
//"<font color=\"#ff0000\">K</font>"
|
||||
//"<font color=\"339900\">i</font>"
|
||||
//"<font color=\"#ff6600\">d</font>"
|
||||
//"<font color=\"#0066ff\">s</font>"
|
||||
//" and Teens</a></b><br>"
|
||||
"<b><a href=\"/Kids_and_Teens/\">Kids and Teens</a></b><br>"
|
||||
"<b><a href=\"/Top/Kids_and_Teens/\">Kids and Teens</a></b><br>"
|
||||
"<small>"
|
||||
"<a href=\"/Kids_and_Teens/Arts/\">Arts</a>, "
|
||||
"<a href=\"/Kids_and_Teens/School_Time/\">School Time</a>, "
|
||||
"<a href=\"/Kids_and_Teens/Teen_Life/\">Teen Life</a>..."
|
||||
"<a href=\"/Top/Kids_and_Teens/Arts/\">Arts</a>, "
|
||||
"<a href=\"/Top/Kids_and_Teens/School_Time/\">School Time</a>, "
|
||||
"<a href=\"/Top/Kids_and_Teens/Teen_Life/\">Teen Life</a>..."
|
||||
"</small>\n"
|
||||
"</td><td valign=top>"
|
||||
"<b><a href=\"/News/\">News</a></b><br>"
|
||||
"<b><a href=\"/Top/News/\">News</a></b><br>"
|
||||
"<small>"
|
||||
"<a href=\"/News/Media/\">Media</a>, "
|
||||
"<a href=\"/News/Newspapers/\">Newspapers</a>, "
|
||||
"<a href=\"/News/Weather/\">Weather</a>..."
|
||||
"<a href=\"/Top/News/Media/\">Media</a>, "
|
||||
"<a href=\"/Top/News/Newspapers/\">Newspapers</a>, "
|
||||
"<a href=\"/Top/News/Weather/\">Weather</a>..."
|
||||
"</small>\n"
|
||||
"</td><td valign=top>"
|
||||
"<b><a href=\"/Recreation/\">Recreation</a></b><br>"
|
||||
"<b><a href=\"/Top/Recreation/\">Recreation</a></b><br>"
|
||||
"<small>"
|
||||
"<a href=\"/Recreation/Travel/\">Travel</a>, "
|
||||
"<a href=\"/Recreation/Food/\">Food</a>, "
|
||||
"<a href=\"/Recreation/Outdoors/\">Outdoors</a>, "
|
||||
"<a href=\"/Recreation/Humor/\">Humor</a>..."
|
||||
"<a href=\"/Top/Recreation/Travel/\">Travel</a>, "
|
||||
"<a href=\"/Top/Recreation/Food/\">Food</a>, "
|
||||
"<a href=\"/Top/Recreation/Outdoors/\">Outdoors</a>, "
|
||||
"<a href=\"/Top/Recreation/Humor/\">Humor</a>..."
|
||||
"</small>\n"
|
||||
"</td></tr><tr><td valign=top>"
|
||||
"<b><a href=\"/Reference/\">Reference</a></b><br>"
|
||||
"<b><a href=\"/Top/Reference/\">Reference</a></b><br>"
|
||||
"<small>"
|
||||
"<a href=\"/Reference/Maps/\">Maps</a>, "
|
||||
"<a href=\"/Reference/Education/\">Education</a>, "
|
||||
"<a href=\"/Reference/Libraries/\">Libraries</a>..."
|
||||
"<a href=\"/Top/Reference/Maps/\">Maps</a>, "
|
||||
"<a href=\"/Top/Reference/Education/\">Education</a>, "
|
||||
"<a href=\"/Top/Reference/Libraries/\">Libraries</a>..."
|
||||
"</small>\n"
|
||||
"</td><td valign=top>"
|
||||
"<b><a href=\"/Regional/\">Regional</a></b><br>"
|
||||
"<b><a href=\"/Top/Regional/\">Regional</a></b><br>"
|
||||
"<small>"
|
||||
"<a href=\"/Regional/North_America/United_States/\">US</a>, "
|
||||
"<a href=\"/Regional/North_America/Canada/\">Canada</a>, "
|
||||
"<a href=\"/Regional/Europe/United_Kingdom/\">UK</a>, "
|
||||
"<a href=\"/Regional/Europe/\">Europe</a>..."
|
||||
"<a href=\"/Top/Regional/North_America/United_States/\">US</a>, "
|
||||
"<a href=\"/Top/Regional/North_America/Canada/\">Canada</a>, "
|
||||
"<a href=\"/Top/Regional/Europe/United_Kingdom/\">UK</a>, "
|
||||
"<a href=\"/Top/Regional/Europe/\">Europe</a>..."
|
||||
"</small>\n"
|
||||
"</td><td valign=top>"
|
||||
"<b><a href=\"/Science/\">Science</a></b><br>"
|
||||
"<b><a href=\"/Top/Science/\">Science</a></b><br>"
|
||||
"<small>"
|
||||
"<a href=\"/Science/Biology/\">Biology</a>, "
|
||||
"<a href=\"/Science/Social_Sciences/Psychology/\">Psychology</a>, "
|
||||
"<a href=\"/Science/Physics/\">Physics</a>..."
|
||||
"<a href=\"/Top/Science/Biology/\">Biology</a>, "
|
||||
"<a href=\"/Top/Science/Social_Sciences/Psychology/\">Psychology</a>, "
|
||||
"<a href=\"/Top/Science/Physics/\">Physics</a>..."
|
||||
"</small>\n"
|
||||
"</td></tr><tr><td valign=top>"
|
||||
"<b><a href=\"/Shopping/\">Shopping</a></b><br>"
|
||||
"<b><a href=\"/Top/Shopping/\">Shopping</a></b><br>"
|
||||
"<small>"
|
||||
"<a href=\"/Shopping/Vehicles/Autos/\">Autos</a>, "
|
||||
"<a href=\"/Shopping/Clothing/\">Clothing</a>, "
|
||||
"<a href=\"/Shopping/Gifts/\">Gifts</a>..."
|
||||
"<a href=\"/Top/Shopping/Vehicles/Autos/\">Autos</a>, "
|
||||
"<a href=\"/Top/Shopping/Clothing/\">Clothing</a>, "
|
||||
"<a href=\"/Top/Shopping/Gifts/\">Gifts</a>..."
|
||||
"</small>\n"
|
||||
"</td><td valign=top>"
|
||||
"<b><a href=\"/Society/\">Society</a></b><br>"
|
||||
"<b><a href=\"/Top/Society/\">Society</a></b><br>"
|
||||
"<small>"
|
||||
"<a href=\"/Society/People/\">People</a>, "
|
||||
"<a href=\"/Society/Religion_and_Spirituality/\">Religion</a>, "
|
||||
"<a href=\"/Society/Issues/\">Issues</a>..."
|
||||
"<a href=\"/Top/Society/People/\">People</a>, "
|
||||
"<a href=\"/Top/Society/Religion_and_Spirituality/\">Religion</a>, "
|
||||
"<a href=\"/Top/Society/Issues/\">Issues</a>..."
|
||||
"</small>\n"
|
||||
"</td><td valign=top>"
|
||||
"<b><a href=\"/Sports/\">Sports</a></b><br>"
|
||||
"<b><a href=\"/Top/Sports/\">Sports</a></b><br>"
|
||||
"<small>"
|
||||
"<a href=\"/Sports/Baseball/\">Baseball</a>, "
|
||||
"<a href=\"/Sports/Soccer/\">Soccer</a>, "
|
||||
"<a href=\"/Sports/Basketball/\">Basketball</a>..."
|
||||
"<a href=\"/Top/Sports/Baseball/\">Baseball</a>, "
|
||||
"<a href=\"/Top/Sports/Soccer/\">Soccer</a>, "
|
||||
"<a href=\"/Top/Sports/Basketball/\">Basketball</a>..."
|
||||
"</small>\n"
|
||||
"</td></tr>"
|
||||
"<tr><td colspan=3 valign=top>"
|
||||
"<b><a href=\"/World/\">World</a></b><br>"
|
||||
"<b><a href=\"/Top/World/\">World</a></b><br>"
|
||||
"<small>"
|
||||
"<a href=\"/World/Deutsch/\">Deutsch</a>, "
|
||||
"<a href=\"/World/Espa%%c3%%b1ol/\">Espa%c%col</a>, "
|
||||
"<a href=\"/World/Fran%%c3%%a7ais/\">Fran%c%cais</a>, "
|
||||
"<a href=\"/World/Italiano/\">Italiano</a>, "
|
||||
"<a href=\"/World/Japanese/\">Japanese</a>, "
|
||||
"<a href=\"/World/Nederlands/\">Nederlands</a>, "
|
||||
"<a href=\"/World/Polska/\">Polska</a>, "
|
||||
"<a href=\"/World/Dansk/\">Dansk</a>, "
|
||||
"<a href=\"/World/Svenska/\">Svenska</a>..."
|
||||
"<a href=\"/Top/World/Deutsch/\">Deutsch</a>, "
|
||||
"<a href=\"/Top/World/Espa%%c3%%b1ol/\">Espa%c%col</a>, "
|
||||
"<a href=\"/Top/World/Fran%%c3%%a7ais/\">Fran%c%cais</a>, "
|
||||
"<a href=\"/Top/World/Italiano/\">Italiano</a>, "
|
||||
"<a href=\"/Top/World/Japanese/\">Japanese</a>, "
|
||||
"<a href=\"/Top/World/Nederlands/\">Nederlands</a>, "
|
||||
"<a href=\"/Top/World/Polska/\">Polska</a>, "
|
||||
"<a href=\"/Top/World/Dansk/\">Dansk</a>, "
|
||||
"<a href=\"/Top/World/Svenska/\">Svenska</a>..."
|
||||
"</small>\n"
|
||||
"</td></tr></table></center>\n",
|
||||
195, 177, 195, 167);
|
||||
|
Reference in New Issue
Block a user