PAID JOB: 5 minutes of your PHP expertise = $25

by Ken Reno 7 replies
PROBLEM SOLVED! Thanks Warriors!
#programming #$25 #expertise #job #minutes #paid #php
Avatar of Unregistered
  • Profile picture of the author Ken Reno
    P.S. Please post here when you're done so that others will know this is closed. It's going on 1:30 here and the eyes are heavy. :-)

    Thanks again!
    Ken
    Signature
    {{ DiscussionBoard.errors[485982].message }}
  • Profile picture of the author Paul1234
    Hi Ken, here's quick and dirty solution.

    replace:

    function myplugin_filter($buffer) {
    return $buffer . "<a href='http://instantcommission.me'>Earn Instant PayPal Commissions</a>";
    }

    with:

    function myplugin_filter($buffer) {
    $urls = array("http://SITE1.com" ,"http://SITE2.com" ,"http://SITE3.com");
    $text = array("Site 1" ,"Site 2" ,"Site 3");
    srand(time());
    $random = (rand()%3);
    return $buffer . "<a href = \"$urls[$random]\">$text[$random]</a>";
    Signature

    Paul Turner

    {{ DiscussionBoard.errors[485988].message }}
  • Profile picture of the author Mark Brian
    or you can also try another method by replacing:


    function myplugin_filter($buffer) {
    return $buffer . "<a href='http://instantcommission.me'>Earn Instant PayPal Commissions</a>";
    }


    with this one:


    function myplugin_filter($buffer) {

    $arr[1] = '<a href="http://SITE1.com">Site 1</a>';
    $arr[2] = '<a href="http://SITE2.com">Site 2</a>';
    $arr[3] = '<a href="http://SITE3.com">Site 3</a>';

    return $buffer . $arr[rand(1,3)];
    }
    Signature

    {{ DiscussionBoard.errors[485998].message }}
  • Profile picture of the author kool
    <?php

    /*
    * Plugin Name: Instant Commission Plugin
    * Version: 1.0.0
    * Plugin URI: http://www.InstantCommission.Me/plugin.html
    * Description: Earn Instant Commissions With Your Wordpress Blog
    * Author: Ken Reno and Shaun Simpson
    * Author URI: Instant Commissions for Joint Venture And Affiliate Partners
    */

    // Make it work with WordPress before version 2.6
    if (!defined('WP_CONTENT_URL')) {
    define('WP_CONTENT_URL', get_option('siteurl') . '/wp-content');
    }

    // Rename this function to your plugin name
    function myplugin_action() {
    echo "Hello world... I'm an action!";
    }

    $url=array(
    '<a href='http://SITE1.com'>Site 1</a>';
    '<a href='http://SITE2.com'>Site 2</a>';
    '<a href='http://SITE3.com'>Site 3</a>');
    $random=rand(1,count($url));


    // Rename this function if your want your plugin to be a filter (return some text)
    function myplugin_filter($buffer) {
    return $buffer . $url[$random];
    ;
    }



    // Output JavaScript code if you want...
    function myplugin_scripts() {
    echo '<script>alert("Hello world...");</script>';
    }

    if (function_exists('add_action')) {
    // Add in the body
    add_filter('the_content', 'myplugin_filter');

    // Add in the header
    //add_action('wp_head', 'myplugin_action');

    // Add in the footer
    //add_action('wp_footer', 'myplugin_action');

    // Output JavaScript here if you want...
    //add_action('wp_print_scripts', 'myplugin_scripts');
    }

    ?>
    Signature
    {{ DiscussionBoard.errors[486000].message }}
  • Profile picture of the author Ken Reno
    Wow - Thanks gang!

    I asked for your expertise, and learned 3 ways to do it - perfect!

    Will Paul, Mark, and Kool (sorry couldn't find your name Kool!) - please
    PM or post your PayPal address and I'm going to pay you all.

    Thank you for taking a few minutes of your day to help me gang,
    I truly appreciate it!

    Talk soon,
    Ken
    Signature
    {{ DiscussionBoard.errors[486378].message }}
  • Profile picture of the author Mark Brian
    No need to pay Ken, glad to help.
    Signature

    {{ DiscussionBoard.errors[486810].message }}
  • Profile picture of the author Top Deal
    Damn to late, i am sure i could easily help out to solve this problem
    {{ DiscussionBoard.errors[494726].message }}
Avatar of Unregistered

Trending Topics