All forum admins should look: SMF 2.0 iPhone and iPod Touch Theme (NOW FREE!)

Started by farfromperfection, March 10, 2009, 11:09:28 AM

Previous topic - Next topic

BxK

Quote from: Xarcell on April 09, 2009, 03:27:06 PM
1.| I do hope that there is an on-screen option to revert to back to normal theme, in case a person on the iphone doesn't want to use the iphone theme.

2.| Any chance of getting an option to add a banner to the top of the theme?

These edits are in index.template.php

For 1.
FIND
function template_body_below()
{
global $context, $settings, $options, $scripturl, $txt;

echo '<div id="copyright" style="text-align:center;margin-top:8px;margin-bottom:8px;"><h4 style="margin-left:0;font-size:8px;">', theme_copyright(), '</div>';


if ($context['user']['is_logged']){



REPLACE
function template_body_below()
{
global $context, $settings, $options, $scripturl, $txt;

echo '<div id="copyright" style="text-align:center;margin-top:8px;margin-bottom:8px;"><h4 style="margin-left:0;font-size:8px;">', theme_copyright(), '</div>';

echo '<div id="copyright" style="text-align:center;margin-top:8px;margin-bottom:8px;"><h4 style="margin-left:0;font-size:8px;"><a href="http://YOURSITE.com/index.php?theme=YOUR DEFAULT THEME NUMBER">Desktop Version</a</div>';

if ($context['user']['is_logged']){



For 2

Just the Logo

FIND
<div id="topbar">

<h1 id="pageTitle">', iPhoneTitle(), '</h1>
<a class="back" href="', $backlink ,'"', !$_GET ? ' style="display:none;"' :'', '>Back</a>
<a class="button" href="#" id="menubutton" onclick="window.scrollTo(0,99999); return false">Menu</a>

</div>';



REPLACE
<div id="topbar">

<h1 id="pageTitle"><img src="http://YOUR LOGO URL" style="margin: 0px;" alt="', iPhoneTitle(), '" width="320px" height="48px">
<a class="back" href="', $backlink ,'"', !$_GET ? ' style="display:none;"' :'', '>Back</a>
<a class="button" href="#" id="menubutton" onclick="window.scrollTo(0,99999); return false">Menu</a></h1>

</div>';


OR to show the title AND the logo

<div id="topbar">
<h1 id="pageTitle"><img src="http://YOUR LOGO URL" style="margin: 0px;" alt="', iPhoneTitle(), '" width="320px" height="48px">
<p>', iPhoneTitle(), '</p>
<a class="back" href="', $backlink ,'"', !$_GET ? ' style="display:none;"' :'', '>Back</a>
<a class="button" href="#" id="menubutton" onclick="window.scrollTo(0,99999); return false">Menu</a></h1>

</div>';



Good Luck
and
Make sure to change the YOUR SITE URL ect....

ysNoi

"Don't fix it if it ain't broken, don't break it if you can't fix it."

farfromperfection

#102
1.0 rc1 will be released soon

Some new features:

- New "unread board" and "unread topic" icon. The old one was from Dashcode but it just wasn't iPhoney enough so there's now an icon just like the "unread mail" icon in Mail, for boards and topics.

- A "new posts" button on threads if 1) you've read the topic before and 2)  there are new replies since you last read it. Tapping it will go to the first unread post.

- "iPhone / Full Version" switcher. I need to make a mod for this to work properly since it requires editting a few files, and the default theme (so that you can switch back)

- Fixed some bugs: It no longer says "page 1 of 0" if a board has no topics; the copyright is centered properly; PM and Email buttons in Profile now work (if the user is allowed to PM/Email of course) 

Rumbaar

Will 1.0 RC1 also include a fix/support for anti-spam measures, like Verification Questions or Post count under which users must pass verification to make a post?

Still get an error if a person tries to post and these settings are in place for 0.9.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

farfromperfection

Quote from: Rumbaar on April 11, 2009, 09:30:49 PM
Will 1.0 RC1 also include a fix/support for anti-spam measures, like Verification Questions or Post count under which users must pass verification to make a post?

Still get an error if a person tries to post and these settings are in place for 0.9.
Yes hopefully  :D

Dragooon

Just wanted to say that you're doing an amazing job, keep it up!

BxK

What files would you have to eat to go back to the normal version I mean it should be just a simple link to the theme you want correct? as I have done.

fals

This dosnt work on my forum... proberbly because of this :
in Sources/Load.php, look for: 
if (!empty($id_theme))
$id_theme = (int) $id_theme;  and add below it: 
elseif (strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone') !== false ||
strpos($_SERVER['HTTP_USER_AGENT'], 'iPod') !== false)
$id_theme = 4;  Replace 4 with the id of this theme on your forum.


Quote from: MATT C on April 12, 2009, 01:54:15 PM
What files would you have to eat to go back to the normal version I mean it should be just a simple link to the theme you want correct? as I have done.
Quote from: MATT C on April 10, 2009, 09:46:35 PM
These edits are in index.template.php

For 1.
FIND
function template_body_below()
{
   global $context, $settings, $options, $scripturl, $txt;

   echo '<div id="copyright" style="text-align:center;margin-top:8px;margin-bottom:8px;"><h4 style="margin-left:0;font-size:8px;">', theme_copyright(), '</div>';


if ($context['user']['is_logged']){



REPLACE
function template_body_below()
{
   global $context, $settings, $options, $scripturl, $txt;

   echo '<div id="copyright" style="text-align:center;margin-top:8px;margin-bottom:8px;"><h4 style="margin-left:0;font-size:8px;">', theme_copyright(), '</div>';

   echo '<div id="copyright" style="text-align:center;margin-top:8px;margin-bottom:8px;"><h4 style="margin-left:0;font-size:8px;"><a href="http://YOURSITE.com/index.php?theme=YOUR DEFAULT THEME NUMBER">Desktop Version</a</div>';

if ($context['user']['is_logged']){







500fan.dk - SMF 2.0 ~ custom theme
ls-forum.dk - SMF 2.0.2 ~ custom theme and custom iPhone theme

BxK


fulltimecasual

Quote from: Cyr1us on April 10, 2009, 01:27:01 PM
Quote from: fals on April 10, 2009, 04:19:36 AM
Quote from: Cyr1us on April 09, 2009, 02:39:19 PM
It would be wonderful  to have a link to see new posts only !
No problem, you can change the links in index.template.php

Could you explain please ?

Yeah, could you explain this for me too! I love the theme, but i have certain threads that are 20 pages long, i need the "new" button option... :)

farfromperfection

Quote from: fulltimecasual on April 12, 2009, 10:33:24 PM
Quote from: Cyr1us on April 10, 2009, 01:27:01 PM
Quote from: fals on April 10, 2009, 04:19:36 AM
Quote from: Cyr1us on April 09, 2009, 02:39:19 PM
It would be wonderful  to have a link to see new posts only !
No problem, you can change the links in index.template.php

Could you explain please ?

Yeah, could you explain this for me too! I love the theme, but i have certain threads that are 20 pages long, i need the "new" button option... :)
Coming soon!

Cyr1us


fals

Hi
Anyone know how to add Windows Mobile detect to this ?
in Sources/Load.php, look for: 
if (!empty($id_theme))
$id_theme = (int) $id_theme;  and add below it:

elseif (strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone') !== false ||
strpos($_SERVER['HTTP_USER_AGENT'], 'iPod') !== false)
$id_theme = 4;

I would also  like windows mobile users to use this theme (fx. Samsungs)
http://msdn.microsoft.com/en-us/library/bb159684.aspx







500fan.dk - SMF 2.0 ~ custom theme
ls-forum.dk - SMF 2.0.2 ~ custom theme and custom iPhone theme

farfromperfection

cyr1us: Hopefully the first week of May. It would be earlier but my macbook's power adapter has stopped working and all my stuff is on there!

fals: I'm not sure if the theme would look right on those other platforms, but if you want to go ahead with it anyway, change:

elseif (strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone') !== false ||
strpos($_SERVER['HTTP_USER_AGENT'], 'iPod') !== false


to

elseif (strpos($_SERVER['HTTP_USER_AGENT'], 'IEMobile') !== false || strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone') !== false ||
strpos($_SERVER['HTTP_USER_AGENT'], 'iPod') !== false


alxz310

I've noticed that large images in posts don't shrink correctly when viewing it on my iPod Touch or iPhone.
The images are stretched vertically. Anyone know a fix for this?

farfromperfection

Quote from: alxz310 on April 19, 2009, 12:00:51 AM
I've noticed that large images in posts don't shrink correctly when viewing it on my iPod Touch or iPhone.
The images are stretched vertically. Anyone know a fix for this?
What version of iPhone OS
And can you provide a link to a page where this happens?
And just to clarify, you're on SMF4iPhone 0.9?

altivec

I got it to work with version 0.9!

I have the same problem with picture shrinking, they shrink badly on the vertical side.

Also it would be nice when you click on a topic that it would go to last page.... on a 8/9 page topics going all the way down and do next and repeat 8 times is kind a frustrating.

Else then that just work great!

farfromperfection

Quote from: altivec on April 20, 2009, 11:26:19 AM
I got it to work with version 0.9!

I have the same problem with picture shrinking, they shrink badly on the vertical side.

Also it would be nice when you click on a topic that it would go to last page.... on a 8/9 page topics going all the way down and do next and repeat 8 times is kind a frustrating.

Else then that just work great!
That's awesome, what was the issue that prevented it from working?

If anybody wants to follow me on twitter I'm @ffperfection, I'll post updates to Twitter first

Leemy

Dude, just wanted to say keep up the good work. *clapping*

farfromperfection

 v1.0b

New features:

- [New] button on threads you've previously visited with unread posts.

- Header where you can put you own image. Just replace img/logo.jpg with your logo.

- "Classic" mode. Don't like the iPhone version? Go back to the site's classic theme with a simple tap of a button. iPhone users will also have a "switch to iphone" button on the default theme. It will come as an SMF package for 1.0, but for now I've provided 3 files you need to replace: index.php, Sources/Load.php and Themes/Default/index.template.php.

- You can now switch between viewing [Boards] and [Latest Posts] on the board index.

- Better unread topic/board icons, as mentioned in my previous post.

- No "hide/show child boards" button if you don't actually have any child boards to hide/show

- Fixed the avatar for PMs if they didn't have an avatar. It now displays the "no avatar" image like it does in topics.

- If you have 0 topics in a board,  the "next page" button is now disabled (as it should be). Same for PMs.

- Login/register buttons have been replaced with a single login button at the top right. It's not in this release but there will be tabs at the top like this: http://i44.tinypic.com/qsscbp.jpg - only with login / register.

- Added verification box when sending PMs or posting and it requires verification.

- Better labels for the "back" button in some places.

I'll be posting the link to www.farfromperfection.com/blog and www.twitter.com/ffperfection very soon.


If there are issues you would like to be fixed that still haven't with this release then let me know!

Thanks.

Advertisement: