Go to first new post in topic - from title

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Ideas Centre
cedricthecat
Registered User
Posts: 212
Joined: Sun May 03, 2009 4:02 pm
Name: Dave

Go to first new post in topic - from title

Post by cedricthecat » Sun Jun 17, 2012 6:04 pm

I know you can search for New Posts and then, from the resulting list, go to the newest unread post within the topic by clicking the little > arrow to the side of the post title

However, on some forums I have seen that clicking the title itself takes you to the same place (newest post).

This is what I'd like to implement. I've had a look here

http://www.phpbb.com/community/viewtopi ... &t=2119159

and tried what is advised, but doesn't seem to be doing the trick. :(

Also tried what is suggested here, but again, no joy..

http://www.flying-bits.org/viewtopic.php?f=9&t=2914

Is there anything else I can try?

User avatar
Oyabun1
Former Team Member
Posts: 23163
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill

Re: Go to first new post in topic - from title

Post by Oyabun1 » Sun Jun 17, 2012 9:45 pm

Some information about your board would be useful - version, style used, any modification to the style, actually please fill out the Support Request Template and post it back here to enable us to assist you better.
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests

User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: Go to first new post in topic - from title

Post by 4_seven » Sun Jun 17, 2012 11:58 pm

open

styles/prosilver/template/viewforum_body.html

find

Code: Select all

<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a> 
replace with

Code: Select all

<!-- IF topicrow.S_UNREAD_TOPIC --><a style="font-weight: bold;" href="{topicrow.U_NEWEST_POST}">{topicrow.TOPIC_TITLE}</a><!-- ELSE --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a><!-- ENDIF -->
                <!-- <a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a> --> 
clear all board- and browser-caches

this code is tested
Current Mods | Mod Base | php(BB) programming | No help via PM

cedricthecat
Registered User
Posts: 212
Joined: Sun May 03, 2009 4:02 pm
Name: Dave

Re: Go to first new post in topic - from title

Post by cedricthecat » Mon Jun 18, 2012 10:43 am

Oyabun1 wrote:Some information about your board would be useful - version, style used, any modification to the style, actually please fill out the Support Request Template and post it back here to enable us to assist you better.
Sorry Bill! I did think as I posted that I should be providing a bit more info...

I'm trying 4-seven's solution (as above) but if this doesn't work will be back and will put up the details as requested!

cedricthecat
Registered User
Posts: 212
Joined: Sun May 03, 2009 4:02 pm
Name: Dave

Re: Go to first new post in topic - from title

Post by cedricthecat » Mon Jun 18, 2012 10:45 am

4_seven wrote:open

styles/prosilver/template/viewforum_body.html

clear all board- and browser-caches

this code is tested
Thanks for this 4_seven

The only problem I am having now is not being able to see if it works or not, as our ACP doesn't seem to have a control to purge the cache! I am sure I am being thick, but according to here

http://www.phpbb.com/kb/article/purging ... pbb-cache/

There should be a "Under the General tab, a button on the right side of the page that says Purge Cache", but I can't see it!

User avatar
KevC
Support Team Member
Support Team Member
Posts: 67326
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: Go to first new post in topic - from title

Post by KevC » Mon Jun 18, 2012 10:53 am

It's in the stack of buttons under the stats box in the main window.

Purge the cache (bottom button)


By the way, what happens if people don't want to go to the latest post?
The beauty of the current setup is that you can do either from pretty much the same mouse position.
-:|:- Support Request Template -:|:-
Image
Cheap UK Hosting
"In the land of the blind the little green bloke with no pupils is king - init!"

cedricthecat
Registered User
Posts: 212
Joined: Sun May 03, 2009 4:02 pm
Name: Dave

Re: Go to first new post in topic - from title

Post by cedricthecat » Mon Jun 18, 2012 10:54 am

I've now followed the instructions for manually purging. All I need now is for someone to post to a thread with a large number of replies in it, and I can see if it's working!

I will report back!

cedricthecat
Registered User
Posts: 212
Joined: Sun May 03, 2009 4:02 pm
Name: Dave

Re: Go to first new post in topic - from title

Post by cedricthecat » Mon Jun 18, 2012 11:03 am

Kevin Clark wrote:It's in the stack of buttons under the stats box in the main window.

Purge the cache (bottom button)
We have:-

Reset most users ever online
Reset board’s start date
Resynchronise statistics
Recalculates the total number of posts, topics, users and files.
Resynchronise post counts Only existing posts will be taken into consideration. Pruned posts will not be counted.
Resynchronise dotted topics First unmarks all topics and then correctly marks topics that have seen any activity during the past six months.

