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
  #52  
Old 07-19-2001, 07:09 AM
Menx's Avatar
Menx Menx is offline
 
Join Date: Nov 2001
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello. I am new to all these hacks things so I installed this one and it works great. I have tested it out by registering a new user and seeing what I can view and post etc etc.

I just got one question and maybe this can't be done but I was wondering... can you make a option where users after X amount of days the amount of posts you need increase over time...

i don't know if you know what I mean... but

say you have new and old members, the new members amount of posts before they can view a section is lower than the old members amount before they can view the section...

so if a member is registered say 10 days then they are classified as old and need to post more before they can get access to a forum even if 5 days ago they would have been able to view it because they came under new.

hope that made sense...
Reply With Quote
  #53  
Old 07-19-2001, 10:16 PM
Nemesis77 Nemesis77 is offline
 
Join Date: Nov 2001
Location: canada
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

where's the Link for the Zip File. I would really like to have this Hack. Thanks all
Reply With Quote
  #54  
Old 07-19-2001, 11:23 PM
MrLister's Avatar
MrLister MrLister is offline
 
Join Date: Oct 2001
Posts: 434
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE]Originally posted by fastforward

Alter the line that checks for posting permissions in newthread.php to something like this

if ($foruminfo[minposts] && ($foruminfo[minposts]>$bbuserinfo[posts]) and !(ismoderator($foruminfo[forumid],"",$bbuserinfo[userid]))) {
eval("standarderror(\"".gettemplate("error_forumno post")."\");");
exit;
}
Reply With Quote
  #55  
Old 07-20-2001, 01:07 AM
Menx's Avatar
Menx Menx is offline
 
Join Date: Nov 2001
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Seems I am also having problems (i spoke too soon)

It allows the odd members to get access to forums even though there is a value said that u need 5 posts before you can view this thread but the main problem is now no new members can post in any of the sections even though they are set to having needed 0 posts they get the error they need x amount of posts before they can post.

but its set to 0 so i don't know how to fix it.

can anyone help....
Reply With Quote
  #56  
Old 07-20-2001, 02:21 AM
Menx's Avatar
Menx Menx is offline
 
Join Date: Nov 2001
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

100% working!
I used bits and pecies from everywhere and now this is 100% working. thanks for the great hack!
Reply With Quote
  #57  
Old 07-21-2001, 03:50 AM
TripleH
Guest
 
Posts: n/a
Default

Ok.. this is going to be a dumb question..

I finally got everything to work,..

But now how to I set the forums? I looked in the edit, and I cna't find it anywhere.. thanks

HHH
Reply With Quote
  #58  
Old 07-26-2001, 01:33 AM
stile
Guest
 
Posts: n/a
Default

Once you set the options with this hack, you can't go back and change them... Is there a way to add it so you can modify the posts needed to set a new topic once you initially set it?

otherwise i gotta nuke all my forums and start over
Reply With Quote
  #59  
Old 07-26-2001, 03:01 AM
pipi pipi is offline
 
Join Date: Nov 2001
Location: USA
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

while using searching function.......users can view anything
Reply With Quote
  #60  
Old 07-26-2001, 03:49 AM
stile
Guest
 
Posts: n/a
Default

I have it set so that people under x amount of posts can't post or view in certain forums using the forum hack.

I also have the Last Post thread hack.

Users can totally bypass the "can't post if you don't have x amount of posts" by clicking on the Last Post thread link.

Kind of defeats the purpose

look: http://php.stileproject.com/spf

try posting from the forum link then last post to thread link.
Reply With Quote
  #61  
Old 07-26-2001, 08:54 AM
Kengan's Avatar
Kengan Kengan is offline
 
Join Date: Nov 2001
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great hack !! Thanks !
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 08:11 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.06304 seconds
  • Memory Usage 2,374KB
  • 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
  • (13)bbcode_php
  • (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
  • (8)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