Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6

Thread: Help on MD5

  1. #1
    New to the CF scene
    Join Date
    Jan 2010
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help on MD5

    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

    Code:
    Matt123456 = ceaf42401d410649b9dd09d36406ab96
    so the web address will be:
    Code:
    http://www6.shoutmix.com/?xboxlivemodding&mode=test&name=Matt&code=ceaf42401d410649b9dd09d36406ab96
    but alli can get it to do is
    Code:
    http://www6.shoutmix.com/?xboxlivemodding&mode=test&name=Matt&code=
    im converting the Username and unique code to md5 using :
    Code:
    $code1 = md5($mybb->user['username'].'123456');
    and so the intergration in the main page is:
    Code:
    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.

  • #2
    Regular Coder
    Join Date
    Dec 2009
    Location
    UK
    Posts
    495
    Thanks
    0
    Thanked 58 Times in 58 Posts
    Is this in a template file? I dont think you can execute php in the templates can you?
    My site: JayGilford.com
    Resources:
    PHP Pagination Class | Getting all page links | Handling PHP Errors properly
    If you like a users help, show your appreciation with the rep and thanks buttons :)

  • #3
    New to the CF scene
    Join Date
    Jan 2010
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Would i be able to call it from a another page?

  • #4
    Regular Coder
    Join Date
    Dec 2009
    Location
    UK
    Posts
    495
    Thanks
    0
    Thanked 58 Times in 58 Posts
    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
    My site: JayGilford.com
    Resources:
    PHP Pagination Class | Getting all page links | Handling PHP Errors properly
    If you like a users help, show your appreciation with the rep and thanks buttons :)

  • #5
    New to the CF scene
    Join Date
    Jan 2010
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by JAY6390 View Post
    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
    Code:
    <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}

  • #6
    Regular Coder
    Join Date
    Dec 2009
    Location
    UK
    Posts
    495
    Thanks
    0
    Thanked 58 Times in 58 Posts
    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
    My site: JayGilford.com
    Resources:
    PHP Pagination Class | Getting all page links | Handling PHP Errors properly
    If you like a users help, show your appreciation with the rep and thanks buttons :)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •