![]() |
| |||||||
| Mod Requests Have a suggestion for a mod? Post it here. You may not always receive an answer, but phpLD devs and mod developers do regularly visit this forum. If you MUST get something done, you may need to opt for paid help. |
![]() |
| | Thread Tools | Display Modes |
| | #1 |
| When you carry out a search and the search is displayed would it be possible to show the category that the site belongs too? For example a search for photographers currently show this: Denise Chastain Photography Includes portraits, documentary, Silo street shoot and contact detals. Is it possible to show it like this: Denise Chastain Photography (Photographers) Includes portraits, documentary, Silo street shoot and contact detals. (Photographers) would also be hyperlinked to display the full category when clicked on. :?: [/url] | |
| |
| | #2 |
| Taken care of. Thank you Sharon. -Casey __________________ Casey Wilson / Ap0s7le Freelance Programmer http://www.ap0s7le.com Need help with PHPLD? PM me | |
| |
| | #3 |
| David asked me to post how I did this. Here goes. In the /index.php there is a section that looks for the query string in the URL. That section in the latest version looks like this starting on line 63. In that block you'll find a query like so. Code: $feat_links = $db->GetAll("SELECT * FROM {$tables['link']['name']} WHERE STATUS=2 AND (URL LIKE $q OR TITLE LIKE $q OR DESCRIPTION LIKE $q) AND FEATURED=1 $expire_where ORDER BY EXPIRY_DATE DESC"); Code: $feat_links = $db->GetAll("SELECT l.*, c.TITLE cTITLE FROM {$tables['link']['name']} AS l, {$tables['category']['name']} AS c WHERE l.STATUS=2 AND l.CATEGORY_ID = c.ID AND (l.URL LIKE $q OR l.TITLE LIKE $q OR l.DESCRIPTION LIKE $q) AND l.FEATURED=1 $expire_where ORDER BY l.EXPIRY_DATE DESC"); Code: $links = $db->GetAll("SELECT * FROM {$tables['link']['name']} WHERE STATUS=2 AND (URL LIKE $q OR TITLE LIKE $q OR DESCRIPTION LIKE $q) $feat_where $expire_where ORDER BY {$sort_cols[$sort]} {$sort_ord[$sort]}"); Code: $links = $db->GetAll("SELECT l.*, c.TITLE cTITLE FROM {$tables['link']['name']} AS l, {$tables['category']['name']} AS c WHERE l.STATUS=2 AND l.CATEGORY_ID = c.ID AND (l.URL LIKE $q OR l.TITLE LIKE $q OR l.DESCRIPTION LIKE $q) $feat_where $expire_where ORDER BY {$sort_cols[$sort]} {$sort_ord[$sort]}"); Code: {$link.cTITLE} Code: {if $link.cTITLE}(http ://{$smarty.const.DOC_ROOT}/index.php?c={$link.CATEGORY_ID}"]{$link.cTITLE}){/if} Thanks -Casey __________________ Casey Wilson / Ap0s7le Freelance Programmer http://www.ap0s7le.com Need help with PHPLD? PM me Last edited by David; 09-02-2008 at 03:47 AM. | |
| |
| | #4 |
| Administrator phpLD Administrator Supporter Join Date: Jan 2005 Posts: 11,667 | I'm thinking that to add the category links only to search results we need to go into main.tpl and do something where "q uneq 0"? |
| |
| | #5 |
| Nah we don't. It'll work fine the way I have it listed. You can view it active on her site. Thanks ![]() -Casey __________________ Casey Wilson / Ap0s7le Freelance Programmer http://www.ap0s7le.com Need help with PHPLD? PM me | |
| |
| | #6 |
| Administrator phpLD Administrator Supporter Join Date: Jan 2005 Posts: 11,667 | Cool, I figured it out now: http://www.businessplexus.com/index.php?search=ballroom Somebody give this guy a donation for helping. Last edited by David; 06-15-2008 at 04:19 AM. |
| |
| | #7 |
| Join Date: Sep 2005 Posts: 90 | I got this to work, but is there a way to use ENABLE_REWRITE to make it point to the full url of the category or subcategory (site.tld/category/) instead of going to the category_ID (site.tld/index.php?c=xx) ?? Thanks __________________ Work At Home Directory Last edited by David; 09-02-2008 at 03:48 AM. |
| |
| | #8 |
| Supporter Join Date: Aug 2005 Location: Sweden Posts: 218 | Yeah I wonder that to. Additionally, I think it would be nice if the category spec should show up at "latest links" and "popular links" as well. And what about the "Suggest a category" feature? How is that one working? |
| |
| | #9 | |
| Administrator phpLD Administrator Supporter Join Date: Jan 2005 Posts: 11,667 | Quote:
{deleted} Last edited by David; 06-15-2008 at 04:20 AM. | |
| |
| | #10 |
| Hi! How I can do to show the all Strocture Category, with this change in the code only see the las category for the link, is posible to show all tree of the categories? Thank you for your time | |
| |
| | #11 | |
| Mentor Join Date: May 2006 Location: Fond du Lac, WI Posts: 1,380 | Quote:
__________________ Last edited by David; 06-15-2008 at 04:20 AM. | |
| |
| | #12 |
| Supporter Join Date: Mar 2006 Posts: 27 | Hi All, How I can do to show category url in search result? |
| |
| | #13 |
| Supporter Moderator Join Date: Dec 2005 Location: Cluj-Napoca/Sighisoara (Romania) Posts: 4,468 | That is an option of phpLD 3.06 __________________ wanna say thank you?
|
| |
| | #14 |
| Supporter Join Date: Mar 2006 Posts: 27 | Unfortunately I am not able to provide payment for phpLD 3.06 from Russia. |
| |
| | #15 |
| Supporter Moderator Join Date: Dec 2005 Location: Cluj-Napoca/Sighisoara (Romania) Posts: 4,468 | None of the following are available in your case? http://www.phplinkdirectory.com/foru...07&postcount=6 Maybe a wire transfer could be the best method. __________________ wanna say thank you?
|
| |
| | #16 |
| Supporter Join Date: Mar 2006 Posts: 27 | This {if $link.cTITLE} Category: <a href="/index.php?c={$link.CATEGORY_ID}">{$link.cTITLE}</a>{/if} work well. How I can to use ENABLE_REWRITE to make Url for category as <a href="{$current_path}{$cat.TITLE_URL}.html">{$cat. TITLE}</a> |
| |
| | #17 |
| Supporter Moderator Join Date: Dec 2005 Location: Cluj-Napoca/Sighisoara (Romania) Posts: 4,468 | That is another feature of phpLD 3.06 It builds the entire link path to the category in the cache no matter if URL is rewritten or not. __________________ wanna say thank you?
|
| |
| | #18 |
| I've added the code but my link to the category doesn't seem to be hyperlinked. Any ideas? | |
| |
| | #19 | |
| Quote:
Last edited by David; 06-15-2008 at 04:21 AM. | ||
| |
| | #20 |
| Supporter Join Date: Jun 2005 Location: Denman Island, BC Posts: 76 | What is the conditional statement required to have the category also display on the Latest Links and Top Hits pages? |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|