Advertisement:

Author Topic: ShelfLife  (Read 4095 times)

Offline Bloc

  • Full Member
  • ***
  • Posts: 415
  • Gender: Male
ShelfLife
« on: July 16, 2016, 06:53:47 AM »
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.

Offline Klauser

  • Semi-Newbie
  • *
  • Posts: 61
Re: ShelfLife
« Reply #1 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.

Offline Klauser

  • Semi-Newbie
  • *
  • Posts: 61
Re: ShelfLife
« Reply #2 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


Offline Bloc

  • Full Member
  • ***
  • Posts: 415
  • Gender: Male
Re: ShelfLife
« Reply #3 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.

Offline Don Houston

  • Jr. Member
  • **
  • Posts: 215
Re: ShelfLife
« Reply #4 on: September 10, 2016, 05:21:37 AM »
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? 

Offline Bloc

  • Full Member
  • ***
  • Posts: 415
  • Gender: Male
Re: ShelfLife
« Reply #5 on: June 16, 2017, 04:51:52 PM »
- Added the required login update for SMF 2.0.14.

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,245
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: ShelfLife
« Reply #6 on: June 21, 2017, 11:58:51 PM »
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

Offline mysimplesite

  • Semi-Newbie
  • *
  • Posts: 42
Re: ShelfLife
« Reply #7 on: July 03, 2017, 07:48:29 PM »
Great theme. Clean code, clean design. Looking forward to what you create for SMF 2.1.

Offline Chen Zhen

  • Sophist Member
  • *****
  • Posts: 1,021
  • Gender: Male
  • If you're going through hell, keep going!
    • Underdog-01 on GitHub
    • WebDev.ca
Re: ShelfLife
« Reply #8 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.

Offline Chen Zhen

  • Sophist Member
  • *****
  • Posts: 1,021
  • Gender: Male
  • If you're going through hell, keep going!
    • Underdog-01 on GitHub
    • WebDev.ca
Re: ShelfLife
« Reply #9 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'])

Offline Bloc

  • Full Member
  • ***
  • Posts: 415
  • Gender: Male
Re: ShelfLife
« Reply #10 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.

Offline Bloc

  • Full Member
  • ***
  • Posts: 415
  • Gender: Male
Re: ShelfLife
« Reply #11 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)

Offline Chen Zhen

  • Sophist Member
  • *****
  • Posts: 1,021
  • Gender: Male
  • If you're going through hell, keep going!
    • Underdog-01 on GitHub
    • WebDev.ca
Re: ShelfLife
« Reply #12 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.


Offline Bloc

  • Full Member
  • ***
  • Posts: 415
  • Gender: Male
Re: ShelfLife
« Reply #13 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.

Offline Chen Zhen

  • Sophist Member
  • *****
  • Posts: 1,021
  • Gender: Male
  • If you're going through hell, keep going!
    • Underdog-01 on GitHub
    • WebDev.ca
Re: ShelfLife
« Reply #14 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

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

Offline Bloc

  • Full Member
  • ***
  • Posts: 415
  • Gender: Male
Re: ShelfLife
« Reply #15 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.

Offline Bloc

  • Full Member
  • ***
  • Posts: 415
  • Gender: Male
Re: ShelfLife
« Reply #16 on: July 07, 2017, 06:35:52 PM »
v2.0rev1 - fixes for Display.template and theme links.

Offline mysimplesite

  • Semi-Newbie
  • *
  • Posts: 42
Re: ShelfLife
« Reply #17 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.


Offline Chen Zhen

  • Sophist Member
  • *****
  • Posts: 1,021
  • Gender: Male
  • If you're going through hell, keep going!
    • Underdog-01 on GitHub
    • WebDev.ca
Re: ShelfLife
« Reply #18 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">