Forum Image in vewforum Page Title

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Scam Warning
RexMundi412
Registered User
Posts: 41
Joined: Fri Nov 15, 2013 1:04 am

Forum Image in vewforum Page Title

Post by RexMundi412 »

In "viewforum_body.html" I would like to add the forum(s) image to the forum(s) page title(s).

EXAMPLE:
From:

Code: Select all

<h2><a href="{U_VIEW_FORUM}">{FORUM_NAME}</a></h2>
To something like:

Code: Select all

<h2><img src="{FORUM_IMAGE}" height="30"><a href="{U_VIEW_FORUM}">{FORUM_NAME}</a></h2>
User avatar
Lumpy Burgertushie
Registered User
Posts: 68490
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Forum Image in vewforum Page Title

Post by Lumpy Burgertushie »

have you tried it yet to see what happens?


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
RexMundi412
Registered User
Posts: 41
Joined: Fri Nov 15, 2013 1:04 am

Re: Forum Image in vewforum Page Title

Post by RexMundi412 »

Robert,
yes I have tried it and a few other variations. The closest I have gotten to is one of those icons that show there should be an image but the link is broken. I'm guessing the "{FORUM_IMAGE}" call to syntax is wrong?

~ Rex
User avatar
Lumpy Burgertushie
Registered User
Posts: 68490
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Forum Image in vewforum Page Title

Post by Lumpy Burgertushie »

try this:

Code: Select all

<!-- <h2><a href="{U_VIEW_FORUM}">{forumrow.FORUM_IMAGE}{FORUM_NAME}</a></h2> -->
you didn't use the correct variable for it to display.

I can't get it to carry the link but it will show up if you do it that way.


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
RexMundi412
Registered User
Posts: 41
Joined: Fri Nov 15, 2013 1:04 am

Re: Forum Image in vewforum Page Title

Post by RexMundi412 »

Tried it this way...

Code: Select all

<!-- <h2><a href="{U_VIEW_FORUM}">{forumrow.FORUM_IMAGE}{FORUM_NAME}</a></h2> -->
... And the entire line disappeared, including the Forum Name text.

Also tried this...

Code: Select all

<h2><a href="{U_VIEW_FORUM}">{forumrow.FORUM_IMAGE}{FORUM_NAME}</a></h2>
... and noting happened.

I tried...

Code: Select all

{forumrow.FORUM_IMAGE}
... a few different ways with no success. Most FAQs about forum image seem to pertain to "forumlist_body.html". Could there be a call function that is allowed there and not on "viewforum_body.html"?

~ Rex
User avatar
Lumpy Burgertushie
Registered User
Posts: 68490
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Forum Image in vewforum Page Title

Post by Lumpy Burgertushie »

are you sure you have forum image set for whatever forum you are trying it on?
if so,
what, exactly , do you have in the box for the forum image?

I just did it the way I showed you above and it works just fine.

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
RexMundi412
Registered User
Posts: 41
Joined: Fri Nov 15, 2013 1:04 am

Re: Forum Image in vewforum Page Title

Post by RexMundi412 »

I'm trying to use the images that I use for "Forum image" set in the forum's ACP settings. I have the images placed in "./phpbb/images/icons/forum/..."

~ Rex
User avatar
Lumpy Burgertushie
Registered User
Posts: 68490
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Forum Image in vewforum Page Title

Post by Lumpy Burgertushie »

RexMundi412 wrote:I'm trying to use the images that I use for "Forum image" set in the forum's ACP settings. I have the images placed in "./phpbb/images/icons/forum/..."

~ Rex

it should be /images/icons/forum/.....
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
RexMundi412
Registered User
Posts: 41
Joined: Fri Nov 15, 2013 1:04 am

Re: Forum Image in vewforum Page Title

Post by RexMundi412 »

"./phpbb/images/icons/forum/..." is where i have the images stored on the server. I have "images/icons/forum/IMAGE.FILE" as the path in ACP/Edit Forum/Forum image, and they display just fine in "fourumlist_body.html". But I can't get any of the codes I tried in viewforum_body.html to display. And when I did try yours, the entire line including the forum's title text disappears.

Image


Seems this should be a 5 minute bit of coding :/
User avatar
Lumpy Burgertushie
Registered User
Posts: 68490
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Forum Image in vewforum Page Title

Post by Lumpy Burgertushie »

ah well, that would have helped before. what style is that?
I have been working on prosilver.

I have been working on putting it somewhere else. I misunderstood your original request.

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
RexMundi412
Registered User
Posts: 41
Joined: Fri Nov 15, 2013 1:04 am

Re: Forum Image in vewforum Page Title

Post by RexMundi412 »

"Vex", it's a style I did based on Prosilver...
viewtopic.php?f=185&t=2221511
... html wise it's virtually the same as Prosilver, it's mainly just CSS changes, in that download anyway. But as you can see I have begun to MOD the overall_ header.
___
I'm not surprised there was a bit of confusion here. My searches for "phpbb" "Forum" "Image" "Icon" before starting this topic virtually resulted in all subjects with how to set them in ACP and if any code editing was involved in the search result, it was about getting the images to display on "forumlist". I had thought to be more concise that my issue lay elsewhere but chose not to, sorry.

thanks for you efforts!

~ Rex
User avatar
Lumpy Burgertushie
Registered User
Posts: 68490
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Forum Image in vewforum Page Title

Post by Lumpy Burgertushie »

ok, I have been attempting this in prosilver and I can't get it to work either.

that variable is defined in the functions_display.php file and that php file is included in viewforum.php

so, the variable should work in the viewforum_body.php file and should display the image but it is not.

I guess someone with more knowledge of how this works will have to come along and help you.

sorry,

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52229
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Forum Image in vewforum Page Title

Post by Brf »

There is no ".forumrow" in viewforum_body. That loop is only in forumlist_body.
If you want to show the {FORUM_IMAGE} you would have to edit viewforum.php to include it.
RexMundi412
Registered User
Posts: 41
Joined: Fri Nov 15, 2013 1:04 am

Re: Forum Image in vewforum Page Title

Post by RexMundi412 »

Brf wrote:... you would have to edit viewforum.php to include it.
That is where I am stuck.
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52229
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Forum Image in vewforum Page Title

Post by Brf »

We should be able to copy what is in the forumlist.

In viewforum.php, look for

Code: Select all

	'MODERATORS'	=> (!empty($moderators[$forum_id])) ? implode(', ', $moderators[$forum_id]) : '',
and after that, on a new line, put in:

Code: Select all

			'FORUM_IMAGE'			=> ($forum_data['forum_image']) ? '<img src="' . $phpbb_root_path . $forum_data['forum_image'] . ' />' : '',
Locked

Return to “[3.0.x] MOD Requests”