Tutorials
Mon Apr 20, 2009 12:40 am
Hard Coding an extra URL in the Profile Fields
Note: I will be making a mod for this soon, to reduce edits!
OK, here we go, there are a lot of edits and a few things not included like adding the image.
Here is the hard coded way.
First thing you need to do is Back Up Everything database and files you will be editing. This is a must.
Files you will be editing include
- includes/ucp/ucp_profile.php
- styles/prosilver/template/ucp_profile_profile_info.html
- styles/prosilver/template/memberlist_view.html
- styles/prosilver/template/viewtopic_body.html
- viewtopic.php
- memberlist.php
Spoiler:
There are still some obvious changes to be made like the image, language vars, and naming, but this should get you going.
To add it to the admin email for admin register approval
Files to edit
- includes/ucp/ucp_register.php
- styles/your style/template/ucp_register.html
- language/en/email/admin_activate.txt
NOTE: You'll notice I added an @mod in the break lines, this does nothing, I just added it for a search feature so I can find all code edits easilly in the files for future use
Spoiler:
Comments & Discussion Total Comments • 0
Mon Feb 23, 2009 12:08 am
SEO phpBB3 tweaks
When it comes to SEO, don't cheat, that will get you no where FAST....
But there are always things you can do to improve your SEO.
Here are a couple that may help for phpBB3.
Change you default phpBB3 <title> tags around a little to reflect the content first.
In the overall_header.html
FIND
NOTE: {PAGE_TITLE} doesn't necessarily need to be first, {SITENAME} could be
Change to
In the view topic pages we are going to put the topic title first, we really don't care if Google knows its in the viewtopic.php
viewtopic.php
At the bottom FIND
Change to
You can also add them to your Meta description in the overall_header.html
More to come on SEO
But there are always things you can do to improve your SEO.
Here are a couple that may help for phpBB3.
Change you default phpBB3 <title> tags around a little to reflect the content first.
In the overall_header.html
FIND
- Code: Select all
<title>{SITENAME} • <!-- IF S_IN_MCP -->{L_MCP} • <!-- ELSEIF S_IN_UCP -->{L_UCP} • <!-- ENDIF -->{PAGE_TITLE}</title>
NOTE: {PAGE_TITLE} doesn't necessarily need to be first, {SITENAME} could be
Change to
- Code: Select all
<title>{PAGE_TITLE} • {SITENAME} <!-- IF S_IN_MCP --> • {L_MCP} • <!-- ELSEIF S_IN_UCP --> • {L_UCP}<!-- ENDIF --></title>
In the view topic pages we are going to put the topic title first, we really don't care if Google knows its in the viewtopic.php
viewtopic.php
At the bottom FIND
- Code: Select all
page_header($user->lang['VIEW_TOPIC'] . ' - ' . $topic_data['topic_title']);
Change to
- Code: Select all
page_header($topic_data['topic_title'] . ' - ' . $user->lang['VIEW_TOPIC']);
You can also add them to your Meta description in the overall_header.html
- Code: Select all
<meta name="description" content="{SITENAME},{PAGE_TITLE}" />
More to come on SEO
Comments & Discussion Total Comments • 0
Sun Feb 08, 2009 9:21 pm
phpBB3 Custom Pages
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
Next lets drive this page by making the php file
There are 3 lines that will need editing to make different pages than about us
This line
pulls the definition from the lang file we are making next
This line
pulls the template up for the browser to display the HTML
The other line closer to the top
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
You can see how to add to it
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,
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
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$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);
//Lets put this in there also, it has all of the forums useful functions for displaying certain items
include($phpbb_root_path . 'includes/functions_display.' . $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) 2008 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' => '© 2008 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,
Comments & Discussion Total Comments • 0
Sun Feb 08, 2009 8:50 pm
phpBB Lists
Just testing out the article system.
Did you ever notice the slick List (<ul><li></li></ul>) system phpBB3 has in its BBcode options?
It holds structure Check it Out,
Here is the code for what I just did for those that don't get it, it's the List and * buttons in the post box
Did you ever notice the slick List (<ul><li></li></ul>) system phpBB3 has in its BBcode options?
It holds structure Check it Out,
- Main List Head
- Item 1
- Item 2
- Sub List Head
- Sub Item 1
- Sub item 2
- Sub Item 3
- How about Sub of a Sub
- Sub of a Sub
- How about Sub of a Sub
- Bring it back a little
- Back 1
- Back 2
- Sub List Head
Here is the code for what I just did for those that don't get it, it's the List and * buttons in the post box
Spoiler:
Comments & Discussion Total Comments • 0
