Warning: The author of this contribution does not provide support for it anymore.

View or mark unread posts

[Solved] MOD not working on 3.0.12 - View or mark unread posts

[Solved] MOD not working on 3.0.12

by engines » Thu Apr 24, 2014 3:39 am

I have a custom style installed base on prosilver.
During the install in ACP, I asked to to perform the changes in the custom style.
I see the "You have no unread posts" but I can't see the "Mark post as unread" at the bottom of a topic.

I have also refreshed the cache of templates and purged my cache
Last edited by engines on Mon Apr 28, 2014 11:30 pm
engines
Registered User
Posts: 21
Joined: Sat Mar 02, 2013 4:17 pm

Re: MOD not working on 3.0.12

by 5hocK » Thu Apr 24, 2014 7:24 am

engines wrote:I can't see the "Mark post as unread" at the bottom of a topic.

It's at the bottom of each post; is it working for prosilver?
5hocK
Registered User
Posts: 3147
Joined: Wed Nov 23, 2011 7:00 pm
Location: UK

Re: MOD not working on 3.0.12

by asinshesq » Thu Apr 24, 2014 9:46 am

What style do you use? And did you go to the ucp and temporarily switch to pro silver just to see if it's working there?
asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: MOD not working on 3.0.12

by engines » Thu Apr 24, 2014 12:34 pm

asinshesq wrote:What style do you use? And did you go to the ucp and temporarily switch to pro silver just to see if it's working there?


The style is a modified version of prosilver. I just switched over to prosilver, I don't see any links at the bottom of the post.

It was a successful install with Automod
engines
Registered User
Posts: 21
Joined: Sat Mar 02, 2013 4:17 pm

Re: MOD not working on 3.0.12

by asinshesq » Thu Apr 24, 2014 12:45 pm

Do you see a 'view unread posts' or 'you have no unread posts' link at the top of the index page? And do you see a mark unread link in your private messages?
asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: MOD not working on 3.0.12

by engines » Thu Apr 24, 2014 12:48 pm

I see 'you have no unread posts' link at the top of the index page. I've disabled PM's so can't check that
engines
Registered User
Posts: 21
Joined: Sat Mar 02, 2013 4:17 pm

Re: MOD not working on 3.0.12

by asinshesq » Thu Apr 24, 2014 12:53 pm

Can you post or attach your template's viewtopic_body.html file?
asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: MOD not working on 3.0.12

by asinshesq » Thu Apr 24, 2014 12:59 pm

Also, as shock was getting at above, are you sure you're looking in the right place? The mark unread link is NOT at the bottom of the topic. On pro silver it is at the bottom right side of each post on the page.
asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: MOD not working on 3.0.12

by engines » Fri Apr 25, 2014 3:24 am

Yes I looked at the bottom right of each post. I even searched for the word unread.

Attached is the html file
Attachments
viewtopic_body.zip
viewtopic_body.html
(3.71 KiB) Downloaded 152 times
engines
Registered User
Posts: 21
Joined: Sat Mar 02, 2013 4:17 pm

Re: MOD not working on 3.0.12

by 5hocK » Fri Apr 25, 2014 7:27 am

You have this line added twice
<!-- start mod view or mark unread posts (and end mod too) ... added preceding line -->
Edit: Just tested this with two lines and it makes no difference, the Mod still works.
Have you any other double edits? Worth checking.
5hocK
Registered User
Posts: 3147
Joined: Wed Nov 23, 2011 7:00 pm
Location: UK

Re: MOD not working on 3.0.12

by asinshesq » Fri Apr 25, 2014 10:02 am

Found it. You have the link in the wrong place in that file. You another mod installed - the Delete Topics mod - and that mod has lines identical to where the link code goes for this mod. That fooled automod into putting this code in the wrong place. So do this:

Code: Select all

OPEN
styles/prosilver/template/viewtopic_body.html

FIND
      <div class="back2top"><a href="#wrap" class="top" title="{L_BACK_TO_TOP}">{L_BACK_TO_TOP}</a><!-- IF S_INC_UNREAD_LINK --><a href="{postrow.U_MARK_UNREAD}" class="post" title="{L_MARK_POST_UNREAD}">{L_MARK_POST_UNREAD}</a><!-- ENDIF --></div>
      <!-- start mod view or mark unread posts (and end mod too) ... added preceding line -->
      <!-- start mod view or mark unread posts (and end mod too) ... added preceding line -->

REPLACE WITH
      <div class="back2top"><a href="#wrap" class="top" title="{L_BACK_TO_TOP}">{L_BACK_TO_TOP}</a></div>

FIND (this is much lower in the file)
      <div class="back2top"><a href="#wrap" class="top" title="{L_BACK_TO_TOP}">{L_BACK_TO_TOP}</a></div>

REPLACE WITH
      <div class="back2top"><a href="#wrap" class="top" title="{L_BACK_TO_TOP}">{L_BACK_TO_TOP}</a><!-- IF S_INC_UNREAD_LINK --><a href="{postrow.U_MARK_UNREAD}" class="post" title="{L_MARK_POST_UNREAD}">{L_MARK_POST_UNREAD}</a><!-- ENDIF --></div>
      <!-- start mod view or mark unread posts (and end mod too) ... added preceding line -->


When you are done, remember you need to go to acp-->styles_prosilver and refresh cache for prosilver. And remember to do this for your other style as well.
asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: MOD not working on 3.0.12

by engines » Fri Apr 25, 2014 2:18 pm

asinshesq,

I did as you suggested and it's working. Thank you all for being prompt.
engines
Registered User
Posts: 21
Joined: Sat Mar 02, 2013 4:17 pm