[RC] Add Page MOD

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Scam Warning
Locked
User avatar
janine
Registered User
Posts: 345
Joined: Sun Mar 24, 2002 6:38 pm
Location: Pa

Re: [RC] Add Page MOD

Post by janine » Wed Apr 01, 2009 2:33 pm

It was there and enabled..

Ahh, I added the module wrong :oops:

It's working fine now sorry!

User avatar
ameeck
Former Team Member
Posts: 6559
Joined: Mon Mar 21, 2005 6:57 pm

Re: [RC] Add Page MOD

Post by ameeck » Wed Apr 01, 2009 2:40 pm

No problem, I'm glad it works.

User avatar
simplistsims
Registered User
Posts: 106
Joined: Tue May 31, 2005 1:17 pm
Location: Carlisle, England
Contact:

Re: [RC] Add Page MOD

Post by simplistsims » Wed Apr 01, 2009 2:57 pm

Can I use PHP with this MOD? :mrgreen:

User avatar
ameeck
Former Team Member
Posts: 6559
Joined: Mon Mar 21, 2005 6:57 pm

Re: [RC] Add Page MOD

Post by ameeck » Wed Apr 01, 2009 3:03 pm

No, only BBCode can be used to format pages.

User avatar
madguy
Registered User
Posts: 114
Joined: Thu Sep 04, 2008 2:07 pm
Location: Russia, Moscow

Re: [RC] Add Page MOD

Post by madguy » Wed Apr 01, 2009 6:18 pm

Awesome!!! :D Waiting for subsilver2... ;)

EDIT: Hm, it seems that I cannot use custom BBCodes in pages?
EDIT 2: Oh wait, I forgot to enter those quotes that I put around {TEXT} token in the custom BBCode... :oops:

User avatar
ameeck
Former Team Member
Posts: 6559
Joined: Mon Mar 21, 2005 6:57 pm

Re: [RC] Add Page MOD

Post by ameeck » Wed Apr 01, 2009 9:13 pm

subsilver2 changes are packed in the version I sent to the MODDB, wait for the update, it shouldn't take more than a week.

Humanrag3
Registered User
Posts: 157
Joined: Thu Oct 30, 2008 3:58 am

Re: [RC] Add Page MOD

Post by Humanrag3 » Thu Apr 02, 2009 3:27 am

I don't if its just me, but I added

Code: Select all

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([A-Za-z0-9\-\+]+)$ ./page.php?p=$1 [L]
Like it says, but when do /pagename
it just brings me to the list of pages.

User avatar
ameeck
Former Team Member
Posts: 6559
Joined: Mon Mar 21, 2005 6:57 pm

Re: [RC] Add Page MOD

Post by ameeck » Thu Apr 02, 2009 5:17 am

Do you enter what is in the Page URL indentificator field when you add the page?

User avatar
DoYouSpeakWak
Registered User
Posts: 2307
Joined: Fri Jul 25, 2008 1:32 pm
Location: Island of Wak-Wak
Name: Hans Lassen
Contact:

Re: [RC] Add Page MOD

Post by DoYouSpeakWak » Thu Apr 02, 2009 10:16 am

Thx for this one. Really easy install and there are so many ways this could be used.

i have one question about the modrewrite. is it posible to make like this.

Normal
www.example.com/phpBB3/pagename

Instead do it like this

www.example.com/pagename

I can image it would require a htaccces file at root. But it would less for users to remember.
Whatever you share comes back. Support the phpBB Communities
My Validated and Released Modifications
Offering paid phpBB help and System administrator services.

Niklas.SB
Registered User
Posts: 37
Joined: Fri May 02, 2008 7:25 am

Re: [RC] Add Page MOD

Post by Niklas.SB » Thu Apr 02, 2009 12:42 pm

You have to upload phpBB in your root directory: root/phpBB-files and directorys!
At the moment you have root/phpBB3/phpBB-files and directorys

Greets,
Niklas

User avatar
ameeck
Former Team Member
Posts: 6559
Joined: Mon Mar 21, 2005 6:57 pm

Re: [RC] Add Page MOD

Post by ameeck » Thu Apr 02, 2009 12:43 pm

You would put the code I have in the install file into a .htaccess file in the root folder and change the paths. In the first parameter you would add phpBB3/ and in the second you would change ./ to /

User avatar
DoYouSpeakWak
Registered User
Posts: 2307
Joined: Fri Jul 25, 2008 1:32 pm
Location: Island of Wak-Wak
Name: Hans Lassen
Contact:

Re: [RC] Add Page MOD

Post by DoYouSpeakWak » Thu Apr 02, 2009 1:52 pm

Thx for the reply. Im not all that smart with modrewrites yet.

Can it be this easy ?

Code: Select all

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([A-Za-z0-9\-\+]+)$ ./phpBB3/page.php?p=$1 [L]
Whatever you share comes back. Support the phpBB Communities
My Validated and Released Modifications
Offering paid phpBB help and System administrator services.

User avatar
ameeck
Former Team Member
Posts: 6559
Joined: Mon Mar 21, 2005 6:57 pm

Re: [RC] Add Page MOD

Post by ameeck » Thu Apr 02, 2009 1:56 pm

Yes, it can be this easy, that should work. Though I'm no expert on mod_rewrite too.

If you have any mod_rewrite script in the root folder, it will probably conflict together though.

User avatar
DoYouSpeakWak
Registered User
Posts: 2307
Joined: Fri Jul 25, 2008 1:32 pm
Location: Island of Wak-Wak
Name: Hans Lassen
Contact:

Re: [RC] Add Page MOD

Post by DoYouSpeakWak » Thu Apr 02, 2009 2:54 pm

ameeck wrote:Yes, it can be this easy, that should work. Though I'm no expert on mod_rewrite too.

If you have any mod_rewrite script in the root folder, it will probably conflict together though.
Thats a bit contradicting with your current rank image :)

Tried it. Works fine. Only have two other things in the root file. redirect from phpBB2 to phpBB3 and some wiki. no problems. But when browsing the page all links in header and footer are to example.com/faq.php were it should be example.com/phpBB3/faq.php Seems there is a bit more to it.
Whatever you share comes back. Support the phpBB Communities
My Validated and Released Modifications
Offering paid phpBB help and System administrator services.

User avatar
ameeck
Former Team Member
Posts: 6559
Joined: Mon Mar 21, 2005 6:57 pm

Re: [RC] Add Page MOD

Post by ameeck » Thu Apr 02, 2009 3:36 pm

Didn't you know were just automated robots that answer your questions using Google? :)

I should have thought of that, the paths are still generated from the page.php file.

I would try this:
  • move page.php to the root directory and change

    Code: Select all

    $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './'; 
    to

    Code: Select all

    $phpbb_root_path = './phpBB3/'; 
  • In your new .htaccess, change the second parameter to

    Code: Select all

    ./page.php?p=$1 [L]
  • Now hopefully you should see the pages correctly

Locked

Return to “[3.0.x] MODs in Development”