The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Details »» | |||||||||||||||||||||||||
THIS THREAD IS CLOSED!
Posts in here will NOT be answered This hack has undergone many major changes since this thread was started. Consequently, most of the posts have become dated and of little use. To coincide with the latest major release (20010712), a new one has been started. See this thread for the latest version and discussion Show Your Support
|
Comments |
#622
|
|||
|
|||
Just downloaded and activated basic setup. Exactly what I need.
HOWEVER... I get a parse error on usenet.php on line 378 also Warning: GLOBAL variable declaration meaningless in main() scope in /xx/xx/xx/admin/usenet.php on line 353 trying to do the administration ?? are these known errors. Or probably, have I missed something. Could it have something to do with needing to insert xtra \\s in some SQL inserts? Does the newnews.pl need to run first? before I do admin. |
#623
|
||||
|
||||
I am installing some of the options with this hack. I have installed 3 or 4 of them. 2 questions; First
I installed the stat's hack in stats.php, but when I go to the admin control panel and view stat's it does not show usenet stat's I then looked in drop down menu and there was not a selection to choose them. I also installed the hack that separtes the board post from the usenet post. Would this have something to do with them not showing up on the stat's page or to do I have to place a command in one of templates for this? Second Question. I want to add the last active thread option, Before I do I would like someone to look at code below and make sure I'm putting it in the right place. Area's I am going to place are in bold and state before this to the side. 8) Populating of last active thread in the forum table. This can then be referenced in templates by using $forum[lastactivethread]. a) admin/functions.php - line 1022 if ($newwords) { $newwords=trim($newwords); $insertwords="(NULL,'".str_replace(" ","'),(NULL,'",addslashes($newwords))."')"; $DB_site->query("INSERT IGNORE INTO word (wordid,title) VALUES $insertwords"); $selectwords="title IN('".str_replace(" ","','",addslashes($newwords))."')"; $DB_site->query("INSERT IGNORE INTO searchindex (wordid,postid) SELECT DISTINCT wordid,$postid FROM word WHERE $selectwords"); } ===before this==== if ($newtitlewords) { $newtitlewords=trim($newtitlewords); $insertwords="(NULL,'".str_replace(" ","'),(NULL,'",addslashes($newtitlewords))."') "; $DB_site->query("INSERT IGNORE INTO word (wordid,title) VALUES $insertwords"); $selectwords="title IN('".str_replace(" ","','",addslashes($newtitlewords))."')"; $DB_site->query("REPLACE INTO searchindex (wordid,postid,intitle) SELECT DISTINCT wordid,$postid,1 FROM word WHERE $selectwords"); } }===before this=== // ###################### Start makeforumjump ####################### b) admin/functions.php - line 1577 $DB_site->query("DELETE FROM thread WHERE threadid='$threadid'"); $DB_site->query("DELETE FROM thread WHERE open=10 AND pollid='$threadid'"); // delete redirects $DB_site->query("DELETE FROM threadrate WHERE threadid='$threadid'"); $DB_site->query("DELETE FROM subscribethread WHERE threadid='$threadid'"); } }===before this==== // ###################### Start delete post ####################### c) admin/functions.php - line 1599 $DB_site->query("DELETE FROM searchindex WHERE postid=$postid"); $DB_site->query("DELETE FROM post WHERE postid='$postid'"); } }===before this=== // ###################### Start make login code ####################### d) admin/functions.php - New function at end of file. //searches expire after a week: $DB_site->query("DELETE FROM search WHERE dateline<".(time()-(7*24*60*60))); } // bye bye! }===before this==== ?> This is where I put the hack in stats.php $from = mktime(12,0,0,$frommonth,$fromday,$fromyear); //START USENET HACK if (($type == "post" || $type == "thread") && $showusenetpostsinstats==0) { $stats = $DB_site->query("SELECT COUNT(*), DATE_FORMAT(FROM_UNIXTIME($field),'$sqlformat') AS timeframe, MAX($field) FROM $table WHERE $field > '$from' AND $field < '$to' AND isusenetpost=0 GROUP BY timeframe ORDER BY $field $sort"); } else { $stats = $DB_site->query("SELECT COUNT(*), DATE_FORMAT(FROM_UNIXTIME($field),'$sqlformat') AS timeframe, MAX($field) FROM $table WHERE $field > '$from' AND $field < '$to' GROUP BY timeframe ORDER BY $field $sort"); } //END USENET HACK unset($totals); unset($dates); unset($sum); while ($stat = $DB_site->fetch_array($stats)) { $totals[] = $stat[0]; if ($stat[0]>$max) { $max=$stat[0]; |
#624
|
|||
|
|||
Houston, we have a problem...
Just moved my forums to new server, installed perl 5.6, MySQL 3.23.38, all modules required, installed usenet hack and... - VBB shows thread titles but no posts inside them. - All usenet posts retrieved from the server in database have threadid=0 Here's what I did so far: Manualy compiled all the modules once again with versions as posted in this thread Once again installed Bundle::CPAN and all the required modules matching CPAN version. Still the same - all posts are inserted to database with threadid=0 and don't appear under threads in VBB... |
#625
|
|||||
|
|||||
Quote:
Quote:
Quote:
Quote:
It is a NEW function. Add it after the brace but before the php close Quote:
|
#626
|
|||
|
|||
Quote:
|
#627
|
||||
|
||||
fastforward:
ok I got all the code in place for the lastactivethread and I placed on the following location in the forumdisplaybit template but it still not showup on the opening page in my forums. Can you direct me on where I am going wrong below is the script. I have tried $forum, $forum2, and $thread in front of [lastactivethread] but none work. <tr align="center"> <td bgcolor="#DFDFDF"><img src="images/$thread[newoldhot].gif" border="0" alt=""></td> <td bgcolor="#DFDFDF">$thread[icon]</td> <td bgcolor="#F1F1F1" align="left" width="100%"><normalfont>$thread[gotonew] $paperclip$thread[movedprefix]$thread[typeprefix]<a href="showthread.php?s=$session[sessionhash]&threadid=$thread[threadid]">$thread[title]</a></normalfont> <smallfont>$thread[pagenav]</smallfont></td> <td align="right"bgcolor="#DFDFDF" nowrap><smallfont> $forum[lastactivethread] $thread[firstpostdate] $thread[firstposttime]<br>by <b>$thread[postedby]</b></smallfont></td> <td bgcolor="#F1F1F1"><normalfont> <a href="javascript:who($thread[threadid])">$thread[replycount]</a> </normalfont></td> <td bgcolor="#DFDFDF"><normalfont>$thread[views]</normalfont></td> $threadrating <td bgcolor="$backcolor"> <table cellpadding="0" cellspacing="0" border="0"><tr> <td rowspan="2" nowrap><a href="showthread.php?s=$session[sessionhash]&goto=lastpost&threadid=$thread[threadid]"><img src="images/lastpost.gif" border="0" alt="Go to last post"></a> </td> <td nowrap><smallfont>$thread[lastreplydate] <smallfont color="#666686">$thread[lastreplytime]</smallfont></smallfont></td> </tr><tr> <td nowrap><smallfont>by <a href="member.php?action=getinfo&find=lastposter&th readid=$thread[threadid]"><b>$thread[lastposter]</b></a></smallfont></td> </tr></table> </td> </tr> |
#628
|
|||
|
|||
An excellent hack, but as per my previous post. I don't understand where it goes wrong. The admin function does it's job ok... but I get those errors mentioned... any pointers please.
I'm willing of course to do legwork. I loaded the version from the top, 2 days ago. Perl things in place...etc. Please I need the base to work before I apply the other hacks. I'm a mainframe guy T.I.A. George see the urgency of this need requirement at this site The USENET Forums are currently hidden. |
#629
|
|||
|
|||
Quote:
|
#630
|
|||
|
|||
cpfooter();
if ($action=="manual") { if ($mode=="Delete") { foreach ($lostmsgid as $i){ $DB_site->query("DELETE FROM usenet_article WHERE msgid='" . addslashes($i) . "'"); } echo "Message(s) Deleted<br><br>"; } if ($mode=="Insert into thread") { //$num_rows = $DB_site->num_rows($threadmsgids); if ($threadmsgids=$DB_site->query("SELECT msgid,ord FROM post WHERE threadid=$threadid ORDER BY dateline LIMIT 1")){ $thread=$DB_site->fetch_array($threadmsgids); $threadmsgid = $thread["msgid"]; $ord = $thread["ord"]; // most likely 0 foreach ($lostmsgid as $i){ $DB_site->query("UPDATE usenet_article SET refs='" . addslashes($threadmsgid) . "', ord=$ord, manual=1 WHERE msgid='" . addslashes($i) . "'"); $DB_site->query("INSERT IGNORE INTO usenet_ref (msgid,ref) VALUES ('" . addslashes($i) . "','" . addslashes($threadmsgid) . "')"); } echo "Messages inserted.<br><br>"; } else { echo "Thread was not found or not specified. Please go back and select a valid thread.";} } if ($mode=="New Threads") { foreach ($lostmsgid as $i){ $subjects=$DB_site->query("SELECT subject FROM usenet_article WHERE msgid='" . addslashes($i) . "' LIMIT 1"); $subject=$DB_site->fetch_array($subjects); $subject=$subject["subject"]; $subject = eregi_replace("^Re:[ ]*","",$subject); $DB_site->query("UPDATE usenet_article SET refs='', ord=0, manual=1, subject='" . addslashes($subject) ."' WHERE msgid='" . addslashes($i) . "'"); } echo "New threads created<br><br>"; } |
#631
|
|||
|
|||
Quote:
You might be better of not implementing this option. Instead, you can use this hack. It supports showing the icon aswell. newnews.pl works with it. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|