Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Copying/Modifying the Mobile Theme
I have been trying to modify the mobile theme included with Vanilla Forum, but with varying degrees of success. After copying and making the following changes, my new mobile theme still fails to render correctly on either my DroidX or Firefox using a mobile User Agent. Specifically, the scale of the page is incorrect and the "Start a new Discussion" button on the right of the header fails to appear.
On line 86 of class.mobilethemehooks.php:
Changed the link path to:
And on line 86 of class.mobilethemehooks.php:
Changed the link path to:
I'm wondering if perhaps the mobile theme depends on some Javascript to render correctly. I'll do more investigation later.
Additionally, it seems as though both of the lines I modified could be rewritten more generally to automatically use the mobile theme's path. This would make things easier for others trying to create their own mobile themes.
On line 86 of class.mobilethemehooks.php:
$Sender->Menu->AddLink('NewDiscussion', Img('themes/mobile/design/images/new.png', array('alt' => T('New Discussion'))), '/post/discussion'.(array_key_exists('CategoryID', $Sender->Data) ? '/'.$Sender->Data['CategoryID'] : ''), array('Garden.SignIn.Allow'), array('class' => 'NewDiscussion'));
Changed the link path to:
$Sender->Menu->AddLink('NewDiscussion', Img('themes/myMobileThemeName/design/images/new.png', array('alt' => T('New Discussion'))), '/post/discussion'.(array_key_exists('CategoryID', $Sender->Data) ? '/'.$Sender->Data['CategoryID'] : ''), array('Garden.SignIn.Allow'), array('class' => 'NewDiscussion'));
And on line 86 of class.mobilethemehooks.php:
$Sender->Menu->AddLink('NewConversation', Img('themes/mobile/design/images/new.png', array('alt' => T('New Conversation'))), '/messages/add', '', array('class' => 'NewConversation'));
Changed the link path to:
$Sender->Menu->AddLink('NewConversation', Img('themes/myMobileThemeName/design/images/new.png', array('alt' => T('New Conversation'))), '/messages/add', '', array('class' => 'NewConversation'));
I'm wondering if perhaps the mobile theme depends on some Javascript to render correctly. I'll do more investigation later.
Additionally, it seems as though both of the lines I modified could be rewritten more generally to automatically use the mobile theme's path. This would make things easier for others trying to create their own mobile themes.
0