Page 1 of 10

[ABD] Frontpage and folders

Posted: Thu Apr 30, 2009 11:04 am
by DoYouSpeakWak
Modification Name: Frontpage and folders
Author: DoYouSpeakWak

Modification Description:: Adds a frontpage and folders system to your site.
Modification Version:: 0.0.5

Features:
    • Uses language/XX/mods/file.php for text in main left block and panels on the right.
      Has its own overall_header with no forum information. you can replace it with normal phpbb header if you wish without changing the forum itself.
      Extensive css file for each style to manage font size, colors and margins.
      Uses directories for diffrent pages.
      Jquery menu with sliding effects.
      Topics/Posts in sliding boxes and/or on frontpage
      Your own 5 latest posts on frontpage
      Login box, Your panels and other shortcuts.

    Comments:
    This is made with custom folders made allready. Copyright, Contact etc. You can change these to suit your needs. See Guide at the end of this post.HTML can also easily be added instead of language dependent text loaded from language/XX/mods/. This mod DO NOT work with automod.

    To do:
    Improve the CSS part, make all language options individual. Make subsilver2 (only 0.0.5) work properly with IE and Chrome.

    Demo:
    http://www.vintagehifi.dk

    Download URL:
    http://phpbb3premods.com/mods/frontpage ... _0.0.5.zip

    Optional DIY:

    Q: How do i change the folders names to what i need.
    A:See the below guide. Further qustions, just ask.

    1: Change the "about" folder inside the root of this mod to "example" then go inside the folder you have just changed and open the index.php file.

    Find

    Code: Select all

    page_header($user->lang['ABOUT']);
    Replace with

    Code: Select all

    page_header($user->lang['EXAMPLE']);
    Find

    Code: Select all

    'body' => 'frontpage/about.html')
    Replace with

    Code: Select all

    'body' => 'frontpage/example.html')
    Open
    /language/en/mods/frontpage.php

    find

    Code: Select all

    'ABOUT'				=> 'About us',
    Replace with

    Code: Select all

    'EXAMPLE				=> 'This is a example page',
    Rename

    From
    /styles/prosilver(or subsilver)/template/frontpage/about.html

    To
    /styles/prosilver(or subsilver)/template/frontpage/example.html

    Refresh templates and purge cache.

    Q: I wanna add the word frontpage in front of the "Board index" in the forum. Example: http://psyhosting.info/mod_images/front ... gation.png
    A: Subsilver2 and prosilver see below

    Open /styles/prosilver/template/overall_header.html

    Find

    Code: Select all

    <a href="{U_INDEX}" accesskey="h">{L_INDEX}</a>
    Inline before-add

    Code: Select all

    <a href="{U_FRONTPAGE}" accesskey="h">{L_FRONTPAGE_SHORT}</a> <strong>&#8249;</strong>
    Open /styles/subsilver2/template/breadcrumbs.html

    find

    Code: Select all

    <a href="{U_INDEX}">{L_INDEX}</a>
    Inline before-add

    Code: Select all

    <a href="{U_FRONTPAGE}">{L_FRONTPAGE_SHORT}</a> &#187; 
    Refresh templates

    Re: [DEV] Frontpage and folders

    Posted: Fri May 01, 2009 2:09 pm
    by Niklas.SB
    Very nice!
    I'm looking forward to the release!

    Greets,
    Niklas

    Re: [ALPHA] Frontpage and folders

    Posted: Thu May 14, 2009 11:15 am
    by DoYouSpeakWak
    Updated to alpha. Cleaned it up a bit. added download.

    Re: [ALPHA] Frontpage and folders

    Posted: Thu May 14, 2009 11:38 am
    by Insomniac'
    Hi, very nice idea and mod !

    For the download section, can you give us some details please. Thanks.

    Re: [ALPHA] Frontpage and folders

    Posted: Thu May 14, 2009 11:49 am
    by DoYouSpeakWak
    That i do not know, if any got the codes i will gladly add them.

    Re: [ALPHA] Frontpage and folders

    Posted: Sun May 31, 2009 3:38 pm
    by DoYouSpeakWak
    Updated to version 0.0.2.

    Changes a bit of code in all index.php files so this mod now runs smooth with debug on, before it gave out an error. If you had the earlier version installed. simple overwrite all index.php with the ones in the new pacakge avaliable in the first post of this topic.

    Re: [ALPHA] Frontpage and folders

    Posted: Sun May 31, 2009 4:10 pm
    by darkonia
    wow nice work, runs clean without any bugs, thx a lot, fine mod :ugeek:

    Re: [ALPHA] Frontpage and folders

    Posted: Sun May 31, 2009 6:17 pm
    by zake black
    Hi looking Good i like it!

    Rather than pointing to a folder is possible to have an option to link to a url?

    For example you have a contact us link with folder and index file. well i have a contact us page already installed, so i would prefer to link to that rather than the folder that you have added.

    Same applys to the gallery that i have etc. etc.

    Thanks

    Andy

    Re: [ALPHA] Frontpage and folders

    Posted: Mon Jun 01, 2009 1:27 am
    by DoYouSpeakWak
    Tested and working on phpBB 3.0.5

    Thats no problem. Its just a href in the langauge file. change from /contact/ to what ever you like.

    Some mods you can change to work with the folder concept. These mods all had diffrent .php names. Changed them to index.php and phpbb root. Move to folder. Its easy to do if the mods all ready are intalled. but they would have to have there own .php file. Or Annoncement cetner, recent topic, top five and other mods that places a box on your forum. those boxes can also be moved to other pages within the folders.

    Examples. Should do good for search engines and users as well.
    http://phpbb3test.info/chat/
    http://phpbb3test.info/mods/
    http://phpbb3test.info/recent/

    Re: [ALPHA] Frontpage and folders

    Posted: Sat Jun 06, 2009 4:37 am
    by arrow816
    This is great mod, and works almost perfect except this. I get this on my index.php file.

    Code: Select all

    Warning: include(./../forums/common.php) [function.include]: failed to open stream: No such file or directory in C:\xampp\htdocs\phpbb3\test2\index.php on line 15
    
    Warning: include() [function.include]: Failed opening './../forums/common.php' for inclusion (include_path='.;C:\xampp\php\pear\') in C:\xampp\htdocs\phpbb3\test2\index.php on line 15
    
    Fatal error: Call to a member function session_begin() on a non-object in C:\xampp\htdocs\phpbb3\test2\index.php on line 18
    
    I dont know why this is doing that, but its only happening on my index.php page.

    Re: [ALPHA] Frontpage and folders

    Posted: Sat Jun 06, 2009 8:17 am
    by DoYouSpeakWak
    Its seems your missing a file or have confused a index.php with another. Remember. There are alot of index.php files. :)

    Do you have a url for your site i can look at ?

    Re: [ALPHA] Frontpage and folders

    Posted: Tue Jun 09, 2009 9:52 am
    by lugsciath
    Add: Runs clean and its easy expandable/configurable for modders. For next Version it would be nice to add a acp module instead hardcoding of frontpage.php But its surely useful and a very good mod from now :) , looks like a little cms.

    Greetings

    Uwe

    Re: [ALPHA] Frontpage and folders

    Posted: Wed Jul 08, 2009 12:42 pm
    by Mick
    If, like me, you prefer your board in the root and would like to use the 'Frontpage' templates but only want them to be shown on demand, for example whenever you click on the 'about' link etc., here is an alternative install method.

    Please make sure you have backups of any files you are editing, just in case ;)
    • 1. Make a new folder in the root of your board called 'frontpage'.
      2. Copy all the files in the 'root' folder except the 'forum' folder in to the frontpage folder you just made.
      3. Copy the contents of the 'forum' folder to the root of your forum as per the original instructions.
      4. Open each of the index.php files (six of them) in the folders in your 'frontpage' folder and find:

    Code: Select all

    $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../forum/';   
    • 5. Replace with:

    Code: Select all

    $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '../../';   
    • 6. Open the index.php file in the root of the 'frontpage' folder and find:

    Code: Select all

    $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './forum/';   
    • 7. Replace with:

    Code: Select all

    $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '../';   
    Note: Assuming you have already done this next part, if not use this code (item 9.) instead of that described in the original instructions, ie: "Open: styles/prosilver/templates/overall_header.html" about 60% down the list.
    • 8. Open overall_header.html and find:

    Code: Select all

    <li class="icon-frontpage"><a href="{U_FRONTPAGE}" title="{L_FRONTPAGE}">{L_FRONTPAGE_SHORT}</a></li>   
    • 9. Replace with:

    Code: Select all

    <li class="icon-frontpage"><a href="/frontpage/" title="Menu">Frontpage</a></li>   
    Purge the cache and refresh your templates, themes and imagesets.

    I have no doubt this needs tidying up a bit like the path for the 'Frontpage' link in section 9. Input appreciated ;)

    Thanks to DoYouSpeakWak

    Re: [ALPHA] Frontpage and folders

    Posted: Thu Jul 09, 2009 7:35 am
    by emsik
    Inside folder "frontpage_and_folders_alpha_0.0.2" there still exist folder name "frontpage_and_folders_alpha_0.0.1" ;)

    I use prosilver se, but after installing this mod, there is no borders and the background of text block is grey ? What did i do wrong ?

    Image

    Re: [ALPHA] Frontpage and folders

    Posted: Thu Jul 09, 2009 8:55 am
    by Mick
    emsik wrote:I use prosilver se, but after installing this mod, there is no borders and the background of text block is grey ? What did i do wrong ?
    Try editing your html files (about.html, contact.html for example) by replacing:

    Code: Select all

    <!-- INCLUDE /frontpage/overall_frontpage_header.html --> 
    With:

    Code: Select all

    <!-- INCLUDE overall_header.html --> 
    And:

    Code: Select all

    <!-- INCLUDE /frontpage/overall_frontpage_footer.html --> 
    With:

    Code: Select all

    <!-- INCLUDE overall_footer.html -->