Woopra Forums » Plugins and Add-ons

Woopra and SMF (Simple Machines Forum)

(8 posts)
  • Started 3 months ago by lazy
  • Latest reply from friz
  • This topic is not a support question
  • Lazy
    Member

    Im playing around with SMF (1.5.5) and a new Project, where SMF is the base of the community - this domain is not yet approved and i can not test this code but i think the code should do it, if not please give me/us a hint or fix the solution(s). Like the other Plugin Post of mine, the Avatar-Stuff will sure come but give me time, i allways got a lack of time.. but it will sure come and i think, soon - and.. avatars arent that important.. ;) like smilies.. just web stuff.

    Puf this Code in your index.template.php in your (using) Theme Directory of SMF and make sure to replace the orginal (echo </body></html>) code line in it.

    if ($context['user']['is_guest'])
    echo '<script type="text/javascript">
    var woopra_id = \'woopraidnummer\';
    </script>
    <script src="http://static.woopra.com/js/woopra.js"></script>
    </body></html>';

    else

    echo '<script type="text/javascript">
    var woopra_id = \'woopraidnummer\';
    var woopra_array = new Array();
    woopra_array[\'name\'] = ', $user_info['username'], ';
    woopra_array[\'Email\'] = ', $user_info['email'], ';
    </script>
    <script src="http://static.woopra.com/js/woopra.js"></script>
    </body></html>';

    Posted 3 months ago #
  • friz
    Member

    Thx!
    Once my domain with an SMF forum is approved, I will give this a try :-)

    Posted 3 months ago #
  • Lazy
    Member

    no problem, hope it works like i posted it.. i`m waiting that my smf domain is applied, too ;)

    Posted 3 months ago #
  • yassa
    Member

    I did something similar, which also works:

    <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
    var woopra_id = "PUT YOUR NUMBER HERE";
    var woopra_array = new Array();

    woopra_array["name"] = "', $context['user']['name']. '";
    woopra_array["Email"] = "', $context['user']['email']. '";

    // ]]></script>
    <script src="http://static.woopra.com/js/woopra.js"></script>

    Posted 3 months ago #
  • Lazy
    Member

    hi ;)

    your version is the better one i think, i really forgot about cdata.

    thank you for sharing it! ;)

    Posted 3 months ago #
  • pmk
    Member

    Hello Yassa,

    Can you please confirm that your code is correct?

    I tried put this in my phpbb board, and the client shows>>> ', $userdata['username'].'

    :(

    Anything missing in the code?

    Posted 2 months ago #
  • friz
    Member

    works with smf :-)

    Posted 2 months ago #
  • friz
    Member

    One thing I've noticed with the code:
    All the visits show as forum/index.php, so I can't see which pages of the forum are looked at.

    Posted 2 weeks ago #

RSS feed for this topic

Reply

You must log in to post.