The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
need a code to do this:
can someone tell me what the code would be to show, lets say, news... There's a forum called News where I make threads which becomes news... what code is it to show about 5 of those thread news on the front page (which is going to be something I'm going to be working on soon)... thanks for any help, and I could give you more info if needed.
|
#2
|
||||
|
||||
There are plenty of hacks here in vb.org that can do what you need.
|
#3
|
||||
|
||||
yeah, but I want to completely coustom make mine so that I have the good feeling of doing something...
|
#4
|
||||
|
||||
As JulianD stated, there are hacks such as vBHome lite that will give you this in a very query-efficient manner. If you are fairly new to PHP coding, I wouldn't create it on your own as the news process itself can develop a huge amount of queries if configured improperly (Teck would probably know).
Also, if you insist on it being original, why are you asking for the code to do it in this thread? |
#5
|
||||
|
||||
I just need to know the code that calls to pull the database string for the slected forum ID and limited it to 5 (I know it's a database string but I just don't know what it is -_-')
|
#6
|
||||
|
||||
Look at one of the many news hacks and take the queries used there and the modicications to the DB that are required.
|
#7
|
||||
|
||||
well... I did found that you could use this querie to get the info needed:
[sql] $sql = 'SELECT threadid, title, forumid, replycount, postusername, postuserid, lastposter, dateline, iconid FROM thread WHERE forumid =2 ORDER BY threadid DESC LIMIT 5'; [/sql] but what did I need to put as require to connect to the database without much work and the code to show it as HTML. |
#8
|
||||
|
||||
You know that query will only get the titles for the news? Not sure if thats all you want. Like I said before if you look at the hacks they show you how do the queries and how to use templates to output the results.
If you art't integrating with vB then look up the mysql_connect() PHP function. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|