...

View Full Version : Help on MD5



matt1020
01-08-2010, 02:52 AM
ok so i have MyBB v1.4 and trying to intergrate http://shoutmix.com into index page, so what it does is get the logged in username (eg. Matt) and the shoutbox has a unique code (eg. 123456) and then need to be converted MD5


Matt123456 = ceaf42401d410649b9dd09d36406ab96

so the web address will be:

http://www6.shoutmix.com/?xboxlivemodding&mode=test&name=Matt&code=ceaf42401d410649b9dd09d36406ab96

but alli can get it to do is

http://www6.shoutmix.com/?xboxlivemodding&mode=test&name=Matt&code=

im converting the Username and unique code to md5 using :

$code1 = md5($mybb->user['username'].'123456');

and so the intergration in the main page is:

http://www6.shoutmix.com/?xboxlivemodding&mode=test&name={$mybb->user['username']}&code={$code1}

but the code part dont show ?? the username shows fine, its just the code if anyone can help me, please signup to http://xboxlivemodding.co.uk/home and ask for Matt or Pyschobean in the other shoutbox. or just reply to this thread with your suggestions.

JAY6390
01-08-2010, 02:59 AM
Is this in a template file? I dont think you can execute php in the templates can you?

matt1020
01-08-2010, 03:03 AM
Would i be able to call it from a another page?

JAY6390
01-08-2010, 03:06 AM
Templating systems on things like this are designed not to allow you to integrate your own php into them to prevent users from messing up the software, so I highly doubt it

matt1020
01-08-2010, 03:13 AM
Templating systems on things like this are designed not to allow you to integrate your own php into them to prevent users from messing up the software, so I highly doubt it



<html>
<head>
<title>{$mybb->settings['bbname']}</title>
{$headerinclude}
<script type="text/javascript">
<!--
lang.no_new_posts = "{$lang->no_new_posts}";
lang.click_mark_read = "{$lang->click_mark_read}";
// -->

</script>
</head>
<body>
{$header}
<sf_shoutbox>

<?php
$code1 = md5($mybb->user['username'].'bbfd3bbd5b');
?>

<!-- Begin ShoutMix - http://www.shoutmix.com -->
<iframe title="Xboxlivemodding" src="http://www6.shoutmix.com/?xboxlivemodding&mode=test&name={$mybb->user['username']}&code={$code1}" width="100%" height="300" frameborder="0" scrolling="auto">
<a href="http://www6.shoutmix.com/?Xboxlivemodding">View shoutbox</a>
</iframe>
<!-- End ShoutMix -->

{$forums}
{$boardstats}

<table border="0" class="symbols" cellspacing="1" cellpadding="2" align="center">
<tr>
<td class="thead_bottom" colspan="3" style="white-space:nowrap"></td>
</tr>
<tr>
<td class="trow1" style="white-space:nowrap" align="center"><img src="{$theme['imgdir']}/on.gif" alt="{$lang->new_posts}" style="vertical-align: middle; padding-bottom: 4px;" /> <span class="smalltext">{$lang->new_posts}</span></td>
<td class="trow1" style="white-space:nowrap" align="center"><img src="{$theme['imgdir']}/off.gif" alt="{$lang->no_new_posts}" style="vertical-align: middle; padding-bottom: 4px;" /> <span class="smalltext">{$lang->no_new_posts}</span></td>
<td class="trow1" style="white-space:nowrap" align="center"><img src="{$theme['imgdir']}/offlock.gif" alt="{$lang->forum_locked}" style="vertical-align: middle;" /> <span class="smalltext">{$lang->forum_locked}</span></td>
</tr>
<tr>
<td class="thead_bottom" colspan="3"></td>
</tr>
</table>
{$footer}
</body>
</html>



Intergrating $code1 = md5($mybb->user['username'].'bbfd3bbd5b'); , would i be able to put that code into anther file and call to it with a Include () and just put in URL &code={$code1}

JAY6390
01-08-2010, 03:21 AM
Those $blah are templating variables. I would actually try the mybb forums to see how you could do this. There will be more experts on this on there than here



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum