Why is the Icon of Subforum not visible?

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
Post Reply
cryptoevo.de
Registered User
Posts: 18
Joined: Mon Dec 25, 2017 4:30 pm

Why is the Icon of Subforum not visible?

Post by cryptoevo.de »

I use a bought theme, and when I set a Icon it is only visible for the Forumtest1 and Testforum2 shows a listing dot/circle instead.
Bildschirmfoto 2018-12-13 um 16.18.09.png
The coder of the theme said that changes had to be made in to core phpBB for that.
Why can I then give a path for a icon when its not shown?
Bildschirmfoto 2018-12-13 um 16.23.17.png
The test environment: www.bnn.ooo
Last edited by Mick on Sat Dec 15, 2018 12:58 pm, edited 1 time in total.
Reason: Moved from support.
User avatar
KevC
Support Team Member
Support Team Member
Posts: 72375
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: Why is the Icon of Subforum not visible?

Post by KevC »

You would need to ask the person you bought the style from.
-:|:- Support Request Template -:|:-
Image
"Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb"
cryptoevo.de
Registered User
Posts: 18
Joined: Mon Dec 25, 2017 4:30 pm

Re: Why is the Icon of Subforum not visible?

Post by cryptoevo.de »

KevC wrote: Fri Dec 14, 2018 4:38 pm You would need to ask the person you bought the style from.
Hey KevC :)

Erm, with the term coder I meant the guy who wrote the code of the theme, here specially he is also coincidentally the seller.
So i asked him already.

And he claimed that he would need to change phpBB core for it and that i should ask here around.

But I already thought, if the icon works for the "mother"-forum than it should be nearly the same code for the subform?
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 52768
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Why is the Icon of Subforum not visible?

Post by stevemaury »

We have no idea what phpBB core edits might be required to make his style work as you wish, since we know nothing about his style. If he knows that edits are required, he should know what those edits are.
I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
cryptoevo.de
Registered User
Posts: 18
Joined: Mon Dec 25, 2017 4:30 pm

Re: Why is the Icon of Subforum not visible?

Post by cryptoevo.de »

stevemaury wrote: Fri Dec 14, 2018 8:22 pm We have no idea what phpBB core edits might be required to make his style work as you wish, since we know nothing about his style. If he knows that edits are required, he should know what those edits are.
Isn't there like a conventional way for "requesting" the icon?
I mean like there must be a usual way for that?
Because in the back panel i can set an Icon therefore, there must be a conventional way to ask for the icon...
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Why is the Icon of Subforum not visible?

Post by david63 »

cryptoevo.de wrote: Sat Dec 15, 2018 11:51 am Isn't there like a conventional way for "requesting" the icon?
As you have found out - yes there is but if the style developer does not respect that method then there is nothing that we can do here. This is one of the downsides of using styles that have not been approved in the CDB.
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
cryptoevo.de
Registered User
Posts: 18
Joined: Mon Dec 25, 2017 4:30 pm

Re: Why is the Icon of Subforum not visible?

Post by cryptoevo.de »

david63 wrote: Sat Dec 15, 2018 11:56 am
cryptoevo.de wrote: Sat Dec 15, 2018 11:51 am Isn't there like a conventional way for "requesting" the icon?
As you have found out - yes there is but if the style developer does not respect that method then there is nothing that we can do here. This is one of the downsides of using styles that have not been approved in the CDB.
Dude, why are everybody concentrating what one individual have done... when I ask in generell how it has to be done?
It doesn't matter how he has implemented it ("wrong")... what matters is what has to be done in generell to get that work done guys...
I can talk the whole day about why something is not working, but this is waste of time... instead focus on how it has to be done right.

I can't code at all, but I can in theory i understand the logics at least.
None of your posts helped me really in anyway, I want to know what he has to do or if his claim that it is caused by phpBB core is true...

SO i searched trough some random open source template and found that line.

Code: Select all

<!-- IF forumrow.FORUM_IMAGE --><span class="forum-image">{forumrow.FORUM_IMAGE}</span>
https://github.com/bpiec/we_clearblue/b ... y.html#L45

This seems like the snipped or "convention" i talk of, i am sure there is no big way around then some stupid hardcoded paths or other shit you talk of.

Isn't it enough to paste that line somewhere {forumrow.FORUM_IMAGE} or something similar to see the icon of the subform?
User avatar
battye
Extension Customisations
Extension Customisations
Posts: 11048
Joined: Wed Feb 11, 2004 11:02 am
Location: Australia
Contact:

Re: Why is the Icon of Subforum not visible?

Post by battye »

EDIT: Update at viewtopic.php?p=15153621#p15153621
cryptoevo.de wrote: Fri Dec 14, 2018 4:37 pmWhy can I then give a path for a icon when its not shown?
Bildschirmfoto 2018-12-13 um 16.23.17.png
The test environment: www.bnn.ooo
Because at https://bnn.ooo/viewforum.php?f=4 - see, Testforum2 has the icon there :)

AFAIK there is no "conventional" way to get a forum icon appearing in that little list of subforums because a) it would look really out of place; and b) there is not that much space there (eg. there's no subforum descriptions or anything like that either - just the name of the subforum).

I don't recommend this because we've moved away from hard-coded changes and do things with extensions now - to make updating easier, and so nobody has to make manual edits to the code any more. But I don't want you to leave empty handed either because what you are asking is possible with some small tweaks - as you said the code for forums and subforums isn't hugely different.

I haven't tested this, so this is more of a point in the right direction so you can see what is required to get something like this working. Perhaps this will help the person who designed your style inform you of your options as well, with regard to the style they have made. :)

Basically, it would be something like this. Open includes/functions_display.php

find: $subforums[$parent_id][$forum_id]['type'] = $row['forum_type'];
after add: $subforums[$parent_id][$forum_id]['forum_image'] = $row['forum_image'];

find:

Code: Select all

					$subforums_list[] = array(
						'link'		=> append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $subforum_id),
						'name'		=> $subforum_row['name'],
						'unread'	=> $subforum_unread,
						'type'		=> $subforum_row['type'],
					);
on the line above 'link', add: 'forum_image' => $subforum_row['forum_image'],

find:

Code: Select all

			$subforums_row[] = array(
				'U_SUBFORUM'	=> $subforum['link'],
				'SUBFORUM_NAME'	=> $subforum['name'],
				'S_UNREAD'		=> $subforum['unread'],
				'IS_LINK'		=> $subforum['type'] == FORUM_LINK,
			);
on the line above U_SUBFORUM, add: 'U_SUBFORUM_IMAGE' => $subforum['forum_image'],

Then in forumlist_body.html your designer should then be able to access the forum image with {forumrow.subforum.U_SUBFORUM_IMAGE}
Customisations Team Member

https://github.com/battye/php-array-parser - Give it a Star! :D
User avatar
Mannix_
Registered User
Posts: 1857
Joined: Sun Oct 25, 2015 2:56 pm
Name: Matt
Contact:

Re: Why is the Icon of Subforum not visible?

Post by Mannix_ »

If you are asking for the way to display forum images set in acp for subforum on index page, it is possible to do without touching the core files of phpbb it just few edits to the template file. But it would require to have subforum name and the forum image of that subforum to be the same to make it work.
Did I helped You? Consider a donation.
New version of phpBB has been released? My styles aren't validated for it yet? Check my page for the latest downloads!
User avatar
battye
Extension Customisations
Extension Customisations
Posts: 11048
Joined: Wed Feb 11, 2004 11:02 am
Location: Australia
Contact:

Re: Why is the Icon of Subforum not visible?

Post by battye »

I'm putting together a small extension that will show subforum images on the index page, cryptoevo.de.
If you give me another day or so I'll have something that you can use on your forum without making any code changes at all.
ch5.png
ch5.png (8.92 KiB) Viewed 780 times
Customisations Team Member

https://github.com/battye/php-array-parser - Give it a Star! :D
User avatar
battye
Extension Customisations
Extension Customisations
Posts: 11048
Joined: Wed Feb 11, 2004 11:02 am
Location: Australia
Contact:

Re: Why is the Icon of Subforum not visible?

Post by battye »

Extension in Development viewtopic.php?f=456&t=2495511
Customisations Team Member

https://github.com/battye/php-array-parser - Give it a Star! :D
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26546
Joined: Fri Aug 29, 2008 9:49 am

Re: Why is the Icon of Subforum not visible?

Post by Mick »

Nice one!
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
Post Reply

Return to “phpBB Custom Coding”