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

Closed Thread
 
Thread Tools
Details »»

Version: , by (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 01-21-2001 Last Update: Never Installs: 3
 
No support by the author.

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

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

Comments
  #622  
Old 07-01-2001, 01:41 PM
george_proost george_proost is offline
 
Join Date: Nov 2001
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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  
Old 07-03-2001, 12:59 PM
webhost's Avatar
webhost webhost is offline
 
Join Date: Oct 2001
Location: St. Louis
Posts: 577
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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  
Old 07-03-2001, 02:44 PM
v0n
Guest
 
Posts: n/a
Default

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  
Old 07-03-2001, 05:51 PM
fastforward fastforward is offline
 
Join Date: Oct 2001
Location: NC, USA
Posts: 399
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by webhost
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===
Correct.
Quote:
// ###################### 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====
Correct.
Quote:
// ###################### 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===
Correct.
Quote:
// ###################### 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====
?>
WRONG!
It is a NEW function. Add it after the brace but before the php close
Quote:
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]; [/B]
The stats option doesn't actually add a new option. I think there may be a typo. I believe it actually shows the usenet posts UNLESS you apply this option. The next version will provide more options for stats.
  #626  
Old 07-03-2001, 05:55 PM
fastforward fastforward is offline
 
Join Date: Oct 2001
Location: NC, USA
Posts: 399
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by v0n
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...
Looks like you're having the same problem as chrome. As you know, a couple of people have seen this problem but have fixed it by upgrading their modules. See if you can get in touch with chrome and see if he's found the problem.
  #627  
Old 07-03-2001, 08:11 PM
webhost's Avatar
webhost webhost is offline
 
Join Date: Oct 2001
Location: St. Louis
Posts: 577
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>&nbsp;</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  
Old 07-03-2001, 08:18 PM
george_proost george_proost is offline
 
Join Date: Nov 2001
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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  
Old 07-03-2001, 08:25 PM
fastforward fastforward is offline
 
Join Date: Oct 2001
Location: NC, USA
Posts: 399
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by george_proost
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.


I have never seen this error before and the usenet.php file has not been changed for months. What does your line 378 say?
  #630  
Old 07-03-2001, 08:31 PM
george_proost george_proost is offline
 
Join Date: Nov 2001
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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  
Old 07-03-2001, 08:32 PM
fastforward fastforward is offline
 
Join Date: Oct 2001
Location: NC, USA
Posts: 399
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by webhost
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.
Check in the forum table and see if the lastactivethread column is populated.

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.
Closed Thread


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 03:21 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.09097 seconds
  • Memory Usage 2,337KB
  • Queries Executed 25 (?)
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
  • (8)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
  • (2)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
  • (9)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_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
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_imicons
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete