Follow Us:
Tricked Out Mods: Forums

Best Hosting
 Forum FAQForum FAQ   SearchSearch   UsergroupsUsergroups   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to add links in the mobile Theme
 
 
Post new topic   Reply to topic   print    Tricked Out News Forum Index -> mobile Theme
View previous topic :: View next topic  
Author Message
bobby
Site Admin
Site Admin


Joined: Jan 20, 2009
Posts: 779
Location: North Carolina

PostPosted: Fri Jul 29, 2011 4:02 pm 
Post subject: How to add links in the mobile Theme
Reply with quote

If you want to add more links in the mobile theme, look in themes/mobile/theme.php and find function mnav( ). You will see something like this:

Code:
function mnav() {

   
echo '<table><tr>';
echo '<td width="3%" valign="top" align="center">';
      echo '<a href="javascript:history.go(-1)"><img src="themes/mobile/images/icons/back.png" alt="' . _GOBACK2 . '" title="' . _GOBACK2 . '" /></a><br />';
      echo '<a href="javascript:history.go(-1)">Back</a>';
      echo '</td>';
echo '<td width="3%" valign="top" align="center">';
      echo '<a href="index.php"><img src="themes/mobile/images/icons/home.png" alt="' . _HOME . '" title="' . _HOME . '" /></a><br />';
      echo '<a href="index.php">' . _HOME . '</a>';
      echo '</td>';
if (is_active('Forums')) {      
   echo '<td width="3%" valign="top" align="center">';
      echo '<a href="modules.php?name=Forums"><img src="themes/mobile/images/icons/forum.png" alt="' . _BBFORUMS . '" title="' . _BBFORUMS . '" /></a><br />';
      echo '<a href="modules.php?name=Forums">' . _BBFORUMS . '</a>';
      echo '</td>';   
}      
if (is_active('News')) {      
   echo '<td width="3%" valign="top" align="center">';
      echo '<a href="news.html"><img src="themes/mobile/images/icons/news.png" alt="' . _NEWS . '" title="' . _NEWS . '" /></a><br />';
      echo '<a href="news.html">News</a>';
      echo '</td>';   
}   
if (is_active('GCalendar')) {      
   echo '<td width="3%" valign="top" align="center">';
      echo '<a href="eventscalendar.html"><img src="themes/mobile/images/icons/calendar.png" alt="' . _GCALENDAR_EVENTS . '" title="' . _GCALENDAR_EVENTS . '" /></a><br />';
      echo '<a href="eventscalendar.html">Calendar</a>';
      echo '</td>';   
}   
if (is_active('Downloads')) {      
   echo '<td width="3%" valign="top" align="center">';
      echo '<a href="downloads.html"><img src="themes/mobile/images/icons/download.png" alt="' . _UDOWNLOADS . '" title="' . _UDOWNLOADS . '" /></a><br />';
      echo '<a href="downloads.html">' . _UDOWNLOADS . '</a>';
      echo '</td>';   
}      
if (is_active('Content')) {      
   echo '<td width="3%" valign="top" align="center">';
      echo '<a href="content.html"><img src="themes/mobile/images/icons/content.png" alt="Content" title="Content" /></a><br />';
      echo '<a href="content.html">Content</a>';
      echo '</td>';   
}   
if (is_active('FAQ')) {      
   echo '<td width="3%" valign="top" align="center">';
      echo '<a href="faq.html"><img src="themes/mobile/images/icons/faq.png" alt="FAQ" title="FAQ" /></a><br />';
      echo '<a href="faq.html">FAQ</a>';
      echo '</td>';   
}
if (is_active('Your_Account')) {      
   echo '<td width="3%" valign="top" align="center">';
      echo '<a href="account.html"><img src="themes/mobile/images/icons/youraccount.png" alt="' . _FSIYOURACCOUNT . '" title="' . _FSIYOURACCOUNT . '" /></a><br />';
      echo '<a href="account.html">' . _FSIYOURACCOUNT . '</a>';
      echo '</td>';   
}
echo '</tr></table>';

   }


to add another link, just add the code where you want it to appear. For example, if you want to add a link for a module named My_Module between the Forums icon and the News icon, find the following code:

Code:
if (is_active('Forums')) {      

   echo '<td width="3%" valign="top" align="center">';
      echo '<a href="modules.php?name=Forums"><img src="themes/mobile/images/icons/forum.png" alt="' . _BBFORUMS . '" title="' . _BBFORUMS . '" /></a><br />';
      echo '<a href="modules.php?name=Forums">' . _BBFORUMS . '</a>';
      echo '</td>';   
}      
if (is_active('News')) {      
   echo '<td width="3%" valign="top" align="center">';
      echo '<a href="news.html"><img src="themes/mobile/images/icons/news.png" alt="' . _NEWS . '" title="' . _NEWS . '" /></a><br />';
      echo '<a href="news.html">News</a>';
      echo '</td>';   
}   


And change it like so:

Code:
if (is_active('Forums')) {      

   echo '<td width="3%" valign="top" align="center">';
      echo '<a href="modules.php?name=Forums"><img src="themes/mobile/images/icons/forum.png" alt="' . _BBFORUMS . '" title="' . _BBFORUMS . '" /></a><br />';
      echo '<a href="modules.php?name=Forums">' . _BBFORUMS . '</a>';
      echo '</td>';   
}
if (is_active('My_Module')) {      
   echo '<td width="3%" valign="top" align="center">';
      echo '<a href="modules.php?name=My_Module"><img src="themes/mobile/images/icons/My_Module.png" alt="My_Module" title="My_Module" /></a><br />';
      echo '<a href="modules.php?name=My_Module">My_Module</a>';
      echo '</td>';   
}         
if (is_active('News')) {      
   echo '<td width="3%" valign="top" align="center">';
      echo '<a href="news.html"><img src="themes/mobile/images/icons/news.png" alt="' . _NEWS . '" title="' . _NEWS . '" /></a><br />';
      echo '<a href="news.html">News</a>';
      echo '</td>';   
}   


You will add your modules icon to the themes/mobile/images/icons/ folder. They should be 48x48.
_________________
Tricked Out News
  
Back to top
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic   print    Tricked Out News Forum Index -> mobile Theme All times are GMT - 5 Hours
 
 Page 1 of 1
 
 

Jump to:   
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001-2008 phpBB Group
Forums ©