24. januar 2011 - 20:25 Der er 5 kommentarer og
1 løsning

Simpelt Opgave :)

Hej jeg har dette script som jeg gerne vil ha sat ind i det store script :) nogen der kan hjælpe :)
<script type="text/javascript"><!--
google_ad_client = "ca-pub-7572355586468162";
/* Pu Flash Games */
google_ad_slot = "3446020419";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

--------------------------------------------------------------

<?php
/**
* @version        $Id$
* @package        PU Arcade - A Joomla Arcade Component
* @copyright    Copyright (C) 2003 - 2009 Pragmatic Utopia. All rights reserved.
* @license        GNU/GPL
* @notes        This software product is a community supported product hosted at www.puarcade.com.
*                 Please refer to this sites forums should you have any issues regarding this product.
*                 Security issues with this product can be contacted at security@puarcade.com
*/

#################################################
# PUA Arcade - Template File                    #
# Template    : Game Page Layout                    #
#################################################
defined('_JEXEC') or die('Restricted access');

// ~cXc~ get template - Game Page Header: Open Tags
if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_header_open.php')){
    require ('components/com_puarcade/templates/'.$config->template.'/pua_header_open.php');
} else{
    require ('components/com_puarcade/templates/default/pua_header_open.php');
}
// Game Page Header: Open Tags - end ~cXc~
echo $game->title;

// ~cXc~ get template - Game Page Header: Close Tags
if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_header_close.php')){
    require ('components/com_puarcade/templates/'.$config->template.'/pua_header_close.php');
} else{
    require ('components/com_puarcade/templates/default/pua_header_close.php');
}
// Game Page Header: Close Tags - end ~cXc~

/*
** Plugin-event: onPUABeforeFlashGame
*/
clsPUArcade::triggerCustomEvent( 'onPUABeforeFlashGame', array( $game->id, $game->title, $my->id, $uname ) );
/*
** End of Plugin-event
*/

/*
* Scoring messages logic
*/
puarcade_html::showScoreText( $my->id, $config->allow_gsave, $game->id );
/*
* End of scoring messages logic
*/


//Show the rater
if ($config->rate == 1) {
    // ~cXc~ get template - Game Rating
    if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_game_rate.php')){
        require_once ('components/com_puarcade/templates/'.$config->template.'/pua_game_rate.php');
    } else{
        require_once ('components/com_puarcade/templates/default/pua_game_rate.php');
    }
    // Game Rating - end ~cXc~
}

if ($game->mochi == 1){
    puarcade_html::writeMochi($config,$uname,$game);
}
?>
<div class="pu_MediaObject">
<center><?php
if (stristr($game->filename, '.swf')) {

    // ~cXc~ get template - Flash Game
    if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_game_flash.php')){
        require_once ('components/com_puarcade/templates/'.$config->template.'/pua_game_flash.php');
    } else{
        require_once ('components/com_puarcade/templates/default/pua_game_flash.php');
    }
    // Flash Game - end ~cXc~

}
else if(stristr($game->filename, '.dcr')) {

    // ~cXc~ get template - Director Game
    if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_game_director.php')){
        require_once ('components/com_puarcade/templates/'.$config->template.'/pua_game_director.php');
    } else{
        require_once ('components/com_puarcade/templates/default/pua_game_director.php');
    }
    // Director Game - end ~cXc~

}
else if(stristr($game->filename, '.nes')) {
    // NES Emulation for playing NES ROMS courtesy of vNES http://www.virtualnes.com/index.html
    $gamepath = JPATH_SITE.$config->games_dir.$game->filename;
    $gamesize = @filesize($gamepath);
    if ($gamesize < 1000) {
        $gamesize = 24592;
    }

    // ~cXc~ get template - Nintendo Game
    if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_game_vnes.php')){
        require_once ('components/com_puarcade/templates/'.$config->template.'/pua_game_vnes.php');
    } else{
        require_once ('components/com_puarcade/templates/default/pua_game_vnes.php');
    }
    // Nintendo Game - end ~cXc~

}
else if(stristr($game->filename, '.gb') || stristr($game->filename, '.gbc')) {
    // GameBoy emulation for playing GB ROMS courtesy of JavaBoy http://www.millstone.demon.co.uk/download/javaboy/

    // ~cXc~ get template - Gameboy Game
    if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_game_javaboy.php')){
        require_once ('components/com_puarcade/templates/'.$config->template.'/pua_game_javaboy.php');
    } else{
        require_once ('components/com_puarcade/templates/default/pua_game_javaboy.php');
    }
    // Gameboy Game - end ~cXc~

}
else if(stristr($game->filename, '.htm') || strstr($game->filename, '.html') || strstr($game->filename, '.txt')) {
    // Use this for javascript games and such
    include(JPATH_SITE.$config->games_dir.$game->filename);
}
else if(stristr($game->filename, '.bin')) {
    // Atari 2600 emulation for playing Atari 2600 ROMS courtesy of JStella http://jstella.sourceforge.net/

    // ~cXc~ get template - Atari Game
    if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_game_jstella.php')){
        require_once ('components/com_puarcade/templates/'.$config->template.'/pua_game_jstella.php');
    } else{
        require_once ('components/com_puarcade/templates/default/pua_game_jstella.php');
    }
    // Atari Game - end ~cXc~

}
?></center>
</div>
<?php
// end MediaObject

// ~cXc~ get template - Social Bookmarks
if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_game_social.php')){
    require_once ('components/com_puarcade/templates/'.$config->template.'/pua_game_social.php');
} else{
    require_once ('components/com_puarcade/templates/default/pua_game_social.php');
}
// Social Bookmarks - end ~cXc~

?>

<div
    class="pu_block_container"><?php

    /*
    ** Plugin-event: onPUAAfterFlashGame
    */
    clsPUArcade::triggerCustomEvent( 'onPUAAfterFlashGame', array( $game->id, $game->title, $my->id, $uname ) );
    /*
    * End of Plugin-event
    */

    if ($config->scoreundergame == 1 && $game->scoring != 0 && $NumScores != 0 ) {
        ?>
<div class="pu_ScoreUnderGame"><?php
if ($game->reverse_score == 1) {
    $orderdir = "ASC";
} else {
    $orderdir = "DESC";
}
?> <script type="text/javascript">
                var uplight = new Image();
                uplight.src = "<?php echo $imagepath; ?>up1.gif";
                var downlight = new Image();
                downlight.src = "<?php echo $imagepath; ?>down1.gif";
                var upoff = new Image();
                upoff.src = "<?php echo $imagepath; ?>up.gif";
                var downoff = new Image();
                downoff.src = "<?php echo $imagepath; ?>down.gif";
        </script> <?php
        // ~cXc~ get template - Game Page Header: Open Tags
        if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_header_open.php')){
            require ('components/com_puarcade/templates/'.$config->template.'/pua_header_open.php');
        } else{
            require ('components/com_puarcade/templates/default/pua_header_open.php');
        }
        // Game Page Header: Open Tags - end ~cXc~
        echo $game->title." ".PUA_SCORES;
        // ~cXc~ get template - Game Page Header: Close Tags
        if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_header_close.php')){
            require ('components/com_puarcade/templates/'.$config->template.'/pua_header_close.php');
        } else{
            require ('components/com_puarcade/templates/default/pua_header_close.php');
        }
        // Game Page Header: Close Tags - end ~cXc~

        // ~cXc~ get template - Game Scores
        if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_game_scores.php')){
            require_once ('components/com_puarcade/templates/'.$config->template.'/pua_game_scores.php');
        } else{
            require_once ('components/com_puarcade/templates/default/pua_game_scores.php');
        }
        // Game Scores - end ~cXc~
        ?>
<div id="FlashTable"><?php clsPUArcade::WriteScoresTable($game->id,"score",$orderdir,10,0); ?></div>
</div>
<!-- ??? end pu_block_container ??? --> <!-- end pu_ScoreUnderGame I think ~cXc~ -->
        <?php
    } //end scoreundergame and has score
    //Show a tag cloud if we are supposed to
    if ($config->tagcloud == 1) {

        // ~cXc~ get template - Game Cloud, Tag Cloud
        if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_game_cloud.php')){
            require_once ('components/com_puarcade/templates/'.$config->template.'/pua_game_cloud.php');
        } else{
            require_once ('components/com_puarcade/templates/default/pua_game_cloud.php');
        }
        // Game Cloud, Tag Cloud - end ~cXc~

    }
    //If showing both stats and tag, insert a margin
    if ($config->showstats == 1 && $config->tagcloud == 1) {
        ?>
<div class="pu_AddMargin"></div>
        <?php
    }
    //Show the stats block if we are supposed to
    if ($config->showstats == 1) {

        // ~cXc~ get template - Game Stats
        if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_game_stats.php')){
            require_once ('components/com_puarcade/templates/'.$config->template.'/pua_game_stats.php');
        } else{
            require_once ('components/com_puarcade/templates/default/pua_game_stats.php');
        }
        // Game Stats - end ~cXc~

    }
    ?></div>
<!-- end pu_block_container I think ~cXc~ -->
<div
    class="pu_GamePageBottomLinks"><?php
    if ($config->faves == 1) {

        // ~cXc~ get template - Game Faves
        if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_game_faves.php')){
            require ('components/com_puarcade/templates/'.$config->template.'/pua_game_faves.php');
        } else{
            require ('components/com_puarcade/templates/default/pua_game_faves.php');
        }
        // Game Faves - end ~cXc~

    }
    /*
    * User reporting functions about game functionality
    */
    if ($my->id && $config->report == 1) {

        // ~cXc~ get template - Game Faves
        if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_game_report.php')){
            require ('components/com_puarcade/templates/'.$config->template.'/pua_game_report.php');
        } else{
            require ('components/com_puarcade/templates/default/pua_game_report.php');
        }
        // Game Faves - end ~cXc~

    }
    if ($config->comments == 1) {
        puarcade_html::writeJomComment($game);
    }elseif ($config->comments == 2) {
        puarcade_html::writeJoComment();
    }elseif ($config->comments == 3){
        puarcade_html::writeJComments($game);
    }
    // why is this here?
    ?> <!-- Not sure what this closes out, or rather where this is being opened. -->
</div>
<!-- end pu_GamePageBottomLinks I think ~cXc~ -->
<!-- END puarcade.html::writeflashgame -->
Avatar billede repox Seniormester
24. januar 2011 - 20:36 #1
Prøv eventuelt at sætte det ind lige før
<!-- end pu_GamePageBottomLinks I think ~cXc~ -->
?
24. januar 2011 - 21:12 #2
Min fejl :(
Jeg vil meget gerne ha den lige før //Show the rater

Hvis du vil se hvad jeg mener kan jeg vise dig det her...
http://gamle-spil.dk/index.php?option=com_puarcade&Itemid=53&fid=1&gid=8

Det skal være lige over de stjerner...
Avatar billede repox Seniormester
25. januar 2011 - 02:01 #3
Så skal du jo bare sætte dette ind lige før:
echo '<script type="text/javascript"><!--
google_ad_client = "ca-pub-7572355586468162";
/* Pu Flash Games */
google_ad_slot = "3446020419";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>';

lige før //Show the rater
25. januar 2011 - 08:24 #4
Now it look like this and it don´t show up.


<?php
/**
* @version        $Id$
* @package        PU Arcade - A Joomla Arcade Component
* @copyright    Copyright (C) 2003 - 2009 Pragmatic Utopia. All rights reserved.
* @license        GNU/GPL
* @notes        This software product is a community supported product hosted at www.puarcade.com.
*                 Please refer to this sites forums should you have any issues regarding this product.
*                 Security issues with this product can be contacted at security@puarcade.com
*/

#################################################
# PUA Arcade - Template File                    #
# Template    : Game Page Layout                    #
#################################################
defined('_JEXEC') or die('Restricted access');

// ~cXc~ get template - Game Page Header: Open Tags
if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_header_open.php')){
    require ('components/com_puarcade/templates/'.$config->template.'/pua_header_open.php');
} else{
    require ('components/com_puarcade/templates/default/pua_header_open.php');
}
// Game Page Header: Open Tags - end ~cXc~
echo $game->title;

// ~cXc~ get template - Game Page Header: Close Tags
if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_header_close.php')){
    require ('components/com_puarcade/templates/'.$config->template.'/pua_header_close.php');
} else{
    require ('components/com_puarcade/templates/default/pua_header_close.php');
}
// Game Page Header: Close Tags - end ~cXc~

/*
** Plugin-event: onPUABeforeFlashGame
*/
clsPUArcade::triggerCustomEvent( 'onPUABeforeFlashGame', array( $game->id, $game->title, $my->id, $uname ) );
/*
** End of Plugin-event
*/

/*
* Scoring messages logic
*/
puarcade_html::showScoreText( $my->id, $config->allow_gsave, $game->id );
/*
* End of scoring messages logic
*/


//Google Adsense Code start
echo '<script type="text/javascript"><!--
google_ad_client = "ca-pub-7572355586468162";
/* Pu Flash Games 2 */
google_ad_slot = "6149612719";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>';
//Google Adsense Code stop

//Show the rater
if ($config->rate == 1) {
    // ~cXc~ get template - Game Rating
    if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_game_rate.php')){
        require_once ('components/com_puarcade/templates/'.$config->template.'/pua_game_rate.php');
    } else{
        require_once ('components/com_puarcade/templates/default/pua_game_rate.php');
    }
    // Game Rating - end ~cXc~
}

if ($game->mochi == 1){
    puarcade_html::writeMochi($config,$uname,$game);
}
?>
<div class="pu_MediaObject">
<center><?php
if (stristr($game->filename, '.swf')) {

    // ~cXc~ get template - Flash Game
    if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_game_flash.php')){
        require_once ('components/com_puarcade/templates/'.$config->template.'/pua_game_flash.php');
    } else{
        require_once ('components/com_puarcade/templates/default/pua_game_flash.php');
    }
    // Flash Game - end ~cXc~

}
else if(stristr($game->filename, '.dcr')) {

    // ~cXc~ get template - Director Game
    if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_game_director.php')){
        require_once ('components/com_puarcade/templates/'.$config->template.'/pua_game_director.php');
    } else{
        require_once ('components/com_puarcade/templates/default/pua_game_director.php');
    }
    // Director Game - end ~cXc~

}
else if(stristr($game->filename, '.nes')) {
    // NES Emulation for playing NES ROMS courtesy of vNES http://www.virtualnes.com/index.html
    $gamepath = JPATH_SITE.$config->games_dir.$game->filename;
    $gamesize = @filesize($gamepath);
    if ($gamesize < 1000) {
        $gamesize = 24592;
    }

    // ~cXc~ get template - Nintendo Game
    if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_game_vnes.php')){
        require_once ('components/com_puarcade/templates/'.$config->template.'/pua_game_vnes.php');
    } else{
        require_once ('components/com_puarcade/templates/default/pua_game_vnes.php');
    }
    // Nintendo Game - end ~cXc~

}
else if(stristr($game->filename, '.gb') || stristr($game->filename, '.gbc')) {
    // GameBoy emulation for playing GB ROMS courtesy of JavaBoy http://www.millstone.demon.co.uk/download/javaboy/

    // ~cXc~ get template - Gameboy Game
    if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_game_javaboy.php')){
        require_once ('components/com_puarcade/templates/'.$config->template.'/pua_game_javaboy.php');
    } else{
        require_once ('components/com_puarcade/templates/default/pua_game_javaboy.php');
    }
    // Gameboy Game - end ~cXc~

}
else if(stristr($game->filename, '.htm') || strstr($game->filename, '.html') || strstr($game->filename, '.txt')) {
    // Use this for javascript games and such
    include(JPATH_SITE.$config->games_dir.$game->filename);
}
else if(stristr($game->filename, '.bin')) {
    // Atari 2600 emulation for playing Atari 2600 ROMS courtesy of JStella http://jstella.sourceforge.net/

    // ~cXc~ get template - Atari Game
    if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_game_jstella.php')){
        require_once ('components/com_puarcade/templates/'.$config->template.'/pua_game_jstella.php');
    } else{
        require_once ('components/com_puarcade/templates/default/pua_game_jstella.php');
    }
    // Atari Game - end ~cXc~

}
?></center>
</div>



<script type="text/javascript"><!--
google_ad_client = "ca-pub-7572355586468162";
/* Pu Flash Games */
google_ad_slot = "3446020419";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>




<?php
// end MediaObject

// ~cXc~ get template - Social Bookmarks
if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_game_social.php')){
    require_once ('components/com_puarcade/templates/'.$config->template.'/pua_game_social.php');
} else{
    require_once ('components/com_puarcade/templates/default/pua_game_social.php');
}
// Social Bookmarks - end ~cXc~

?>

<div
    class="pu_block_container"><?php

    /*
    ** Plugin-event: onPUAAfterFlashGame
    */
    clsPUArcade::triggerCustomEvent( 'onPUAAfterFlashGame', array( $game->id, $game->title, $my->id, $uname ) );
    /*
    * End of Plugin-event
    */

    if ($config->scoreundergame == 1 && $game->scoring != 0 && $NumScores != 0 ) {
        ?>
<div class="pu_ScoreUnderGame"><?php
if ($game->reverse_score == 1) {
    $orderdir = "ASC";
} else {
    $orderdir = "DESC";
}
?> <script type="text/javascript">
                var uplight = new Image();
                uplight.src = "<?php echo $imagepath; ?>up1.gif";
                var downlight = new Image();
                downlight.src = "<?php echo $imagepath; ?>down1.gif";
                var upoff = new Image();
                upoff.src = "<?php echo $imagepath; ?>up.gif";
                var downoff = new Image();
                downoff.src = "<?php echo $imagepath; ?>down.gif";
        </script> <?php
        // ~cXc~ get template - Game Page Header: Open Tags
        if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_header_open.php')){
            require ('components/com_puarcade/templates/'.$config->template.'/pua_header_open.php');
        } else{
            require ('components/com_puarcade/templates/default/pua_header_open.php');
        }
        // Game Page Header: Open Tags - end ~cXc~
        echo $game->title." ".PUA_SCORES;
        // ~cXc~ get template - Game Page Header: Close Tags
        if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_header_close.php')){
            require ('components/com_puarcade/templates/'.$config->template.'/pua_header_close.php');
        } else{
            require ('components/com_puarcade/templates/default/pua_header_close.php');
        }
        // Game Page Header: Close Tags - end ~cXc~

        // ~cXc~ get template - Game Scores
        if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_game_scores.php')){
            require_once ('components/com_puarcade/templates/'.$config->template.'/pua_game_scores.php');
        } else{
            require_once ('components/com_puarcade/templates/default/pua_game_scores.php');
        }
        // Game Scores - end ~cXc~
        ?>
<div id="FlashTable"><?php clsPUArcade::WriteScoresTable($game->id,"score",$orderdir,10,0); ?></div>
</div>
<!-- ??? end pu_block_container ??? --> <!-- end pu_ScoreUnderGame I think ~cXc~ -->
        <?php
    } //end scoreundergame and has score
    //Show a tag cloud if we are supposed to
    if ($config->tagcloud == 1) {

        // ~cXc~ get template - Game Cloud, Tag Cloud
        if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_game_cloud.php')){
            require_once ('components/com_puarcade/templates/'.$config->template.'/pua_game_cloud.php');
        } else{
            require_once ('components/com_puarcade/templates/default/pua_game_cloud.php');
        }
        // Game Cloud, Tag Cloud - end ~cXc~

    }
    //If showing both stats and tag, insert a margin
    if ($config->showstats == 1 && $config->tagcloud == 1) {
        ?>
<div class="pu_AddMargin"></div>
        <?php
    }
    //Show the stats block if we are supposed to
    if ($config->showstats == 1) {

        // ~cXc~ get template - Game Stats
        if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_game_stats.php')){
            require_once ('components/com_puarcade/templates/'.$config->template.'/pua_game_stats.php');
        } else{
            require_once ('components/com_puarcade/templates/default/pua_game_stats.php');
        }
        // Game Stats - end ~cXc~

    }
    ?></div>
<!-- end pu_block_container I think ~cXc~ -->
<div
    class="pu_GamePageBottomLinks"><?php
    if ($config->faves == 1) {

        // ~cXc~ get template - Game Faves
        if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_game_faves.php')){
            require ('components/com_puarcade/templates/'.$config->template.'/pua_game_faves.php');
        } else{
            require ('components/com_puarcade/templates/default/pua_game_faves.php');
        }
        // Game Faves - end ~cXc~

    }
    /*
    * User reporting functions about game functionality
    */
    if ($my->id && $config->report == 1) {

        // ~cXc~ get template - Game Faves
        if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_game_report.php')){
            require ('components/com_puarcade/templates/'.$config->template.'/pua_game_report.php');
        } else{
            require ('components/com_puarcade/templates/default/pua_game_report.php');
        }
        // Game Faves - end ~cXc~

    }
    if ($config->comments == 1) {
        puarcade_html::writeJomComment($game);
    }elseif ($config->comments == 2) {
        puarcade_html::writeJoComment();
    }elseif ($config->comments == 3){
        puarcade_html::writeJComments($game);
    }
    // why is this here?
    ?> <!-- Not sure what this closes out, or rather where this is being opened. -->
</div>
<!-- end pu_GamePageBottomLinks I think ~cXc~ -->
<!-- END puarcade.html::writeflashgame -->
25. januar 2011 - 23:16 #5
Rettelse det er sådan det ser ud nu og nu den viser bare ingen reklame på siden meget underligt...

<?php
/**
* @version        $Id$
* @package        PU Arcade - A Joomla Arcade Component
* @copyright    Copyright (C) 2003 - 2009 Pragmatic Utopia. All rights reserved.
* @license        GNU/GPL
* @notes        This software product is a community supported product hosted at www.puarcade.com.
*                 Please refer to this sites forums should you have any issues regarding this product.
*                 Security issues with this product can be contacted at security@puarcade.com
*/

#################################################
# PUA Arcade - Template File                    #
# Template    : Game Page Layout                    #
#################################################
defined('_JEXEC') or die('Restricted access');

// ~cXc~ get template - Game Page Header: Open Tags
if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_header_open.php')){
    require ('components/com_puarcade/templates/'.$config->template.'/pua_header_open.php');
} else{
    require ('components/com_puarcade/templates/default/pua_header_open.php');
}
// Game Page Header: Open Tags - end ~cXc~
echo $game->title;

// ~cXc~ get template - Game Page Header: Close Tags
if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_header_close.php')){
    require ('components/com_puarcade/templates/'.$config->template.'/pua_header_close.php');
} else{
    require ('components/com_puarcade/templates/default/pua_header_close.php');
}
// Game Page Header: Close Tags - end ~cXc~

/*
** Plugin-event: onPUABeforeFlashGame
*/
clsPUArcade::triggerCustomEvent( 'onPUABeforeFlashGame', array( $game->id, $game->title, $my->id, $uname ) );
/*
** End of Plugin-event
*/

/*
* Scoring messages logic
*/
puarcade_html::showScoreText( $my->id, $config->allow_gsave, $game->id );
/*
* End of scoring messages logic
*/


//Google Adsense Code start
echo '<script type="text/javascript"><!--
google_ad_client = "ca-pub-7572355586468162";
/* Pu Flash Games */
google_ad_slot = "6149612719";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>';
//Google Adsense Code stop

//Show the rater
if ($config->rate == 1) {
    // ~cXc~ get template - Game Rating
    if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_game_rate.php')){
        require_once ('components/com_puarcade/templates/'.$config->template.'/pua_game_rate.php');
    } else{
        require_once ('components/com_puarcade/templates/default/pua_game_rate.php');
    }
    // Game Rating - end ~cXc~
}

if ($game->mochi == 1){
    puarcade_html::writeMochi($config,$uname,$game);
}
?>
<div class="pu_MediaObject">
<center><?php
if (stristr($game->filename, '.swf')) {

    // ~cXc~ get template - Flash Game
    if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_game_flash.php')){
        require_once ('components/com_puarcade/templates/'.$config->template.'/pua_game_flash.php');
    } else{
        require_once ('components/com_puarcade/templates/default/pua_game_flash.php');
    }
    // Flash Game - end ~cXc~

}
else if(stristr($game->filename, '.dcr')) {

    // ~cXc~ get template - Director Game
    if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_game_director.php')){
        require_once ('components/com_puarcade/templates/'.$config->template.'/pua_game_director.php');
    } else{
        require_once ('components/com_puarcade/templates/default/pua_game_director.php');
    }
    // Director Game - end ~cXc~

}
else if(stristr($game->filename, '.nes')) {
    // NES Emulation for playing NES ROMS courtesy of vNES http://www.virtualnes.com/index.html
    $gamepath = JPATH_SITE.$config->games_dir.$game->filename;
    $gamesize = @filesize($gamepath);
    if ($gamesize < 1000) {
        $gamesize = 24592;
    }

    // ~cXc~ get template - Nintendo Game
    if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_game_vnes.php')){
        require_once ('components/com_puarcade/templates/'.$config->template.'/pua_game_vnes.php');
    } else{
        require_once ('components/com_puarcade/templates/default/pua_game_vnes.php');
    }
    // Nintendo Game - end ~cXc~

}
else if(stristr($game->filename, '.gb') || stristr($game->filename, '.gbc')) {
    // GameBoy emulation for playing GB ROMS courtesy of JavaBoy http://www.millstone.demon.co.uk/download/javaboy/

    // ~cXc~ get template - Gameboy Game
    if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_game_javaboy.php')){
        require_once ('components/com_puarcade/templates/'.$config->template.'/pua_game_javaboy.php');
    } else{
        require_once ('components/com_puarcade/templates/default/pua_game_javaboy.php');
    }
    // Gameboy Game - end ~cXc~

}
else if(stristr($game->filename, '.htm') || strstr($game->filename, '.html') || strstr($game->filename, '.txt')) {
    // Use this for javascript games and such
    include(JPATH_SITE.$config->games_dir.$game->filename);
}
else if(stristr($game->filename, '.bin')) {
    // Atari 2600 emulation for playing Atari 2600 ROMS courtesy of JStella http://jstella.sourceforge.net/

    // ~cXc~ get template - Atari Game
    if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_game_jstella.php')){
        require_once ('components/com_puarcade/templates/'.$config->template.'/pua_game_jstella.php');
    } else{
        require_once ('components/com_puarcade/templates/default/pua_game_jstella.php');
    }
    // Atari Game - end ~cXc~

}
?></center>
</div>
<?php
// end MediaObject

// ~cXc~ get template - Social Bookmarks
if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_game_social.php')){
    require_once ('components/com_puarcade/templates/'.$config->template.'/pua_game_social.php');
} else{
    require_once ('components/com_puarcade/templates/default/pua_game_social.php');
}
// Social Bookmarks - end ~cXc~

?>

<div
    class="pu_block_container"><?php

    /*
    ** Plugin-event: onPUAAfterFlashGame
    */
    clsPUArcade::triggerCustomEvent( 'onPUAAfterFlashGame', array( $game->id, $game->title, $my->id, $uname ) );
    /*
    * End of Plugin-event
    */

    if ($config->scoreundergame == 1 && $game->scoring != 0 && $NumScores != 0 ) {
        ?>
<div class="pu_ScoreUnderGame"><?php
if ($game->reverse_score == 1) {
    $orderdir = "ASC";
} else {
    $orderdir = "DESC";
}
?> <script type="text/javascript">
                var uplight = new Image();
                uplight.src = "<?php echo $imagepath; ?>up1.gif";
                var downlight = new Image();
                downlight.src = "<?php echo $imagepath; ?>down1.gif";
                var upoff = new Image();
                upoff.src = "<?php echo $imagepath; ?>up.gif";
                var downoff = new Image();
                downoff.src = "<?php echo $imagepath; ?>down.gif";
        </script> <?php
        // ~cXc~ get template - Game Page Header: Open Tags
        if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_header_open.php')){
            require ('components/com_puarcade/templates/'.$config->template.'/pua_header_open.php');
        } else{
            require ('components/com_puarcade/templates/default/pua_header_open.php');
        }
        // Game Page Header: Open Tags - end ~cXc~
        echo $game->title." ".PUA_SCORES;
        // ~cXc~ get template - Game Page Header: Close Tags
        if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_header_close.php')){
            require ('components/com_puarcade/templates/'.$config->template.'/pua_header_close.php');
        } else{
            require ('components/com_puarcade/templates/default/pua_header_close.php');
        }
        // Game Page Header: Close Tags - end ~cXc~

        // ~cXc~ get template - Game Scores
        if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_game_scores.php')){
            require_once ('components/com_puarcade/templates/'.$config->template.'/pua_game_scores.php');
        } else{
            require_once ('components/com_puarcade/templates/default/pua_game_scores.php');
        }
        // Game Scores - end ~cXc~
        ?>
