PDA

View Full Version : Wordpress setup and some questions


lonerunner
31st October 2009, 07:20 AM
Im using wordpress and i foud some plugin to insert php code in sidebar, so im using include function instead iframe. i dont know is this wordpress or toplist template related question. When i use template with this code

<tr>
<td class="toplistContent">1. ##link1##</td>
</tr>
<tr>
<td class="toplistContent">2. ##link2##</td>
</tr>
<tr>
<td class="toplistContent">3. ##link3##</td>
</tr>
<tr>
<td class="toplistContent">4. ##link4##</td>
</tr>
<tr>
<td class="toplistContent">5. ##link5##</td>
</tr>
this template should create out.php?trade=sometrade.com and arrange top sites by clicks, which does, but links are in same window. Can i create links in target _blank in this template? And also another Very annoying problem i found is when i go in some internal link like mysite.com/2009/10/ or mysite.com/category/blond/ links become mysite.com/category/blond/out.php?trade=sometrade.com and returning 404 warning page.

so i try to create new template like this

<li><a href="##siteurl1##" target="_blank">##sitename1##</a><br></li>
<li><a href="##siteurl2##" target="_blank">##sitename2##</a><br></li>
<li><a href="##siteurl3##" target="_blank">##sitename3##</a><br></li>
<li><a href="##siteurl4##" target="_blank">##sitename4##</a><br></li>
<li><a href="##siteurl5##" target="_blank">##sitename5##</a><br></li>
<li><a href="##siteurl6##" target="_blank">##sitename6##</a><br></li>
<li><a href="##siteurl7##" target="_blank">##sitename7##</a><br></li>
<li><a href="##siteurl8##" target="_blank">##sitename8##</a><br></li>
<li><a href="##siteurl9##" target="_blank">##sitename9##</a><br></li>
<li><a href="##siteurl10##" target="_blank">##sitename10##</a><br></li>
<li><a href="##siteurl11##" target="_blank">##sitename11##</a><br></li>
<li><a href="##siteurl12##" target="_blank">##sitename12##</a><br></li>
<li><a href="##siteurl13##" target="_blank">##sitename13##</a><br></li>
<li><a href="##siteurl14##" target="_blank">##sitename14##</a><br></li>
<li><a href="##siteurl15##" target="_blank">##sitename15##</a><br></li>

and this works fine with sublinks on site and target blank. but now links are not by topsite order and clicks, it display random and also when i click on trade it goes to random trade.

how to setup fu***** toplist properly.

and is it ok if insert in.php code in my main index page (not template index) will it work properly like this? i see links are counting.

and one more.
What is

Default Return Priority: in Default Trade Settings

too many questions? Sorry i guess after all im not so smart :)

ICEFIRE
31st October 2009, 07:42 PM
The in.php include should go into the WP index and not the template index.

Feel free to use this include instead of the usual one, it works better on multipage sites:


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


The template you have posted assumes the out.php is into the same directory, so it may get a bit confused if a subdirectory link is called... or a wp rewritten post to look like a subdirectory and SE friendly.

I think this toplist template will work better. Perhaps you will need to fix the path to out.php, but if you use absolute path it will work flawlessly.

<li><a href="/out.php?link=trade-top&trade=##sitedomain1##" target="_blank">##sitename1##</a><br></li>
<li><a href="/out.php?link=trade-top&trade=##sitedomain2##" target="_blank">##sitename2##</a><br></li>
<li><a href="/out.php?link=trade-top&trade=##sitedomain3##" target="_blank">##sitename3##</a><br></li>
<li><a href="/out.php?link=trade-top&trade=##sitedomain4##" target="_blank">##sitename4##</a><br></li>
<li><a href="/out.php?link=trade-top&trade=##sitedomain5##" target="_blank">##sitename5##</a><br></li>
<li><a href="/out.php?link=trade-top&trade=##sitedomain6##" target="_blank">##sitename6##</a><br></li>
<li><a href="/out.php?link=trade-top&trade=##sitedomain7##" target="_blank">##sitename7##</a><br></li>
<li><a href="/out.php?link=trade-top&trade=##sitedomain8##" target="_blank">##sitename8##</a><br></li>
<li><a href="/out.php?link=trade-top&trade=##sitedomain9## target="_blank">##sitename9##</a><br></li>
<li><a href="/out.php?link=trade-top&trade=##sitedomain10##" target="_blank">##sitename10##</a><br></li>
<li><a href="/out.php?link=trade-top&trade=##sitedomain11##" target="_blank">##sitename11##</a><br></li>
<li><a href="/out.php?link=trade-top&trade=##sitedomain12##" target="_blank">##sitename12##</a><br></li>
<li><a href="/out.php?link=trade-top&trade=##sitedomain13##" target="_blank">##sitename13##</a><br></li>
<li><a href="/out.php?link=trade-top&trade=##sitedomain14## target="_blank">##sitename14##</a><br></li>
<li><a href="/out.php?link=trade-top&trade=##sitedomain15##" target="_blank">##sitename15##</a><br></li>



The default return priority is the priority CjOverkill gives to that trade. For example, if you want the script to return faster traffic to a given trade, just raise it's priority. It will also try to overfeed the trade but will be not that agressive as setting that trade in boost or overkill mode.

lonerunner
1st November 2009, 01:50 AM
Thank you this new template works perfect, and i also changed in.php code, but what this new code do?

ICEFIRE
1st November 2009, 04:46 AM
The in.php include I posted will just prevent wp from loading in.php twice when someone jumps from your main page to a blog post.

It's not a big deal, but will not cause unnecesary server load nor will count some extra raws.