The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
php mysql query to pull last x number of posts
I migrated from phpbb3 to vbulletin.. and I used to pull the last 30 posts from my site by post id..
and oddly I can do that in vbulletin as well but only the posts that imported... so the question is this..I was pulling by postid or lastpost... its easy to tell that vb5 has gone away from postid... but is there query that I can run in vb5 to do this? can someone help me figure out how to reconstruct the url for pulling the last x number just php and mysql query? Thanks |
#2
|
||||
|
||||
That won't be easy to do. All posts, threads, forums, categories, attachments, photos, galleries, private messages......you get the idea, are stored in the node table. Everything in vb5 is considered content. It is possible to do refining the query by contenttype, but may not be full proof. Might I ask what exactly you are trying to accomplish?
The reason you can still puul the last 30 by postid in vbulletin on imported posts is because your old post table still exists. |
#3
|
|||
|
|||
Quote:
just on my main site I like to list the last 30, but most of my forums are closed so RSS wont build them. so I was just wanting to pull the topic, date, person posting so people can see what is being taked about in a quick glance. in phpbb3 you can deterime what is built in RSS locked or not. |
#4
|
||||
|
||||
I use a search module with a custom search string in it that gives all the new threads, posts and comments in chronological order starting with the newest to the oldest. It works relatively bug free since version 5.1.5. Here is the basic version. I can help you tweak it for your needs. It also displays results based on permissions so if the user is logged in and has access to the closed forums, those new posts will be displayed for them to view.
Code:
search?searchJSON={"date":{"from":"1"},"type":["vBForum_Gallery","vBForum_Link","vBForum_Photo","vBForum_Poll","vBForum_Text","vBForum_Video"],"sort":{"relevance":"desc"},"view":"","exclude_type":["vBForum_PrivateMessage"]} |
Благодарность от: | ||
MarkFL |
#5
|
|||
|
|||
that code worked well. thank you.
So answer me this.. what would have have to embed in my main site (outside the forum) to make it display it on web page outside my forum? I realize session info is needed just not sure how in VB5 if that can be or how to. |
#6
|
|||
|
|||
Just curious, if I am understanding you right..... Wouldn't a RSS feeder on the other site work to list all the newest posts from RSS on your Vb 5 site?
|
#7
|
||||
|
||||
Quote:
External Login Tutorial Nope, he wants his users with private forum access to be able to view the activity stream. The RSS only works for public forums. |
#8
|
|||
|
|||
ive tried this fix and some other things but still cannot get a basic display of recent content in the order it was updated....theres always a couple in the middle thats out of order...
the search modules are pretty confusing to start with in vb5 but then to not work idk what i can do but wait and pray they fix it really all i want is one "topic view" style module with a list of latest topics, posts, and comments, then one "default style" module that includes all activity but pms....shouldn't be too hard right? --------------- Added [DATE]1458114644[/DATE] at [TIME]1458114644[/TIME] --------------- well...i kept messing with it.... this is the best string i found so far Code:
{"last_visit":1,"type":["vBForum_Gallery","vBForum_Link","vBForum_Poll","vBForum_Text","vBForum_Video"],"channel":["1"],"sort":{"lastcontent":"desc"},"view":"topic","exclude_type":["vBForum_PrivateMessage"]} btw, another thing that bugs me and seems to come up about searches of recent activity is regarding confusion when members comments, or editing....wouldnt it be nice if above the members name on these results, is said last edited by, last commented by, or last posted by above names? yes...yes it would |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|