News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Pretty urls & smf4iphone

Started by valentino86, March 24, 2011, 07:15:06 PM

Previous topic - Next topic

valentino86

I have a problem with the buttons of the smf4iphone's menu because with the prettyurls mod they don't work well. How can I fix it?

Arantor

Which mod, exactly? There's several iPhone mods out there.
Holder of controversial views, all of which my own.



Arantor

Yes, I know which Pretty URLs mod you meant. I meant which *theme* since there are several floating about.
Holder of controversial views, all of which my own.



Arantor

And what exactly is the problem with the URLs? Everything looks alright to me.
Holder of controversial views, all of which my own.


valentino86

Try to go in one board or topic and then push whatever buttons you want, it will not work.

Arantor

Well, I used the link given, which didn't really look like an iPhone theme, and it worked absolutely fine for me but I don't have an iPhone...
Holder of controversial views, all of which my own.


valentino86


Arantor

In which case it's a bug with the theme and should be reported to the theme author in the dedicated theme support thread

I'd also note the theme doesn't have the SMF copyright in it (which it should)
Holder of controversial views, all of which my own.


valentino86

Ok I got it.

Quote from: Arantor on March 25, 2011, 05:33:24 AM
I'd also note the theme doesn't have the SMF copyright in it (which it should)

Yes it has

valentino86

Quote from: Arantor on March 25, 2011, 05:33:24 AM
In which case it's a bug with the theme

But it works without prettyurls mod, are you sure that's a bug? I just need to change this links

<li class="active" id="tabhome" onclick="go('home');">
<li id="tabmessages" onclick="go('pm');">
<li id="tabprofile" onclick="go('profile');">

Arantor

OK, so it is, in VERY SMALL letters, which is bending the rules of the licence.

Oh, it's a bug, but it's one that the theme author would have to fix. You see, those onclick calls aren't anything that Pretty URLs would touch...
Holder of controversial views, all of which my own.


valentino86

Inside li tag can I insert a href?

Arantor

That's the thing, you're not supposed to because it is a Javascript link itself!
Holder of controversial views, all of which my own.


valentino86

ok I found a way, on the index.template.php look for this

<div id="tabbar">';
echo '
<ul>

<li onclick="go(\'home\');" id="tabhome"', $ishome ,'>
<a href="http://www.meccanicaweb.it/forum">', $txt['iHome'] ,'</a>
</li>

<li onclick="if(document.getElementById(\'searchbar\').style.display==\'block\'){document.getElementById(\'searchbar\').style.display=\'none\';}else{document.getElementById(\'searchbar\').style.display=\'block\';document.searchform.search.focus();}" id="tabsearch"', $issearch ,'>
<a href="#">', $txt['iSearch'] ,'</a>
</li>

<li onclick="go(\'pm\');" id="tabmessages"', $ispm ,'>';
if (($context['user']['unread_messages'] > 0) && ($context['user']['unread_messages'] < 10))
echo '
<div id="count">',$context['user']['unread_messages'],'<span style="font-size:15px;">&nbsp;&nbsp;<span><br id="miobr" /><br id="miobr" /></div>';
elseif ($context['user']['unread_messages'] > 10)
echo '
<div id="count">',$context['user']['unread_messages'],'<span style="font-size:12px;">&nbsp;&nbsp;<span><br id="miobr" /><br id="miobr" /></div>';
echo '
<a href="#">', $txt['iMessages'] ,'</a>
</li>

<li onclick="go(\'profile\');" id="tabprofile"', $isprofile ,'>
<a href="#">', $txt['iProfile'] ,'</a>
</li>

<li onclick="go(\'logout;sesc=', $context['session_id'] ,'\');" id="tablogout">
<a href="#">', $txt['iLogout'] ,'</a>
</li>

</ul>

</div>';}


and replace with

<div id="tabbar">';
echo '
<ul>

<li id="tabhome"', $ishome ,'>
<a href="http://www.meccanicaweb.it/forum">', $txt['iHome'] ,'</a>
</li>

<li onclick="if(document.getElementById(\'searchbar\').style.display==\'block\'){document.getElementById(\'searchbar\').style.display=\'none\';}else{document.getElementById(\'searchbar\').style.display=\'block\';document.searchform.search.focus();}" id="tabsearch"', $issearch ,'>
<a href="#">', $txt['iSearch'] ,'</a>
</li>

<li id="tabmessages"', $ispm ,'>';
if (($context['user']['unread_messages'] > 0) && ($context['user']['unread_messages'] < 10))
echo '
<div id="count">',$context['user']['unread_messages'],'<span style="font-size:15px;">&nbsp;&nbsp;<span><br id="miobr" /><br id="miobr" /></div>';
elseif ($context['user']['unread_messages'] > 10)
echo '
<div id="count">',$context['user']['unread_messages'],'<span style="font-size:12px;">&nbsp;&nbsp;<span><br id="miobr" /><br id="miobr" /></div>';
echo '
<a href="http://www.meccanicaweb.it/forum/index.php?action=pm">', $txt['iMessages'] ,'</a>
</li>

<li id="tabprofile"', $isprofile ,'>
<a href="http://www.meccanicaweb.it/forum/index.php?action=profile">', $txt['iProfile'] ,'</a>
</li>

<li id="tablogout">
<a href="http://www.meccanicaweb.it/forum/index.php">', $txt['iLogout'] ,'</a>
</li>

</ul>

</div>';}


and on style.css look for this

#tabbar li a{

display: block;
height: 14px;

}


and replace with

#tabbar li a{

display: block;
height: 17px;
padding-top: 32px;

}


I don't know how can I fix the logout link

Advertisement: