Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Logician NEWS: Drag Any Message to Your Main Page Details »»
Logician NEWS: Drag Any Message to Your Main Page
Version: 1.00, by Logician Logician is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 05-30-2002 Last Update: Never Installs: 105
 
No support by the author.

This is a news script which will drag vb forum messages from your vb db to your non-vb main page/news page. There are a lot of good news script around but I needed a highly customizable main page news script with some special features and wrote it myself. I'm using it in my site's main page for a long time, but I was just too lazy to write installation/help documents to share it here, sorry!

FEATURES:

* This script simply pulls forum messages which you marked as "news" from your vb database and post them in your non-vbulletin (main/other) page.
* You can mark messages as "NEWS" in any forum you want (including private forums). You dont need to restrict your news to a specific forum.
* You can drag any message to your main page, regardless of its date. So news is NOT supposed to be the most recent messages in your board.
* You do NOT have to carry the whole message to your main page as news. You can import it all or simply take some part of it. So eg. you can drag a message's the first paragraph to your news page and link the thread for "Read More".
* Moreover you can insert invisible custom NEWS text which will be dragged to your main page to your board messages, but not shown in the original forum thread. So your original thread message and news text on your main page can be different than eachother.
* You can have sticky news in your main page (even if they are not sticky in your forum).
* News does NOT need to be the first message in the thread. You can tag any reply message as news and pull it to your main page either.
* Script parses ALL of your message icons/smilies (including your custom add-ons) and some of the important vBCode like: [url] [email] [img] [b] [i] [u]
* You can specify which members may post news.
* You can form your News' title seperately, apart from of the original thread/message title.
* You can set maximum number of news shown in your main page.
* You can set maximum number of characters that all shown news should not exceed. Some messages can be long and some can be short and if you set a character limit, the script will automatically compile enough news from your database to fit your web page's relevant part according to the limit you set.
* You can enable/disable:
News Poster Name
News Date
News Read Number
News 'Send to a Friend' Link
Comment number/Add comment button/Last commenter
Will viewing news increase the original thread's view count or not
News is sticky or not
for ALL your news INDIVIDUALLY.
* All news tags are invisible in the original thread. So forum readers do not notice any difference when you tag a message as news.
* Dragging a message to your main page as news is as simple as inserting a hidden [news]Title of My News[/news] tag to your forum message.

Well, these features are what I needed in my news script, so it should suffice to you too!

It's an easy to install script and will work with ALL vbulletin versions because it's an add-on, not a hack. I can give support as much as I have time, but please ask here, not via email or PM.

If you use the script, please click INSTALL. If you post the URL of your news page after installation, you can help other users see the script in action in different pages and in custom designs, thank you!

Logician

Show Your Support

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

Comments
  #72  
Old 09-11-2002, 07:05 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by DeadMan384AD
I finally have this available to the public on my site... and it looks great! Works great too! I just need to get it so smilies work, but I think you mentioned it in this thread already, if not...
The hack automatically parses smilies
Reply With Quote
  #73  
Old 09-11-2002, 11:35 AM
zonegray zonegray is offline
 
Join Date: Feb 2002
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Go ahead and add them..
Thanks. Seems like I should be able to modify the script so that it simply checks if the poster is a member of a certian group. Any special reason you didn't do it this way?

Also, when I post a news item, the output contains a tag
Quote:
<a name="a">
where the first intro tag was. So, when I browse in Mozilla, the whole paragraph lights up with the "hover" color when I pass the mouse over it. Anybody else notice this?

That tag is in the regular message post, BTW, not the front page text.
Reply With Quote
  #74  
Old 09-11-2002, 12:55 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by zonegray

Thanks. Seems like I should be able to modify the script so that it simply checks if the poster is a member of a certian group. Any special reason you didn't do it this way?
Yes there is a reason:

The hack is coded to be a site main page script which means that it will be accessed very heavily everyday. So as to keep its performance high, I wanted to get rid of every possible SQL connection the script will make so hardcoding many things inside the code helps the code not to query your database for these information.

If I programmed it to check usergroups to decide if user is a legitimate news poster, the script will make an extra SQL connection for every news message you have in your main page. Because post table does not save usergroup of message poster but only its userid/username so we should query the user table for every news poster to decide if he is from an allowed user group. If you have 10 news in your main page, this would mean the script would make 10 more SQL queries to your board which IMO too much for a main page script.

So I dont suggest modifying the script to work with usergroups.

But if you are determined here is a work-around for you: Instead of restricting user names, restrict news forums in the settings so that news can only be posted in forum X. Also loose the poster info and let EVERYONE can post news in the scripts settings. Then all you need to do is to restrict this forum's permissions to other usergroups than your special one via vb ADmin CP. So with this trick you can make only that usergroup can post news in the main page..


Quote:
Also, when I post a news item, the output contains a tag where the first intro tag was. So, when I browse in Mozilla, the whole paragraph lights up with the "hover" color when I pass the mouse over it. Anybody else notice this? That tag is in the regular message post, BTW, not the front page text.
Oh I see.. it's a trivial issue related to the bb tag of intro we created inside Admin CP. You can change it to something like <b></b> or any other non-posting HTML code to correct the issue..
Reply With Quote
  #75  
