Home › Forums › Front End PM PRO › MEssage div linkable to message page
- This topic has 7 replies, 2 voices, and was last updated 5 years, 10 months ago by Shamim Hasan.
-
AuthorPosts
-
December 24, 2018 at 6:18 am #20063Daniel AnghelParticipant
Hi Shamim,
I would need your help with one little thing. I’ve been researching all issues I’ve been having but I cannot seem to find the solution to this one. I’m sure you can enlighten me.
I would like to make the “fep-table-row” class linkable to the same page as message subject.
I attached a screenshot of what I want to achieve. Red square gotta be clickable, and redirects you to the same page as the link rounded by the green border.
I hope you can help! Thank you kindly!
Have a great Christmas and a very nice New year!!!
Attachments:You must be logged in to view attached files.December 24, 2018 at 6:42 am #20069Shamim HasanKeymasterYou can override
box-message.php
template to link that div to message url. Override template instruction in https://www.shamimsplugins.com/docs/front-end-pm/customization/change-templates-2/December 24, 2018 at 3:24 pm #20076Daniel AnghelParticipantI already did the template customization for pretty much stuff I wanted to change, but I cannot seem to find the code part that links the subject to the message page. Would you mind to point me at least in the right direction to do this change to the div?
Thank you so much for your time.
And BTW, you did a great job with the plugin!! Congrats!Kind regards
December 24, 2018 at 7:51 pm #20088Shamim HasanKeymasterIn box-message.php see a line
<div id="fep-message-<?php echo fep_get_the_id(); ?>" class="fep-table-row">
.If you use HTML5 then add
<a href="<?php echo fep_query_url( 'viewmessage', [ 'fep_id' => fep_get_the_id(), 'feppage' => isset( $_GET['feppage'] ) ? $_GET['feppage'] : 1, 'fep-filter' => isset( $_GET['fep-filter'] ) ? $_GET['fep-filter'] : '', ] ); ?>">
before that div and add
</a>
after closing that div.December 24, 2018 at 9:02 pm #20091Daniel AnghelParticipantNice! Thanks for the support!
Very apreciated your help!Unfortunately, i had a problem with that piece of code. This is the part of the template where i inserted te code you gave me:
<div id="fep-table" class="tabla-listachats fep-table fep-odd-even"> <?php while( $messages->have_messages() ) { $messages->the_message(); ?> <a id="mensaje-completo-general" href="<?php echo fep_query_url( 'viewmessage', [ 'fep_id' => fep_get_the_id(), 'feppage' => isset( $_GET['feppage'] ) ? $_GET['feppage'] : 1, 'fep-filter' => isset( $_GET['fep-filter'] ) ? $_GET['fep-filter'] : '', ] ); ?>"> <div id="fep-message-<?php echo fep_get_the_id(); ?>" class="fep-table-row"> <?php foreach ( Fep_Messages::init()->get_table_columns() as $column => $display ) : ?> <div class="fep-column fep-column-<?php echo esc_attr( $column ); ?>"><?php Fep_Messages::init()->get_column_content( $column ); ?></div> <?php endforeach; ?> </div> </a> <?php } //endwhile ?> </div>
The problem is that the a link stays on top of the name/photo of the author. I attach image to explain it better. The bluepart is the a tag i inserted.
Thank you kindly!
Attachments:You must be logged in to view attached files.December 24, 2018 at 11:10 pm #20095Shamim HasanKeymasterIf you have styling issue then remove previous code and add
onClick="window.location.href='<?php echo fep_query_url( 'viewmessage', [ 'fep_id' => fep_get_the_id(), 'feppage' => isset( $_GET['feppage'] ) ? $_GET['feppage'] : 1, 'fep-filter' => isset( $_GET['fep-filter'] ) ? $_GET['fep-filter'] : '', ] ); ?>'"
in that div. Also style that div to show cursor as pointer.
January 11, 2019 at 5:21 am #20628Daniel AnghelParticipantHi,
I am having a little bug with the solution you gave me.
I just noticed that if I try to check any message on the left side, it goes to the message. That’s because the checkbox also have the a link. There is any way to avoid the checkbox from being linked to the message page? Thanks!
January 15, 2019 at 3:06 am #20702Shamim HasanKeymasterThen you will need to add click event individually to every column except checkbox column.
-
AuthorPosts
You need to purchase ‘Front End PM PRO’ to create topic in this support forum.
If you already purchased ‘Front End PM PRO’ please LOGIN.