Make Forum Image Clickable

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Post Reply
User avatar
Edward572
Registered User
Posts: 160
Joined: Wed Aug 03, 2005 12:37 am
Location: Ontario, Canada
Name: Edward
Contact:

Make Forum Image Clickable

Post by Edward572 » Sun Sep 02, 2018 11:58 pm

Make Forum Image Clickable
Anyone have an extension or code to do this for v3.2.2, found old posts for v3.0.0 but nothing new.

Any Ideas?
Last edited by Mick on Tue Sep 04, 2018 7:19 am, edited 2 times in total.
Reason: Solved.
Cheers All, Have A Good One
StormerSoft.Com

Bacon is the greatest food, but someone said no, "Chocolate"
Forum StormerSoft.Com

User avatar
Lumpy Burgertushie
Registered User
Posts: 65301
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Make Forum Image Clickable

Post by Lumpy Burgertushie » Mon Sep 03, 2018 1:20 am

change

Code: Select all

<!-- IF forumrow.FORUM_IMAGE --><span class="forum-image">{forumrow.FORUM_IMAGE}</span><!-- ENDIF -->
around line ~45 of "forumlist_body.html" of the yourstyle\template folder to:

Code: Select all

<!-- IF forumrow.FORUM_IMAGE --><span class="forum-image"><a href="{forumrow.U_VIEWFORUM}">{forumrow.FORUM_IMAGE}</a></span><!-- ENDIF -->
that should still work.
be sure to purge the cache afterwards and refresh your browser.

robert
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

OK, so what's the speed of dark?

User avatar
Mick
Support Team Member
Support Team Member
Posts: 20332
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: Make Forum Image Clickable

Post by Mick » Mon Sep 03, 2018 7:23 am

Edward572 wrote:
Sun Sep 02, 2018 11:58 pm
Anyone have an extension or code to do this
Please note (again) if you need an extension please post in the extensions forums and if you want code then phpBB Custom coding is the place to be, thanks.
"The more connected we get the more alone we become" - Kyle Broflovski

There are no ‘threads’ in phpBB, they are topics.

User avatar
Edward572
Registered User
Posts: 160
Joined: Wed Aug 03, 2005 12:37 am
Location: Ontario, Canada
Name: Edward
Contact:

Re: Make Forum Image Clickable

Post by Edward572 » Mon Sep 03, 2018 3:38 pm

Mick wrote:
Mon Sep 03, 2018 7:23 am
Edward572 wrote:
Sun Sep 02, 2018 11:58 pm
Anyone have an extension or code to do this
Please note (again) if you need an extension please post in the extensions forums and if you want code then phpBB Custom coding is the place to be, thanks.
Sorry, I found the old after I posted the last post.

Woopsee

Thanks Again,
Edward
Lumpy Burgertushie wrote:
Mon Sep 03, 2018 1:20 am
change

Code: Select all

<!-- IF forumrow.FORUM_IMAGE --><span class="forum-image">{forumrow.FORUM_IMAGE}</span><!-- ENDIF -->
around line ~45 of "forumlist_body.html" of the yourstyle\template folder to:

Code: Select all

<!-- IF forumrow.FORUM_IMAGE --><span class="forum-image"><a href="{forumrow.U_VIEWFORUM}">{forumrow.FORUM_IMAGE}</a></span><!-- ENDIF -->
that should still work.
be sure to purge the cache afterwards and refresh your browser.

robert
Thanks I'll try that on v3.2.2, no that did not work or could I find the lines, but thanks for helping. Code for the v3.22 is below

Code: Select all

<!-- BEGIN forumrow -->
	<!-- IF (forumrow.S_IS_CAT and not forumrow.S_FIRST_ROW) or forumrow.S_NO_CAT  -->
			</ul>

			</div>
		</div>
	<!-- ENDIF -->

	<!-- EVENT forumlist_body_category_header_before -->
	<!-- IF forumrow.S_IS_CAT or forumrow.S_FIRST_ROW  or forumrow.S_NO_CAT  -->
		<div class="forabg">
			<div class="inner">
			<ul class="topiclist">
				<li class="header">
					<!-- EVENT forumlist_body_category_header_row_prepend -->
					<dl class="row-item">
						<dt><div class="list-inner"><!-- IF forumrow.S_IS_CAT --><a href="{forumrow.U_VIEWFORUM}">{forumrow.FORUM_NAME}</a><!-- ELSE -->{L_FORUM}<!-- ENDIF --></div></dt>
						<dd class="topics">{L_TOPICS}</dd>
						<dd class="posts">{L_POSTS}</dd>
						<dd class="lastpost"><span>{L_LAST_POST}</span></dd>
					</dl>
					<!-- EVENT forumlist_body_category_header_row_append -->
				</li>
			</ul>
			<ul class="topiclist forums">
	<!-- ENDIF -->
	<!-- EVENT forumlist_body_category_header_after -->

	<!-- IF not forumrow.S_IS_CAT -->
		<!-- EVENT forumlist_body_forum_row_before -->
		<li class="row">
			<!-- EVENT forumlist_body_forum_row_prepend -->
			<dl class="row-item {forumrow.FORUM_IMG_STYLE}">
				<dt title="{forumrow.FORUM_FOLDER_IMG_ALT}">
					<!-- IF forumrow.S_UNREAD_FORUM --><a href="{forumrow.U_VIEWFORUM}" class="row-item-link"></a><!-- ENDIF -->
					<div class="list-inner">
						<!-- IF S_ENABLE_FEEDS and forumrow.S_FEED_ENABLED -->
							<!--
								<a class="feed-icon-forum" title="{L_FEED} - {forumrow.FORUM_NAME}" href="{U_FEED}?f={forumrow.FORUM_ID}">
									<i class="icon fa-rss-square fa-fw icon-orange" aria-hidden="true"></i><span class="sr-only">{L_FEED} - {forumrow.FORUM_NAME}</span>
								</a>
							-->
						<!-- ENDIF -->
						<!-- IF forumrow.FORUM_IMAGE -->
							<!-- EVENT forumlist_body_forum_image_before -->
							<span class="forum-image"><!-- EVENT forumlist_body_forum_image_prepend -->{forumrow.FORUM_IMAGE}<!-- EVENT forumlist_body_forum_image_append --></span>
							<!-- EVENT forumlist_body_forum_image_after -->
						<!-- ENDIF -->
						<a href="{forumrow.U_VIEWFORUM}" class="forumtitle">{forumrow.FORUM_NAME}</a>
						<!-- IF forumrow.FORUM_DESC --><br />{forumrow.FORUM_DESC}<!-- ENDIF -->
						<!-- IF forumrow.MODERATORS -->
							<br /><strong>{forumrow.L_MODERATOR_STR}{L_COLON}</strong> {forumrow.MODERATORS}
						<!-- ENDIF -->
						<!-- IF .forumrow.subforum and forumrow.S_LIST_SUBFORUMS -->
							<!-- EVENT forumlist_body_subforums_before -->
							<br /><strong>{forumrow.L_SUBFORUM_STR}{L_COLON}</strong>
							<!-- BEGIN subforum -->
								<!-- EVENT forumlist_body_subforum_link_prepend --><a href="{forumrow.subforum.U_SUBFORUM}" class="subforum<!-- IF forumrow.subforum.S_UNREAD --> unread<!-- ELSE --> read<!-- ENDIF -->" title="<!-- IF forumrow.subforum.S_UNREAD -->{L_UNREAD_POSTS}<!-- ELSE -->{L_NO_UNREAD_POSTS}<!-- ENDIF -->">
									<i class="icon <!-- IF forumrow.subforum.IS_LINK -->fa-external-link<!-- ELSE -->fa-file-o<!-- ENDIF --> fa-fw <!-- IF forumrow.subforum.S_UNREAD --> icon-red<!-- ELSE --> icon-blue<!-- ENDIF --> icon-md" aria-hidden="true"></i>{forumrow.subforum.SUBFORUM_NAME}</a><!-- IF not forumrow.subforum.S_LAST_ROW -->{L_COMMA_SEPARATOR}<!-- ENDIF --><!-- EVENT forumlist_body_subforum_link_append -->
							<!-- END subforum -->
							<!-- EVENT forumlist_body_subforums_after -->
						<!-- ENDIF -->

						<!-- IF not S_IS_BOT -->
						<div class="responsive-show" style="display: none;">
							<!-- IF forumrow.CLICKS -->
								{L_REDIRECTS}{L_COLON} <strong>{forumrow.CLICKS}</strong>
							<!-- ELSEIF not forumrow.S_IS_LINK and forumrow.TOPICS -->
								{L_TOPICS}{L_COLON} <strong>{forumrow.TOPICS}</strong>
							<!-- ENDIF -->
						</div>
						<!-- ENDIF -->
					</div>
				</dt>
				<!-- IF forumrow.CLICKS -->
					<dd class="redirect"><span>{L_REDIRECTS}{L_COLON} {forumrow.CLICKS}</span></dd>
				<!-- ELSEIF not forumrow.S_IS_LINK -->
					<dd class="topics">{forumrow.TOPICS} <dfn>{L_TOPICS}</dfn></dd>
					<dd class="posts">{forumrow.POSTS} <dfn>{L_POSTS}</dfn></dd>
					<dd class="lastpost">
						<span>
							<!-- IF forumrow.U_UNAPPROVED_TOPICS -->
								<a href="{forumrow.U_UNAPPROVED_TOPICS}" title="{L_TOPICS_UNAPPROVED}">
									<i class="icon fa-question fa-fw icon-blue" aria-hidden="true"></i><span class="sr-only">{L_TOPICS_UNAPPROVED}</span>
								</a>
							<!-- ELSEIF forumrow.U_UNAPPROVED_POSTS -->
								<a href="{forumrow.U_UNAPPROVED_POSTS}" title="{L_POSTS_UNAPPROVED_FORUM}">
									<i class="icon fa-question fa-fw icon-blue" aria-hidden="true"></i><span class="sr-only">{L_POSTS_UNAPPROVED_FORUM}</span>
								</a>
							<!-- ENDIF -->
							<!-- IF forumrow.LAST_POST_TIME -->
								<dfn>{L_LAST_POST}</dfn>
								<!-- IF forumrow.S_DISPLAY_SUBJECT -->
									<!-- EVENT forumlist_body_last_post_title_prepend -->
									<a href="{forumrow.U_LAST_POST}" title="{forumrow.LAST_POST_SUBJECT}" class="lastsubject">{forumrow.LAST_POST_SUBJECT_TRUNCATED}</a> <br />
								<!-- ENDIF -->
									{L_POST_BY_AUTHOR} {forumrow.LAST_POSTER_FULL}
								<!-- IF not S_IS_BOT -->
									<a href="{forumrow.U_LAST_POST}" title="{L_VIEW_LATEST_POST}">
										<i class="icon fa-external-link-square fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">{L_VIEW_LATEST_POST}</span>
									</a>
								<!-- ENDIF -->
								<br />{forumrow.LAST_POST_TIME}
							<!-- ELSE -->
								{L_NO_POSTS}<br />&nbsp;
							<!-- ENDIF -->
						</span>
					</dd>
				<!-- ELSE -->
					<dd>&nbsp;</dd>
				<!-- ENDIF -->
			</dl>
			<!-- EVENT forumlist_body_forum_row_append -->
		</li>
		<!-- EVENT forumlist_body_forum_row_after -->
	<!-- ENDIF -->

	<!-- IF forumrow.S_LAST_ROW -->
			</ul>

			</div>
		</div>
	<!-- EVENT forumlist_body_last_row_after -->
	<!-- ENDIF -->

<!-- BEGINELSE -->
	<div class="panel">
		<div class="inner">
		<strong>{L_NO_FORUMS}</strong>
		</div>
	</div>
<!-- END forumrow -->
Does not find that line above, thanks again if you have a solution.
Cheers All, Have A Good One
StormerSoft.Com

Bacon is the greatest food, but someone said no, "Chocolate"
Forum StormerSoft.Com

User avatar
Lumpy Burgertushie
Registered User
Posts: 65301
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Make Forum Image Clickable

Post by Lumpy Burgertushie » Mon Sep 03, 2018 4:37 pm

find:

Code: Select all

<span class="forum-image"><!-- EVENT forumlist_body_forum_image_prepend -->{forumrow.FORUM_IMAGE}<!-- EVENT forumlist_body_forum_image_append --></span>
replace with:

Code: Select all

<span class="forum-image"><!-- EVENT forumlist_body_forum_image_prepend --><a href="{forumrow.U_VIEWFORUM}">{forumrow.FORUM_IMAGE}</a><!-- EVENT forumlist_body_forum_image_append --></span>
give that a try.


robert
Last edited by Mick on Mon Sep 03, 2018 5:57 pm, edited 1 time in total.
Reason: Replaced [c] with [code]
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

OK, so what's the speed of dark?

User avatar
Edward572
Registered User
Posts: 160
Joined: Wed Aug 03, 2005 12:37 am
Location: Ontario, Canada
Name: Edward
Contact:

Re: Make Forum Image Clickable

Post by Edward572 » Mon Sep 03, 2018 11:29 pm

Works perfectly!

Thank You,
Ed
Last edited by Mick on Tue Sep 04, 2018 7:15 am, edited 1 time in total.
Reason: Removed unnecessary quoting.
Cheers All, Have A Good One
StormerSoft.Com

Bacon is the greatest food, but someone said no, "Chocolate"
Forum StormerSoft.Com

donross
Registered User
Posts: 3
Joined: Mon Oct 01, 2018 9:32 am

Re: Make Forum Image Clickable

Post by donross » Sun Nov 18, 2018 1:19 pm

Sorry, doesn't work for me.
phpBB 3.2.3

I wonder, why the clickable Forum_Image isn't implemented as option.
For me it is clear to click on a given picture that represents a content to get there.

Greetz
Don

User avatar
Edward572
Registered User
Posts: 160
Joined: Wed Aug 03, 2005 12:37 am
Location: Ontario, Canada
Name: Edward
Contact:

Re: Make Forum Image Clickable

Post by Edward572 » Mon Nov 19, 2018 12:01 am

Silly question but did you clear cache and edit the correct file.

Cache needs to be cleared.

Cheers
Ed
Cheers All, Have A Good One
StormerSoft.Com

Bacon is the greatest food, but someone said no, "Chocolate"
Forum StormerSoft.Com

Post Reply

Return to “phpBB Custom Coding”

Who is online

Users browsing this forum: bonelifer, janus_zonstraal and 6 guests