Diffrent Icons for subforum read and subforum unread

For support and discussion related to templates, themes, and imagesets in phpBB 3.2.
User avatar
Tastenplayer
Registered User
Posts: 999
Joined: Thu Jul 03, 2014 9:20 pm
Location: Village in the middle of Switzerland
Name: Jutta Koliofotis

Diffrent Icons for subforum read and subforum unread

Post by Tastenplayer »

So far I've always received an error. Now it finally worked halfway.
The problem is, if I insert this code it will be displayed correctly:
Subforum1.png

Code: Select all


							<!-- BEGIN subforum -->
								<!-- EVENT forumlist_body_subforum_link_prepend --><a href="{forumrow.subforum.U_SUBFORUM}" class="subforum<!-- IF forumrow.subforum.S_UNREAD --> unread<!-- ELSE --> read<!-- ENDIF -->" title="<!-- IF forumrow.subforum.S_UNREAD -->{L_UNREAD_POSTS}<!-- ELSE -->{L_NO_UNREAD_POSTS}<!-- ENDIF -->">
									<i class="icon <!-- IF forumrow.subforum.IS_LINK --> fa-share fa-fw icon-black<!-- ENDIF --><!-- IF forumrow.subforum.S_UNREAD --> fa-file fa-fw icon-black<!-- ELSE --> fa-file-o fa-fw icon-black<!-- ENDIF --> icon-md" aria-hidden="true"></i>{forumrow.subforum.SUBFORUM_NAME}</a><!-- IF not forumrow.subforum.S_LAST_ROW -->{L_COMMA_SEPARATOR}<!-- ENDIF --><!-- EVENT forumlist_body_subforum_link_append -->
							<!-- END subforum -->
It's supposed to be:
- Icon fa-share for subforum link
- Icon fa-square for subforum unread
- Icon fa-circle-o for subforum read
be displayed.
Then, however, an icon fa-circle-o is also displayed for the subforum link.
Subforum2.png
What must the correct code be? I just can't figure out what I have to change and how.

Code: Select all

							<!-- BEGIN subforum -->
								<!-- EVENT forumlist_body_subforum_link_prepend --><a href="{forumrow.subforum.U_SUBFORUM}" class="subforum<!-- IF forumrow.subforum.S_UNREAD --> unread<!-- ELSE --> read<!-- ENDIF -->" title="<!-- IF forumrow.subforum.S_UNREAD -->{L_UNREAD_POSTS}<!-- ELSE -->{L_NO_UNREAD_POSTS}<!-- ENDIF -->">
									<i class="icon <!-- IF forumrow.subforum.IS_LINK --> fa-share fa-fw icon-black<!-- ENDIF --><!-- IF forumrow.subforum.S_UNREAD --> fa-square fa-fw icon-black<!-- ELSE --> fa-circle-o fa-fw icon-black<!-- ENDIF --> icon-md" aria-hidden="true"></i>{forumrow.subforum.SUBFORUM_NAME}</a><!-- IF not forumrow.subforum.S_LAST_ROW -->{L_COMMA_SEPARATOR}<!-- ENDIF --><!-- EVENT forumlist_body_subforum_link_append -->
							<!-- END subforum -->
Edit: code was wrong - not fa-file-o (which strangely enough is displayed correctly in style) but a fa-circle-o, what then also shows a fa-circle-o for subforum link, for whatever reason :? .
You do not have the required permissions to view the files attached to this post.
More of my styles you can find in my phpBB Style Board & More
Be the best version of yourself rather than a bad copy of someone else!
Excuse me for my English, but I learned the language by speaking to people and not at school.
🎨 All my styles are updated to 3.3.8 and can be downloaded here
User avatar
Mannix_
Registered User
Posts: 2029
Joined: Sun Oct 25, 2015 2:56 pm
Name: Matt

Re: Diffrent Icons for subforum read and subforum unread

Post by Mannix_ »

So is everything working as intended now or you still need help with something?
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
Tastenplayer
Registered User
Posts: 999
Joined: Thu Jul 03, 2014 9:20 pm
Location: Village in the middle of Switzerland
Name: Jutta Koliofotis

