Customizing a Custom Page

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Get Involved
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
User avatar
redryder
Registered User
Posts: 64
Joined: Mon May 26, 2008 9:45 pm

Customizing a Custom Page

Post by redryder » Thu Aug 07, 2008 4:58 am

what i wanted was a separate page for all our forum rules. something central, that can be linked to from anywhere else on the site, so we wouldn't have 'rules' scattered all over the board.

so i made a custom page. (the knowledge base article on 'adding a page' was great, easy to follow and worked like a charm!) it's very simple. pretty much the page that the article makes, with a few changes to the tables and content.

first, a minor issue. i have an image in the header that i want to link to the new page, just as most header images link to the index. problem is, when i use this same coding as the link to the index:

Code: Select all

<a href="{U_INDEX}"><img src="{T_THEME_PATH}/images/headerMIDDLE.jpg" border="0" /></a>
changing {U_INDEX} to {U_RULES} (the new page title), it still links back to the index. i had to put the actual URL to the new page in order for the link to work. if that's the only way it will work, then i'm fine with that, i just figured making that change should work too. am i missing something?

second, a more complicated inquiry.

the idea for the new 'rules' page was fine, in theory. but needs a bit more customization to be useful in reality. i realized after the fact, that if the 'rules' ever need to be edited, then only someone with access to the ACP and/or original templates could edit and update that page. but we have moderators on the site that would handle such updates that we don't necessarily want to give access to the ACP.

what i'd like to be able to do is integrate some of the post topic features into the new page. having the page appear just as it would when a new topic is posted, without any options to reply to, or add additional topics to, or edit, except for moderators and admins.

while i'm pretty sure it can be done, i'm not entirely sure where to start. i'm guessing that i can pull code from another template, (which i messed around with a bit. copy and paste, trial and error. no success as of yet), all that if this, end if, else this stuff really get's me confused.

can anyone give me a little bit of direction?

thanks a bunch!

~ deanna ~

User avatar
jimdunn
Registered User
Posts: 1570
Joined: Tue Mar 25, 2008 11:49 am
Location: Australia

Re: Customizing a Custom Page

Post by jimdunn » Thu Aug 07, 2008 5:14 am

It sounds a little bit as though you're trying to turn your new page into a forum.

Couldn't you have a Rules Forum, and set permissions on that as you desired?

Sorry if I misinterpreted you.

User avatar
redryder
Registered User
Posts: 64
Joined: Mon May 26, 2008 9:45 pm

Re: Customizing a Custom Page

Post by redryder » Thu Aug 07, 2008 5:20 am

jimdunn wrote:It sounds a little bit as though you're trying to turn your new page into a forum.

Couldn't you have a Rules Forum, and set permissions on that as you desired?

Sorry if I misinterpreted you.
yeah, i suppose i could, if it comes down to it.

was just trying to get away from a 'forum' look for the rules page, and didn't really want to clutter up the forums with a 'rules' page . .

in the end, i just may have to concede . . . but it never hurts to ask first!
;)

User avatar
jimdunn
Registered User
Posts: 1570
Joined: Tue Mar 25, 2008 11:49 am
Location: Australia

Re: Customizing a Custom Page

Post by jimdunn » Thu Aug 07, 2008 5:26 am

If you want a different look for the Rules Forum, you could install a different style for it.
You can assign styles to individual Forums in their settings.

If you're set on having a separate page, an easier way to look at it might be to store the page text separately either in a text file or a new database table, and include it on the Rules page with PHP code. Then you could give your moderators a custom tool/page to edit the text. Still a bit of work involved in setting that up though.

User avatar
redryder
Registered User
Posts: 64
Joined: Mon May 26, 2008 9:45 pm

Re: Customizing a Custom Page

Post by redryder » Thu Aug 07, 2008 5:03 pm

jimdunn wrote:If you want a different look for the Rules Forum, you could install a different style for it.
You can assign styles to individual Forums in their settings.

If you're set on having a separate page, an easier way to look at it might be to store the page text separately either in a text file or a new database table, and include it on the Rules page with PHP code. Then you could give your moderators a custom tool/page to edit the text. Still a bit of work involved in setting that up though.
i'm thinking that no matter what i decide to do, it will involve quite a bit of work ;)

but hey, it'll give me some good practice with all this code stuff. :)



this thought occurs to me tho . . maybe a good place to start might be with a copy of a 'post topic' page, and culling out of it anything that i don't want on the new page . . .

i do want to keep the same style look as the rest of the board, just dont want it to have the same 'feel' as a thread in a topic in a forum . . .

so i guess i'll just start cutting and pasting, saving, purging and refreshing and see what i get!

User avatar
jimdunn
Registered User
Posts: 1570
Joined: Tue Mar 25, 2008 11:49 am
Location: Australia

Re: Customizing a Custom Page

Post by jimdunn » Thu Aug 07, 2008 6:12 pm

It's late here - I just saw your reply :)

Your problem is likely to be that all the pages like viewtopic.php etc, depend on being called from within a forum specific environment. And they display things in a forum like manner - which seems to be what you are trying to move away from, if I understand the previous posts.

If I actually do see what you are trying to achieve in terms of look and feel - this may be moving the wrong way.

Again - tired thoughts - take them at face value.

Jim

Locked

Return to “[3.0.x] Support Forum”