The Arcive of vBulletin Modifications Site. |
|
Latest announcement on forum home Details »»
|
|||||||||||||||||||||||||
This is my first hack which I created out of necessity. It's is so simple, it adds "Last Announcement" in the forums home. This is done by selecting the latest thread created in a given forum to be displayed.
See the screenshot attached. 1.2 Update: - The hack now uses the plugin system, no more code changes .1.1 Update: - Code is now more optimized, compatible with non-cookied and clustered boards. (Thanks for KirbyDE) 1.01 Update: - Now it works if you use prefix in database. Enjoy ![]() Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
Nice work, I shall most certainly use it.
|
|
#3
|
|||
|
|||
|
I get this error when I made the changes...any1 know what the problem is?
Parse error: parse error, unexpected T_WHILE in /home/illusion/public_html/forums/index.php on line 101 |
|
#4
|
|||
|
|||
|
Works great thanks. *installed*
|
|
#5
|
|||
|
|||
|
Quote:
Welcome FleaBag & thedvs
|
|
#6
|
||||
|
||||
|
and possible to have it of different color more and than an announcement
:squareeyed: |
|
#7
|
||||
|
||||
|
Nice hack. Installed!
|
|
#8
|
||||
|
||||
|
Some suggestions
- Use Hook forumhome_complete to avoid file edits - Use query_read instead of just query to avoid overhead and make the hack compatible with splitted (master/slave) mySQL servers - Use $db->fetch_array instead of mysql_fetch_array() to make the hack compatible with vBulletins Database Abstraction Layer - The generated link is missing the Session ID ($vbulletin->session->vars['sessionurl']), so it might not work for non-cookied users - ++$lnsnbsp; seems to be unnecessary Furthermore, if you just want 1 record, it's easier to use $db->query_first() Last but not least: A setting to select the Forum ID (rather than having the User edit the Plugin) would be perfect
|
|
#9
|
|||
|
|||
|
Thanks a lot KirbyDE!
I have updated the hack following your suggestions, but I really don't know how to make a plugin and I don't really have time to , I'm not considering myself a pro vb coder or something just created this little hack out of necessity and liked to share it. Anyone is welcome to port this hack into a plugin without crediting me even ![]() Thank you again for your valuable tips. |
|
#10
|
|||
|
|||
|
Thankyou i've been looking for something like this!
/me installs |
![]() |
|
|