Re: Diffrent Icons for subforum read and subforum unread

Post by Tastenplayer »

Mannix_ wrote: Wed Oct 23, 2019 1:29 pm So is everything working as intended now or you still need help with something?
The problem still exists, as written above.

Strangely enough it works when I use a fa-share for subforum-link, a fa-file-o for subforum-read and a fa-square for subforum-unread.
If I want a fa-circle-o instead of the fa-file-o, the subforum link will also show a fa-circle-o instead of a fa-share.
Therefore my code seems to be faulty. Or how else is such a thing possible(strange is that it simply works correctly with the fa-file-o but not with the fa-circle-o)?

Code: Select all

<!-- BEGIN subforum -->
								<!-- EVENT forumlist_body_subforum_link_prepend --><a href="{forumrow.subforum.U_SUBFORUM}" class="subforum<!-- IF forumrow.subforum.S_UNREAD --> unread<!-- ELSE --> read<!-- ENDIF -->" title="<!-- IF forumrow.subforum.S_UNREAD -->{L_UNREAD_POSTS}<!-- ELSE -->{L_NO_UNREAD_POSTS}<!-- ENDIF -->">
									<i class="icon <!-- IF forumrow.subforum.IS_LINK --> fa-share fa-fw icon-black<!-- ENDIF --><!-- IF forumrow.subforum.S_UNREAD --> fa-square fa-fw icon-black<!-- ELSE --> fa-circle-o fa-fw icon-black<!-- ENDIF --> icon-md" aria-hidden="true"></i>{forumrow.subforum.SUBFORUM_NAME}</a><!-- IF not forumrow.subforum.S_LAST_ROW -->{L_COMMA_SEPARATOR}<!-- ENDIF --><!-- EVENT forumlist_body_subforum_link_append -->
							<!-- END subforum -->
More of my styles you can find in my phpBB Style Board & More
Be the best version of yourself rather than a bad copy of someone else!
Excuse me for my English, but I learned the language by speaking to people and not at school.
🎨 All my styles are updated to 3.3.8 and can be downloaded here
User avatar
Mazeltof
Registered User
Posts: 104
Joined: Wed Sep 28, 2016 5:18 pm
Location: Arras - France

Re: Diffrent Icons for subforum read and subforum unread

Post by Mazeltof »

Hi

Maybe you can try with something like that :

Code: Select all

								<!-- EVENT forumlist_body_subforum_link_prepend --><a href="{forumrow.subforum.U_SUBFORUM}" class="subforum<!-- IF forumrow.subforum.S_UNREAD --> unread<!-- ELSE --> read<!-- ENDIF -->" title="<!-- IF forumrow.subforum.S_UNREAD -->{L_UNREAD_POSTS}<!-- ELSE -->{L_NO_UNREAD_POSTS}<!-- ENDIF -->">
									<i class="icon <!-- IF forumrow.subforum.IS_LINK -->fa-external-link<!-- ENDIF --><!-- IF forumrow.subforum.S_UNREAD --> fa-square<!-- ELSE --> fa-circle-o<!-- ENDIF --> fa-fw icon-black icon-md" aria-hidden="true"></i>{forumrow.subforum.SUBFORUM_NAME}</a><!-- IF not forumrow.subforum.S_LAST_ROW -->{L_COMMA_SEPARATOR}<!-- ENDIF --><!-- EVENT forumlist_body_subforum_link_append -->
							<!-- END subforum -->
User avatar
warmweer
Jr. Extension Validator
Posts: 11873
Joined: Fri Jul 04, 2003 6:34 am
Location: somewhere in the space-time continuum

Re: Diffrent Icons for subforum read and subforum unread

Post by warmweer »

Can't this be done with css?
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
User avatar
Tastenplayer
Registered User
Posts: 999
Joined: Thu Jul 03, 2014 9:20 pm
Location: Village in the middle of Switzerland
Name: Jutta Koliofotis

Re: Diffrent Icons for subforum read and subforum unread

Post by Tastenplayer »

Mazeltof wrote: Wed Oct 23, 2019 7:34 pm Hi

