PDA

View Full Version : View New Posts - Request


Rand M
10-17-2002, 03:32 PM
Firstly my apologies if this 'hack' has been raised before.
If it has could someone point the way!

As you all know the "View New Posts" displays those threads that have 'new posts'....

Is it possible to modify this function to display the new posts, much like the display from the 'Search' function when the option to 'Show Results as Posts' is selected?

I'd like to give my users the option from the 'View New Posts' display result, to select another option to display 'Show Results as Posts' rather than just the threads.

I am very new to vBulletin, so if the experienced 'hackers' could give me some tips on how to achieve this I would be most grateful.

Many thanks
Rand

Logician
10-18-2002, 08:28 AM
if you change the line in search.php:

(NULL,'".addslashes($wheresql)."',".time().",'".addslashes($query)."',0,$bbuserinfo[userid],'".addslashes($ipaddress)."')");


TO:

(NULL,'".addslashes($wheresql)."',".time().",'".addslashes($query)."',1,$bbuserinfo[userid],'".addslashes($ipaddress)."')");


I guess it should work. There are 2 instances, change both. This is not tested btw.

Rand M
10-18-2002, 01:14 PM
Thanks Logician for replying to my request!

I edited the two fields in search.php and the resulting display from "View New Posts" was as you suggested changed from 'thread view' to 'post view'.

The down side (for me!) was that this changes the display to show all posts in a thread that may only have one 'new post'. A slightly less downside was the display is in 'descending' order, newest post first!

I'm so new to working with vBulletin that what follows may be a load of rubbish!!! So feel free to correct my assumptions....
I assume that when 'View New Posts' is selected it just runs a sql query with a set of default options(???)
I've looked through the 'vBulletin Template Reference' to find the search templates used by search.php but couldnt find anything that sets the 'View New Posts' display. Then again if I'd been looking for pink elephants I would have missed them as well....

What I'd like to be able to do is to set 'View New Posts' to display 'only' new posts in 'ascending' order.

(Why!!! .... the majority of my users are from a 'Discus' forum that has this option..... but we're replacing Discus with vBulletin)

I hope you dont mind another question? Is search.php the area to concentrate my 'learning' in to achieve this modified display.

Thanks again,
Rand

Logician
10-18-2002, 07:37 PM
Unfortunately my help ends here. Yes its true its search.php that should be hacked to achive your goal, but IMO it's the most complex vb script so I can't give you a fast solution anymore for your request. It would take sometime to find a way for this.. Hopefully someone else who has more time will help much by testing some modifications in search.php. Or maybe somebody can figure out a quick solution which didnt occur to me at the moment.. Sorry about it..

Rand M
10-18-2002, 09:54 PM
Your help has been most appreciated!
I'll look into search.php as much as I can....... IF anything makes sense I'll be sure to post what I find.