It is currently Thu Sep 09, 2010 7:17 am

phpBB3 modifications

Projects

phpBB3 Custom Pages

Posted by topdown

This is a place holder.
I will be updating this soon.

Making Basic Additional pages in PhpBB3 is fairly easy if you follow these instructions.

There are 3 basic files needed
1. HTML template
2. your php file, goes in the root of the forum
3. language definition file php

Lets start with the template

open notepad or a code editor of your choice (NOT WORD, OR ANY MS PRODUCT)

This is the basic code for a prosilver style using the panel bg2 classes with the link back to top arrow like in the topic_body.

Save this file as about_body.html

Code: Select all
<!-- INCLUDE overall_header.html -->
  <div class="panel bg2">
    <div class="inner"><span class="corners-top"><span></span></span>
        <h3>phpBB3 Custom Pages</h3>
        <p>Put your content here</p>
        <div class="back2top"><a href="#wrap" class="top" title="Top">Top</a></div>
    <span class="corners-bottom"><span></span></span>
    </div>
</
div>
<!--
 INCLUDE overall_footer.html --> 



Next lets drive this page by making the php file

Code: Select all
<?PHP
/** 
*
* @name about.php
* @version 1.11.26
* @package phpBB WEBMASTERS CMS -custompages.php
* @copyright (c) 2007 topdown, Webmasters United.org 
* @license http://opensource.org/licenses/gpl-license.php GNU Public License 
*
*/

// Note: If you would like to have a page in a different location than in the main phpBB3 directory
// You must change the following variable, and change the 'U_PORTAL' template variable in functions.php
$phpbb_root_path = './';
define('IN_PHPBB', true);
$phpEx = substr(strrchr(__FILE__, '.'), 1);
// Lets make sure we have all of the variables loaded up for custom pages
include($phpbb_root_path . 'common.' . $phpEx);
 

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup('my_lang' , 2); //The 2 stands for the style id for this page


// Output page
page_header($user->lang['ABOUT US']);

$template->set_filenames(array(
    'body' => 'about_body.html')
    // ENSURE THAT THE ABOVE FILENAME MATCHES THE FILENAME IN phpBB3/styles/subSilver/template
    // dirrectory! (or subBlack whatever template you are using
);

make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));

page_footer();

?>



There are 3 lines that will need editing to make different pages than about us

This line
Code: Select all
page_header($user->lang['ABOUT US']); 

pulls the definition from the lang file we are making next


This line
Code: Select all
$template->set_filenames(array(
    'body' => 'about_body.html') 

pulls the template up for the browser to display the HTML

The other line closer to the top
Code: Select all
$user->setup('my_lang'); 

is the name of the language file used by this page named (my_lang.php)

Save this file as about.php

You should see the edits you need to make to change file names.

Next we make the lang file

Code: Select all
<?php
/** 
*
* @name WEB.php  **language file**
* @version 1.12.07
* @package -WEBpages.php
* @copyright (c) 2007 topdown, Webmasters United.org 
* @license http://opensource.org/licenses/gpl-license.php GNU Public License 
*
*/


/**
* DO NOT CHANGE
*/
if (empty($lang) || !is_array($lang))
{
    $lang = array();
}


$lang = array_merge($lang, array(
    'ABOUT US'            => 'ABOUT US',
    'CONTACT US'        => 'CONTACT US',
    'HOME'                => 'HOME',
    


        
// copyright
    'CUSTOM_COPY'     => '@copyright (c) 2007 topdown, Webmasters United.org  All rights Reserved.',
    
    
));

?>


You can see how to add to it

Code: Select all
'HOME'                => 'HOME', 

just copy, paste and rename the HOME to whatever you put in the other files

Then save this file as
my_lang.php


Now upload

about_body.html to your styles template directory
about.php to the root, where the forums index.php file is
and the my_lang.php to the language / en directory

Done

Good luck, :mrgreen:
Comments & Discussion    Total Comments • 0

[Released] Animated Light Box 2 Mod (Beta 1)

Posted by topdown

There is a BBC img2 here to try it out.

MOD Title: Lightbox 2 animated image viewing
MOD Author: topdown
MOD Description: This will add Light Box 2.04 the latest version of light box animated image viewing to your
forum. It will be used for attached images if your server has ImageMagic installed and enabled. You can also use BBC
to link in images that will automatically be shown as thumbs.

MOD Version: 1.0.0B
MOD Status: BETA

Tested on phpBB version: 3.0.2
Released: 09 Aug 2008

Installation Level: easy
Installation Time: ~ 3 Minutes

Download:
Lightbox Mod 2 - 1.0.0 Beta.zip


You can report bugs in this topic ...
Comments & Discussion    Total Comments • 11

[Final] CSS stylesheet for exported XML PM's

Posted by topdown

MOD Title: CSS stylesheet for exported XML PM's
MOD Author: topdown
MOD Description: This is a CSS file I created to make it easy to read through downloaded XML files from your PM box.

Is to implement, just keep he file in the same folder or desktop where the downloaded PM XML
file is and then add the link into the XML file.

Now open the XML file in your browser.
MOD Version: 1.0.0
MOD Status: Released

Tested on phpBB version: 3.0.1
Released: 21 Jun 2008

Installation Level: easy
Installation Time: ~ 0 Minutes

Download:
pm_style.zip


With this CSS sheet you can backup all PM's in your box and read them easily from your desktop.

To implement this once you download your PM's in XML format
simply open he XML file in a editor
FIND
Code: Select all
<?xml version="1.0"?>


AFTER ADD
Code: Select all
<?xml-stylesheet href="pm_style.css" type="text/css"?>


Save and then open it in your browser.
NOTE: the Files need to be in the same spot or folder.
Comments & Discussion    Total Comments • 0

[Released] Ads in the Forum Description using BBC codes

Posted by topdown

MOD Title: Ads in the Forum Description using BBC codes
MOD Author: topdown
MOD Description: The following is instructions on placing ads in a forums description
using HTML - BBC Replacement

You can make as many as you want and stager the ads through
your forums on the index or view forums.

You could even use the codes in a post here and there if you wanted.

Make sure you follow the TOS of whoever's ads your using
some only allow 3 or a certain amount of ads per page along
with other limitations.
MOD Version: 1.0.0
MOD Status: Released

[b]Tested on phpBB version: 3.0.1
Released:[/b] 11 Jun 2008

Installation Level: easy
Installation Time: ~ 1 Minutes

------------------------------------------------------------------------------------------------------------



BBC
Code: Select all
[ad789]{TEXT}[/ad789]


HTML REPLACEMENT
Code: Select all
<p style="text-align:center;">{TEXT}<br />Your Google ad JAVASCRIPT</p>


USAGE
Code: Select all
[ad789][/ad789]


OR
Code: Select all
[ad789]Some text here will be above the ad[/ad789]


Don't check the show box when making the BBC tag
the 789 can be any random number so that users can't guess the tag.

If you want more than one
just add new BBC - HTML Replacement and use a different random number for the BBC tag.

There are a lot of different ways this can be made.
Comments & Discussion    Total Comments • 0

phpBB3 Styles Demo Hack

Posted by topdown

With this hack you will modify the sessions.php to allow anyone to use a style ID in the URL of your forum.

Open : includes/session.php

FIND
Code: Select all
if (!empty($_GET['style']) && $auth->acl_get('a_styles')) 


REPLACE WITH

Code: Select all
//if (!empty($_GET['style']) && $auth->acl_get('a_styles'))
        
//////////////// NEW LINE BELLOW FOR STYLE DEMO //////////////////////////
        
if (!empty($_GET['style'])) 


Now in the ACP you must go to board settings
SET:
Override user style: to NO

Your done.

To use it, you can get the style ID from the database table or guess at it.
USE

http://your_forum/index.php?style=1

1 = generally prosilver the default style

To make a demo, just set these as forum links.

Have fun ! ;)
Comments & Discussion    Total Comments • 0
cron