PDA

View Full Version : Cjoverkill and Wordpress 3.0.1


addult
31st August 2010, 12:20 PM
Hi!

My website works under Wordpress 3.0.1
And unfortunately it don't get Cjoverkill working on my blog :confused:

I've trouble with this line of code:

<?php include file="in.php" ?>

I've tried pasting it everywhere but nothing works... I get a error, the page is completely blank and it says: 'error on line blabla'

I also tried this code (I found it on this board):

$cookietime=300;
$referer=$_SERVER["HTTP_REFERER"];
if($_COOKIE["overkill_in"]<time()-$cookietime){
setcookie("overkill_in", time(), time()+($cookietime*1));
include ("in.php");
}

But it doesn't work either... I do get my website but I see the code literally on my website :(

I've turned my WP Super Cache off btw.

Hope someone here can help me! Thanks!

ICEFIRE
1st September 2010, 11:16 AM
Make sure that the CjOverkill files are in the same directory as the wp files.

Then edit the wp index.php file with any text editor and place the long code there:


$cookietime=300;
$referer=$_SERVER["HTTP_REFERER"];
if($_COOKIE["overkill_in"]<time()-$cookietime){
setcookie("overkill_in", time(), time()+($cookietime*1));
include ("in.php");
}


If you place this code into your wp template then wp will bug because of the way wp works and uses the templates.

addult
2nd September 2010, 10:52 AM
Thanks! It works out to insert this piece of code :)

I've also placed the toplist in my blog. But onfortunately the links don't work. I get this error:
"Fatal error: Unable to read 17984 bytes in /out.php on line 0"

This (http://bit.ly/c5BPm4) is my website, the link trades are on the sidebar below (until the script works)
[I've used the toplist template that I found in this topic (http://bbs.icefire.org/showthread.php?t=154&highlight=wordpress)]

ICEFIRE
2nd September 2010, 01:16 PM
Make sure you have uploaded the CjOverkill files in binary mode. Some FTP clients will select automatically text mode and will corrupt the files on upload. Just upload the php files again using binary mode and you are done.

addult
23rd January 2011, 05:44 PM
Thanks! It's working now.

But I still have problems with tracking the links. On the homepage I've thumbs that I'd like to track with the out.php

If I put this in my permalink, it works:
/out.php?/%postname%/


But every click goes to my trades, and I want e.g. 75% skim to my url, and 25% to the trades. When I fill in this in my permalink settings:

out.php?pct=74&url=%postname%/

The post will give a 404 error. Also when I change the permalink to this:

out.php?pct=74&url=/%postname%/

What I also tried was changing the main index template file, I tried this:

<a href="out.php?pct=74&url=<?php the_permalink() ?>" target="_blank" title="<?php the_title_attribute(); ?>"><?php echo thman_get_limited_string($post->post_title,15); ?></a>

This works for the thumbs on the main page. But if you go to page 2 of page 3 the posts the 404 error will show up...

So I was wondering if it possible to run the out.php over all the links on my page automatically?

ICEFIRE
24th January 2011, 12:10 AM
Probably you are using some fancy rewriting in your WP setup... something like http://www.yoursite.com/post-id/post-name-here or something like

Make sure that in the links you point to out.php properly. a href="out.php... will probably fail with this setup, while a href="/out.php.... should work. Notice the / at the beginning of the href. that will ensure your server will not think you are trying to call some non existing file and should not give 404 errors.

addult
23rd February 2011, 12:11 AM
Thanks it works with the '/' before the out.php!! :D