Hi, we are using the clink plugin to redirect customers to an external site for more information. The countdown however doesn’t function anymore and with the countdown setting on, also the automatic redirection is not working.
Looking at the developers website, it seems to be hacked or not in service anymore and the last plugin update was one year ago. Are there any updates planned or is this plugin running out of time?
Thanks for your help.
Best regards, Helga
I want to change links structure from this format https://www.site.com/clink/link-name
to something like that https://www.site.com/clink/?p=123 .
So , could you please tell me how ?
I tested Clink and it seems to be working generally very well. Just one thing seems to be working incorrectly: some characters like the ampersand (&) are encoded in the URLs.
The target URL we have: https://example.com/?product=shoe&color=yellow
What we see in the address bar after Clink redirection: https://example.com/?product=shoe& #038;color=yellow (minus the space)
This happens with both types of redirections, with and without the timer. However, this does not happen if the user clicks the link on the redirection page or if admin clicks the link on the link list at wp-admin/edit.php?post_type=clink
.
The cause of the problem is that the URLs are stored in the database in the _postmeta table in an encoded format, which works correctly when echoing the link in HTML, like the two clickable links mentioned above, but it does not work properly when blindly redirected to.
Fix
Edit https://plugins.trac.www.ads-software.com/browser/clink/trunk/clink-template.php and replace current line 13, which is
$clink_url = get_post_meta($post_id, 'clink_url', true);
with
$clink_url_for_html = get_post_meta($post_id, 'clink_url', true);
$clink_url_for_redirection = str_replace('&', '&', $clink_url_for_html);
(Notice the variable names making it clear which should be used and where.)
and then replace every current occurrence of $clink_url with $clink_url_for_html, except on lines
57, 108 and 127 with $clink_url_for_redirection. Also declare $clink_url_for_redirection as global inside clink_page_generator(), after line 31.
This fix does not decode the single quote (‘) encoded in the URLs, but can be easily extended to do so if necessary by adding another str_replace() call.
Code cleanup
Lines 85 and 110 in https://plugins.trac.www.ads-software.com/browser/clink/trunk/clink-template.php are redundant and can be deleted to make the code easier to read and work with.
]]>Hello,
Is it possible that the links open in a new window?
Kind regards,
Leon
Please add ability to add an excerpt… you can easily improve what I added as follows:
clink/inc/cpt.php
'supports' => array( 'title', 'author', 'revisions', 'excerpt' ), // excerpt added
clink/inc/functions.php
while( $clink_widget_query->have_posts() ) :
$clink_widget_query->the_post();
$clink_link_title = get_the_title();
$clink_link_url = get_the_permalink();
$excerpt_text = htmlentities(get_the_excerpt()); // added
if( $arg['show_clicks'] == 1 ){
$clink_clicks = clink_clicks( get_the_ID() , true );
$clink_clicks = '<span class="clink-clicks"> ' . $clink_clicks . ' </span>';
}
// replaced with following line //$Cl_qu_str .= '<li class="clink-' . get_the_ID() . '"><a href="' . $clink_link_url . '">' . $clink_link_title . $clink_clicks . '</a></li>';
$Cl_qu_str .= '<li class="clink-link clink-' . get_the_ID() . '"><a href="' . $clink_link_url . '" target="_blank">' . $clink_link_title . $clink_clicks . '<div class="excerpt-text">'.$excerpt_text.'</div></a></li>';
style.css
.clink-link a {
color: #009900 !important;
font-size: 125%;
line-height: 125%;
}
.clink-link a:hover {
color: #990000 !important;
}
.excerpt-text {
color: #5c5c5c !important;
font-size: 75%;
}
]]>
Please add ability to set number of clicks when editing the link.
I managed to set the click numbers I accumulated on my old site as I wanted by editing the database table wp_postmeta and changing the meta_value where the post_id matched the link for your meta_key clink_clicks, for example:
UPDATE db
.wp_postmeta
SET meta_value
= ‘1532’ WHERE wp_postmeta
.meta_key
= ‘clink_clicks’ AND wp_postmeta
.post_id
= ‘8092’;
hi,
there is an error on mobile…,
only run on desktop…
thanks,
]]>Hi,
Does Clink have a way to import and export links in bulk?
Thank you
]]>How can change “Target” from widget ?
]]>1: Your plugin has been destroyed site SEO. You added “no follow” code into the your template file. So, this code already destroyed SEO. Please resolve this problem.
2: Your plugin does not work on Chrome latest vers. I’ve been editing it for good looking.
3: Does not seen Post head, id , logo, menu etc. on Downlodin page (On Chrome).
So i hope you will solve all.
Thanks.
]]>