Sub-Forum Banner

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Mravens10
Registered User
Posts: 12
Joined: Fri Jan 18, 2019 2:49 pm

Sub-Forum Banner

Post by Mravens10 »

Greeting,
I just joined because I’m working on my second website and my previous site was made using mybb forum software. Currently, I decided to go with phpbb because I’ve heard good things about this software. That being said I was wondering if anyone is planning on making an extension that would allow us to add subforum banners images to our site. I’m not a coder, but I figuring it shouldn’t be too hard. If we follow the same concepts that the ForumIcon extension was made by a fantastic human being it should be sort of simple. Again I’m going by my mind and I’m no coder so hopefully it’s simple. Just an extension where we can add banners to a file called forum banners in the public_html folder and then in each subforum menu in the ACP we can select it. Obviously the coding would have to trigger it to work on each subforum. Note: I’m not referring to the Header Banner which is another amazing extension I love. I’m also not referring to the advertisement extension either. I hope you all understand what I mean.
Last edited by HiFiKabin on Sat Jan 19, 2019 6:45 pm, edited 1 time in total.
User avatar
Raul [ThE KuKa]
Style Customisations
Style Customisations
Posts: 11073
Joined: Mon Dec 08, 2003 9:24 pm
Location: Spain
Name: Raul Arroyo
Contact:

Re: Sub-Forum Banner

Post by Raul [ThE KuKa] »

Hello,

"A image is worth a thousand words..."
Can you attach a image of what you want please?

At least, I did not understand what you want. :roll:

Best regards.
All unsolicited PMs will be ignored.
:warning: Knowledge Base | Documentation | Board rules | phpBB Styles Rules & Policies | Styles Queue Stats :warning:


If you like my styles, translations, etc. and want to show some appreciation, then feel free to Donate.
:flag_es: phpBB Spain - Online Since 2003 :heart:


Mravens10
Registered User
Posts: 12
Joined: Fri Jan 18, 2019 2:49 pm

Re: Sub-Forum Banner

Post by Mravens10 »

Obviously this isn’t phpbb but something like. Image
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Sub-Forum Banner

Post by Lumpy Burgertushie »

open viewforum_body.html

Find:

Code: Select all


<h2><a href="{U_VIEW_FORUM}">{FORUM_NAME}</a></h2>
above paste:

Code: Select all


<!-- IF FORUM_ID == 45 -->
<--insert banner code here -->
<!-- ELSEIF FORUM_ID == 46 -->
<--insert banner code here -->
<!-- ELSEIF FORUM_ID == 47 -->
<--insert banner code here -->
<!-- ENDIF -->

change the forum id number to whatever your forum id is.
if you are using prosilver then it would be better to create a copy of prosilver and rename it and edit those files. remember, you have to change the name of the style in the style.cfg file as well.
then, upload the new style to your server and install it and set it as the one everybody uses.


robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
Mravens10
Registered User
Posts: 12
Joined: Fri Jan 18, 2019 2:49 pm

Re: Sub-Forum Banner

Post by Mravens10 »

With this code what would the layout be like for the banner code? Like an example? Do I remove the <!-- --> stuff out when I put it in? I'm not that brilliant of a coder.
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Sub-Forum Banner

Post by Lumpy Burgertushie »

yes, you would replace all of this <-- insert banner code here --> with the actual link to the banner image on your server.
however , do not remove any of the other <-- or --> in the code.

those always have to have arrow no space dash dash one space for the front, and one space dash dash nospace right arrow.


robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
Mravens10
Registered User
Posts: 12
Joined: Fri Jan 18, 2019 2:49 pm

Re: Sub-Forum Banner

Post by Mravens10 »

This what I have so far and it's not working?

Code: Select all

<!--IF FORUM_ID == 24>
<-- <center><img src="www.powerzonicgaming.com/forum/images/forumbanners/24.png"></center> -->
<!-- ELSEIF FORUM_ID == 46 -->
<--insert banner code here -->
<!-- ELSEIF FORUM_ID == 47 -->
<--insert banner code here -->
<!-- ENDIF-->
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Sub-Forum Banner

Post by Lumpy Burgertushie »

Mravens10 wrote: Sat Jan 19, 2019 12:24 am This what I have so far and it's not working?

Code: Select all

<!--IF FORUM_ID == 24>
<-- <center><img src="www.powerzonicgaming.com/forum/images/forumbanners/24.png"></center> -->
<!-- ELSEIF FORUM_ID == 46 -->
<--insert banner code here -->
<!-- ELSEIF FORUM_ID == 47 -->
<--insert banner code here -->
<!-- ENDIF-->
change it to:

Code: Select all

<!--IF FORUM_ID == 24>
<center><img src="https://www.powerzonicgaming.com/forum/images/forumbanners/24.png"></center>
<!-- ELSEIF FORUM_ID == 46 -->
<--insert banner code here -->
<!-- ELSEIF FORUM_ID == 47 -->
<--insert banner code here -->
<!-- ENDIF-->
make sure it is exact. if you leave out the endif you will get errors etc. etc.
right now I am getting blank pages when I click on one of your forums.


robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
Mravens10
Registered User
Posts: 12
Joined: Fri Jan 18, 2019 2:49 pm

Re: Sub-Forum Banner

Post by Mravens10 »

Lumpy Burgertushie wrote: Sat Jan 19, 2019 12:41 am
Mravens10 wrote: Sat Jan 19, 2019 12:24 am This what I have so far and it's not working?

<!--IF FORUM_ID == 24>
<-- <center><img src="www.powerzonicgaming.com/forum/images/forumbanners/24.png"></center> -->
<!-- ELSEIF FORUM_ID == 46 -->
<--insert banner code here -->
<!-- ELSEIF FORUM_ID == 47 -->
<--insert banner code here -->
<!-- ENDIF-->
change it to:
<!--IF FORUM_ID == 24>
<center><img src="https://www.powerzonicgaming.com/forum/images/forumbanners/24.png"></center>
<!-- ELSEIF FORUM_ID == 46 -->
<--insert banner code here -->
<!-- ELSEIF FORUM_ID == 47 -->
<--insert banner code here -->
<!-- ENDIF-->


make sure it is exact. if you leave out the endif you will get errors etc. etc.
right now I am getting blank pages when I click on one of your forums.


robert
Yeah I know, my godaddy hosting went down don't know when it be back up. I'll let you know when it comes back up.
Mravens10
Registered User
Posts: 12
Joined: Fri Jan 18, 2019 2:49 pm

Re: Sub-Forum Banner

Post by Mravens10 »

Bump:
Site is back up and I added the code you suggested and its still not working.

I though the <-- --> stuff is commenting.
User avatar
Talk19Zehn
Registered User
Posts: 846
Joined: Tue Aug 09, 2011 1:10 pm
Contact:

Re: Sub-Forum Banner

Post by Talk19Zehn »

Hi, I think the first introduction of the IF-Statement is also missing --

<!--IF FORUM_ID == 24>

<!-- IF FORUM_ID == 24 -->
Best regards
phpBB3 Designs - My own works: Stylearea Ongray-Designs, Adventinducement-Calendar for phpBB
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Sub-Forum Banner

Post by Lumpy Burgertushie »

it is in certain places but in this case it must be there for the IF statements but not for the actual banner code.

currently you have this:

Code: Select all

<!--IF FORUM_ID == 24 --
you are missing the space needed after the --and you are missing the closing >

it should be this;
<!-- IF FORUM_ID == 24 -->

like I said above you have to be very precise, one space or lack thereof can make it not work etc.


robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
Mravens10
Registered User
Posts: 12
Joined: Fri Jan 18, 2019 2:49 pm

Re: Sub-Forum Banner

Post by Mravens10 »

Yeah I did that and still nothing. Do I have to add something else any where else for this? Here the full part of the code:

Code: Select all

<h2 class="forum-title"><!-- EVENT viewforum_forum_name_prepend --><a href="{U_VIEW_FORUM}">{FORUM_NAME}</a></h2><!-- EVENT viewforum_forum_name_append -->
<!-- EVENT viewforum_forum_title_after -->
<!--IF FORUM_ID == 24 -->
<center><img src="https://www.powerzonicgaming.com/forum/images/forumbanners/24.png"></center>
<!-- ELSEIF FORUM_ID == 46 -->
<--insert banner code here -->
<!-- ELSEIF FORUM_ID == 47 -->
<--insert banner code here -->
<!-- ENDIF -->
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Sub-Forum Banner

Post by Lumpy Burgertushie »

I am still seeing the previous mistakes. did you purge the cache after you made the edits?

this is what I am looking at the source of:
http://powerzonicgaming.com/forum/style ... _body.html

robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
Mravens10
Registered User
Posts: 12
Joined: Fri Jan 18, 2019 2:49 pm

Re: Sub-Forum Banner

Post by Mravens10 »

Just did now. It's giving me this now:
HTTP 500 error
That’s odd... the website can’t display this page
The site may be under maintenance or could have a programming error.
Try this
Go back to the last page
Try contacting the website’s owner
Post Reply

Return to “phpBB Custom Coding”