Nothing that mentions "purge"....
Kevin Clark wrote:By the way, what happens if people don't want to go to the latest post?
The beauty of the current setup is that you can do either from pretty much the same mouse position.
Yes, good point! Thing is that our forum is a "break-away" from another, broader themed one, and most of the folks that are coming across will be used to "click title to go to newest post"!

Btw, have now purged the cache manually (I think!) and the changes suggested above do not seem to have had any effect... :(

User avatar
KevC
Support Team Member
Support Team Member
Posts: 67326
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: Go to first new post in topic - from title

Post by KevC » Mon Jun 18, 2012 11:07 am

cedricthecat wrote:We have:-

Reset most users ever online
Reset board’s start date
Resynchronise statistics Recalculates the total number of posts, topics, users and files.
Resynchronise post counts Only existing posts will be taken into consideration. Pruned posts will not be counted.
Resynchronise dotted topics First unmarks all topics and then correctly marks topics that have seen any activity during the past six months.

Nothing that mentions "purge"....
You should have


Reset most users ever online
Reset board’s start date
Resynchronise statistics
Resynchronise post counts
Resynchronise dotted topics
Purge all sessions
Purge the cache

Possibly the bottom two are only available to founder accounts.
-:|:- Support Request Template -:|:-
Image
Cheap UK Hosting
"In the land of the blind the little green bloke with no pupils is king - init!"

User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: Go to first new post in topic - from title

Post by 4_seven » Mon Jun 18, 2012 11:15 am

If no success in finding, what Kevin mentioned, start your FTP Program and delete alle files in folder cache/ except .htaccess and index.htm ;)
Current Mods | Mod Base | php(BB) programming | No help via PM

User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: Go to first new post in topic - from title

Post by 4_seven » Mon Jun 18, 2012 11:20 am

cedricthecat wrote:Btw, have now purged the cache manually (I think!) and the changes suggested above do not seem to have had any effect.
4_seven wrote:this code is tested
first try the manual ftp method to delete the cache. if you have prosilver and cleared all available board-, template-, style-, and browser-caches, it must work
Current Mods | Mod Base | php(BB) programming | No help via PM

cedricthecat
Registered User
Posts: 212
Joined: Sun May 03, 2009 4:02 pm
Name: Dave

Re: Go to first new post in topic - from title

Post by cedricthecat » Mon Jun 18, 2012 2:32 pm

Curious as to where the button is, but, more importantly here, have done the manual purge again and the mod is now working!

:D

However..... (why is there always a "however"?!). Someone has noticed that new topics appearing in sub-forum lists (alongside the arrow) have now changed to a smaller, bold font in the same colour as read topics, whereas before they were in a slightly larger, non-bold orange font. Oddly, if you click on "View new posts", this latter style prevails....

EDIT: And we also seem to have --> at the end of each title now!

Guessing that both of the above are part of the mod? (in red?)

IF topicrow.S_UNREAD_TOPIC --><a style="font-weight: bold
<!-- <a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a> -->

User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: Go to first new post in topic - from title

Post by 4_seven » Mon Jun 18, 2012 6:54 pm

The mod is tested and work as intended, for a bit css finetuning make a bit css and it should work.

For this --> just remove that:

Code: Select all

<!-- <a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a> --> 
for me it works without showing a -->.
Current Mods | Mod Base | php(BB) programming | No help via PM

cedricthecat
Registered User
Posts: 212
Joined: Sun May 03, 2009 4:02 pm
Name: Dave

Re: Go to first new post in topic - from title

Post by cedricthecat » Mon Jun 18, 2012 9:16 pm

Cheers!

Any way to stop the topic title text going bold? (and changing colour?)

Thanks!

User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: Go to first new post in topic - from title

Post by 4_seven » Mon Jun 18, 2012 9:22 pm

for me it works out of the box. in a genuine phpbb3 prosilver style this is needed, bcs. it looses bold, if not

if you have a wired style or whatever remove that

Code: Select all

style="font-weight: bold;" 
for other services i have no time, bcs. i normally have work with more important things.
a bit self-initiative is required. i am no privat for your needs, thank you.
Current Mods | Mod Base | php(BB) programming | No help via PM

Locked

Return to “[3.0.x] MOD Requests”

Who is online

Users browsing this forum: Sogou [Spider] and 11 guests

cron