Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Theme Site Themes => Topic started by: Bloc on July 16, 2016, 06:53:47 AM

Title: ShelfLife
Post by: Bloc on July 16, 2016, 06:53:47 AM
Link to the theme (http://custom.simplemachines.org/themes/index.php?lemma=2852)
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fcustom.simplemachines.org%2Fthemes%2Findex.php%2Faction%2Cdownload%2Flemma%2C2852%2Fimage%2Cthumb&hash=55c6b68fcb3304ac86db6e55722e3b9c)

ShelfLife is another theme I have worked on before, also only the theme part is there, no special features added. A traditional theme with new layout elements and colors, written using HTML5/CSS3 and having a responsive layout.
Title: Re: ShelfLife
Post by: Klauser on August 26, 2016, 03:16:15 AM
Your Theme is realy cool, but its not working with SMF Gallery on a Android phone like Samsung S4. If you click on Gallery all  the pictures are overlapped.
Title: Re: ShelfLife
Post by: Klauser on August 26, 2016, 04:19:27 AM
In the header "Unread" and "Replies" is not  language localized , it stands in english instead of German.

If I click "Unread" than in the logs are errors

index.php?action=unread
8: Undefined index: new
File: /homepages/Themes/shelflife203/Common.template.php
Line: 136

index.php?action=unread
8: Undefined index: can_approve_posts
File: /homepages/Themes/shelflife203/Common.template.php
Line: 104

Title: Re: ShelfLife
Post by: Bloc on August 27, 2016, 02:02:25 PM
You will need to create german language file Themestrings and translate to get it in your language.

About the errors...currently I am too busy working on ElkArte themes, so I cannot say when those will be fixed.
Title: Re: ShelfLife
Post by: Don Houston on September 10, 2016, 05:21:37 AM
HI!

OK this should be easy to answer.  I have http://www.kdsupport.info (http://www.kdsupport.info) and if you go to my site you will see that the boards description is not all aligned.  Is there a way to change that so it looks professional? 
Title: Re: ShelfLife
Post by: Bloc on June 16, 2017, 04:51:52 PM
- Added the required login update for SMF 2.0.14.
Title: Re: ShelfLife
Post by: vbgamer45 on June 21, 2017, 11:58:51 PM
Thanks for the update!
Title: Re: ShelfLife
Post by: mysimplesite on July 03, 2017, 07:48:29 PM
Great theme. Clean code, clean design. Looking forward to what you create for SMF 2.1.
Title: Re: ShelfLife
Post by: Chen Zhen on July 06, 2017, 11:51:52 PM
In the header "Unread" and "Replies" is not  language localized , it stands in english instead of German.

If I click "Unread" than in the logs are errors

index.php?action=unread
8: Undefined index: new
File: /homepages/Themes/shelflife203/Common.template.php
Line: 136

index.php?action=unread
8: Undefined index: can_approve_posts
File: /homepages/Themes/shelflife203/Common.template.php
Line: 104

I happened to be testing some things with this theme and came across the same issue while viewing new topics.
Apply the following edit:

file: ../Themes/shelflife204/Common.template.php
find:
Code: [Select]
foreach ($tps as $topic)

replace with:
Code: [Select]
foreach ($context['topics'] as $topic)

Also the theme copyright link is dead.
Title: Re: ShelfLife
Post by: Chen Zhen on July 07, 2017, 03:12:52 PM

Also 2 other edits to stop undefined errors I came across:

file: ../Themes/shelflife204/Display.template.php

find twice in the same file:
Code: [Select]
if ($message['member']['can_see_warning'])

replace with:
Code: [Select]
if (!$message['member']['is_guest'] && $message['member']['can_see_warning'])
Title: Re: ShelfLife
Post by: Bloc on July 07, 2017, 03:53:21 PM
In the header "Unread" and "Replies" is not  language localized , it stands in english instead of German.

If I click "Unread" than in the logs are errors

index.php?action=unread
8: Undefined index: new
File: /homepages/Themes/shelflife203/Common.template.php
Line: 136

index.php?action=unread
8: Undefined index: can_approve_posts
File: /homepages/Themes/shelflife203/Common.template.php
Line: 104

I happened to be testing some things with this theme and came across the same issue while viewing new topics.
Apply the following edit:

file: ../Themes/shelflife204/Common.template.php
find:
Code: [Select]
foreach ($tps as $topic)

replace with:
Code: [Select]
foreach ($context['topics'] as $topic)

Also the theme copyright link is dead.


You have to copy and translate ThemeStrings.english.php to ThemeStrings.german.php to get "unread" and "replies" in your own language.

The other errors will be corrected in an update.
Title: Re: ShelfLife
Post by: Bloc on July 07, 2017, 03:56:21 PM

Also 2 other edits to stop undefined errors I came across:

file: ../Themes/shelflife204/Display.template.php

find twice in the same file:
Code: [Select]
if ($message['member']['can_see_warning'])

replace with:
Code: [Select]
if (!$message['member']['is_guest'] && $message['member']['can_see_warning'])

Those are direct lines from default theme's Display.template.php..they should not create errors unless there is a bug in default theme too. (or caused by a mod)
Title: Re: ShelfLife
Post by: Chen Zhen on July 07, 2017, 05:37:09 PM
Both posts I made concerning experiencing undefined errors are from an English forum with no other language available or set.
I found the first edit was due to the data being stored in the $context array from the SMF source file MessageIndex.php & posted the easiest fix.

The second error was concerning guests browsing the forum although only one of the occurrences of that logic statement showed an error.
Both errors were present after testing the theme for 2 days.
Please run your own test (using the English language) to confirm these undefined errors.
My posts regarding edits are suggestions to fix those undefined errors.

Title: Re: ShelfLife
Post by: Bloc on July 07, 2017, 05:41:50 PM
I am always using english, and those errors do not appear in my test forum. If I cannot replicate them, I cannot correct them.

Again, check to see if any mods are interefering with things on your end. Or if the same errors are present when using the default theme.
Title: Re: ShelfLife
Post by: Chen Zhen on July 07, 2017, 05:47:53 PM
The same errors do not show in the default theme.
There are no mods concerning perusing boards, threads or posts installed.
Only the Arcade is installed as this was on its test forum and I am testing it with other themes whereas this happened to be one of them (the top 5 seemed like a good start).
ref. Link (https://docskillz.com/arcade/index.php?topic=23.msg625#new)

It's a nice theme btw but those errors did indeed appear shortly after applying it.
Title: Re: ShelfLife
Post by: Bloc on July 07, 2017, 05:57:29 PM
Yes, I manage to create the errors now, I see that your fix is indeed correct - I had pulled out that template part in the re-writing but forgot to add in the guest condition(in default theme its in the non-guest logic, in mine its not..)

I'll fix those up in the update as well.
Title: Re: ShelfLife
Post by: Bloc on July 07, 2017, 06:35:52 PM
v2.0rev1 - fixes for Display.template and theme links.
Title: Re: ShelfLife
Post by: mysimplesite on July 07, 2017, 08:06:17 PM
Please reply if anyone has gotten ShelfLife to work with Ad Management on 2.0.14, and please include how you did it. I posted on Ad Management but didn't get a reply, so I'm trying here.

I got a bunch of errors and none of the 'find' code could be found to place extra code before or after 'find' code.

For example, 'find' includes the word 'colspan' which doesn't appear anywhere in the suggested template.

Title: Re: ShelfLife
Post by: Chen Zhen on July 07, 2017, 11:11:03 PM
I found one more issue for you.. The image/link for modifying a post shows no matter what permissions are enabled.
Not that it allows "anyone" to edit a post but it shows an image/link for those that do not have permission including guests.

shelflife ~ Display.template.php
find:
Code: [Select]
// Done with the information about the poster... on to the post itself.
echo '
</div>
<div class="bwcell14">
<div class="post_container">
<div class="floatright">
<div class="mess_icons_hit">
<a href="' , $scripturl  , '?action=post;msg=' . $message['id'] . ';topic=' . $context['current_topic'] . '#icon">
<img src="', $settings['images_url'] , '/post/' , $message['icon'] . '.png" id="mes******' . $message['id'] . '" alt="*" />
</a>
</div>
</div>
<div class="post_top">

replace with:
Code: [Select]
// Done with the information about the poster... on to the post itself.
echo '
</div>
<div class="bwcell14">
<div class="post_container">', $message['can_modify'] ? '
<div class="floatright">
<div class="mess_icons_hit">
<a href="' . $scripturl  . '?action=post;msg=' . $message['id'] . ';topic=' . $context['current_topic'] . '#icon">
<img src="' . $settings['images_url'] . '/post/' . $message['icon'] . '.png" id="mes******' . $message['id'] . '" alt="*" />
</a>
</div>
</div>' : '', '
<div class="post_top">