vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   PluhNews 1.5 (https://vborg.vbsupport.ru/showthread.php?t=21875)

Ian Cunningham 03-25-2002 07:04 PM

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?

DemiNeo0101 03-25-2002 09:17 PM

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 -->

If one of you guys could help me out that would be great. Thx.

DemiNeo0101 03-25-2002 09:57 PM

with the header include in my index.php i get:
Parse error: parse error in /home/forumc/www/vbb/index.php on line 53

DemiNeo0101 03-25-2002 09:58 PM

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'] = '&nbsp;';
        }
        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')."\");");


Gutspiller 03-26-2002 03:17 AM

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:

DemiNeo0101 03-27-2002 07:28 PM

I think you just have to use the include on the regulare page.

Brian Cruz 03-27-2002 11:38 PM

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.

DemiNeo0101 03-28-2002 09:18 PM

should be able to do that in the templates.

DemiNeo0101 03-28-2002 09:19 PM

think somne can awnser my question above?

Vivi Ornitier 03-29-2002 04:09 AM

When I try to install it I get an error on line 50 which is...
PHP Code:

$linkcode "$forumspath/showthread.php?threadid=".$threadid"; 


keely 04-11-2002 02:07 AM

Ok First Let me say I'm a newbie so please be gentle. Ok that being said I have the info coming into my PluhHeadlines.php & PluhNews.php files fine. I want to have this information come up in a table 1 cell for the headline and the next cell with the 1st post to come up with who posted and to read more, reply to article. I have seen this done just not sure where to put it in my HTML and how do i create the SSI or the connection to the database. Any help would be greatly aprceiated.
thanks in advance
Keely

www.ding60.com

PS also running front pages and not sure there is a way to do do...i warned you i'm a newbie :)

Lanigironu 04-11-2002 02:50 AM

Quote:

Originally posted by Vivi Ornitier
When I try to install it I get an error on line 50 which is...
PHP Code:

$linkcode "$forumspath/showthread.php?threadid=".$threadid"; 


Did you specify the path correctly?

GuruXL 04-11-2002 04:37 PM

Code:

Fatal error: Failed opening required './global.php' (include_path='.:') in /path/to/forums/PluhNews.php on line 5
that's the error i get when i try to include PluhNews.php on the front index page which is located at the root directory. i've seen some post about this problem too but i don't quite get the solution, or if there was a solution posted at all -_-. I can sure use some help here thanks.

note* i edited the path in the code, but it points to the right place. privacy ^^.

GuruXL 04-11-2002 07:47 PM

Can someone help me? i really want to use this script and i have no idea what went wrong.

TECK 04-11-2002 08:16 PM

can you post those lines (1 through 10)? i will tell you what is wrong.

GuruXL 04-11-2002 09:16 PM

Code:

<?php
//PluhNews 1.5 released under GNU GPL Licence version 2.0 (see copying.txt file for more info)
//Set your permissions in your control panel to make sure that only YOU and who you specify can post news. Otherwise, everyone and their dog can register and post in your news forums, thus posting where your news will appear. But for this script to work it's extra magic, be sure your members can reply to your news posts.


require('./global.php');
require("./PluhConfig.php");
require("./admin/config.php");

//scroll down to edit the HTML for the news
//**********************

//Start the goodies (please do not edit to goodies unless you know what you are doing

//include the header
include("./PluhHeader.txt");

well that's the first few lines of PluhNews.php, what i want to do is include the news in one of my main pages in the root directory. but the global keeps getting in the way :(

GuruXL 04-11-2002 09:21 PM

i don't know what i did now, but it works if i directly go to PluhNews.php, however, if i try to include PluhNews.php from the root directory (where my main files are), i don't get an error, but a blank page...

GuruXL 04-12-2002 11:34 PM

I fixed the errors hehe :)

but now, for the character limit addon. how do i make it so that the "read more" only show up if it exceeds the character limit?

Lethal 04-22-2002 08:34 AM

Ok , I have installed it and everything went ok. It works fine but I can not get it to come up on my index page in my home directory when I try to include it. My index is index.php It works fine when i use SSI but not with php include. Also, I am using vBHome and just adding the html to the template. I have tried so many things but nothing is working. Here is the code from where the include is:

Code:

<center>
      <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="90%">
        <tr>
          <td width="100%" align="center"><!-- PluhNews Begin -->
<?php include("/forums/PluhNews.php"); ?><!-- PluhNews Ends -->
</td>
        </tr>
      </table>
      </center>


That html is in my vBHome (home) template. I even tried having my home page in the same directory as PluhNews and still nothing. I don't know what is wrong. Someone help.

The link to my Pluhnews page: http://theinfected.com/forums/PluhNews.php

The link to where I want my news to be:
http://www.theinfected.com/index.php (in the center of the page.)

I have tried all of these includes but nothing happens with either of them. The SSI include works thou but I don't want to use .shtml



PHP Code:

<? include("http://theinfected.com/forums/PluhNews.php"); ?>

PHP Code:

<? include("/forums/PluhNews.php"); ?>

PHP Code:

<?php include("http://theinfected.com/forums/PluhNews.php"); ?>

PHP Code:

<?php include("/forums/PluhNews.php"); ?>

Here is the code in my PluhNews.php file where the html starts:

Code:

//<!- PluhHeader -->
$bericht=bbcodeparse2($pagetext,"1","1","1","1");
echo "

<style fprolloverstyle>A:hover {color: #00cc00; font-family: Verdana; size=\"2\"; text-decoration: blink}
</style>
<body style=\"font-family: Verdana; size=\" link=\"#FFFFFF\" vlink=\"#FFFFFF\" alink=\"#FFFFFF\" text=\"#999999\" bgcolor=\"#000000\">

&nbsp;<div align=\"center\">
  <center>
  <table border=\"1\" cellspacing=\"1\" width=\"472\" cellpadding=\"2\" bordercolorlight=\"#000000\" bordercolordark=\"#000000\">
    <tr>
      <td width=\"457\" bordercolor=\"#333333\" bgcolor=\"#000000\" background=\"http://www.theinfected.com/images/header4.jpg\"><font face=\"Verdana\" size=\"2\"><b><font face=\"Terminal\" size=\"1\" color=\"#00CC00\">-&gt;</font><font size=\"2\">
<a href=\"$forumspath/showthread.php?s=&threadid=$threadid\">$title</a></font>
<font face=\"Terminal\" size=\"1\" color=\"#00CC00\">&lt;-</font></b></font></td>
    </tr>
    <tr>
      <td width=\"457\" bordercolor=\"#333333\" bgcolor=\"#1E1E1E\">
      <font face=\"Verdana\" size=\"2\">
      <p style=\"margin-top: 0; margin-bottom: 0\"><font face=\"Verdana\" size=\"1\">
      Posted By </font>
      <a href=\"$forumspath/member.php?s=&action=getinfo&userid=$postuserid\"><b><font size=\"1\">$postusername</font></b></a>
      at <i>$dateposted</i></font></p>
      <p style=\"margin-top: 0; margin-bottom: 0\">&nbsp;</p>
      <p style=\"margin-top: 0; margin-bottom: 0\"><font size=\"2\">$bericht</font></p>
      </font>
      <p align=\"center\">
      <font face=\"Verdana\" size=\"2\">
      <a href=\"$forumspath/showthread.php?s=&threadid=$threadid\"><b>$replycount</b>$commenttext</a> Last comment
      was by <b>$lastposter</b></font></p>
      </td>
    </tr>
  </table>
  </center>
</div>
<p style=\"margin-top: 0; margin-bottom: 0\">&nbsp;</p>

</body>
";

}
}

//add news search stuff (this is optional - delete if you do not wish to include this, or edit it to meet your needs
echo "<center><a href=\"$forumspath/search.php?s=\">Search the News</a> | <a href=\"$forumspath/forumdisplay.php?s=&forumid=$newsforums\">View All News Posts</a></center>";

//end HTML edit
//**********************

//include the footer
include("./PluhFooter.txt");


Lethal 04-22-2002 07:53 PM

Anyone?

Lethal 04-23-2002 02:17 AM

Hello???????

Hamma 04-23-2002 01:56 PM

Try and use your full path for the include. ie:

PHP Code:

<? include("/home/username/www/forums/PluhNews.php"); ?>

This is what I use on my website, I addapted it to work on multiple subdomains and multple forums.. etc.

http://www.dragonwolves.com

Lethal 04-24-2002 06:13 AM

well i got this to work, this is what i put in my index.php page:

PHP Code:

<?php include ("site url/forum/Pluhnews.php"); ?>


even thou my page is php I still had to put in the <?php why i dont' know cause I have that at the top as well. Don't know but this works. I swear I tried this before and it didn't work. Oh well.

AndyTSJ 05-06-2002 08:26 PM

There must be some way of doing this, and I know it's been discussed before but I'm not sure if a solution was found. Is there a way of using pluhnews to display posts from more than on forum ?? If someone can figure out how to do this then that would be VERY cool :)

Gutspiller 05-07-2002 06:30 PM

Quote:

Originally posted by AndyTSJ
There must be some way of doing this, and I know it's been discussed before but I'm not sure if a solution was found. Is there a way of using pluhnews to display posts from more than on forum ?? If someone can figure out how to do this then that would be VERY cool :)
Search this thread around page 20 or 25 and look for my name and somebody else (can't remember who) I was talking with, we figured out the problem.

Want to see an example? http://www.3dNewz.com

wintz 05-14-2002 04:54 PM

Quote:

Originally posted by Courage
When I acces the online userlist i see something like:
Unknown Location:...
Those ppl are seyng the newsboard..

I want to know what modifications i need to make in online.php

10x

Yeah i have the same thing, anyone know how to fix this? thanks

wintz 05-15-2002 09:12 AM

ok i`ve posted a pic of what it is doing, any ideas on how to fix/stop this? thanks

Dark_Wizard 05-15-2002 09:53 AM

Quote:

Originally posted by wintz
ok i`ve posted a pic of what it is doing, any ideas on how to fix/stop this? thanks
Add this hack by FireFly....

wintz 05-15-2002 10:30 AM

Your a star m8, thanks for the link it works a treat :)

Gutspiller 05-15-2002 07:31 PM

I have that hack installed and I still sometimes get that error location. Don't expect that hack to fix the problem completely. :(

Gutspiller 05-15-2002 07:31 PM

I have that hack installed and I still sometimes get that error location. Don't expect that hack to fix the problem completely. :(

Mithan 05-24-2002 02:00 AM

This is a great news program, but I would like to know if there is a way for me to display 5 news headlines instead of the same number of News items it shows in the news?

Currently I have 10 news items to be shown, but I only want 5 headlines in that area. How can I edit this?

My site is at www.ac2hq.com

Thank you.

Seby 05-29-2002 08:36 AM

Hi,

I really like this hack/addon, but I have a request for a new feature. I use coranto (new version of newspro) right now and it has an option to display a dividing table after a new day starts. You can see that at www.cscentral.com Here is how it looks in the code:

PHP Code:

<If: SubisNewDate>
<
TABLE WIDTH=100BORDER=0 CELLPADDING=0 CELLSPACING=0>
  <
TR
    <
TD ROWSPAN=3 width="206"> <IMG SRC="http://cscentral.barrysworld.com/images/devider_01.gif" WIDTH=206 HEIGHT=48></TD>
    <
TD background="http://cscentral.barrysworld.com/images/devider_02.gif"> <IMG SRC="http://cscentral.barrysworld.com/images/devider_02.gif" WIDTH=10 HEIGHT=21 align="right"
    </
TD>
    <
TD ROWSPAN=3 width="44"> <IMG SRC="http://cscentral.barrysworld.com/images/devider_04.gif" WIDTH=44 HEIGHT=48></TD>
  </
TR>
  <
TR
    <
TD background="http://cscentral.barrysworld.com/images/devider_05.gif" height="25"
      <
div align="right"><font color="A7A7A5" size="4"><b><FieldDay> <FieldMonth_Name> <FieldYear>&nbsp;&nbsp;&nbsp;&nbsp;</b></font></div>
    </
TD>
  </
TR>
  <
TR
    <
TD HEIGHT=2 background="http://cscentral.barrysworld.com/images/devider_07.gif"> <IMG SRC="http://cscentral.barrysworld.com/images/devider_07.gif" WIDTH=10 HEIGHT=2></TD>
  </
TR>
</
TABLE>
</If> 

