PDA

View Full Version : Search Syntax for custom search


karlm
12-10-2013, 04:42 PM
I'd like to have a link/button that allows one-click access to global (or at least admin-selected) content... similar to how the activity.php works (shows all content from all areas of suite) but I'd like the results in a 'search results' type layout.

My members do not like the activity.php layout.

However, they are accustomed to the 'today's posts' and 'new posts'.

What I'm after is the search result layout after a search for "multiple content types" so blogs & group comments etc. are all included, but in a tidy manner - the activity.php layout is too new for them and too ... detailed, I guess. For whatever reason they don't like it.

So I'd like to add a link to the effect of:

<a href="search.php?{vb:raw session.sessionurl}do=getnew&contenttype=vBForum_Post&cms&blog_post&etc.">Newest Content</a>
I found the below link but it doesn't seem to cover more than the forum specific content.

http://www.vbulletin.com/forum/forum...-current-forum

Also, it would be beneficial to have it date-sorted in ascending order, so it gives the full impression of being a typical search.

I'm doing this because most of the site is ignored by members because they use the 'newest posts' link and nothing else.. so blogs & cms entries all go entirely unnoticed by the members.

Lynne
12-10-2013, 04:52 PM
I'm not really sure of what you are trying to do. If you would rather have them use the New Posts, then why not change the navtab that says What's New to instead say New Posts and change the URL for it?

karlm
12-10-2013, 05:12 PM
I'm not really sure of what you are trying to do. If you would rather have them use the New Posts, then why not change the navtab that says What's New to instead say New Posts and change the URL for it?

It's to the effect of getting the 'whats new' tab (activity.php) results but in the format of a traditional 'seach.php' result page.

A long-winded way is for me to go to advanced search and leave the keyword box empty but select the basics (threads/posts, articles, blogs/comments, visitor messages) , then use 'sort by date - descending' and 'yesterday and newer' as criteria.

It shows all the recently updated bits - in a traditional search results page.

That's the look I'd like to acquire by using some super fangled search.php code (as described poorly above).

It's possibly best explained by viewing the original post on VB.com


http://www.vbulletin.com/forum/forum/general/php-html-questions/4010898-search-syntax-for-global-blogs-cms-forum-etc?p=4010910#post4010910

ozzy47
12-10-2013, 07:30 PM
Try this mod, https://vborg.vbsupport.ru/showthread.php?t=302365

Lynne
12-10-2013, 11:27 PM
Ah yes, I saw that posted on vb.com also and I answered you there.