Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-09-30 02:42:08
- deronsizemore
- Member
- From: Kentucky
- Registered: 2005-11-02
- Posts: 324
Any plugin to number search results?
I’ve looked and searched and can’t seem to turn anything up. Anyone know of something that will allow numbered results on the search results page?
Offline
Re: Any plugin to number search results?
I don’t know how to output the number, but it seems really simple…for someone who knows PHP :P. You could take the easy route and use an <ol>
and <li>
though.
Last edited by jm (2006-09-30 03:51:05)
Offline
#3 2006-09-30 11:34:22
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Any plugin to number search results?
I’ve got an unpublished plugin (upm_search_util) that does just that. Gimme some time and I’ll publish it today (I need to add a help doc to it).
Offline
#4 2006-09-30 14:15:50
- deronsizemore
- Member
- From: Kentucky
- Registered: 2005-11-02
- Posts: 324
Re: Any plugin to number search results?
Whoa, sounds cool Mary! Great timing! :-)
Thanks Jon, I know zero PHP so that’s out of the question and I thought about the <ol>
and <li>
but wasn’t sure how to do it. I didn’t see in textbook where any of the tags would accept the wrap=”“ and break=”“ attributes. I think I’ll just wait on Mary’s plugin! :-)
Last edited by deronsizemore (2006-09-30 14:16:40)
Offline
#5 2006-10-05 13:55:15
- deronsizemore
- Member
- From: Kentucky
- Registered: 2005-11-02
- Posts: 324
Re: Any plugin to number search results?
Is this plugin available yet Mary? If not, not a big deal, just can’t find it in my searches. :-)
Offline
#6 2006-10-06 01:42:35
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Any plugin to number search results?
Yeah sorry, I ran into trouble with my plugin template… I’ll try and get it going tonight.
Offline
#7 2007-03-12 10:40:16
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Any plugin to number search results?
It occurred to me today that my plugin is superfluous.
<txp:if_search>
<ol<txp:chs_urlvar_exists var="pg"> start="<txp:chs_urlvar_echo var="pg" />"</txp:chs_urlvar_exists>>
<txp:article limit="1" />
</ol>
<p><txp:older>Next</txp:older>
<txp:newer>Previous</txp:newer></p>
</txp:if_search>
My plugin did the same thing, but it’s better to use a generic plugin (which you can use for several things) when you can. :)
Offline
#8 2007-03-28 17:09:40
- marios
- Archived Plugin Author
- Registered: 2005-03-12
- Posts: 1,253
Re: Any plugin to number search results?
To complete up, what jm already suggest above:
the form:
<li class="search"><h3><txp:permlink><txp:title /></txp:permlink></h3>
<p><txp:search_result_excerpt /></p>
<p class="small"><txp:permlink><txp:permlink /></txp:permlink> · <txp:posted /></p></li>
and your CSS:
#content ol, #content li.search {
list-style-type: upper-roman !important;
margin: 20px 20px;
}
regards, marios
⌃ ⇧ < ⎋ ⌃ ⇧ >
Offline
Re: Any plugin to number search results?
hi marios, although your solution is very good it poses the problem with results in the second page which they would again start from one. This could be avoided if you have a large number in the article limit for search results.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#10 2007-03-29 10:23:38
- marios
- Archived Plugin Author
- Registered: 2005-03-12
- Posts: 1,253
Re: Any plugin to number search results?
Yeah, true. Only works, if there is no second page, which is the case in the example.
regards, mario
⌃ ⇧ < ⎋ ⌃ ⇧ >
Offline