Page 1 of 2

Forum Image in vewforum Page Title

Posted: Sat Sep 06, 2014 3:32 pm
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>

Re: Forum Image in vewforum Page Title

Posted: Sat Sep 06, 2014 11:23 pm
by Lumpy Burgertushie
have you tried it yet to see what happens?


robert

Re: Forum Image in vewforum Page Title

Posted: Sun Sep 07, 2014 12:38 pm
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

Re: Forum Image in vewforum Page Title

Posted: Sun Sep 07, 2014 1:12 pm
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

Re: Forum Image in vewforum Page Title

Posted: Sun Sep 07, 2014 1:29 pm
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

Re: Forum Image in vewforum Page Title

Posted: Sun Sep 07, 2014 2:28 pm
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

Re: Forum Image in vewforum Page Title

Posted: Sun Sep 07, 2014 2:39 pm
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

Re: Forum Image in vewforum Page Title

Posted: Sun Sep 07, 2014 3:48 pm
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/.....

Re: Forum Image in vewforum Page Title

Posted: Mon Sep 08, 2014 1:08 pm
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 :/

Re: Forum Image in vewforum Page Title

Posted: Mon Sep 08, 2014 2:05 pm
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

Re: Forum Image in vewforum Page Title

Posted: Mon Sep 08, 2014 2:34 pm
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

Re: Forum Image in vewforum Page Title

Posted: Mon Sep 08, 2014 2:59 pm
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

Re: Forum Image in vewforum Page Title

Posted: Mon Sep 08, 2014 3:13 pm
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.

Re: Forum Image in vewforum Page Title

Posted: Mon Sep 08, 2014 4:17 pm
by RexMundi412
Brf wrote:... you would have to edit viewforum.php to include it.
That is where I am stuck.

Re: Forum Image in vewforum Page Title

Posted: Mon Sep 08, 2014 5:34 pm
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'] . ' />' : '',