Moving a link off of Quick Links phpBB3.1.3

For support and discussion related to templates, themes, and imagesets in phpBB 3.1.
Scam Warning
Post Reply
KB_Thailand
Registered User
Posts: 55
Joined: Mon Feb 03, 2014 2:02 am
Location: Thailand
Name: Ken
Contact:

Moving a link off of Quick Links phpBB3.1.3

Post by KB_Thailand » Mon Mar 23, 2015 4:42 am

Ok, I've searched and searched, but have been unable to find anything relating to this, so either nobody has asked, or I haven't hit the right combination of words. ;)

I am trying to move the New Posts link off of the Quick Links dropdown, or just create a new one, and place it on the forum main page like it was before the upgrade to 3.1. I've manage to do mods for my board that work in other areas, like increase the default font size, expand the Last Post column to 40 characters, and expand the overall width of the forum, but haven't been able to quite put this one together.

Any info appreciated!
Thanks!
KB

Here's the idea:
QuickLink.jpg
QuickLink.jpg (23.05 KiB) Viewed 656 times
ToWhere.jpg
Last edited by Oyabun1 on Mon Mar 23, 2015 5:01 am, edited 1 time in total.
Reason: Moved from 3.1.x Support forum
“Reason is poor propaganda when opposed by the yammering, unceasing lies of shrewd and evil and self-serving men."
-- Robert A. Heinlein

Swanny
Registered User
Posts: 408
Joined: Sun Apr 14, 2002 2:11 am
Location: Canada

Re: Moving a link off of Quick Links phpBB3.1.3

Post by Swanny » Mon Mar 23, 2015 6:25 am

This would be nice to have. I upgraded my biggest forum today and I suspect people will have a hard time adjusting since some of those old options are now under Quick links, hidden away.

KB_Thailand
Registered User
Posts: 55
Joined: Mon Feb 03, 2014 2:02 am
Location: Thailand
Name: Ken
Contact:

Re: Moving a link off of Quick Links phpBB3.1.3

Post by KB_Thailand » Mon Mar 23, 2015 12:10 pm

Exactly...first thing my members said after the upgrade: "where did the New Posts link go?" I know it is pretty petty, but doing two clicks where it used to be one seems to be an issue. ;) For new members, it is not intuitive to look under something called Quick Links for forum links, as that wording is more often used for external links I think.

I was doing some code reading today, and I think I may have a clue as to how to change it. If I succeed in doing so, I will post the changes here. In the interim, if anyone is fairly sure how to accomplish this, please do let me know.

Thanks,
KB
“Reason is poor propaganda when opposed by the yammering, unceasing lies of shrewd and evil and self-serving men."
-- Robert A. Heinlein

KB_Thailand
Registered User
Posts: 55
Joined: Mon Feb 03, 2014 2:02 am
Location: Thailand
Name: Ken
Contact:

Re: Moving a link off of Quick Links phpBB3.1.3

Post by KB_Thailand » Tue Mar 24, 2015 12:46 am

Caveat: this is most probably NOT the best/correct way to do this, but it works on my board with prosilver. I used the existing mark-read class just because it was already there, aligned with the real mark-read link while a list link did not, and matched font size. :lol: I just added a separate link instead of removing New Posts from the Quick Links menu.
Since this is inside an IF U_MARK_FORUMS statement, if you turn off the ability to mark forums read (if you can--don't know but assume that is what U_MARK_FORUMS is) then this code will not execute and you will get no link. You can figure it out from there. ;)

Go to Styles->Prosilver->Template and edit index_body.html
Find this (it is close to the top of the file):

Code: Select all

<!-- IF U_MARK_FORUMS -->
	<div class="action-bar compact">
		<a href="{U_MARK_FORUMS}" class="mark-read rightside" accesskey="m" data-ajax="mark_forums_read">{L_MARK_FORUMS_READ}</a>
	</div>
<!-- ENDIF -->
Between the div class statement and the mark-read href, insert this:

Code: Select all

<a href="./search.php?search_id=newposts" class="mark-read leftside">New posts</a>
So the block looks like:

Code: Select all

<!-- IF U_MARK_FORUMS -->
	<div class="action-bar compact">
		<a href="./search.php?search_id=newposts" class="mark-read leftside">New posts</a> 
		<a href="{U_MARK_FORUMS}" class="mark-read rightside" accesskey="m" data-ajax="mark_forums_read">{L_MARK_FORUMS_READ}</a>
	</div>
<!-- ENDIF -->
This produces the following on my board:
NewPosts.jpg
NewPosts.jpg (26.16 KiB) Viewed 586 times
I hope it helps someone else. :)
KB
“Reason is poor propaganda when opposed by the yammering, unceasing lies of shrewd and evil and self-serving men."
-- Robert A. Heinlein

KB_Thailand
Registered User
Posts: 55
Joined: Mon Feb 03, 2014 2:02 am
Location: Thailand
Name: Ken
Contact:

Re: Moving a link off of Quick Links phpBB3.1.3

Post by KB_Thailand » Thu Nov 23, 2017 3:39 pm

Sorry Livakee, no idea on that. Maybe some of the other folks who have multi language boards can answer it for you. :)

If I had to guess, there is probably a variable for that link under the Quick Links menu, so take a look there and see if that is the case. At that point, maybe just insert the variable where the 'New Posts' text is. Just a guess off the top of my head as has been a couple of years since I looked at this.
“Reason is poor propaganda when opposed by the yammering, unceasing lies of shrewd and evil and self-serving men."
-- Robert A. Heinlein

User avatar
david63
Jr. Extension Validator
Posts: 13385
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: Moving a link off of Quick Links phpBB3.1.3

Post by david63 » Thu Nov 23, 2017 3:47 pm

Livakee wrote:
Thu Nov 23, 2017 12:48 pm
how can I have them translated automatically when I change the forum language?
Change this

Code: Select all

<a href="./search.php?search_id=newposts" class="mark-read leftside">New posts</a>
to be

Code: Select all

<a href="./search.php?search_id=newposts" class="mark-read leftside">{L_NEW_POSTS}</a>
but be aware the the language variable NEW_POSTS is depreciated
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

Post Reply

Return to “[3.1.x] Styles Support & Discussion”

Who is online

Users browsing this forum: oBot and 3 guests