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
Simple newsportal / thread overview to add to your board... Details »»
Simple newsportal / thread overview to add to your board...
Version: 1.00, by KuraFire KuraFire is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

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

Okay, this isn't really a hack, since you don't have to modify any vb-files really, but I figured this was the best place to make it public anyhow. I found it rather useful myself, so I figured others might, too.

Last update: April 28th, 2003!
** Update summary: **
The bug that could occur due to MySQL stupidity has been fixed. Version 2 of the Newsportal script is now attached in this post, you can simply overwrite the newsportal.php on your site with the one from the attached zipfile to upgrade.
From now on, no more vB files need to be adjusted nor do you have to make any database changes. If you've already done all that due to the mysql-bug in a previous stage of this hack, you can just leave it like that, it won't do any harm. If you're intent on 'cleaning' your files again, let me know if you can't get it done yourself.


Q&A:
What does this 'hack' do?

http://www.kurafire.com/newsportal.php

That's a live example of the fully functional version of the Hack (version 2). I think it speaks for itself.

The amount of newsposts & threads on the right is set in a variable at the beginning.


Is this hack hard to install?
Absolutely not. You upload the newsportal.php, you add the new templates (see zipfile), and you place a link to newsportal.php wherever you want it on your site. That's it.
You don't have to modify any vB files, nor your database.


Does this hack include my style and everything?
Yes, the newsportal page will use your headinclude, header, footer and style-colors (pagebgcolor, tableouterwidth, linkcolor, etc.) and all these settings are easily configureable. You just edit the templates like you're (hopefully) used to with all the normal vB Templates.


Version 2:
The newsportal script now uses 2 queries to get the necessary information for your News posts. One for all thread info and the postid's of the starting posts, and one for the pagetext (ie. post contents) of all those postid's. You can use 2, 20 or 200 newsposts, that won't matter, it'll always be 2 queries (though I discourage using more than 20 newsposts ). ^_^

That's it, you're all done. Have fun with the newsportal! ^_^

Show Your Support

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

Comments
  #122  
Old 05-05-2003, 04:09 PM
Crazy Pete Crazy Pete is offline
 
Join Date: Nov 2002
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm getting this error when I try to include the news on a non-forum page. I already removed the $header and $headinclude statements from the newsthreads template, as I don't need them on the other page. When I'm already logged in and browsing the forums, everything's fine, but if I just hit the homepage (where the news in included) first, I get this error...

Warning: Cannot modify header information - headers already sent by
(output started at /home/pete/public_html/index.php:44) in
/home/pete/public_html/forums/admin/functions.php on line 1753
Reply With Quote
  #123  
Old 05-06-2003, 12:03 AM
KuraFire's Avatar
KuraFire KuraFire is offline
 
Join Date: Oct 2001
Location: inside vB3's .php
Posts: 1,245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this hack is a standalone, not usable as a portable hack.

If you want to include it, you'll just have to copy - paste the code for JUST THE NEWS stuff only, and hook that up into your non-forum page script.
Reply With Quote
  #124  
Old 05-06-2003, 06:28 AM
Robink Robink is offline
 
Join Date: Feb 2003
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Yesterday at 04:08 AM Tigga said this in Post #118
Double check that your forum permissions are set correctly for those forums and that users not in your admin or mod groups don't have permission to view threads in those forums. Also be sure that "Use custom settings" at the top of the forum permissions page is checked (that seems to be a very common thing that is overlooked. )
Its not a permissions problem, since if the user Clicks on the link It displays the No Permissions Screen. And Im certain that users cant see my private forums.

Secondly, I just tested by logging on as a Guest, and it still shows me threads from my Mod forum only on the latest threads...

So, I think changing the query of ading some condition based on usergroupid seems like the only choice.

Thanks for the help anyway, Tigga
Reply With Quote
  #125  
Old 05-06-2003, 07:26 AM
KuraFire's Avatar
KuraFire KuraFire is offline
 
Join Date: Oct 2001
Location: inside vB3's .php
Posts: 1,245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 09:28 AM Robink said this in Post #123
Its not a permissions problem, since if the user Clicks on the link It displays the No Permissions Screen. And Im certain that users cant see my private forums.

Just outta curiosity, but did you check that too?

Did you install any hack that involved your forums listing or the forum table? Or something with Host masks etc. ?

SOMETHING that might've altered your permissions structure to work differently from most boards? Cos it works for everyone else, the permission section...
Reply With Quote
  #126  
Old 05-06-2003, 11:32 AM
Tigga's Avatar
Tigga Tigga is offline
 
Join Date: Dec 2001
Location: Atlanta
Posts: 1,061
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 03:28 AM Robink said this in Post #123
Its not a permissions problem, since if the user Clicks on the link It displays the No Permissions Screen. And Im certain that users cant see my private forums.
You should still double check the permissions. That's a common problem people seem to have with mYvBindex, and every time it's because they don't have the permissions set properly, or they forgot to hit the "Use custom settings" button at the top. IIRC Kurafire and I use about the same method for forum permissions and it does work, but only if the permissions are set as they should be, so I'd be willing to bet that's what your problem is.
Reply With Quote
  #127  
Old 05-06-2003, 12:55 PM
KuraFire's Avatar
KuraFire KuraFire is offline
 
Join Date: Oct 2001
Location: inside vB3's .php
Posts: 1,245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 02:32 PM Tigga said this in Post #125
You should still double check the permissions. That's a common problem people seem to have with mYvBindex, and every time it's because they don't have the permissions set properly, or they forgot to hit the "Use custom settings" button at the top. IIRC Kurafire and I use about the same method for forum permissions and it does work, but only if the permissions are set as they should be, so I'd be willing to bet that's what your problem is.

Yeah, and it works for everyone else, and it's (I think) mostly the same section of code to check for permissions as is used in vB's own files... :/
Reply With Quote
  #128  
Old 05-06-2003, 01:38 PM
Crazy Pete Crazy Pete is offline
 
Join Date: Nov 2002
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Yesterday at 09:03 PM KuraFire said this in Post #122
this hack is a standalone, not usable as a portable hack.

If you want to include it, you'll just have to copy - paste the code for JUST THE NEWS stuff only, and hook that up into your non-forum page script.
Hmm, well I tried doing that and I got this:

Fatal error: Call to a member function on a non-object in /home/pete/public_html/testindex.php on line 117

The line in question is...

$newsql = $DB_site->query("SELECT t.threadid as tid, t.title as ttitle, t.replycount as treply, t.postusername as user, t.postuserid as userid, t.dateline as dateline, MIN(p.postid) as postid FROM thread t LEFT JOIN post p USING (threadid) WHERE forumid=$newsforum GROUP BY t.threadid ORDER BY t.threadid DESC LIMIT $newslimit");
Reply With Quote
  #129  
Old 05-06-2003, 03:42 PM
KuraFire's Avatar
KuraFire KuraFire is offline
 
Join Date: Oct 2001
Location: inside vB3's .php
Posts: 1,245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

that means you're not using the vBulletin engine in your non-forum page.

(I think)
Reply With Quote
  #130  
Old 05-07-2003, 09:20 AM
mossyuk mossyuk is offline
 
Join Date: Jul 2002
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is there no way to make it so it doesnt have to be in the /forums/ directory? I use individual team pages on my Intranet and I would like to use this script for each team but so far havent figured out how
Reply With Quote
  #131  
Old 05-07-2003, 09:22 AM
Robink Robink is offline
 
Join Date: Feb 2003
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Yesterday at 07:02 PM Tigga said this in Post #125
so I'd be willing to bet that's what your problem is.
You win the bet!!

The problem was that in the catagory, I set it that Registered users and guest cant see the catagory alltogether. But I hadnt set the Forum permissions. After I went and set it, the problem dissappeared!

Now the newsportal works like a charm, which I am using as my home page portal...

This is my favourite hack! Thanks KuraFire... Now my profile says that this is my fav hack too
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 05:04 AM.


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.04595 seconds
  • Memory Usage 2,323KB
  • Queries Executed 27 (?)
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
  • (6)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_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