PDA

View Full Version : Search Results to show category


Sharr76
08-04-2005, 10:41 PM
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]

Ap0s7le
08-10-2005, 10:44 PM
Taken care of.

Thank you Sharon.

-Casey

Ap0s7le
08-11-2005, 04:29 AM
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.

Content visible to registered users only.

Change that line to.

Content visible to registered users only.

Now just a couple lines below that find.

Content visible to registered users only.

Change it to.
Content visible to registered users only.

Now you can access that added Category Title in your templates like so

Content visible to registered users only.

For example with Sharon I used this in the link.tpl
Content visible to registered users only.

Any questions just yell.

Thanks

-Casey

David
08-11-2005, 04:59 AM
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"?

Ap0s7le
08-11-2005, 05:05 AM
Nah we don't.

It'll work fine the way I have it listed. You can view it active on her site.

Thanks :)

-Casey

David
08-11-2005, 05:17 AM
Cool, I figured it out now:
http://www.businessplexus.com/index.php?search=ballroom

Somebody give this guy a donation for helping. ;)

ing
09-19-2005, 03:22 PM
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
:)

Nobody
09-19-2005, 11:07 PM
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?

David
09-20-2005, 04:51 AM
Content visible to registered users only.

All we have right now is this:
{deleted}

mdarriba
09-25-2005, 06:15 PM
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

proprod
08-27-2006, 08:30 AM
Content visible to registered users only.

David, I noticed there, it has a link with full cat structure, parent, child... how did you accomplish this?

Alex2006
09-11-2006, 10:18 PM
Hi All,
How I can do to show category url in search result?

Boby
09-11-2006, 10:29 PM
That is an option of phpLD 3.06 ;)

Alex2006
09-12-2006, 06:50 PM
Unfortunately I am not able to provide payment for phpLD 3.06 from Russia.

Boby
09-12-2006, 07:59 PM
None of the following are available in your case?
http://www.phplinkdirectory.com/forum/showpost.php?p=36407&postcount=6

Maybe a wire transfer could be the best method.

Alex2006
09-13-2006, 08:28 PM
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>

Boby
09-13-2006, 08:33 PM
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.

Kaz
09-20-2006, 10:18 PM
I've added the code but my link to the category doesn't seem to be hyperlinked. Any ideas?

Kaz
01-28-2007, 09:49 PM
Content visible to registered users only.

Could you let us know how you got it working with enable rewrite:confused:

solutionsphp
01-28-2007, 09:54 PM
What is the conditional statement required to have the category also display on the Latest Links and Top Hits pages?

Kaz
02-04-2007, 07:23 PM
I'm having trouble with mod rewrite, currently my category link code looks like this:

Content visible to registered users only.And I would like it so that it uses mod rewrite rule so it doesn't have links like this:

Content visible to registered users only.It has a link like this instead:

Content visible to registered users only.PLEASE SOMEONE HELP:eek:

shadav
03-14-2007, 04:56 AM
I did what was posted but it didn't do anything? where exactly should I post the part in links.tpl at?

i have version 2.1.1

MrKool
05-23-2007, 02:48 AM
Did you find where to add variables to show categories in search results


Content visible to registered users only.

discover
05-31-2007, 05:58 PM
could this be added to the next version ?
i think its important enough