The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Details »» | ||||||||||||||||||||||||||
UPDATED! Woohoo!
I just fixed/added stuff from version 1.0! Download the new version 1.5 if you have the old 1.0 - lots of better features. From the readme.txt: Quote:
And Headlines! http://pluh.com/forums/PluhHeadlines.php Let me know if you like it! (Thanks Dark Wizard and Bane) *NOTE: I will not be able to provide support for this hack, as I am extremely busy. Sorry...* Show Your Support
|
Comments |
#402
|
|||
|
|||
I've installed this hack, and I am using the headlines and news all in the actual template of my VB page.... I have the headlines on all pages in the sidebar, and the news only on the main page.
But, I have a large problem! When I visit my actual forums, they dont appear! I get my headlines working fine, but I just see: Forum Posts Threads Last Post [BLANK!] Private Messages All of the actual catagories etc.. are gone! Does anyone know why? |
#403
|
||||
|
||||
Ok. Heres the Deal. I wanna include the Headlines in my welcome panel in the Forumhome template. I've tryed doing pretty much everything. And it still does not show up.
I want it right next to the Red "Forum News" letters in the welcome panel on http://forums.cheatlist.com(there may be stuff writen there allready. My header file is at: Http://forums.cheatlist.com/vbb/PluhHeadlines.php Here is the Welcome Panel code: Code:
<!-- welcomepanel --> <table cellpadding="{tableouterborderwidth}" cellspacing="0" border="0" bgcolor="{tablebordercolor}" {tableouterextra} width="{contenttablewidth}" align="center"> <tr> <td> <table cellpadding="4" cellspacing="{tableinnerborderwidth}" border="0" {tableinnerextra} width="100%"> <tr id="cat"> <td bgcolor="#000000" colspan="7"><normalfont color="{categoryfontcolor}"><b>Welcome</b></normalfont></td> </tr> <tr> <td bgcolor="{secondaltcolor}" align="center" valign="middle" width="50" rowspan="2">$avatarimage</td> <td bgcolor="{secondaltcolor}" align="left" valign"top" width="400"><smallfont>$unregwelcomemessage $welcometext<br> The time now is $timenow.<br> You last visited: $bbuserinfo[lastvisitdate].<br> <b>$newposts</b></smallfont> </td> <td bgcolor="{secondaltcolor}" align="left" valign"top" width="300"> <smallfont> Members: $numbermembers<br> Threads: $totalthreads<br> Posts: $totalposts<br> Total Posts Today: $poststoday<br> Newest Member: <a href="member.php?s=$session[sessionhash]&action=getinfo&userid=$newuserid">$newusername</a><br> Member of The Day: <a href="member.php?s=$session[sessionhash]&action=getinfo&userid=$memberoftheday[userid]">$memberoftheday[username]</a><br> Top Poster: <a href="member.php?&action=getinfo&userid=$topposters[userid]\">$topposters[username]</a>($topposters[posts])<br> Top Thread Starter: <a href="member.php?&action=getinfo&userid=$toptstarter[postuserid]">$toptstarter[postusername]</a>($toptstarter[count]) </smallfont> </td> <td bgcolor="{secondaltcolor}" align="center" valign="middle" width="400">$logincode <br> <smallfont> <div align="center"><a href="/vbb/admin/">Administrator Control Panel</a> | <a href="/vbb/mod/">Moderater Control Panal</a></div> </smallfont> </td> </tr> <tr> <tr id="cat"> <td id="ForumNews" bgcolor="{categorybackcolor}" colspan="7"><normalfont color="{categoryfontcolor}"><b>Forum News</normalfont></b></a></td> </tr> <tr> <td bgcolor="{secondaltcolor}" align="center" valign="middle" width="80"><img src="{imagesfolder}/news.gif" alt=""></td> <td bgcolor="{firstaltcolor}" colspan="6"><smallfont><!--#include file="Http://forums.cheatlist.com/vbb/PluhHeadlines.php"--></smallfont></td> </tr> $pminfo </table> </td> </tr> </table> <!-- /welcomepanel --> |
#404
|
||||
|
||||
with the header include in my index.php i get:
Parse error: parse error in /home/forumc/www/vbb/index.php on line 53 |
#405
|
||||
|
||||
here is the index.php i'm geting that error on. If you can fix this and re-post the fix i will love you long time
Code:
<?php error_reporting(7); $templatesused='forumhome_birthdaybit,error_nopermission,forumhome_pmloggedin,forumhome_welcometext,forumhome_logoutcode,forumhome_newposts,forumhome_todayposts,forumhome_logincode,forumhome_loggedinuser,forumhome_loggedinusers,forumhome_lastpostby,forumhome_moderator,forumhome_forumbit_level1_nopost,forumhome_forumbit_level1_post,forumhome_forumbit_level2_nopost,forumhome_forumbit_level2_post,forumhome,forumhome_unregmessage'; $loadbirthdays=1; $loadmaxusers=1; require('./global.php'); $permissions=getpermissions(); if (!$permissions['canview']) { show_nopermission(); } // start member of the day stuff $thisdate=date('Y-m-d'); $getdaytemplate=$DB_site->query_first("SELECT template FROM template WHERE title='memberoftheday' AND templatesetid=-2"); $daytemplate=$getdaytemplate['template']; $daybits=explode('||vb||',$daytemplate); if ($daybits[0]!=$thisdate or ($resetmember==1 and $bbuserinfo['usergroupid']==6)) { /* This template is either outdated or the admin wants to reset it. Either way, we need to choose a new member of the day. Aren't you excited?! */ $newmember=$DB_site->query_first("SELECT userid,username FROM user WHERE userid<>$daybits[1] AND (usergroupid=5 OR usergroupid=6 OR usergroupid=7 OR usergroupid=2) ORDER BY RAND() LIMIT 1"); $newtemplate=$thisdate.'||vb||'.$newmember['userid'].'||vb||'.$newmember['username']; $DB_site->query("UPDATE template SET template='".addslashes($newtemplate)."' WHERE templatesetid=-2 AND title='memberoftheday'"); $memberoftheday['userid']=$newmember['userid']; $memberoftheday['username']=$newmember['username']; } else { $memberoftheday['userid']=$daybits[1]; $memberoftheday['username']=$daybits[2]; } // end of member of the day stuff if ($bbuserinfo[userid]!=0) { $avatarurl=getavatarurl($bbuserinfo[userid]); if ($avatarurl=='') { $avatarurl='images/avatars/noavatar.gif'; } $avatarimage='<a href="member.php?s='.$session[sessionhash].'&action=editavatar"><img src="'.$avatarurl.'" border="0">'; } else { $avatarimage='<a href="register.php?s='.$session[sessionhash].'&action=signup"><img src="images/avatars/guestavatar.gif" border="0"></a>'; } <? include ("/vbb/pluhheadlines.php"); ?> //check usergroup of user to see if they can use PMs //$permissions=getpermissions($forumid); if ($enablepms==1 and $permissions['canusepm'] and $bbuserinfo['receivepm']) { $ignoreusers=""; if (trim($bbuserinfo['ignorelist'])!="") { $ignoreusers='AND fromuserid<>'.implode(' AND fromuserid<>',explode(' ', trim($bbuserinfo['ignorelist']))); } $allpm=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] $ignoreusers"); $newpm=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] AND dateline>$bbuserinfo[lastvisit] AND folderid=0 $ignoreusers"); $unreadpm=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] AND messageread=0 AND folderid=0 $ignoreusers"); if ($newpm['messages']==0) { $lightbulb='off'; } else { $lightbulb='on'; } if ($unreadpm['messages']==0) { $pmblink='//'; } else { $pmblink=''; } eval("\$pminfo = \"".gettemplate('forumhome_pmloggedin')."\";"); } else { $pminfo=''; } $numbersmembers=$DB_site->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM user'); $numbermembers=number_format($numbersmembers['users']); // Top poster $topposters=$DB_site->query_first("SELECT username,posts,userid FROM user ORDER BY posts desc LIMIT 1"); // Top Threads starter $toptstarter=$DB_site->query_first("SELECT COUNT(*) AS count,postuserid,postusername FROM thread GROUP BY postuserid ORDER BY count DESC LIMIT 1"); // get total posts $countposts=$DB_site->query_first('SELECT COUNT(*) AS posts FROM post'); $totalposts=number_format($countposts['posts']); $countthreads=$DB_site->query_first('SELECT COUNT(*) AS threads FROM thread'); $totalthreads=number_format($countthreads['threads']); // number of posts today $datecut = mktime(0,0,0,date("m"), date("d"), date("y")); $getpoststoday=$DB_site->query_first("SELECT count(*) AS count FROM post WHERE dateline>='$datecut'"); $poststoday=$getpoststoday[count]; // get newest member $getnewestusers=$DB_site->query_first("SELECT userid,username FROM user WHERE userid=$numbersmembers[max]"); $newusername=$getnewestusers['username']; $newuserid=$getnewestusers['userid']; // if user is know, then welcome $getnewthread=$DB_site->query_first("SELECT COUNT(*) AS threads FROM thread WHERE lastpost > '$bbuserinfo[lastvisit]'"); $getnewpost=$DB_site->query_first("SELECT count(*) AS posts FROM post WHERE dateline > '$bbuserinfo[lastvisit]'"); if ($bbuserinfo['userid']!=0) { $username=$bbuserinfo['username']; eval("\$welcometext = \"".gettemplate('forumhome_welcometext')."\";"); eval("\$logincode = \"".gettemplate('forumhome_logoutcode')."\";"); eval("\$newposts = \"".gettemplate('forumhome_newposts')."\";"); } else { $welcometext = ""; eval("\$newposts = \"".gettemplate('forumhome_todayposts')."\";"); eval("\$logincode = \"".gettemplate('forumhome_logincode')."\";"); } $birthdaybits=""; if ($showbirthdays) { $birthdays = gettemplate('birthdays',0,0); $btoday = explode('|||',$birthdays); $today = vbdate("Y-m-d",time()); if ($today != $btoday[0] and $today != $btoday[1]) { // Need to update! getbirthdays(); $birthdays = $DB_site->query_first("SELECT template FROM template WHERE title='birthdays' and templatesetid = -2"); $birthdays = $birthdays[template]; $btoday = explode('|||',$birthdays); } if ($today == $btoday[0]) { $birthdays = $btoday[2]; } elseif ($today == $btoday[1]) { $birthdays = $btoday[3]; } if ($birthdays) { eval("\$birthdaybits = \"".gettemplate("forumhome_birthdaybit")."\";"); } } //Forum info $forums=$DB_site->query('SELECT * FROM forum WHERE displayorder<>0 AND active=1 ORDER BY parentid,displayorder'); while ($forum=$DB_site->fetch_array($forums)) { $iforumcache["$forum[parentid]"]["$forum[displayorder]"]["$forum[forumid]"] = $forum; } $DB_site->free_result($forums); unset($forum); //Forum perms $forumperms=$DB_site->query("SELECT forumid,canview,canpostnew FROM forumpermission WHERE usergroupid='$bbuserinfo[usergroupid]'"); while ($forumperm=$DB_site->fetch_array($forumperms)) { $ipermcache["$forumperm[forumid]"] = $forumperm; } $DB_site->free_result($forumperms); unset($forumperm); if ($bbuserinfo['userid']!=0 AND $enableaccess) { //Access table perms $accessperms=$DB_site->query("SELECT forumid,accessmask FROM access WHERE userid='$bbuserinfo[userid]'"); while ($accessperm=$DB_site->fetch_array($accessperms)) { $accesscache["$accessperm[forumid]"] = $accessperm; } $DB_site->free_result($accessperms); unset($accessperm); // usergroup defaults $usergroupdef['canview'] = $permissions['canview']; $usergroupdef['canpostnew'] = $permissions['canpostnew']; // array for accessmask=0 $noperms['canview'] = 0; $noperms['canpostnew'] = 0; } else { $accesscache = ''; } $forummoderators=$DB_site->query('SELECT user.userid,user.username,moderator.forumid FROM moderator LEFT JOIN user ON (moderator.userid=user.userid) ORDER BY user.username'); while ($moderator=$DB_site->fetch_array($forummoderators)) { $imodcache["$moderator[forumid]"][] = $moderator; $mod["$moderator[userid]"] = 1; } $DB_site->free_result($forummoderators); unset($moderator); $activeusers = ""; $loggedinusers = ""; if ($displayloggedin) { $datecut=time()-$cookietimeout; $loggedins=$DB_site->query_first("SELECT COUNT(*) AS sessions FROM session WHERE userid=0 AND lastactivity>$datecut"); $numberguest=$loggedins['sessions']; $numbervisible=0; $numberregistered=0; $loggedins=$DB_site->query("SELECT DISTINCT session.userid,username,invisible,usergroupid FROM session LEFT JOIN user ON (user.userid=session.userid) WHERE session.userid>0 AND session.lastactivity>$datecut ORDER BY invisible ASC, username ASC"); if ($loggedin=$DB_site->fetch_array($loggedins)) { $numberregistered++; if ($loggedin['invisible']==0 or $bbuserinfo['usergroupid']==6) { $numbervisible++; $userid = $loggedin['userid']; if ($loggedin['invisible'] == 1) { // Invisible User but show to Admin $invisibleuser = '*'; } else { $invisibleuser = ''; } if ($loggedin['usergroupid'] == 6 and $highlightadmin) { $username = "<b><i>$loggedin[username]</i></b>"; } else if (($mod["$userid"] or $loggedin['usergroupid'] == 5) and $highlightadmin) { $username = "<b>$loggedin[username]</b>"; } else { $username = $loggedin['username']; } eval("\$activeusers = \"".gettemplate('forumhome_loggedinuser')."\";"); } while ($loggedin=$DB_site->fetch_array($loggedins)) { $numberregistered++; $invisibleuser = ''; if ($loggedin['invisible']==1 and $bbuserinfo['usergroupid']!=6) { continue; } $numbervisible++; $userid=$loggedin['userid']; if ($loggedin['invisible'] == 1) { // Invisible User but show to Admin $invisibleuser = '*'; } if ($loggedin['usergroupid'] == 6 and $highlightadmin) { $username = "<b><i>$loggedin[username]</i></b>"; } else if (($mod["$userid"] or $loggedin['usergroupid'] == 5) and $highlightadmin) { $username = "<b>$loggedin[username]</b>"; } else { $username = $loggedin['username']; } eval("\$activeusers .= \", ".gettemplate('forumhome_loggedinuser')."\";"); } } $DB_site->free_result($loggedins); $totalonline=$numberregistered+$numberguest; $numberinvisible=$numberregistered-$numbervisible; $maxusers=explode(" ", gettemplate('maxloggedin',0,0)); if ((int)$maxusers[0] <= $totalonline) { $time = time(); $maxloggedin = "$totalonline " . $time; $DB_site->query("UPDATE template SET template='$maxloggedin' WHERE title='maxloggedin'"); $maxusers[0] = $totalonline; $maxusers[1] = $time; } $recordusers = $maxusers[0]; $recorddate = vbdate($dateformat,$maxusers[1]); $recordtime = vbdate($timeformat,$maxusers[1]); eval("\$loggedinusers = \"".gettemplate('forumhome_loggedinusers')."\";"); } // Start makeforumbit function makeforumbit($forumid,$depth=1,$permissions='') { global $DB_site,$bbuserinfo,$iforumcache,$ipermcache,$imodcache,$session,$accesscache,$usergroupdef,$noperms; global $showlocks,$hideprivateforums,$showforumdescription,$forumhomedepth,$dateformat,$timeformat,$enableaccess; global $bbforumview; if ( !isset($iforumcache["$forumid"]) ) { return; } $forumbits = ''; while ( list($key1,$val1)=each($iforumcache["$forumid"]) ) { while ( list($key2,$forum)=each($val1) ) { // Permissions if ( $enableaccess and is_array($accesscache["$forum[forumid]"]) ) { if ($accesscache["$forum[forumid]"]['accessmask']==1) { $forumperms = $usergroupdef; } else { $forumperms = $noperms; } } else if ( is_array($ipermcache["$forum[forumid]"]) ) { $forumperms = $ipermcache["$forum[forumid]"]; } else { $forumperms = $permissions; } if (!$hideprivateforums) { $forumperms['canview']=1; } if (!$forumperms['canview']) { continue; } else { $forumshown=1; // do light bulb if ($bbuserinfo['lastvisitdate']=='Never') { $forum['onoff']='on'; } else { if (isset($bbforumview[$forum['forumid']]) and $bbforumview[$forum['forumid']]>$bbuserinfo['lastvisit']) { $userlastvisit=$bbforumview[$forum['forumid']]; } else { $userlastvisit=$bbuserinfo['lastvisit']; } if ($userlastvisit<$forum['lastpost']) { $forum['onoff']='on'; } else { $forum['onoff']='off'; } } if ((!$forumperms['canpostnew'] and $showlocks) or $forum['allowposting']==0) { $forum['onoff'].='lock'; } // prepare template vars if (!$showforumdescription) { $forum['description']=''; } // dates if ($forum['lastpost']>0) { $forum['lastpostdate']=vbdate($dateformat,$forum['lastpost']); $forum['lastposttime']=vbdate($timeformat,$forum['lastpost']); eval("\$forum['lastpostinfo'] = \"".gettemplate('forumhome_lastpostby')."\";"); } else { $forum['lastpostinfo']='Never'; } $listexploded=explode(",", $forum['parentlist']); while ( list($mkey1,$mval1)=each($listexploded) ) { if ( !isset($imodcache["$mval1"]) ) { continue; } reset($imodcache["$mval1"]); while ( list($mkey2,$moderator)=each($imodcache["$mval1"]) ) { if ( !isset($forum['moderators']) ) { eval("\$forum['moderators'] = \"".gettemplate('forumhome_moderator')."\";"); } else { eval("\$forum['moderators'] .= \", ".gettemplate('forumhome_moderator')."\";"); } } } if ( !isset($forum['moderators']) ) { $forum['moderators'] = ' '; } if ($forum['cancontainthreads']==1) { $tempext = '_post'; } else { $tempext = '_nopost'; } eval("\$forumbits .= \"".gettemplate("forumhome_forumbit_level$depth$tempext")."\";"); if ($depth<$forumhomedepth) { $forumbits.=makeforumbit($forum['forumid'],$depth+1,$forumperms); } } // END if can view } // END while ( list($key2,$forum)=each($val1) ) { } // END while ( list($key1,$val1)=each($iforumcache["$forumid"]) ) { unset($iforumcache["$forumid"]); return $forumbits; } if (!isset($forumid) or $forumid==0 or $forumid=='') { $forumid=-1; } else { // need to get permissions for this specific forum $permissions=getpermissions(intval($forumid)); } $forumbits=makeforumbit(intval($forumid), 1, $permissions); $unregwelcomemessage=''; if ($bbuserinfo['userid']==0) { eval("\$unregwelcomemessage = \"".gettemplate('forumhome_unregmessage')."\";"); }eval("dooutput(\"".gettemplate('forumhome')."\");"); |
#406
|
||||
|
||||
Can somebody tell me how I get this hack to work across domain urls?
The page that has the content that I want on another domain is here: http://www.theforumz.com/forumz/frontpage.php I was hoping to get all those headlines capable of being on another site. Is that possible, and if so, how? Thanks for any help you can provide. :cry: |
#407
|
||||
|
||||
I think you just have to use the include on the regulare page.
|
#408
|
||||
|
||||
I'd really, really like to have the thread icon and avatar appear for each post. If someone could figure out how to do it, I'd be forever in your debt.
|
#409
|
||||
|
||||
should be able to do that in the templates.
|
#410
|
||||
|
||||
think somne can awnser my question above?
|
#411
|
||||
|
||||
When I try to install it I get an error on line 50 which is...
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|