India
|
Edited by Ananthavas at 2013-11-8 19:28
In most cases, it is inconvenient for mobile users, to view notifications on Mobile, since discuz! doesn't have Notices Option on it's mobile version...
Here is a small(simple work around to display Notices Option + Indicator whenever a new Notification comes..
The feature can be obtained by editing header.htm file, which is located at yoursite.com/template/default/mobile/common/
The steps are as follows:
* Edit Header.htm which is located on /template/default/mobile/common/
(Before editing, keep a backup of the original file for safety)
* Look for the following lines which can be found at last..
- <div class="hd"><a href="$nav" title="<!--{if empty($nobbname)}--> $_G['setting']['bbname'] - <!--{/if}-->{lang waptitle}"><!--{if $_G['setting']['mobile']['mobilesimpletype'] == 1}--><!--{if empty($nobbname)}--> $_G['setting']['bbname'] - <!--{/if}--> {lang waptitle}<!--{else}--><img src="./static/image/mobile/logo.gif" /><!--{/if}--></a></div>
- <div class="wp">
- <div class="pd2">
- <!--{if $_G['uid']}--><a href="home.php?mod=space&uid={$_G['uid']}&do=profile">{$_G['member']['username']}</a><span class="pipe">|</span><a href="home.php?mod=space&do=pm" {if $_G[member][newpm]}class="xi1"{/if}>{if $_G[member][newpm]}{lang new_pm}{else}{lang pm_center}{/if}</a><span class="pipe">|</span><a href="home.php?mod=space&uid={$_G[uid]}&do=favorite&view=me&type=forum">{lang favorite}</a><span class="pipe">|</span><a href="home.php?mod=space&uid={$_G[uid]}&do=thread&view=me">{lang my_posts}</a>
- YOU CAN INSERT THE CODES HERE<span class="pipe">|</span><a href="member.php?mod=logging&action=logout&formhash={FORMHASH}" title="{lang logout}">{lang logout}</a><!--{elseif $_G['connectguest']}-->{$_G['member']['username']}<span class="pipe">|</span><a href="member.php?mod=logging&action=logout&formhash={FORMHASH}" title="{lang logout}">{lang logout}</a><!--{else}--><a href="member.php?mod=logging&action=login" title="{lang login}">{lang login}</a><!--{if $_G['setting']['regstatus']}--><span class="pipe">|</span><a href="member.php?mod={$_G[setting][regname]}" title="{$_G['setting']['reglinkname']}">{$_G['setting']['reglinkname']}</a><!--{/if}--><!--{if $_G['setting']['connect']['allow'] && !$_G['setting']['bbclosed']}--><span class="pipe">|</span><a href="$_G[connect][login_url]&statfrom=login_simple">{lang qqconnect:connect_mobile_login}</a><!--{/if}--><!--{/if}-->
- </div>
- <!--{hook/global_header_mobile}-->
Copy the Code * On the above codes, I had written this: YOU CAN INSERT THE CODES HERE
Just replace it with the following code:- <span class="pipe">|</span><a href="home.php?mod=space&do=notice&mobile=no" id="myprompt"{if $_G[member][newprompt]} class="new"{/if}>{lang remind}<!--{if $_G[member][newprompt]}-->($_G[member][newprompt])<!--{/if}--></a>
Copy the Code Here, the statement: id="myprompt"{if $_G[member][newprompt]} class="new"{/if}>{lang remind}<!--{if $_G[member][newprompt]}-->($_G[member][newprompt]) is for indicating the new notices count..
* You are almost done!
Just Save the file & open your website in Mobile mode.. It will display Notices option & whenever you get a new notice, it'll display the count indicator too, just like the below picture.
* If you can't edit the files manually, just download the below attachment & replace the header.htm file in yoursite.com/template/default/mobile/common/ with the header file in the zip archive..
This file is already edited & it includes a link to Search option also..
Enjoy!
*Remember to keep a backup of the file, that you're going to edit!
|
This post contains more resources
You have to Login for download or view attachment(s). No Account? Register
x
|