• Welcome to Simple Machines Community Forum. Please login or sign up.
December 02, 2021, 01:57:13 PM

News:

SMF 2.0.18 has been released! Please update. Read more.


ShelfLife

Started by Bloc, July 16, 2016, 06:53:47 AM

Previous topic - Next topic

Bloc

Link to the theme


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.

Klauser

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.

Klauser

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


Bloc

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.

Don Houston

HI!

OK this should be easy to answer.  I have 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? 

Bloc

- Added the required login update for SMF 2.0.14.

vbgamer45

Thanks for the update!
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

mysimplesite

Great theme. Clean code, clean design. Looking forward to what you create for SMF 2.1.

Chen Zhen

Quote from: 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

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:

foreach ($tps as $topic)


replace with:

foreach ($context['topics'] as $topic)


Also the theme copyright link is dead.

My SMF Mods & Plug-Ins

WebDev


"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Chen Zhen


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

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

find twice in the same file:

if ($message['member']['can_see_warning'])


replace with:

if (!$message['member']['is_guest'] && $message['member']['can_see_warning'])

My SMF Mods & Plug-Ins

WebDev


"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Bloc

Quote from: Chen Zhen on July 06, 2017, 11:51:52 PM
Quote from: 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

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:

foreach ($tps as $topic)


replace with:

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.

Bloc

Quote from: 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:

if ($message['member']['can_see_warning'])


replace with:

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)

Chen Zhen

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.


My SMF Mods & Plug-Ins

WebDev


"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Bloc

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.

Chen Zhen

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

It's a nice theme btw but those errors did indeed appear shortly after applying it.

My SMF Mods & Plug-Ins

WebDev


"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Bloc

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.

Bloc

v2.0rev1 - fixes for Display.template and theme links.

mysimplesite

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.


Chen Zhen

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:

// 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:

// 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">


My SMF Mods & Plug-Ins

WebDev


"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Advertisement: