It is currently 19 Feb 2018, 02:03

Anything Goesphpbb. How to add Active Topics, Unanswered Topics links to every page (Showcase | Slideshow)

Anything, almost anything at all
(even advertisement if it's decent, spammers will be banned)
Post Reply
User avatar
tim

Administrator
View: Showcase | Slideshow
Topic Posts: 1/1
Posts: 2155
Joined: 26 Sep 2016, 00:16
Cash on hand: 7,887.02 GLP
Bank: 51,356.25 GLP
Gender: Guy
Location: Victoria, BC
Website: https://gimplearn.net
Operating System: Windows
GIMP Version: 2.8.22
My Personal Blog
My FineArtAmerica
x 1193
x 256
Contact:
Canada

phpbb. How to add Active Topics, Unanswered Topics links to every page

Post#1 by tim » 11 Oct 2016, 20:59


How I added number of links like "Active Topics", "Unanswered Topics",
"Unread Posts", "New Posts", "Your Posts"
to every page of my forum.
It's probably a bad hack but it works beautifully.
At the very end of the file [forumroot]/styles/[stylename]/template/overall_header.html
on my forum the [forumroot] is /gimplearn
the [stylename] is prosilver.

after the code

Code: Select all

<div id="page-body" role="main">
I added the code

Code: Select all

		<!-- IF S_USER_LOGGED_IN-->
		<div id="information" class="rules">
			<div class="inner">
				<a href="http://gimplearn.net/search.php?search_id=active_topics">Active Topics</a> | 
				<a href="http://gimplearn.net/search.php?search_id=unanswered">Unanswered Topics</a> <br/>
				<a href="http://gimplearn.net/search.php?search_id=unreadposts">Unread Posts</a> | 
				<a href="http://gimplearn.net/search.php?search_id=newposts">New Posts</a> | 
				<a href="http://gimplearn.net/search.php?search_id=egosearch">Your Posts</a>
			</div>
		</div>
		<!-- ENDIF -->
All these links i got from going to Quicklinks I figure it's probably more convenient just to show them so user is one click away without having to choose the drop down.
Where the first line of links is Topic related.
And the second line is Post related.
I am pretty happy with the way it looks
for mine

I took out the if check code

Code: Select all

<!-- IF S_USER_LOGGED_IN-->
<!-- ENDIF -->
So non-registered user can see these links too, worse case when you click them it just prompts for you to login. it's not bad.

This is what the links look like now with the above addition of code.
What_Active_Topics_links_on_every_page_looks_like_if_user_is_logged_in.png
What_Active_Topics_links_on_every_page_looks_like_if_user_is_logged_in.png # (56.96 KiB) Viewed 2101 times (Watermarked | Thumbnail)

Or if you're really keen, you can make it so that Topic links will show up for logged in and logged out users.
But Post links will only show up for logged in users, by using the code below:

Code: Select all

		<div id="myown" class="myown">
			<div class="inner">
				<a href="http://gimplearn.net/search.php?search_id=active_topics">Active Topics</a> | 
				<a href="http://gimplearn.net/search.php?search_id=unanswered">Unanswered Topics</a>
				<!-- IF S_USER_LOGGED_IN-->
				<br/>
				<a href="http://gimplearn.net/search.php?search_id=unreadposts">Unread Posts</a> | 
				<a href="http://gimplearn.net/search.php?search_id=newposts">New Posts</a> | 
				<a href="http://gimplearn.net/search.php?search_id=egosearch">Your Posts</a>
				<!-- ENDIF -->
			</div>
		</div>
All i did is i put the if logged in code around the 2nd line of the 3 links.

Then I thought 2 lines together doesn't separate the fact that some links are topics related and some links are post related enough so I wanted to put Topic links on the left and post links on the right...but on the same line.
So I used this code, it just defines a table of 100% width and show all topic links on the left using cell alignment and show all post links on the right also using cell alignment.
Here's the code now.

Code: Select all

		<div id="myown" class="myown">
			<div class="inner">
			    <table width="100%"><tr>
					<td align="left">
						<a href="http://gimplearn.net/search.php?search_id=active_topics">Active Topics</a> | 
						<a href="http://gimplearn.net/search.php?search_id=unanswered">Unanswered Topics</a>
					</td>
					<!-- IF S_USER_LOGGED_IN-->
					<td align="right">
						<a href="http://gimplearn.net/search.php?search_id=unreadposts">Unread Posts</a> | 
						<a href="http://gimplearn.net/search.php?search_id=newposts">New Posts</a> | 
						<a href="http://gimplearn.net/search.php?search_id=egosearch">Your Posts</a>
					</td>
					<!-- ENDIF -->
				</tr>
				</table>
			</div>
		</div>
Now if you're logged in this is what you see on my site.
What_Topic_links_on_the_left_and_post_links_on_the_right_looks_like.png
What_Topic_links_on_the_left_and_post_links_on_the_right_looks_like.png # (121.66 KiB) Viewed 2096 times (Watermarked | Thumbnail)
And if you're not logged in then you won't see the second cell that contains the post links.
Topic_links_when_user_not_logged_in.png
Topic_links_when_user_not_logged_in.png # (118.39 KiB) Viewed 2095 times (Watermarked | Thumbnail)
0 x



aka Tin
Image gimplearn.net                                              

Registered members enjoy ads-free content
Post Reply

Last 20 Members Who Visited This Topic

User avatar tim (2), User avatar gnerd (1)

  • Similar Topics
    Replies
    Views
    Last post
• Featuring Members' Works (Image Attachments Only) •
1: Alan
2: Pat625
3: leopardo-40
4: trandoductin
5: RJKD
6: dinasset
7: Issabella

Who is online

Users browsing this forum: No registered users and 1 guest