<div id="FlashTable"><?php clsPUArcade::WriteScoresTable($game->id,"score",$orderdir,10,0); ?></div>
</div>
<!-- ??? end pu_block_container ??? --> <!-- end pu_ScoreUnderGame I think ~cXc~ -->
        <?php
    } //end scoreundergame and has score
    //Show a tag cloud if we are supposed to
    if ($config->tagcloud == 1) {

        // ~cXc~ get template - Game Cloud, Tag Cloud
        if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_game_cloud.php')){
            require_once ('components/com_puarcade/templates/'.$config->template.'/pua_game_cloud.php');
        } else{
            require_once ('components/com_puarcade/templates/default/pua_game_cloud.php');
        }
        // Game Cloud, Tag Cloud - end ~cXc~

    }
    //If showing both stats and tag, insert a margin
    if ($config->showstats == 1 && $config->tagcloud == 1) {
        ?>
<div class="pu_AddMargin"></div>
        <?php
    }
    //Show the stats block if we are supposed to
    if ($config->showstats == 1) {

        // ~cXc~ get template - Game Stats
        if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_game_stats.php')){
            require_once ('components/com_puarcade/templates/'.$config->template.'/pua_game_stats.php');
        } else{
            require_once ('components/com_puarcade/templates/default/pua_game_stats.php');
        }
        // Game Stats - end ~cXc~

    }
    ?></div>
<!-- end pu_block_container I think ~cXc~ -->
<div
    class="pu_GamePageBottomLinks"><?php
    if ($config->faves == 1) {

        // ~cXc~ get template - Game Faves
        if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_game_faves.php')){
            require ('components/com_puarcade/templates/'.$config->template.'/pua_game_faves.php');
        } else{
            require ('components/com_puarcade/templates/default/pua_game_faves.php');
        }
        // Game Faves - end ~cXc~

    }
    /*
    * User reporting functions about game functionality
    */
    if ($my->id && $config->report == 1) {

        // ~cXc~ get template - Game Faves
        if (file_exists('components/com_puarcade/templates/'.$config->template.'/pua_game_report.php')){
            require ('components/com_puarcade/templates/'.$config->template.'/pua_game_report.php');
        } else{
            require ('components/com_puarcade/templates/default/pua_game_report.php');
        }
        // Game Faves - end ~cXc~

    }
    if ($config->comments == 1) {
        puarcade_html::writeJomComment($game);
    }elseif ($config->comments == 2) {
        puarcade_html::writeJoComment();
    }elseif ($config->comments == 3){
        puarcade_html::writeJComments($game);
    }
    // why is this here?
    ?> <!-- Not sure what this closes out, or rather where this is being opened. -->
</div>
<!-- end pu_GamePageBottomLinks I think ~cXc~ -->
<!-- END puarcade.html::writeflashgame -->
27. januar 2011 - 09:05 #6
Hej det virkede :)
Har bare et problem at jeg ikke kan se reklamer der kommer fra google meget mystisk :)
Men laver du lige et svar så du kan få dine point?
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Vi tilbyder markedets bedste kurser inden for webudvikling

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester