MEssage div linkable to message page


Home Forums Front End PM PRO MEssage div linkable to message page

This topic is: Not Resolved
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #20063
    Daniel Anghel
    Participant

    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.
    #20069
    Shamim Hasan
    Keymaster

    You 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/

    #20076
    Daniel Anghel
    Participant

    I 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

    #20088
    Shamim Hasan
    Keymaster

    In 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.

    #20091
    Daniel Anghel
    Participant

    Nice! 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.
    #20095
    Shamim Hasan
    Keymaster

    If 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.

    #20628
    Daniel Anghel
    Participant

    Hi,

    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!

    #20702
    Shamim Hasan
    Keymaster

    Then you will need to add click event individually to every column except checkbox column.

Viewing 8 posts - 1 through 8 (of 8 total)

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.