The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Simple newsportal / thread overview to add to your board... Details »» | |||||||||||||||||||||||||||
Simple newsportal / thread overview to add to your board...
Developer Last Online: Nov 2023
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
|
Comments |
#42
|
||||
|
||||
Thanks, checking it out right away. :up:
|
#43
|
|||
|
|||
good hack
/me installed this hack |
#44
|
||||
|
||||
didn't work one bit, so far, awaiting PPN's response....
(edit: this pertaining to PPN's permissions code in the other thread) |
#45
|
||||
|
||||
this one is really cool
i added a few things, and now i wont need vbportal (for smaller sites) anymore we shouldnt forget that vbportal has some functions that i personally wouldnt wanna code myself... greets kreftt |
#46
|
|||
|
|||
I worked on a project like this a while back, never polished up enough to release. The twist I took was I had it run when someone submitted post; it created an HTML that could be served many times with no queries. The theory: thread reads = a lot, posts submissions = not as many.
|
#47
|
||||
|
||||
kura.. if you have a chance, look at the perms included in the vbHome hack. they work, but perms = alot of queries, as firefly mention it to me earlier. PPN was kind enough to look at my hole file i wrote. i will let you know what he says about the perms, then i will post here the mods PPN did to the code, so you can insert it also in your hack.
team work. |
#48
|
||||
|
||||
here it is kura, from my file the code that works (thanks PPN):
Code:
// latest threads *************************** $doperms=$DB_site->query("SELECT canview,forumid FROM forumpermission WHERE usergroupid='$bbuserinfo[usergroupid]'"); while ($doperm = $DB_site->fetch_array($doperms)) { $perms["$doperm[forumid]"] = $doperm; } $DB_site->free_result($doperms); unset($doperm); $forum=$DB_site->query("SELECT forumid FROM forum"); while ($forums=$DB_site->fetch_array($forum)) { if($perms["$forums[forumid]"]["canview"] == 1 || !isset($perms["$forums[forumid]"]["canview"])) { $forumperms[]=$forums["forumid"]; } } $DB_site->free_result($forum); unset($forums); if(!empty($forumperms)) { $forumperms='AND forumid='.implode(' OR forumid=',$forumperms); } $dothreads=$DB_site->query("SELECT * FROM thread WHERE open=1 AND open<>10 $forumperms ORDER BY lastpost DESC LIMIT 10"); while ($dothread=$DB_site->fetch_array($dothreads)) { $dots=''; if (strlen($dothread[title])>29) { $dots='...'; } $forumid=$dothread[forumid]; $threadid=$dothread[threadid]; $threadtitle=substr($dothread[title], 0, 32); $lastthreadbits .= '<a href="showthread.php?s='.$session[sessionhash].'&forumid='.$forumid.'&threadid='.$threadid.'">'.$threadtitle.$dots.'</a><br>'; } unset($dothread); https://vborg.vbsupport.ru/attachmen...&postid=249059 try the code and let me know what you think. i will update my vbHome hack also. later on today... |
#49
|
||||
|
||||
I didn't use your code above nakkid, but I used PPN's new code (his former had a wrong var.name) and it works.
The first post is updated and the hack now includes permissions. Re-download if you have this installed and overwrite newsportal.php and re-set your variables, to include the permission checking (works like a charm! ) |
#50
|
||||
|
||||
Okay I just wanna say a big THANK YOU NAKKID for helping me out, sure PPN did the actual code-writing but nakkid pointed me to it and helped out nonetheless. Thanks Nakkid! :up:
|
#51
|
||||
|
||||
hey kreft on that test forum i like dat avatar............where u got it from???? or could u PLZ pm me it??????
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|