Sub Menu
Links Menu
Online Users

In total there are 663 users online :: 2 registered, 0 hidden and 661 guests

Most users ever online was 1091 on Wed Aug 16, 2023 5:27 pm

Registered users: Bing [Bot], Majestic-12 [Bot] based on users active over the past 60 minutes

[request] forum age addon

Mods etc.

Moderator: Integra Moderator

[request] forum age addon

PostAuthor: Skywalker » Mon Feb 12, 2007 4:15 pm

2.0.

can someone port this to im?
Code: Select all
################################################################ MOD Title]http://phpbbmodders.org#[/url]# MOD De.scription: Allows you to define what age is needed to##                  view a certain forum## MOD Version:      1.0.0#### Installation Level: Intermediate## Installation Time: 10 Minutes## Files To Edit:##         index.php##         posting.php##         viewtopic.php##         viewforum.php##         admin/admin_forums.php##         language/lang_english/lang_admin.php##         language/lang_english/lang_main.php##         templates/subSilver/index_body.tpl##         templates/subSilver/admin/forum_edit_body.tpl#### Included Files:   (n/a)## License: [url=http://opensource.org/licenses/gpl-license.php]http://opensource.org/licenses/gpl-license.php[/url] GNU General Public License v2################################################################ For security purposes, please check: [url=http://www.phpbb.com/mods/#]http://www.phpbb.com/mods/#[/url]# for the latest version of this MOD. Although MODs are checked## before being allowed in the MODs Database there is no guarantee## that there are no security problems within the MOD. No support## will be given for MODs not found within the MODs Database which## can be found at [url=http://www.phpbb.com/mods/#]http://www.phpbb.com/mods/#[/url]############################################################### Author Notes:#### Credits of this MOD go to following people## Ramon Fincken - He gave me the Links as tipps for what to use## Doe Ray Me - He made the "View Forum Postcount Threshold" MOD, that i used as a Base for my own.## Thanks a lot for this MOD! But you didn't secure posting.php## Cyberalien - eXtreme Styles MOD is so awesome!## Terrafrost - Birthdays MOD rocks! Thanks so much!## RMcGirr83 - His "Profile Age Add-on" add-on for the birthday MOD was very usefull.## I borrowed a little piece of code.## filmn requested this MOD. <img>#### Following MODs are required for this to work## eXtreme Styles: [url=http://phpbbstyles.com/viewtopic.php?t=356#]http://phpbbstyles.com/viewtopic.php?t=356#[/url]# Birthdays MOD: [url=http://www.phpbb.com/phpBB/viewtopic.php?t=342028#]http://www.phpbb.com/phpBB/viewtopic.php?t=342028#[/url]# XS-Birthdays compatibility: [url=http://www.phpbb.com/phpBB/viewtopic.php?p=2107785#2107785]http://www.phpbb.com/phpBB/viewtopic.ph ... 85#2107785[/url]################################################################## MOD History:####   2006-06-13 - Version 0.1.0##      - First release####   2006-06-19 - Version 0.1.1##      - Fix for no birthdate entered (thanks to Sam England, the admin of ivirtua)####   2006-09-24 - Version 1.0.0##      - Submitted to MODDB################################################################## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD################################################################-----[ SQL ]-------------------------------------------------#ALTER TABLE phpbb_forums ADD forum_view_age VARCHAR(150) NOT NULL default '0';  ##-----[ OPEN ]------------------------------------------------#index.php  ##-----[ FIND ]------------------------------------------------#$posts = $forum_data[$j]['forum_posts'];  ##-----[ BEFORE, ADD ]------------------------------------------------#               if ( $forum_data[$j]['forum_view_age'] && $userdata['user_level'] != ADMIN )               {                 $bday_month_day = floor($userdata['user_birthday'] / 10000);                 $bday_year_age = $userdata['user_birthday'] - 10000*$bday_month_day;                 $fudge = ( gmdate('md') < $bday_month_day ) ? 1 : 0;                 $age = ( $bday_year_age ) ? (gmdate('Y')-$bday_year_age-$fudge) : '0';                   if ( ($age <forum_data> $folder_alt,  ##-----[ AFTER, ADD ]------------------------------------------------#'AGE_HIDDEN' => $age_hidden,  ##-----[ OPEN ]------------------------------------------------#posting.php  ##-----[ FIND ]------------------------------------------------#//// The user is not authed, if they're not logged in then redirect  ##-----[ BEFORE, ADD ]------------------------------------------------#$forum_view_age = $post_info['forum_view_age'];  $bday_month_day = floor($userdata['user_birthday'] / 10000);$bday_year_age = $userdata['user_birthday'] - 10000*$bday_month_day;$fudge = ( gmdate('md') < $bday_month_day ) ? 1 : 0;$age = ( $bday_year_age ) ? (gmdate('Y')-$bday_year_age-$fudge) : '0';  if ( ($age < $forum_view_age || !$age) && $userdata['user_level'] != ADMIN ){         message_die(GENERAL_MESSAGE, sprintf($lang['Forum_view_age_sorry'], $forum_view_age));           // Added because of registered user and guest conflict         if (!$userdata['session_logged_in'])         {                  message_die(GENERAL_MESSAGE, sprintf($lang['Forum_view_age_sorry'], $forum_view_age));         }}  ##-----[ OPEN ]------------------------------------------------#viewtopic.php  ##-----[ FIND ]------------------------------------------------#$sql = "SELECT t.topic_id,  ##-----[ IN-LINE FIND ]------------------------------------------#, f.forum_id  ##-----[ IN-LINE AFTER, ADD ]------------------------------------------#, f.forum_view_age  ##-----[ FIND ]------------------------------------------------#$topic_time = $forum_topic_data['topic_time'];  ##-----[ AFTER, ADD ]------------------------------------------#$forum_view_age = $forum_topic_data['forum_view_age'];  $bday_month_day = floor($userdata['user_birthday'] / 10000);$bday_year_age = $userdata['user_birthday'] - 10000*$bday_month_day;$fudge = ( gmdate('md') < $bday_month_day ) ? 1 : 0;$age = ( $bday_year_age ) ? (gmdate('Y')-$bday_year_age-$fudge) : '0';  if ( $forum_view_age && ($age <forum_view_age>sql_query($sql)){         message_die(GENERAL_ERROR, 'Could not query forum information.', '', __LINE__, __FILE__, $sql);}$forum_information = $db->sql_fetchrow($result);$forum_view = $forum_information['forum_view_age'];  $bday_month_day = floor($userdata['user_birthday'] / 10000);$bday_year_age = $userdata['user_birthday'] - 10000*$bday_month_day;$fudge = ( gmdate('md') < $bday_month_day ) ? 1 : 0;$age = ( $bday_year_age ) ? (gmdate('Y')-$bday_year_age-$fudge) : '0';  if ( $forum_view && ($age <forum_view> $lang['Forum_status'],  ##-----[ AFTER, ADD ]------------------------------------------#'L_FORUM_VIEW_AGE' => $lang['Forum_view_age'],  ##-----[ FIND ]------------------------------------------------#'FORUM_NAME' => $forumname,  ##-----[ AFTER, ADD ]------------------------------------------#'FORUM_VIEW_AGE' => $forumviewage,  ##-----[ FIND ]------------------------------------------#$sql = "INSERT INTO " . FORUMS_TABLE  ##-----[ IN-LINE FIND ]------------------------------------------------#forum_status  ##-----[ IN-LINE AFTER, ADD ]------------------------------------------#, forum_view_age  ##-----[ FIND ]------------------------------------------#VALUES ('" . $next_id .  ##-----[ IN-LINE FIND ]------------------------------------------------#" . intval($HTTP_POST_VARS['forumstatus']) . "  ##-----[ IN-LINE AFTER, ADD ]------------------------------------------#, " . intval($HTTP_POST_VARS['forumviewage']) . "  ##-----[ FIND ]------------------------------------------#SET forum_name  ##-----[ IN-LINE FIND ]------------------------------------------------#, forum_status = " . intval($HTTP_POST_VARS['forumstatus']) . "  ##-----[ IN-LINE AFTER, ADD ]------------------------------------------#, forum_view_age = " . intval($HTTP_POST_VARS['forumviewage']) . "  ##-----[ OPEN ]------------------------------------------------#language/lang_english/lang_admin.php  ##-----[ FIND ]------------------------------------------------#$lang['Forum_status'] = 'Forum status';  ##-----[ AFTER, ADD ]-----------------------------------------#$lang['Forum_view_age'] = 'Required Age';  ##-----[ OPEN ]------------------------------------------------#language/lang_english/lang_main.php  ##-----[ FIND ]------------------------------------------------#//// That's all, Folks!// -------------------------------------------------  ##-----[ BEFORE, ADD ]-----------------------------------------#//Forum View Age$lang['Forum_view_age_sorry'] = 'Sorry, you need to be <b>%d Years old</b> to view this forum';  ##-----[ OPEN ]------------------------------------------------#templates/subSilver/index_body.tpl  ##-----[ FIND ]------------------------------------------------#<BEGIN>  ##-----[ AFTER, ADD ]-----------------------------------------#<IF>  ##-----[ FIND ]------------------------------------------------#<END>  ##-----[ BEFORE, ADD ]-----------------------------------------#<ENDIF>  ##-----[ OPEN ]------------------------------------------------#templates/subSilver/admin/forum_edit_body.tpl  ##-----[ FIND ]------------------------------------------------#   <tr>     <td>{L_FORUM_STATUS}</td>     <td><select>{S_STATUS_LIST}</select></td>   </tr>  ##-----[ AFTER, ADD ]-----------------------------------------#   <tr>     <td>{L_FORUM_VIEW_AGE}</td>     <td><input></td>   </tr>##-----[ SAVE/CLOSE ALL FILES ]--------------------------------## EoM  
Last edited by Skywalker on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

Skywalker
Sr Integra Member
Sr Integra Member
 
Posts: 236
Likes: 0 post
Liked in: 0 post
Joined: Fri Apr 14, 2006 4:25 pm
Cash on hand: 0.00

PostAuthor: Michaelo » Mon Feb 12, 2007 8:42 pm

I don't believe any more mods are being entertained at the moment... try later...
Last edited by Michaelo on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
Kiss Portal Engine phpbbireland (status: Released)
User avatar
Michaelo
Administrator
Administrator
 
Posts: 1646
Likes: 0 post
Liked in: 0 post
Joined: Sat Mar 11, 2006 5:14 pm
Cash on hand: 0.00
Location: Dublin, Ireland

Re: [request] forum age addon

PostAuthor: found it » Tue Feb 13, 2007 1:12 am

Hi

Just to clarify the above mod is using Terrafrost - Birthdays MOD which is not installed in integramod...

You would have to unistall our birthday mod and ten add terrafrost birthday mod before you could install this mod...

FYI

:mrgreen:
Last edited by found it on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[url=http]themes.[/url]
http://www.founditforum.com :: [url=http]Joining people together[/url]

[url=http][img=left]http://www.bbful.com/bbful_banner2.png[/img][/url]
User avatar
found it
Dev Team
Dev Team
 
Posts: 792
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 3:29 am
Cash on hand: 0.00

Re: [request] forum age addon

PostAuthor: Skywalker » Tue Feb 13, 2007 5:34 am

"found it";p="21847" wrote:Hi

Just to clarify the above mod is using Terrafrost - Birthdays MOD which is not installed in integramod...

You would have to unistall our birthday mod and ten add terrafrost birthday mod before you could install this mod...

FYI

:mrgreen:


if someone can give me the code i have to use in index.php i can work a way around that... but i need the file edits that work with CH to get a start,
i know this mod requires some other birthday system but its using the same row in the users table, so it issent hard to make this mod work on IM and it would be a very nice contribution... it also is a nice mod to add to the standard IM package when ready...

so if someone just gives me a helping handand a start on this i will get the rest...
Last edited by Skywalker on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

Skywalker
Sr Integra Member
Sr Integra Member
 
Posts: 236
Likes: 0 post
Liked in: 0 post
Joined: Fri Apr 14, 2006 4:25 pm
Cash on hand: 0.00

PostAuthor: MrDSL » Thu Feb 15, 2007 4:10 am

I have done a mod like this before that works with PCP but I lost my ftp access so I can't download it.

Maybe someone still has a copy of it. I can check my local harddrive but thats a long shot.
Last edited by MrDSL on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
User avatar
MrDSL
PCP Master
PCP Master
 
Posts: 41
Likes: 0 post
Liked in: 0 post
Joined: Thu Apr 27, 2006 4:34 am
Cash on hand: 0.00

PostAuthor: Skywalker » Thu Feb 15, 2007 6:19 am

"MrDSL";p="21985" wrote:I have done a mod like this before that works with PCP but I lost my ftp access so I can't download it.

Maybe someone still has a copy of it. I can check my local harddrive but thats a long shot.

plz ask someone and take a look, maybe ask ftp acces back is a option?
Last edited by Skywalker on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

Skywalker
Sr Integra Member
Sr Integra Member
 
Posts: 236
Likes: 0 post
Liked in: 0 post
Joined: Fri Apr 14, 2006 4:25 pm
Cash on hand: 0.00

PostAuthor: MrDSL » Thu Feb 15, 2007 7:21 am

Actually I take that back I have not done this mod before. I guess I should have read the de.scription before I replied..

sorry

but taking a closer look the mod only uses the user_birthday field so I don't see why you would need to uninstall the birthday mod in IM. It should work fine with the current birthday mod..
Last edited by MrDSL on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
User avatar
MrDSL
PCP Master
PCP Master
 
Posts: 41
Likes: 0 post
Liked in: 0 post
Joined: Thu Apr 27, 2006 4:34 am
Cash on hand: 0.00

Re: [request] forum age addon

PostAuthor: Helter » Thu Feb 15, 2007 7:24 am

I dont think that should require a port, as all the files to edit are included in 141, but ill look tonight, but like Mike said we arnt adding any more mods to the IM package atm.
Last edited by Helter on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
Always use Protection
Image


Please do not PM for support
User avatar
Helter
Administrator
Administrator
 
Posts: 4168
Likes: 0 post
Liked in: 0 post
Images: 0
Joined: Sat Mar 11, 2006 3:46 pm
Cash on hand: 187.60
Location: Seattle Wa
IntegraMOD version: IM 3

Re: [request] forum age addon

PostAuthor: Skywalker » Thu Feb 15, 2007 8:04 am

"HelterSkelter";p="21992" wrote:I dont think that should require a port, as all the files to edit are included in 141, but ill look tonight, but like Mike said we arnt adding any more mods to the IM package atm.


some lines ar deleted by CH so it does need to be ported...
i know this mod wil work on im and i dont ask to add it to the main pack i ask to help me making this mod work with CH so i can do the rest... i will get this mod to work i only need to know where to place the code so it will work with CH

i meant when this mod is ready it will be a nice feature in a next release of (standard) im pack
Last edited by Skywalker on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

Skywalker
Sr Integra Member
Sr Integra Member
 
Posts: 236
Likes: 0 post
Liked in: 0 post
Joined: Fri Apr 14, 2006 4:25 pm
Cash on hand: 0.00


Return to IntegraMOD Modifications

Who is online

Registered users: Bing [Bot], Majestic-12 [Bot]

cron