Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Latest announcement on forum home Details »»
Latest announcement on forum home
Version: 1.2, by tantawi tantawi is offline
Developer Last Online: Oct 2011 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 10-01-2005 Last Update: 01-10-2006 Installs: 50
Uses Plugins Template Edits
 
No support by the author.

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

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 10-02-2005, 08:52 PM
FleaBag's Avatar
FleaBag FleaBag is offline
 
Join Date: Dec 2001
Posts: 1,674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice work, I shall most certainly use it.
Reply With Quote
  #3  
Old 10-02-2005, 10:03 PM
illusions illusions is offline
 
Join Date: Feb 2005
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #4  
Old 10-02-2005, 10:42 PM
thedvs thedvs is offline
 
Join Date: May 2002
Posts: 353
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works great thanks. *installed*
Reply With Quote
  #5  
Old 10-03-2005, 04:28 AM
tantawi tantawi is offline
 
Join Date: Sep 2002
Location: Egypt
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by illusions
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
Are you sure you have vB 3.5 Final installed? I never tested this code on any Betas or RCs. And try the updated hack, as your problem may be with table prefix?

Welcome FleaBag & thedvs
Reply With Quote
  #6  
Old 10-03-2005, 11:15 AM
swantonio's Avatar
swantonio swantonio is offline
 
Join Date: Aug 2004
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

and possible to have it of different color more and than an announcement

:squareeyed:
Reply With Quote
  #7  
Old 10-03-2005, 01:14 PM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice hack. Installed!
Reply With Quote
  #8  
Old 10-03-2005, 07:34 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #9  
Old 10-03-2005, 08:04 PM
tantawi tantawi is offline
 
Join Date: Sep 2002
Location: Egypt
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #10  
Old 10-05-2005, 03:13 AM
csidlernet csidlernet is offline
 
Join Date: Apr 2003
Location: sydney
Posts: 183
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thankyou i've been looking for something like this!
/me installs
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:51 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04527 seconds
  • Memory Usage 2,290KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete