PDA

View Full Version : New posts as posts, Instead of updated threads.


Zachery
03-07-2005, 10:00 PM
Display New Posts, as Posts, instead of Updated Threads.
Hack Author: Freddie
Preparer of list of changes: Zachery
Info:
Someone had made a request for this at vB.com.
Freddie took some time and made the changes to make it work
Now I am taking the time to let everyone else make use of it.
Basicly, it shows the results as posts. instead of threads.
I will give no offical support for this hack, but will do my best anyway.

Tested and is working on my dev forum, and a friends site.
Screen Shot added...

KW802
03-08-2005, 02:33 AM
The results are interesting. For those trying to get a visual idea of this, think of how the results are returned when you do a search (eg: show all posts by a certain user); the same type of output is now returned when searching for new posts so you end up with a little preview of each new post.

Try it... you may like it. :D




(Just make sure you wide awake when doing the edits :p )

AN-net
03-08-2005, 02:47 AM
always thought of doing this but never got around to it, great work zachery:D

zoomforce
03-08-2005, 04:50 AM
i was the one that requested this.. and thank you sOOOOOOOOOOOOOO much!!

Floris
03-08-2005, 04:59 AM
always thought of doing this but never got around to it, great work zachery:D
Freddie you mean :)

And yes, great job freddie, tnx for posting zachery :) I am sure there are quite enough sites that want to have a link to show all the posts from that day, especially the admins.

Zachery
03-08-2005, 05:27 AM
Freddie you mean :)

And yes, great job freddie, tnx for posting zachery :) I am sure there are quite enough sites that want to have a link to show all the posts from that day, especially the admins.
It did take me a while to write out the installer :p

Neutral Singh
03-08-2005, 05:59 AM
Lovely !! Gr8 Job Done !! :)

** Aman clicks install **

Oblivion Knight
03-08-2005, 07:48 AM
So does this simply replace the "updated threads" method, or does it offer an alternative?

Seems like a nice little mod.. :)

Zachery
03-08-2005, 05:10 PM
So does this simply replace the "updated threads" method, or does it offer an alternative?

Seems like a nice little mod.. :)
Offers an alterntive andy

Oblivion Knight
03-08-2005, 10:41 PM
Awesome! It makes much more sense to display posts instead of updated threads anyway.. ;)

Installed at Gamers Euphoria, running flawlessly.

AN-net
03-08-2005, 10:41 PM
oh woops, ty to freddie. i got confused :D

Lionel
03-13-2005, 03:03 AM
I've just installed and I am not too sure... if there are no posts, does it returned a blank page or an error message? I am getting a blank page...

Never mind, I was repeating search.php twice in the link.:rolleyes:

dwh
03-31-2005, 03:52 AM
Interesting idea. Just peaked at the code. What happens when you delete a post/thread. Does it show up? Because it seems you're removing the deletionlog join which is how deleted threads are skipped.

Zachery
04-05-2005, 12:06 AM
Interesting idea. Just peaked at the code. What happens when you delete a post/thread. Does it show up? Because it seems you're removing the deletionlog join which is how deleted threads are skipped.
It got moved to a differnt part of the query

akanevsky
04-05-2005, 12:48 AM
Excellent idea. I will install this later. However, I think it would also be a good idea if every used was able to set an option "show news as new threads or new posts" in his user cp :)

lamur
04-05-2005, 02:33 AM
Looking good, few questions for it though..

1) Can I edit some of the code to make it display the entire post, not just xxx amount of chars?

2) Can it display images and smilies too?

3) can it be made so that it does more than the standard amount of posts per page? I have posts set to 25 before the new page, but can this one specifically be set to say 50? 100?

Thanks soo much this is really nice!

Zachery
04-05-2005, 03:22 AM
Looking good, few questions for it though..

1) Can I edit some of the code to make it display the entire post, not just xxx amount of chars?

2) Can it display images and smilies too?

3) can it be made so that it does more than the standard amount of posts per page? I have posts set to 25 before the new page, but can this one specifically be set to say 50? 100?

Thanks soo much this is really nice!
1) sure, its possible, i don't know how to do it though
2) you'd have to run it thought the bbcode parser, and that would add to the load significatnly I think
3) change the code :) where not sure, its in there somewhere. look for something like $perpage

Oblivion Knight
04-05-2005, 07:08 AM
Excellent idea. I will install this later. However, I think it would also be a good idea if every used was able to set an option "show news as new threads or new posts" in his user cp :)It's pretty easy to do this one using a custom profile field.. :)

I had several users asking how they could use the "old" layout (meaning threads). So I created an option in the User CP for users to choose, and by default it's set to display by Threads.

akanevsky
04-05-2005, 09:29 AM
But the search.php. code also has to include that option... -_- And not every1 knows how to edit the code...

Oblivion Knight
04-05-2005, 12:08 PM
But the search.php. code also has to include that option... -_- And not every1 knows how to edit the code...No it doesn't.. As Zachery said, it provides an alternative to the old layout - not replace it.

You just need to edit the navbar template with the custom profile field. :)

Lionel
04-05-2005, 12:14 PM
The display is very neat. And it does not interfere with any other hacks, such as private threads etc...

lamur
04-05-2005, 03:47 PM
1) sure, its possible, i don't know how to do it though
2) you'd have to run it thought the bbcode parser, and that would add to the load significatnly I think
3) change the code :) where not sure, its in there somewhere. look for something like $perpage

Hey if anyone could help me out on this, it would be GREATLY appreciated. I really know nothing about PHP, but I think these addons would be pretty sweet. :banana:

lamur
04-07-2005, 06:49 PM
Actually, I think the major thing here is to get the Entire post. Does anyone know how to make that happen? Showing pictures and BBcode is good, but I've had lots of people asking if this could show the Entire Text.. Maybe I should go read a PHP book, :)

lamur
04-07-2005, 06:58 PM
Ok, I found where to change this:

// get first 200 chars of page text
$post['pagetext'] = htmlspecialchars_uni(fetch_censored_text(trim(fetc h_trimmed_title(strip_bbcode($post['pagetext'], 1), 9000))));


Now I need to find where I can change the amount of posts per page.. "$perpage is kinda hard to find"

I think it can be changed from the text here, but I dont know what to change.

// get page split...
sanitize_pageresults($numitems, $pagenumber, $perpage, 200, $vboptions['searchperpage']);

// get list of thread to display on this page
$startat = ($pagenumber - 1) * $perpage;
$endat = $startat + $perpage;
$itemids = array();
for ($i = $startat; $i < $endat; $i++)
{
if (isset($orderedids["$i"]))
{
$itemids["$orderedids[$i]"] = true;
}
}

lamur
04-25-2005, 04:22 AM
Still havent found out how to add BBcode or change amount of posts per page..

One other question. How can I make the font not italic and increase it a bit? Ideas?

mstolp
05-14-2005, 07:50 PM
I am new to making modifications.

In the installation text file, the last line says:

"Add a link somewhere, like this search.php?do=getnew&showposts=1 or search.php?do=getdaily&showposts=1"

Where does this go?

Also, how hard is it to adjust these changes to show the last "n" posts (regardless of age) rather than Today's Posts?

Thanks.

Mike

Lionel
05-14-2005, 08:20 PM
I see that this was last updated today... what was the change?

VW Derf
10-17-2005, 10:26 PM
Has this been updated to 3.5?

lamur
11-15-2005, 02:01 AM
I would like to see this updated to 3.5 as well.

Zachery
11-15-2005, 05:14 PM
search.php?do=getnew&showposts=1 stock feature in 3.5

Freddie Bingham
11-15-2005, 05:50 PM
or search.php?do=getdaily&showposts=1

lamur
12-04-2005, 03:04 PM
Is there a way to show the entire post by jacking up the char limit?

Also, how do you change the post from Italic to just normal?
Thanks.