Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter wp_chats2

    (@wp_chats2)

    I can’t thank you enough, its working perfect! It also opened up the door to what can be done with php, and scripting in general, which is ridiculously cool, so thank you again!

    Thread Starter wp_chats2

    (@wp_chats2)

    ok, so this was my best attempt. I tried making this a shortcode plugin, so this is the code for said plugin, but when i tried to activate, it said could not activate, plugin triggered a fatal error. Thanks again for the help…

    <? php
    
    /**
    *Plugin Name: statpage_iframe
    *Plugin URI: example
    *Description: Stat page plugin
    *Author: example
    *Author URI: example
    *Version: 1.0
    */
    
    add_shortcode('statpage_iframe', 'getuser_iframe');
    
    function getuser_iframe($atts, $content = null) {
    
    	$rid = wp_get_current_user();
    	return $rid->user_login;
    	$html = '<iframe src="https://example.com/ccXML.php?part=' . $rid . '"> </iframe>';
    	return $html;
    }

    Thanks again, this is a massive help!

Viewing 2 replies - 1 through 2 (of 2 total)