Maybe you can try with something like that :

Code: Select all

								<!-- EVENT forumlist_body_subforum_link_prepend --><a href="{forumrow.subforum.U_SUBFORUM}" class="subforum<!-- IF forumrow.subforum.S_UNREAD --> unread<!-- ELSE --> read<!-- ENDIF -->" title="<!-- IF forumrow.subforum.S_UNREAD -->{L_UNREAD_POSTS}<!-- ELSE -->{L_NO_UNREAD_POSTS}<!-- ENDIF -->">
									<i class="icon <!-- IF forumrow.subforum.IS_LINK -->fa-external-link<!-- ENDIF --><!-- IF forumrow.subforum.S_UNREAD --> fa-square<!-- ELSE --> fa-circle-o<!-- ENDIF --> fa-fw icon-black icon-md" aria-hidden="true"></i>{forumrow.subforum.SUBFORUM_NAME}</a><!-- IF not forumrow.subforum.S_LAST_ROW -->{L_COMMA_SEPARATOR}<!-- ENDIF --><!-- EVENT forumlist_body_subforum_link_append -->
							<!-- END subforum -->
I had already tried this code. It doesn't work that way. The problem is the subforum link.
code_colorblinds.png
Can't this be done with css?
My previous attempts to adjust this in CSS didn't work.
You do not have the required permissions to view the files attached to this post.
More of my styles you can find in my phpBB Style Board & More
Be the best version of yourself rather than a bad copy of someone else!
Excuse me for my English, but I learned the language by speaking to people and not at school.
🎨 All my styles are updated to 3.3.8 and can be downloaded here
User avatar
Mannix_
Registered User
Posts: 2029
Joined: Sun Oct 25, 2015 2:56 pm
Name: Matt

Re: Diffrent Icons for subforum read and subforum unread

Post by Mannix_ »

try this

Code: Select all

<!-- BEGIN subforum -->
								<!-- EVENT forumlist_body_subforum_link_prepend --><a href="{forumrow.subforum.U_SUBFORUM}" class="subforum<!-- IF forumrow.subforum.S_UNREAD --> unread<!-- ELSE --> read<!-- ENDIF -->" title="<!-- IF forumrow.subforum.S_UNREAD -->{L_UNREAD_POSTS}<!-- ELSE -->{L_NO_UNREAD_POSTS}<!-- ENDIF -->">
									<i class="icon <!-- IF forumrow.subforum.IS_LINK -->fa-share<!-- ELSEIF forumrow.subforum.S_UNREAD -->fa-square icon-black<!-- ELSE --> fa-circle-o icon-black<!-- ENDIF --> fa-fw icon-md" aria-hidden="true"></i>{forumrow.subforum.SUBFORUM_NAME}</a><!-- IF not forumrow.subforum.S_LAST_ROW -->{L_COMMA_SEPARATOR}<!-- ENDIF --><!-- EVENT forumlist_body_subforum_link_append -->
							<!-- END subforum -->
result :
2019-10-24 09.10.43 localhost 426e66d82fb8.png
You do not have the required permissions to view the files attached to this post.
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
Tastenplayer
Registered User
Posts: 999
Joined: Thu Jul 03, 2014 9:20 pm
Location: Village in the middle of Switzerland
Name: Jutta Koliofotis

Re: Diffrent Icons for subforum read and subforum unread

Post by Tastenplayer »

Great! Many thanks for the help.
More of my styles you can find in my phpBB Style Board & More
Be the best version of yourself rather than a bad copy of someone else!
Excuse me for my English, but I learned the language by speaking to people and not at school.
🎨 All my styles are updated to 3.3.8 and can be downloaded here
User avatar
Tastenplayer
Registered User
Posts: 999
Joined: Thu Jul 03, 2014 9:20 pm
Location: Village in the middle of Switzerland
Name: Jutta Koliofotis

Re: Diffrent Icons for subforum read and subforum unread

Post by Tastenplayer »

This code only works if the subforums icons have the same color. As soon as different colors are to be displayed (or more changes in style), this won't work anymore.
For Subforum link the code for the icon button is taken and for Subforum read the red color of Subforum unreads is taken.
icons_coloredwelcome.png
For Subforum Link this code now applies

Code: Select all

.icon, .button .icon {
    color: #BA8D8D;
}
Subforen Code

Code: Select all

							<!-- BEGIN subforum -->
								<!-- EVENT forumlist_body_subforum_link_prepend --><a href="{forumrow.subforum.U_SUBFORUM}" class="subforum<!-- IF forumrow.subforum.S_UNREAD --> unread<!-- ELSE --> read<!-- ENDIF -->" title="<!-- IF forumrow.subforum.S_UNREAD -->{L_UNREAD_POSTS}<!-- ELSE -->{L_NO_UNREAD_POSTS}<!-- ENDIF -->">
									<i class="icon <!-- IF forumrow.subforum.IS_LINK -->fa-share icon black<!-- ELSEIF forumrow.subforum.S_UNREAD -->fa-square icon-red<!-- ELSE --> fa-square-o icon black<!-- ENDIF --> fa-fw icon-md" aria-hidden="true"></i>{forumrow.subforum.SUBFORUM_NAME}</a><!-- IF not forumrow.subforum.S_LAST_ROW -->{L_COMMA_SEPARATOR}<!-- ENDIF --><!-- EVENT forumlist_body_subforum_link_append -->
							<!-- END subforum -->
As a result, the color for these icons would have to be configured in style.css now. But there might be a problem if the same icons are used in any extension or other place in this style. Weird that the colors in the html do not grab.
You do not have the required permissions to view the files attached to this post.
More of my styles you can find in my phpBB Style Board & More
Be the best version of yourself rather than a bad copy of someone else!
Excuse me for my English, but I learned the language by speaking to people and not at school.
🎨 All my styles are updated to 3.3.8 and can be downloaded here
User avatar
Mannix_
Registered User
Posts: 2029
Joined: Sun Oct 25, 2015 2:56 pm
Name: Matt

Re: Diffrent Icons for subforum read and subforum unread

Post by Mannix_ »

Tried to read your post like 10 times and I still don't understand what you want to achieve or what is not working. Link and better explanation would be helpful.
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
Tastenplayer
Registered User
Posts: 999
Joined: Thu Jul 03, 2014 9:20 pm
Location: Village in the middle of Switzerland
Name: Jutta Koliofotis

Re: Diffrent Icons for subforum read and subforum unread

Post by Tastenplayer »

Actually I wanted to insert an edit into my post. But you already answered.

This doesn't seem to have been a problem with the subforum icon code, but my icon code for navigation and buttons. Now everything seems to be displayed correctly.

removed

Code: Select all

.icon, .button .icon {
    color: #BA8D8D;
}
changed to

Code: Select all

.button .icon {
color: #BA8D8D;
}

.nav-main.linklist .icon, .breadcrumbs .crumb .icon, #nav-footer.linklist .icon {
	color: #BA8D8D;
}
Result
colored_iconcolors.png
You do not have the required permissions to view the files attached to this post.
Last edited by Tastenplayer on Mon Oct 28, 2019 3:16 pm, edited 1 time in total.
More of my styles you can find in my phpBB Style Board & More
Be the best version of yourself rather than a bad copy of someone else!
Excuse me for my English, but I learned the language by speaking to people and not at school.
🎨 All my styles are updated to 3.3.8 and can be downloaded here
User avatar
Mannix_
Registered User
Posts: 2029
Joined: Sun Oct 25, 2015 2:56 pm
Name: Matt

Re: Diffrent Icons for subforum read and subforum unread

Post by Mannix_ »

Tastenplayer wrote: Mon Oct 28, 2019 10:43 am
Subforen Code

Code: Select all

							<!-- BEGIN subforum -->
								<!-- EVENT forumlist_body_subforum_link_prepend --><a href="{forumrow.subforum.U_SUBFORUM}" class="subforum<!-- IF forumrow.subforum.S_UNREAD --> unread<!-- ELSE --> read<!-- ENDIF -->" title="<!-- IF forumrow.subforum.S_UNREAD -->{L_UNREAD_POSTS}<!-- ELSE -->{L_NO_UNREAD_POSTS}<!-- ENDIF -->">
									<i class="icon <!-- IF forumrow.subforum.IS_LINK -->fa-share icon black<!-- ELSEIF forumrow.subforum.S_UNREAD -->fa-square icon-red<!-- ELSE --> fa-square-o icon black<!-- ENDIF --> fa-fw icon-md" aria-hidden="true"></i>{forumrow.subforum.SUBFORUM_NAME}</a><!-- IF not forumrow.subforum.S_LAST_ROW -->{L_COMMA_SEPARATOR}<!-- ENDIF --><!-- EVENT forumlist_body_subforum_link_append -->
							<!-- END subforum -->
The problem I see with your code is this. In subforum link you call for 3 classes fa-share icon and black i think you meant to call for icon-black class and the fa-share same goes for subforum read that calls for fa-square-o icon and black. Basically your split the icon-black class into two separate classes where icon class is already being called at the start in the "i" tag. Subforum unread part looks correctly imo
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
Tastenplayer
Registered User
Posts: 999
Joined: Thu Jul 03, 2014 9:20 pm
Location: Village in the middle of Switzerland
Name: Jutta Koliofotis

Re: Diffrent Icons for subforum read and subforum unread

Post by Tastenplayer »

I still believe that only this code in style was to blame .icon, .button .icon
Since I changed that, everything looks correct, even with the subforums.
But also the color for the nav-footer icons must be defined (Code in topic above is edited)
More of my styles you can find in my phpBB Style Board & More
Be the best version of yourself rather than a bad copy of someone else!
Excuse me for my English, but I learned the language by speaking to people and not at school.
🎨 All my styles are updated to 3.3.8 and can be downloaded here
User avatar
Mannix_
Registered User
Posts: 2029
Joined: Sun Oct 25, 2015 2:56 pm
Name: Matt

Re: Diffrent Icons for subforum read and subforum unread

Post by Mannix_ »

I'm guessing this code

Code: Select all

.icon, .button .icon {
    color: #BA8D8D;
}
was in a css file that was loaded after colours.css? hence the red color for icon-red was being overwritten by it.
But i still belive your subforum code looks faulty and it should be like this

Code: Select all

<!-- BEGIN subforum -->
								<!-- EVENT forumlist_body_subforum_link_prepend --><a href="{forumrow.subforum.U_SUBFORUM}" class="subforum<!-- IF forumrow.subforum.S_UNREAD --> unread<!-- ELSE --> read<!-- ENDIF -->" title="<!-- IF forumrow.subforum.S_UNREAD -->{L_UNREAD_POSTS}<!-- ELSE -->{L_NO_UNREAD_POSTS}<!-- ENDIF -->">
									<i class="icon <!-- IF forumrow.subforum.IS_LINK -->fa-share icon-black<!-- ELSEIF forumrow.subforum.S_UNREAD -->fa-square icon-red<!-- ELSE --> fa-square-o icon-black<!-- ENDIF --> fa-fw icon-md" aria-hidden="true"></i>{forumrow.subforum.SUBFORUM_NAME}</a><!-- IF not forumrow.subforum.S_LAST_ROW -->{L_COMMA_SEPARATOR}<!-- ENDIF --><!-- EVENT forumlist_body_subforum_link_append -->
							<!-- END subforum -->
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
Tastenplayer
Registered User
Posts: 999
Joined: Thu Jul 03, 2014 9:20 pm
Location: Village in the middle of Switzerland
Name: Jutta Koliofotis

Re: Diffrent Icons for subforum read and subforum unread

Post by Tastenplayer »

Of course you're right! Originally the code of you was also so. I only had to add the color for Subforum link (- should be in between, of course) :shock: :oops: (Now I definitely need new glasses)

And now it's working again with my code for .icon, .button .icon.
More of my styles you can find in my phpBB Style Board & More
Be the best version of yourself rather than a bad copy of someone else!
Excuse me for my English, but I learned the language by speaking to people and not at school.
🎨 All my styles are updated to 3.3.8 and can be downloaded here

Return to “[3.2.x] Styles Support & Discussion”