Stefan Nilsson
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Store price history for a price comparison siteThanks catacaustic. It sure sounds like the best idea.
Forum: Everything else WordPress
In reply to: Plugin for displaying unique views for Post/pagesDid you ever find anything? I’ve tried several but none of them seem to do it.
Managed to solve it.
In classes/models/PrliUtils.php I replaced row 335 & 336:
header("HTTP/1.1 307 Temporary Redirect"); header('Location: '.$pretty_link_url.$param_string);
With:
if(isset($pretty_link->group_id) && $pretty_link->group_id != 0){ // Fetch group URL from group description $query = 'SELECT gr.* FROM ' . $wpdb->prefix . 'prli_groups gr WHERE id=' . $pretty_link->group_id; $group_data = $wpdb->get_row($query); $group_url = $group_data->description; header("HTTP/1.1 307 Temporary Redirect"); header('Location: '.$group_url.$pretty_link_url.$param_string); } else { header("HTTP/1.1 307 Temporary Redirect"); header('Location: '.$pretty_link_url.$param_string); }
Depending on your use you might want to make some changes but now you know where to start if you want the same functions in your plugin.
I’ve gone through how Pretty Link works and the simple method would be to add the affiliate network URL as a description for the group.
Group (name, description):
– TradeDoubler | https://clk.tradedoubler.com/click?p=23&a=234234&url=Link (target URL):
– https://store.com/true_blood_-_season_5_(5_disc)Then in the redirect you simply add these two:
$link = $group_desc . $link_targetURL;
Unfortunately I’m not able to find where the redirect function is. Could someone point me in the right direction?
Forum: Plugins
In reply to: [Smart Archives Reloaded] Fancy doesn't workIt seem to be a conflict between tools.tabs.min.js and Facybox. I’ve found a workaround by replacing tools.tabs.min.js with a file including both Tabs and jQuery but it adds an extra 92 kb to load – not very good for the speed of the site.
More info:
Forum: Plugins
In reply to: [Smart Archives Reloaded] Fancy doesn't workWhen I inspect elements using Chrome I see the following error:
“Uncaught TypeError: Cannot read property ‘jquery’ of undefined“ in tools.tabs.min.js:16
It’s referring to the following file:
https://plugins.svn.www.ads-software.com/smart-archives-reloaded/tags/2.0.5/inc/tools.tabs.min.js
I assume there’s a jQuery conflict the Brennuis theme created by the tools.tabs.min.js file.
The new version (1.1) should work so try updating the plugin.
I’ve got the same problem with URLs such as:
%20rel=’external%20nofollow
and
‘+uri+%20’
Would love a solution.
I managed to find a solution to this problem. Open:
/wp-content/plugins/pingdom-status/php/pingdom_sync/PingdomDataProvider.php
On row 413 (in version 1.1.4) it says:
echo "\n$date -> $text";
Simply comment out this row by replacing it with:
//echo "\n$date -> $text";
I’ve no idea on why they decided to echo it out.
Forum: Fixing WordPress
In reply to: "Thank you"-popup after leaving a commentI guess this should be viewed as an evil workaround but it works.
Add the following to functions.php
add_filter('comment_post_redirect', 'redirect_after_comment'); function redirect_after_comment($location){ $newurl = substr($location, 0, strpos($location, "#comment")); return $newurl . '?c=y'; }
Add the following where you want your message to be displayed
<?php if($_GET[ 'c' ] == 'y'){ echo 'Thank you'; } ?>
After you leave a comment the function above will strip out #comment-id from the URL and instead replace it with ?c=y so we can check if there was a comment posted. Then we simply check if the variable ‘c’ is ‘y’. If so, we display the message, which in my case is a popup. This is the best method I could come up with.
If you don’t like c=y you can change it to whatever you like.
Forum: Plugins
In reply to: Rate CategoriesAny news on this topic?
Forum: Plugins
In reply to: Style categories in WordPressI have tried it, put it tend to crash when I pass about 1000 lines. I guess I will have to give it a go again.
Forum: Everything else WordPress
In reply to: WordPress Pligg?Any news about this?