The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#8
|
||||
|
||||
![]()
It does work, run this query inside phpmyadmin or whatever you use.
Code:
set @row_num = 0; SELECT @row_num := @row_num + 1 as row_number,threadid,postuserid,title FROM thread WHERE forumid = # AND postuserid = ## ORDER BY dateline DESC LIMIT 1; ## = userid , just make it one to run test on admin first user will return row of thread with its placement. if you remove "LIMIT 1" it will show more threads. --------------- Added [DATE]1360336817[/DATE] at [TIME]1360336817[/TIME] --------------- ill revise the code in a bit. i forgot something. --------------- Added [DATE]1360346941[/DATE] at [TIME]1360346941[/TIME] --------------- Here is the final working and tested code. It will show the position of the thread based on start date, not last reply. With new threads being position 1. (if you would like it the other way around change "DESC" to "ASC" in the $query) PHP Code:
Then add the following where you want it inside of SHOWTHREAD. {vb:raw display} I have added some span id's so you can style it how you'd like. Be sure to change $forum_id to the forum you'd like this running in. --------------- Added [DATE]1360347115[/DATE] at [TIME]1360347115[/TIME] --------------- Here is a sample CSS to add to additional.css Code:
p#pos-text-main { background: rgb(255, 202, 202); border: 1px solid rgb(184, 0, 0); margin: 10px 0; padding: 10px; } span#pos-num { font-weight: bold; } |
Благодарность от: | ||
addamroy |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|