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

Reply
 
Thread Tools
Details »»

Version: , by Wayne Luke (Senior Member) Wayne Luke is offline
Developer Last Online: Oct 2023 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 06-04-2001 Last Update: Never Installs: 5
 
No support by the author.

Forum Features Hack
---- About
This adds several new options and features to individual forums that can be useful.

New Features
1. Meta Tag Keywords set by forum.
2. Meta Tag Description set by forum.
3. Robot Meta Tag set by forum.

New Options
1. Censor words by Forum.
2. Minimum Posts required for New Thread.
3. Minimum Posts to view Forum.

---- Credits
This hack is distributed under the GPL as an add-on to vBulletin. vBulletin is a commercial product and not subject to this license agreement.

Written by: Wayne Luke
Portions of the Install script written by: Kier Darby
vBulletin is created by Jelsoft Ltd. http://www.jelsoft.com

---- Installation.
Run ff_install.php. This will make the modifications to the database and create the new templates.

Open admin/forum.php and look for:
PHP Code:
  makeyesnocode("Count posts made in this forum towards user post counts?","countposts",1); 
After that add:
PHP Code:
  //WL 04-JUNE-2001 New Forum Features Hack
  
maketableheader("Search Engine Options (v1.2 by Wayne Luke)");
  
maketextareacode("Meta Tag Keywords: ","metakey");
  
maketextareacode("Meta Tag Description","metadesc");
  
makeinputcode("Meta Robot Tag","robotext");

  
maketableheader("Forum Control Options (v1.0 by Wayne Luke)");
  
makeyesnocode("Show in Active Topics?","showactive",1);
  
makeyesnocode("Censor Words in this Forum","censor",1);
  
makeinputcode("Minimum Posts to View","minviewposts");
  
makeinputcode("Minimum Posts to Start New Thread","minposts");
  
//WL End Modification 
Also in admin/forum.php Look for:
PHP Code:
  $DB_site->query("INSERT INTO forum
                      (forumid,styleid,title,description,active,displayorder,parentid,
                       parentlist,allowposting,cancontainthreads,daysprune,newpostemail,newthreademail,
                       moderatenew,allowhtml,allowbbcode,allowimages,allowsmilies,allowicons,
                       styleoverride,allowratings,countposts,moderateattach)
                   VALUES
                      (NULL,'
$styleset','".addslashes($title)."','".addslashes($description)."','$isactive','$displayorder','$parentid',
                       '','
$allowposting','$cancontainthreads','$daysprune','".addslashes($newpostemail)."','".addslashes($newthreademail)."',
                       '
$moderatenew','$aallowhtmlcode','$aallowbbcode','$aallowimgcode','$aallowsmilies','$aallowicons',
                       '
$styleoverride','$allowratings','$countposts','$moderateattach')"); 
Replace with:
PHP Code:
$DB_site->query("INSERT INTO forum
  (forumid,styleid,title,description,active,displayorder,parentid,
   parentlist,allowposting,cancontainthreads,daysprune,newpostemail,newthreademail,
   moderatenew,allowhtml,allowbbcode,allowimages,allowsmilies,allowicons,
   styleoverride,allowratings,countposts,moderateattach,metakey,metadesc,robotext,
   showactive,censor,minviewposts,minposts)
 values (NULL,'
$styleset','".addslashes($title)."','".addslashes($description)."',
         '
$isactive','$displayorder','$parentid','','$allowposting','$cancontainthreads',
         '
$daysprune','".addslashes($newpostemail)."','".addslashes($newthreademail)."',
         '
$moderatenew','$aallowhtmlcode','$aallowbbcode','$aallowimgcode','$aallowsmilies',
         '
$aallowicons','$styleoverride','$allowratings','$countposts','$moderateattach',
         '"
.addslashes($metakey)."','".addslashes($metadesc)."','".addslashes($robotext)."',
         '
$showactive','$censor','$minviewposts','$minposts')"); 
After that add:
PHP Code:
  //WL 04-JUNE-2001 New Forum Features Hack
  
maketableheader("Search Engine Options (v1.2 by Wayne Luke)");
  
maketextareacode("Meta Tag Keywords: ","metakey",$forum[metakey]);
  
maketextareacode("Meta Tag Description","metadesc",$forum[metadesc]);
  
makeinputcode("Meta Robot Tag","robotext",$forum[robotext]);


  
maketableheader("Forum Control Options (v1.0 by Wayne Luke)");
  
makeyesnocode("Show in Active Topics?","showactive",1,$forum[showactive]);
  
makeyesnocode("Censor Words in this Forum","censor",1,$forum[censor]);
  
makeinputcode("Minimum Posts to View","minviewposts",$forum[minviewposts]);
  
makeinputcode("Minimum Posts to Start New Thread","minposts",$forum[minposts]);
  
//WL End Modification 
Last edit in admin/forum.php. Find:
PHP Code:
  $DB_site->query("UPDATE forum
                   SET
                     styleid='
$styleset', title='".addslashes($title)."', description='".addslashes($description)."',
                     active='
$isactive', displayorder='$displayorder', parentid='$parentid', parentlist=$parentlist,
                     allowposting='
$allowposting', cancontainthreads='$cancontainthreads', daysprune='$daysprune',
                     newpostemail='"
.addslashes($newpostemail)."', newthreademail='".addslashes($newthreademail)."',
                     moderatenew='
$moderatenew', allowhtml='$aallowhtmlcode', allowbbcode='$aallowbbcode',
                     allowimages='
$aallowimgcode', allowsmilies='$aallowsmilies', allowicons='$aallowicons',
                     styleoverride='
$styleoverride', allowratings='$allowratings', countposts='$countposts',
                     moderateattach='
$moderateattach'
                   WHERE forumid='
$forumid'"); 
Replace with:
PHP Code:
  $DB_site->query("UPDATE forum
                   SET
                     styleid='
$styleset', title='".addslashes($title)."', description='".addslashes($description)."',
                     active='
$isactive', displayorder='$displayorder', parentid='$parentid', parentlist=$parentlist,
                     allowposting='
$allowposting', cancontainthreads='$cancontainthreads', daysprune='$daysprune',
                     newpostemail='"
.addslashes($newpostemail)."', newthreademail='".addslashes($newthreademail)."',
                     moderatenew='
$moderatenew', allowhtml='$aallowhtmlcode', allowbbcode='$aallowbbcode',
                     allowimages='
$aallowimgcode', allowsmilies='$aallowsmilies', allowicons='$aallowicons',
                     styleoverride='
$styleoverride', allowratings='$allowratings', countposts='$countposts',
                     moderateattach='
$moderateattach', metakey='".addslashes($metakey)."',metadesc='".addslashes($metadesc)."',robotext='".addslashes($robotext)."',
                     showactive='
$showactive',censor='$censor',minviewposts='$minviewposts',minposts='$minposts'
                   WHERE forumid='
$forumid'"); 
In newthread.php find:
PHP Code:
  $smilieson=iif($foruminfo[allowsmilies],$ontext,$offtext); 
After it add:
PHP Code:
  //WL 04-June-2001 Forum Features Hack (v1.0 Wayne Luke)
  
if (($foruminfo[minposts]>$bbuserinfo[posts]) and !(ismoderator($foruminfo[forumid],"",$bbuserinfo[userid])) {
    eval(
"standarderror(\"".gettemplate("error_forumnopost")."\");");
    exit;
  }
  
//WL End Modifications 
In newthread.php find:
PHP Code:
    $subject=censortext($subject);
    
$message=censortext($message); 
Replace with:
PHP Code:
    if ($foruminfo[censor]) {
      
$subject=censortext($subject);
      
$message=censortext($message);
    } 
In Forumdisplay find:
PHP Code:
$smilieson=iif($foruminfo['allowsmilies'],$ontext,$offtext); 
After that add:
PHP Code:
//WL 04-June-2001 Forum Features Hack (v1.0 Wayne Luke)
$keyword=$foruminfo[metakey];
$description=$foruminfo[metadesc];
$robotext=$foruminfo[robotext];

if ((
$foruminfo[minviewposts]>$bbuserinfo[posts]) and !(ismoderator($foruminfo[forumid],"",$bbuserinfo[userid]))) {
  eval(
"standarderror(\"".gettemplate("error_forumnoview")."\");");
  exit;
}
//WL End Modifications 
Finally add the following to your forumdisplay template:
<META NAME="keyword" content="$keyword">
<META NAME="description" content="$description">
<META name="robots" content="$robotext">


These same instructions are included in the readme.txt located in the zip file.

Show Your Support

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

Comments
  #22  
Old 06-07-2001, 06:06 PM
kdog316
Guest
 
Posts: n/a
Default

ok but now when i try to post a new thread i get this erorr
Quote:
Parse error: parse error in /home/photo/public_html/tmbps/newthread.php on line 306
Reply With Quote
  #23  
Old 06-07-2001, 09:08 PM
Wayne Luke's Avatar
Wayne Luke Wayne Luke is offline
Senior Member
 
Join Date: Jan 2002
Location: Southern California
Posts: 1,694
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Double check and make sure your code changes match the ones listed in the first post of this thread.
Reply With Quote
  #24  
Old 06-07-2001, 09:09 PM
kdog316
Guest
 
Posts: n/a
Default

could it be because i have version 2.0 not 2.01 it wont work
Reply With Quote
  #25  
Old 06-07-2001, 09:10 PM
Wayne Luke's Avatar
Wayne Luke Wayne Luke is offline
Senior Member
 
Join Date: Jan 2002
Location: Southern California
Posts: 1,694
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It will work in both.... And most likely all the betas as well.
Reply With Quote
  #26  
Old 06-07-2001, 09:35 PM
kdog316
Guest
 
Posts: n/a
Default

red di ti and still get the erorr and here is what lines 307-310 look like
PHP Code:
 if (($foruminfo[minposts]>=$bbuserinfo[posts]) and !(ismoderator($foruminfo[forumid],"",$bbuserinfo[userid])) {
    eval(
"standarderror(\"".gettemplate("error_forumnopost")."\");");
    exit;
  }[
userid])) { 
here is line 307 the one it is saying is wrong
PHP Code:
 if (($foruminfo[minposts]>=$bbuserinfo[posts]) and !(ismoderator($foruminfo[forumid],"",$bbuserinfo[userid])) { 
oh and add reply works fine
Reply With Quote
  #27  
Old 06-07-2001, 09:41 PM
Wayne Luke's Avatar
Wayne Luke Wayne Luke is offline
Senior Member
 
Join Date: Jan 2002
Location: Southern California
Posts: 1,694
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You need to add another closing paranthesis ')' before the curly brace '{'.
Reply With Quote
  #28  
Old 06-07-2001, 09:48 PM
kdog316
Guest
 
Posts: n/a
Default

where
Reply With Quote
  #29  
Old 06-07-2001, 10:06 PM
Mas*Mind's Avatar
Mas*Mind Mas*Mind is offline
 
Join Date: Oct 2001
Location: Amsterdam, The Netherlands, currently living in Cape Town, South Africa
Posts: 103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is definitely wrong:

PHP Code:
}[userid])) { 
Reply With Quote
  #30  
Old 06-07-2001, 10:41 PM
kdog316
Guest
 
Posts: n/a
Default

so whwre do i add the (
Reply With Quote
  #31  
Old 06-08-2001, 01:16 AM
Wayne Luke's Avatar
Wayne Luke Wayne Luke is offline
Senior Member
 
Join Date: Jan 2002
Location: Southern California
Posts: 1,694
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Make it look like:
PHP Code:
if (($foruminfo[minposts]>=$bbuserinfo[posts]) and !(ismoderator($foruminfo[forumid],"",$bbuserinfo[userid]))) { 
and replace the line after "exit;" with }
Reply With Quote
Reply


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 06:28 PM.


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.04789 seconds
  • Memory Usage 2,379KB
  • 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
  • (17)bbcode_php
  • (1)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
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (6)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
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete