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 » Fri Dec 14, 2018 4:37 pm

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: 69355
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: Why is the Icon of Subforum not visible?

Post by KevC » Fri Dec 14, 2018 4:38 pm

You would need to ask the person you bought the style from.
-:|:- Support Request Template -:|:-
Image
Cheap UK Hosting
"In the land of the blind the little green bloke with no pupils is king - init!"

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 » Fri Dec 14, 2018 6:18 pm

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: 50812
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 » 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.
For REALLY good and VERY inexpensive hosting CLICK HERE

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 » Sat Dec 15, 2018 11:51 am

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: 16538
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: Why is the Icon of Subforum not visible?

Post by david63 » 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.
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

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 » Sat Dec 15, 2018 12:07 pm

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: 10940
Joined: Wed Feb 11, 2004 11:02 am
Location: Australia
Contact:

Re: Why is the Icon of Subforum not visible?

Post by battye » Sat Dec 15, 2018 12:43 pm

EDIT: Update at viewtopic.php?p=15153621#p15153621
cryptoevo.de wrote:
Fri Dec 14, 2018 4:37 pm
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
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: 507
Joined: Sun Oct 25, 2015 2:56 pm
Contact:

Re: Why is the Icon of Subforum not visible?

Post by Mannix_ » Sat Dec 15, 2018 3:17 pm

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.
-=-=-=-=-=-=-=-=-=-=-=-=-My Styles-=-=-=-=-=-=-=-=-=-=-=-=-
HexagonHexagonRebornCleanSilverProject Durango
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Want me to port a style to 3.2.x etc. contact me here or on twitter.

User avatar
battye
Extension Customisations
Extension Customisations
Posts: 10940
Joined: Wed Feb 11, 2004 11:02 am
Location: Australia
Contact:

Re: Why is the Icon of Subforum not visible?

Post by battye » Sat Dec 15, 2018 4:49 pm

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 470 times
Customisations Team Member

https://github.com/battye/php-array-parser - Give it a Star! :D

User avatar
battye
Extension Customisations
Extension Customisations
Posts: 10940
Joined: Wed Feb 11, 2004 11:02 am
Location: Australia
Contact:

Re: Why is the Icon of Subforum not visible?

Post by battye » Sun Dec 16, 2018 8:29 am

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: 21568
Joined: Fri Aug 29, 2008 9:49 am
Location: Caerdydd

Re: Why is the Icon of Subforum not visible?

Post by Mick » Sun Dec 16, 2018 4:45 pm

Nice one!
"The more connected we get the more alone we become" - Kyle Broflovski

Post Reply

Return to “phpBB Custom Coding”