Old 09-11-2002, 07:06 PM
Abbas Abbas is offline
 
Join Date: Nov 2001
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Zonegray - The way I do news posting on my forum, is have an actual 'news' forum that contains only news items for the front page. We then make our news posters into moderators for this 'news' forum and make it so that only moderators can post new threads. That way, only the news posters (moderators) can start new threads but everyone can reply to the news. This is similar to other sites where you can see the news on the frontpage and it also says something like '5 replies' or '5 comments'
Reply With Quote
  #76  
Old 09-12-2002, 05:37 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Abbas
Zonegray - The way I do news posting on my forum, is have an actual 'news' forum that contains only news items for the front page. We then make our news posters into moderators for this 'news' forum and make it so that only moderators can post new threads. That way, only the news posters (moderators) can start new threads but everyone can reply to the news. This is similar to other sites where you can see the news on the frontpage and it also says something like '5 replies' or '5 comments'
If you are using my script for this and didnt restrict news posters in settings, I want to remind you that your users can still post news to your main page. Since the script does not care if news message is a thread starter or a reply, if you dont restrict news poster names, your users using news tag in the reply messages in that specific forum will be able to move their posts to your main page..

However they wouldnt know how to drag a message to the main page, so we can still say that you are safe (provided that you installed the tag remover step in installation instructions)
Reply With Quote
  #77  
Old 09-12-2002, 07:23 AM
Abbas Abbas is offline
 
Join Date: Nov 2001
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hehe, actually I'm not using your script just yet (but hoping to soon when I give my forums a huge overhaul), I'm using one of the other news posting scripts, which just takes the first post from each thread.

Hmm... maybe you should make it so that your hack only takes the first post??? I mean when would you want a reply to become a separate post item? Seems unlikely in my opinion.
Reply With Quote
  #78  
Old 09-12-2002, 07:39 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Abbas
hehe, actually I'm not using your script just yet (but hoping to soon when I give my forums a huge overhaul), I'm using one of the other news posting scripts, which just takes the first post from each thread.

Hmm... maybe you should make it so that your hack only takes the first post??? I mean when would you want a reply to become a separate post item? Seems unlikely in my opinion.
If my hack would only take the first post as news, then why would I program it and why would the hack users use it? Other news scripts also do this.. This is (and some other features) that makes my script different than others.

BTW. I dont agree it's unlikely to drag a non-first message as news. If you use [summary] tags it can be very useful to drag them. For example say you have a hot thread in forum X and you want to notify main page visitors about this thread. In your board you have to go and make a news thread in your specific forum. But in my board I can just click reply in that hot thread and write this:

Hey I dont agree you!
[news]Come Join Discussion[/news]
[summary]We are discussing if Logician's News should drag non-first posts to main page or not. click [linkme]here[/linkme]to join! [/summary]


Now all thread viewers will see only the message:

Hey I dont agree you!

in the thread and wouldnt even notice this post was a news, but in your main page a news will appear as:

We are discussing if Logician's News should drag non-first posts to main page or not. click here to join!

See the difference?
Reply With Quote
  #79  
Old 09-13-2002, 11:53 AM
zonegray zonegray is offline
 
Join Date: Feb 2002
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the replies. Seems we could probably run one SQL query at the beginning of the script that would list the users in certain groups, and then just fill the array with the list. But, I think we have other more pressing hacks to do (we're still setting up)., so that will go on the "someday" list. If we eventually ended up with 5-6 hacks that required manual maintenace, it would be a pain, but we can deal with one for now. This hack works so well for us, since it distributes the load of maintaining the front page, meaning nobody has to be "on duty" when the news comes pouring in.

I hadn't noticed that it was possible to enable all users to post news... so we might take the approach Abbas suggested, at least to start; we'll just disable replies in the news sections. But... does anybody know of a hack that will redirect replies to a different section or something similar? The idea is to give users a "Comment" link, but one that takes them somewhere else.
Reply With Quote
  #80  
Old 09-30-2002, 12:29 PM
zonegray zonegray is offline
 
Join Date: Feb 2002
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just wondering... it seems I should be able to intergrate this with WebTemplates this way:

- make a copy of show.php (which would be called for pages that required news), assume it's called shownews.php.
- edit shownews.php and require/include newconfig.php
- assign output of news() to a variable, eg $newsoutput=news()
- use variable in a WebTemplate.

Obviously, I'd want to keep track of the number of queries so it didn't bog down.
Reply With Quote
  #81  
Old 09-30-2002, 04:49 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by zonegray
Just wondering... it seems I should be able to intergrate this with WebTemplates this way:
I didnt try this.. On theory it looks fine.. Please let me know if it worked..
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 06:56 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.05199 seconds
  • Memory Usage 2,328KB
  • 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
  • (8)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
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_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