edit: I have thought of another feature, maybe edit the format of the news date, e.g. just the date and time instead of the day, since when you have a daily devider table you dont need the date to be displayed.

Would it be possible to implement this in pluhnews?

Thanks,
Sebastian

Seby 05-29-2002 09:16 AM

Quote:

Originally posted by Mithan
This is a great news program, but I would like to know if there is a way for me to display 5 news headlines instead of the same number of News items it shows in the news?

Currently I have 10 news items to be shown, but I only want 5 headlines in that area. How can I edit this?

My site is at www.ac2hq.com

Thank you.

Find this line in PluhHeadlins.php

PHP Code:

// create sql statement
$sql "SELECT threadid, title, forumid, replycount, postusername, postuserid, lastposter, dateline, iconid FROM thread WHERE forumid = \"$newsforums\" ORDER BY threadid DESC LIMIT $newsitems"

replace $newsitems with the number of headlines you want to have displayed.

Hope this helps,
Sebastian

filburt1 06-25-2002 12:17 PM

So has anybody figured out how to add avatars to the news events? I know others wanted this feature too.

Mithan 06-25-2002 09:50 PM

Just a FYI:

I have version 1.0 installed on my site and it works great.

http://www.ac2hq.com

We had to put in some extra code to suppress an error message, but other than that, its great.

PS: Whats so good about 1.5?

dogbomb 06-29-2002 02:27 PM

There seems to be a strange bug in this. Whe you are pulling an article from the selected forum, it runs fine. However, when you COPY an old article (one no longer on the main PluhNews page) from that forum to another this start to get a bit kooky.

The article reshows back on the page, but not the original article but a reply firther down.

Anyone else encountered this problem?

TooHectic 07-13-2002 10:36 PM

Quote:

Originally posted by GuruXL
i don't know what i did now, but it works if i directly go to PluhNews.php, however, if i try to include PluhNews.php from the root directory (where my main files are), i don't get an error, but a blank page...
Quote:

I fixed the errors hehe
How did you fix this problem?

I'm having the same problem with my site. I can open http://my site/forums/pluhnews.php just fine, and it works as intended, but if I try to include pluhnews.php inside my http://my site/index.php, I just get a blank page.

Like everyone else, I know the error comes from global.php. Even if I add the full path to global.php in the pluhnews.php file, it still produces a blank page since inside global.php other requires are called. And since those other requires don't have a full path defined, the script cannot find them. (since all requires are called like "./global.php" and "./functions.php".... and since I'm requiring the file from the root directory, it's looking for functions.php, global.php, etc in the root rather than in /forums.)

How did you remedy this problem? Is there a command that will force require statements to look in the same directory as the required file versus the directory the initial call is made from?

Any help is appreciated! Thanks.

TooHectic 07-14-2002 06:49 AM

ok, i fixed it. I just added added some chdir stuff to the beginning of pluhnews.php where the requires are called:

Code:

chdir("./forums");
require("./global.php");
require("./PluhConfig.php");
require("./admin/config.php");
chdir("..");

I'm not sure if that's the best way, but it works.... but then I started getting that weird "Cannot add header information" error. But luckily I found the answer a few pages back. I just moved the requires including the chdir statements out of the PluhNew.php file and put them above the <html> tag in my /index.php file. Seems to work.

If anyone knows of a better solution. Feel free to point it out. Optimization is good.

Lethal 07-14-2002 04:51 PM

is there anyway to have pluhnews inherit vbulletin styles or code like <smallfont> and {categoryfont } ect. ect.

That would be great. I want to put my news in tables but I am going to have different styles and I want the news to inherit the different style colors when a user changes styles. Is this possible. I tried to do it but I kept getting errors and it just wouldn't work with the echo" being in the script.

Well what I want to do is, i have vbportal and the front page I am using the news from that, and then I am going to have different sections of within the site and each section is going to have a news forum. I need a script that will post the news from the specific forum on the sections front page. Pluhnews is great but I want something that will use vbulletins styles like vbportal does. I asked about this over at phpportals.com and I they didn't give me an answer. Any ideas?


All times are GMT. The time now is 01:36 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02251 seconds
  • Memory Usage 1,981KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_code_printable
  • (10)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete