News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

SMF Arcade

Started by niko, October 01, 2004, 02:45:55 PM

Previous topic - Next topic

scimmiotto

Quote from: nadrojcote on December 18, 2009, 02:17:45 PM
I am pleased to bring you what every smf arcade user has been dreaming of.

A complete pack of games including over 1000 games in 28 categories.

Categories include:

Christmas
Find the Difference
Geography
Mario
Memory & Matching
Mouse Click
Pacman
Pinball
Poker
Pong / Tennis / Ball
Pool & Darts
Puzzle & Strategy
Random
Shooting
Simon
Slingo
Smash & Bash
Snake
Snow & Sk8
Space Invaders
Sports & Olympics
Tetris
This or That
TV & Movies
Valentines
Water Sports & Fishing
Webcam
Word & Numbers
Yetis & Penguins

I have seperated each category into folders that are less than 10mb, I had to do this to be able to install them one folder at a time on my host. Some hosts may require that you seperate them into smaller folders.

Instructions:

1. Create all the categories in your arcade admin
2. Upload the game folders to your games folder
3. Upload Gamedata folder to your arcade folder
4. Install each folder through admin>install one at a time
5. Get mad props from all your members

You can download the games here http://tdr.solohosting.org/arcadegames.zip

and you can download the gamedata files here http://tdr.solohosting.org/gamedata.zip (required to be able to save scores)

Thanks goes out to wdm from sleepys arcade for allowing me to download and make a pack out of his games. Woot!

simply great but...why two zip? how to install both them?
Loop code example:
The following statement is FALSE
The previous statement is TRUE.

Zidane5555

Quote from: 01_Underdog on December 23, 2009, 08:56:30 PM

Zidane5555 -

Do you know how to do manual edits?

Install the SMF Arcade v2.018

If it found an error trying to edit that php file then you have to do a manual edit.

<<<<<<<<<<>>>>>>>>>>

Navigate to file: / Themes / default / index.template.php

Find:

if (in_array($context['current_action'], array('admin',


Add this after the above code: (same line after the comma)

'managegames', 'arcadesettings', 'arcadecategory',


Find:

if (in_array($context['current_action'], array('search',


Add this after the above code: (same line after the comma)

'arcade',


Find:

// How about the [search] button?


Add this before the above code: (create new lines before above code)

echo ($current_action == 'arcade' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'arcade' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=arcade">' , $txt['arcade'] , '</a>
</td>' , $current_action == 'arcade' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


If you still have troubles, just attach the file and I'll edit it.

UD

Yes thats exactly what the other fellow had told me to do. I have done it but my button turned out to be corrupt :S Like shown in the pictures provided. Anyhow, I'll send you the file and you can edit it too and see if it makes any difference. Just tell me how I can send you it, you want me to copy paste the whole code in that box ?

Again thanks alot for your help :)

Chen Zhen

zidane555 -

Just attach the whole index.template.php from your default folder...
I believe this site will allow you to attach/upload php files to a post.

I need to see it just in case there are existing changes in there from other mods...

You are using SMF 1.1.8 with the Blueace theme, correct?

UD


My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Zidane5555

Quote from: 01_Underdog on December 25, 2009, 01:48:45 AM
zidane555 -

Just attach the whole index.template.php from your default folder...
I believe this site will allow you to attach/upload php files to a post.

I need to see it just in case there are existing changes in there from other mods...

You are using SMF 1.1.8 with the Blueace theme, correct?

UD

Yes correct, the Blue Ace theme.

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
   global $context, $settings, $options, $scripturl, $txt;

   // Work out where we currently are.
   $current_action = 'home';
   if (in_array($context['current_action'], array('admin', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers')))
      $current_action = 'admin';
   if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
      $current_action = $context['current_action'];
   if ($context['current_action'] == 'search2')
      $current_action = 'search';
   if ($context['current_action'] == 'theme')
      $current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';

   echo '
            <ul>';

   // Show the [home] button.
   echo '
               <li', $current_action == 'home' ? ' id="active"' : '', '><a href="', $scripturl, '">', $txt[103], '</a></li>';

// Show the [Blog] button.
         echo '<li', $current_action == 'Blog' ? ' class="chosen"' : '', '><a href=http://www.soccerfanbase.com/blog/ ><span>Blog</span></a>';

// Show the [YouTube Page] button.
         echo '<li', $current_action == 'YouTube Page' ? ' class="chosen"' : '', '><a href=http://www.youtube.com/user/Soccerfanbase ><span>YouTube Page</span></a>';

   // Show the [help] button.
   echo '
               <li', $current_action == 'help' ? ' id="active"' : '', '><a href="', $scripturl, '?action=help">', $txt[119], '</a></li>';

   // How about the [search] button?
   if ($context['allow_search'])
      echo '
               <li', $current_action == 'search' ? ' id="active"' : '', '><a href="', $scripturl, '?action=search">', $txt[182], '</a></li>';

   // Is the user allowed to administrate at all? ([admin])
   if ($context['allow_admin'])
      echo '
               <li', $current_action == 'admin' ? ' id="active"' : '', '><a href="', $scripturl, '?action=admin">', $txt[2], '</a></li>';

   // Edit Profile... [profile]
   if ($context['allow_edit_profile'])
      echo '
               <li', $current_action == 'profile' ? ' id="active"' : '', '><a href="', $scripturl, '?action=profile">', $txt[467], '</a></li>';

   // Go to PM center... [pm]
   if ($context['user']['is_logged'] && $context['allow_pm'])
      echo '
               <li', $current_action == 'pm' ? ' id="active"' : '', '><a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '<blink>['. $context['user']['unread_messages'] . ']</blink>' : '' , '</a></li>';

// The [gallery]!
      echo '
               <li', $current_action == 'gallery' ? ' id="active"' : '', '>
                <a href="http://soccerfanbase.com/index.php?action=gallery">Gallery</a></li>';



   // The [calendar]!
   if ($context['allow_calendar'])
      echo '
               <li', $current_action == 'calendar' ? ' id="active"' : '', '><a href="', $scripturl, '?action=calendar">', $txt['calendar24'], '</a></li>';

   // the [member] list button
   if ($context['allow_memberlist'])
      echo '
               <li', $current_action == 'mlist' ? ' id="active"' : '', '><a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a></li>';

   // If the user is a guest, show [login] and [register] buttons.
   if ($context['user']['is_guest'])
   {
      echo '
               <li', $current_action == 'login' ? ' id="active"' : '', '><a href="', $scripturl, '?action=login">', $txt[34], '</a></li>
               <li', $current_action == 'register' ? ' id="active"' : '', '><a href="', $scripturl, '?action=register">', $txt[97], '</a></li>';
   }
   // Otherwise, they might want to [logout]...
   else
      echo '
               <li', $current_action == 'logout' ? ' id="active"' : '', '><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">', $txt[108], '</a></li>';
   echo '</ul>';
}


I believe that is what you were looking for ? Hopefully it is.

Sorry to bother you so much....

fwitt

#4224
Quote from: Zidane5555 on December 25, 2009, 03:02:02 PM
Yes correct, the Blue Ace theme.

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
   global $context, $settings, $options, $scripturl, $txt;

   // Work out where we currently are.
   $current_action = 'home';
   if (in_array($context['current_action'], array('admin', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers')))
      $current_action = 'admin';
   if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
      $current_action = $context['current_action'];
   if ($context['current_action'] == 'search2')
      $current_action = 'search';
   if ($context['current_action'] == 'theme')
      $current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';

   echo '
            <ul>';

   // Show the [home] button.
   echo '
               <li', $current_action == 'home' ? ' id="active"' : '', '><a href="', $scripturl, '">', $txt[103], '</a></li>';

// Show the [Blog] button.
         echo '<li', $current_action == 'Blog' ? ' class="chosen"' : '', '><a href=http://www.soccerfanbase.com/blog/ ><span>Blog</span></a>';

// Show the [YouTube Page] button.
         echo '<li', $current_action == 'YouTube Page' ? ' class="chosen"' : '', '><a href=http://www.youtube.com/user/Soccerfanbase ><span>YouTube Page</span></a>';

   // Show the [help] button.
   echo '
               <li', $current_action == 'help' ? ' id="active"' : '', '><a href="', $scripturl, '?action=help">', $txt[119], '</a></li>';

   // How about the [search] button?
   if ($context['allow_search'])
      echo '
               <li', $current_action == 'search' ? ' id="active"' : '', '><a href="', $scripturl, '?action=search">', $txt[182], '</a></li>';

   // Is the user allowed to administrate at all? ([admin])
   if ($context['allow_admin'])
      echo '
               <li', $current_action == 'admin' ? ' id="active"' : '', '><a href="', $scripturl, '?action=admin">', $txt[2], '</a></li>';

   // Edit Profile... [profile]
   if ($context['allow_edit_profile'])
      echo '
               <li', $current_action == 'profile' ? ' id="active"' : '', '><a href="', $scripturl, '?action=profile">', $txt[467], '</a></li>';

   // Go to PM center... [pm]
   if ($context['user']['is_logged'] && $context['allow_pm'])
      echo '
               <li', $current_action == 'pm' ? ' id="active"' : '', '><a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '<blink>['. $context['user']['unread_messages'] . ']</blink>' : '' , '</a></li>';

// The [gallery]!
      echo '
               <li', $current_action == 'gallery' ? ' id="active"' : '', '>
                <a href="http://soccerfanbase.com/index.php?action=gallery">Gallery</a></li>';



   // The [calendar]!
   if ($context['allow_calendar'])
      echo '
               <li', $current_action == 'calendar' ? ' id="active"' : '', '><a href="', $scripturl, '?action=calendar">', $txt['calendar24'], '</a></li>';

   // the [member] list button
   if ($context['allow_memberlist'])
      echo '
               <li', $current_action == 'mlist' ? ' id="active"' : '', '><a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a></li>';

   // If the user is a guest, show [login] and [register] buttons.
   if ($context['user']['is_guest'])
   {
      echo '
               <li', $current_action == 'login' ? ' id="active"' : '', '><a href="', $scripturl, '?action=login">', $txt[34], '</a></li>
               <li', $current_action == 'register' ? ' id="active"' : '', '><a href="', $scripturl, '?action=register">', $txt[97], '</a></li>';
   }
   // Otherwise, they might want to [logout]...
   else
      echo '
               <li', $current_action == 'logout' ? ' id="active"' : '', '><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">', $txt[108], '</a></li>';
   echo '</ul>';
}


becomes...


// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
   global $context, $settings, $options, $scripturl, $txt;

   // Work out where we currently are.
   $current_action = 'home';
   if (in_array($context['current_action'], array('admin', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers')))
      $current_action = 'admin';
   if (in_array($context['current_action'], array('arcade', 'search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
      $current_action = $context['current_action'];
   if ($context['current_action'] == 'search2')
      $current_action = 'search';
   if ($context['current_action'] == 'theme')
      $current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';

   echo '
            <ul>';

   // Show the [home] button.
   echo '
               <li', $current_action == 'home' ? ' id="active"' : '', '><a href="', $scripturl, '">', $txt[103], '</a></li>';

// Show the [Blog] button.
         echo '<li', $current_action == 'Blog' ? ' class="chosen"' : '', '><a href=http://www.soccerfanbase.com/blog/ ><span>Blog</span></a>';

// Show the [YouTube Page] button.
         echo '<li', $current_action == 'YouTube Page' ? ' class="chosen"' : '', '><a href=http://www.youtube.com/user/Soccerfanbase ><span>YouTube Page</span></a>';

   // Show the [help] button.
   echo '
               <li', $current_action == 'help' ? ' id="active"' : '', '><a href="', $scripturl, '?action=help">', $txt[119], '</a></li>';

   // How about the [search] button?
   if ($context['allow_search'])
      echo '
               <li', $current_action == 'search' ? ' id="active"' : '', '><a href="', $scripturl, '?action=search">', $txt[182], '</a></li>';

   // How about the [arcade] button?
      echo '
               <li', $current_action == 'arcade' ? ' id="active"' : '', '><a href="', $scripturl, '?action=arcade">', $txt['arcade'], '</a></li>';

   // Is the user allowed to administrate at all? ([admin])
   if ($context['allow_admin'])
      echo '
               <li', $current_action == 'admin' ? ' id="active"' : '', '><a href="', $scripturl, '?action=admin">', $txt[2], '</a></li>';

   // Edit Profile... [profile]
   if ($context['allow_edit_profile'])
      echo '
               <li', $current_action == 'profile' ? ' id="active"' : '', '><a href="', $scripturl, '?action=profile">', $txt[467], '</a></li>';

   // Go to PM center... [pm]
   if ($context['user']['is_logged'] && $context['allow_pm'])
      echo '
               <li', $current_action == 'pm' ? ' id="active"' : '', '><a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '<blink>['. $context['user']['unread_messages'] . ']</blink>' : '' , '</a></li>';

// The [gallery]!
      echo '
               <li', $current_action == 'gallery' ? ' id="active"' : '', '>
                <a href="http://soccerfanbase.com/index.php?action=gallery">Gallery</a></li>';



   // The [calendar]!
   if ($context['allow_calendar'])
      echo '
               <li', $current_action == 'calendar' ? ' id="active"' : '', '><a href="', $scripturl, '?action=calendar">', $txt['calendar24'], '</a></li>';

   // the [member] list button
   if ($context['allow_memberlist'])
      echo '
               <li', $current_action == 'mlist' ? ' id="active"' : '', '><a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a></li>';

   // If the user is a guest, show [login] and [register] buttons.
   if ($context['user']['is_guest'])
   {
      echo '
               <li', $current_action == 'login' ? ' id="active"' : '', '><a href="', $scripturl, '?action=login">', $txt[34], '</a></li>
               <li', $current_action == 'register' ? ' id="active"' : '', '><a href="', $scripturl, '?action=register">', $txt[97], '</a></li>';
   }
   // Otherwise, they might want to [logout]...
   else
      echo '
               <li', $current_action == 'logout' ? ' id="active"' : '', '><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">', $txt[108], '</a></li>';
   echo '</ul>';
}


remember always back up before manual edits in case of mistakes/typos etc.

Zidane5555

Thanks for your help but I just tried replacing it with the code you provided and nothing happened... I see no Arcade button.. ?

Sakurachan

Any plans for SMF 1.1.11 version?

gbsothere

Quote from: Sakurachan on December 26, 2009, 12:16:05 AM
Any plans for SMF 1.1.11 version?

Have you tried using 2.0.18?  I use it on my 1.1.11 forum with no issues. It should install via package manager but if not, the parsing instructions for 1.1.9 can be used for your 1.1.11 forum.   :)

My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

fwitt

Quote from: Zidane5555 on December 25, 2009, 08:11:49 PM
Thanks for your help but I just tried replacing it with the code you provided and nothing happened... I see no Arcade button.. ?

modified the code in my above post not sure if 2.0.18 uses $context['allow_arcade'] so i removed the reference

scimmiotto

Quote from: scimmiotto on December 24, 2009, 01:14:54 PM
Quote from: nadrojcote on December 18, 2009, 02:17:45 PM
I am pleased to bring you what every smf arcade user has been dreaming of.

A complete pack of games including over 1000 games in 28 categories.

Categories include:

Christmas
Find the Difference
Geography
Mario
Memory & Matching
Mouse Click
Pacman
Pinball
Poker
Pong / Tennis / Ball
Pool & Darts
Puzzle & Strategy
Random
Shooting
Simon
Slingo
Smash & Bash
Snake
Snow & Sk8
Space Invaders
Sports & Olympics
Tetris
This or That
TV & Movies
Valentines
Water Sports & Fishing
Webcam
Word & Numbers
Yetis & Penguins

I have seperated each category into folders that are less than 10mb, I had to do this to be able to install them one folder at a time on my host. Some hosts may require that you seperate them into smaller folders.

Instructions:

1. Create all the categories in your arcade admin
2. Upload the game folders to your games folder
3. Upload Gamedata folder to your arcade folder
4. Install each folder through admin>install one at a time
5. Get mad props from all your members

You can download the games here http://tdr.solohosting.org/arcadegames.zip

and you can download the gamedata files here http://tdr.solohosting.org/gamedata.zip (required to be able to save scores)

Thanks goes out to wdm from sleepys arcade for allowing me to download and make a pack out of his games. Woot!

simply great but...why two zip? how to install both them?

up
Loop code example:
The following statement is FALSE
The previous statement is TRUE.

Chen Zhen

#4230
zidane555 -

Ok, I see the issue.
The index.template.php edits must be implemented for every theme.
The very last edit I put in my last post may be different depending on the theme.
If you enable users with the ability to change themes,  you must do the edits to this file in every theme you show as available to your users.

The original auto install placed the correct edits into the default theme.
ie. if you enable your default 'Core' theme, you should see the arcade button displayed properly.

Judging by the way you are displaying parts of your index.template, I am guessing that you are editing these files via Admin / Themes from within the site software itself? I suppose this will do for this particular edit, but for edits you may need to do in other mods,  I suggest using your ftp or third party software such as Filezilla.

<<<<<<<<<<>>>>>>>>>>

For your Blue Ace theme...

Navigate to: / Themes / Blueace_tp / index.template.php
(from within your site: Admin / Themes and Layout / Modify Themes / Blue Ace / Browse the templates and files of this theme / index.template.php)

Find:

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
   global $context, $settings, $options, $scripturl, $txt;

   // Work out where we currently are.
   $current_action = 'home';
   if (in_array($context['current_action'], array('admin', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers')))
      $current_action = 'admin';
   if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
      $current_action = $context['current_action'];
   if ($context['current_action'] == 'search2')
      $current_action = 'search';
   if ($context['current_action'] == 'theme')
      $current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';

   echo '
            <ul>';

   // Show the [home] button.
   echo '
               <li', $current_action == 'home' ? ' id="active"' : '', '><a href="', $scripturl, '">', $txt[103], '</a></li>';

// Show the [Blog] button.
         echo '<li', $current_action == 'Blog' ? ' class="chosen"' : '', '><a href=http://www.soccerfanbase.com/blog/ ><span>Blog</span></a>';

// Show the [YouTube Page] button.
         echo '<li', $current_action == 'YouTube Page' ? ' class="chosen"' : '', '><a href=http://www.youtube.com/user/Soccerfanbase ><span>YouTube Page</span></a>';

   // Show the [help] button.
   echo '
               <li', $current_action == 'help' ? ' id="active"' : '', '><a href="', $scripturl, '?action=help">', $txt[119], '</a></li>';

   // How about the [search] button?
   if ($context['allow_search'])
      echo '
               <li', $current_action == 'search' ? ' id="active"' : '', '><a href="', $scripturl, '?action=search">', $txt[182], '</a></li>';

   // Is the user allowed to administrate at all? ([admin])
   if ($context['allow_admin'])
      echo '
               <li', $current_action == 'admin' ? ' id="active"' : '', '><a href="', $scripturl, '?action=admin">', $txt[2], '</a></li>';

   // Edit Profile... [profile]
   if ($context['allow_edit_profile'])
      echo '
               <li', $current_action == 'profile' ? ' id="active"' : '', '><a href="', $scripturl, '?action=profile">', $txt[467], '</a></li>';

   // Go to PM center... [pm]
   if ($context['user']['is_logged'] && $context['allow_pm'])
      echo '
               <li', $current_action == 'pm' ? ' id="active"' : '', '><a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '<blink>['. $context['user']['unread_messages'] . ']</blink>' : '' , '</a></li>';

// The [gallery]!
      echo '
               <li', $current_action == 'gallery' ? ' id="active"' : '', '>
                <a href="http://soccerfanbase.com/index.php?action=gallery">Gallery</a></li>';



   // The [calendar]!
   if ($context['allow_calendar'])
      echo '
               <li', $current_action == 'calendar' ? ' id="active"' : '', '><a href="', $scripturl, '?action=calendar">', $txt['calendar24'], '</a></li>';

   // the [member] list button
   if ($context['allow_memberlist'])
      echo '
               <li', $current_action == 'mlist' ? ' id="active"' : '', '><a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a></li>';

   // If the user is a guest, show [login] and [register] buttons.
   if ($context['user']['is_guest'])
   {
      echo '
               <li', $current_action == 'login' ? ' id="active"' : '', '><a href="', $scripturl, '?action=login">', $txt[34], '</a></li>
               <li', $current_action == 'register' ? ' id="active"' : '', '><a href="', $scripturl, '?action=register">', $txt[97], '</a></li>';
   }
   // Otherwise, they might want to [logout]...
   else
      echo '
               <li', $current_action == 'logout' ? ' id="active"' : '', '><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">', $txt[108], '</a></li>';
   echo '</ul>';
}



Replace the above code with this:

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
   global $context, $settings, $options, $scripturl, $txt;

   // Work out where we currently are.
   $current_action = 'home';
   if (in_array($context['current_action'], array('admin', 'managegames', 'arcadesettings', 'arcadecategory', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers')))
      $current_action = 'admin';
   if (in_array($context['current_action'], array('arcade', 'search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
      $current_action = $context['current_action'];
   if ($context['current_action'] == 'search2')
      $current_action = 'search';
   if ($context['current_action'] == 'theme')
      $current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';

   echo '
            <ul>';

   // Show the [home] button.
   echo '
               <li', $current_action == 'home' ? ' id="active"' : '', '><a href="', $scripturl, '">', $txt[103], '</a></li>';

// Show the [Blog] button.
         echo '<li', $current_action == 'Blog' ? ' class="chosen"' : '', '><a href=http://www.soccerfanbase.com/blog/ ><span>Blog</span></a>';

// Show the [YouTube Page] button.
         echo '<li', $current_action == 'YouTube Page' ? ' class="chosen"' : '', '><a href=http://www.youtube.com/user/Soccerfanbase ><span>YouTube Page</span></a>';

   // Show the [help] button.
   echo '
               <li', $current_action == 'help' ? ' id="active"' : '', '><a href="', $scripturl, '?action=help">', $txt[119], '</a></li>';

// Show the arcade button
if (AllowedTo('arcade_view') == true)
    {
echo '
<li', $current_action == 'arcade' ? ' id="active"' : '', '><a href="', $scripturl, '?action=arcade">', $txt['arcade'], '</a></li>';
}

   // How about the [search] button?
   if ($context['allow_search'])
      echo '
               <li', $current_action == 'search' ? ' id="active"' : '', '><a href="', $scripturl, '?action=search">', $txt[182], '</a></li>';

   // Is the user allowed to administrate at all? ([admin])
   if ($context['allow_admin'])
      echo '
               <li', $current_action == 'admin' ? ' id="active"' : '', '><a href="', $scripturl, '?action=admin">', $txt[2], '</a></li>';

   // Edit Profile... [profile]
   if ($context['allow_edit_profile'])
      echo '
               <li', $current_action == 'profile' ? ' id="active"' : '', '><a href="', $scripturl, '?action=profile">', $txt[467], '</a></li>';

   // Go to PM center... [pm]
   if ($context['user']['is_logged'] && $context['allow_pm'])
      echo '
               <li', $current_action == 'pm' ? ' id="active"' : '', '><a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '<blink>['. $context['user']['unread_messages'] . ']</blink>' : '' , '</a></li>';

// The [gallery]!
      echo '
               <li', $current_action == 'gallery' ? ' id="active"' : '', '>
                <a href="http://soccerfanbase.com/index.php?action=gallery">Gallery</a></li>';



   // The [calendar]!
   if ($context['allow_calendar'])
      echo '
               <li', $current_action == 'calendar' ? ' id="active"' : '', '><a href="', $scripturl, '?action=calendar">', $txt['calendar24'], '</a></li>';

   // the [member] list button
   if ($context['allow_memberlist'])
      echo '
               <li', $current_action == 'mlist' ? ' id="active"' : '', '><a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a></li>';

   // If the user is a guest, show [login] and [register] buttons.
   if ($context['user']['is_guest'])
   {
      echo '
               <li', $current_action == 'login' ? ' id="active"' : '', '><a href="', $scripturl, '?action=login">', $txt[34], '</a></li>
               <li', $current_action == 'register' ? ' id="active"' : '', '><a href="', $scripturl, '?action=register">', $txt[97], '</a></li>';
   }
   // Otherwise, they might want to [logout]...
   else
      echo '
               <li', $current_action == 'logout' ? ' id="active"' : '', '><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">', $txt[108], '</a></li>';
   echo '</ul>';
}


<<<<<<<<<<>>>>>>>>>>

BTW - I changed it so that the arcade button will not show for users without permission to view it.

Edit - I just noticed that fwitt posted the proper correction which should have worked for you. If the button does not show up in the above edit, my next hypothesis would be that you do not have the proper language file edits.

You can double check your / Themes / default / languages / Modifications.[-YOUR LANGUAGE-].php has the proper arcade edits.

The particular one that shows the arcade button is:
$txt['arcade'] = 'Arcade';

UD

My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Sakurachan

Quote from: gbsothere on December 26, 2009, 09:22:34 AM
Quote from: Sakurachan on December 26, 2009, 12:16:05 AM
Any plans for SMF 1.1.11 version?

Have you tried using 2.0.18?  I use it on my 1.1.11 forum with no issues. It should install via package manager but if not, the parsing instructions for 1.1.9 can be used for your 1.1.11 forum.   :)

Mhmm it works fine besides.

Fatal error: require_once() [function.require]: Failed opening required '/home/hmuniver/public_html/forum/Sources/ArcadeInstall.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/hmuniver/public_html/forum/Packages/temp/package_install.php on line 25

I'm having bad luck with mods lately. xD

gbsothere

@Sakurachan



"Failed Opening" usually indicates a permissions problem.  See if you have a folder named temp in your Packages directory.  If you don't, create it and set its permissions to 777 (if your server allows that).  You may have to ask them what permissions they allow, but you can first try 777 or 755, if that doesn't work.   (The temp directory is spelled with a small case letter "t").

Then try again.   :)

My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

Sakurachan

#4233
Quote from: gbsothere on December 26, 2009, 07:09:40 PM
@Sakurachan



"Failed Opening" usually indicates a permissions problem.  See if you have a folder named temp in your Packages directory.  If you don't, create it and set its permissions to 777 (if your server allows that).  You may have to ask them what permissions they allow, but you can first try 777 or 755, if that doesn't work.   (The temp directory is spelled with a small case letter "t").

Then try again.   :)

I had it made and it was on 777 and now 755. I'll give it a try then.

It's spelled 'temp' in the directory

Here's what the package manager does..

Type  Action  Description
1. Execute Modification ./index.php Test successful
2. Execute Modification ./Sources/ManagePermissions.php Test successful
3. Execute Modification ./Sources/Subs.php Test successful
4. Execute Modification ./Sources/Who.php Test successful
5. Execute Modification ./Themes/default/index.template.php Test successful
6. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
7. Execute Modification ./Themes/default/languages/Modifications.english-utf8.php Test successful
8. Extract File ./Sources/Arcade.php
9. Extract File ./Sources/ArcadeInstall.php
10. Extract File ./Sources/ArcadeList.php
11. Extract File ./Sources/ArcadePlay.php
12. Extract File ./Sources/ArcadeStats.php
13. Extract File ./Sources/ArcadeSettings.php
14. Extract File ./Sources/Subs-Arcade.php
15. Extract File ./Sources/ManageGames.php
16. Extract File ./Themes/default/arcade.js
17. Extract File ./Themes/default/swfobject.js
18. Extract File ./Themes/default/Arcade.template.php
19. Extract File ./Themes/default/ArcadeMenu.template.php
20. Extract File ./Themes/default/ArcadeAdmin.template.php
21. Extract File ./Themes/default/ManageGames.template.php
22. Extract File ./Themes/default/languages/Arcade.english.php
23. Extract File ./Themes/default/languages/ArcadeAdmin.english.php
24. Extract File ./Themes/default/languages/Arcade.english-utf8.php
25. Extract File ./Themes/default/languages/ArcadeAdmin.english-utf8.php
26. Extract File ./Themes/default/images/favorite.gif
27. Extract File ./Themes/default/images/favorite2.gif
28. Extract File ./Themes/default/images/star2.gif
29. Extract File ./Themes/default/images/gold.gif
30. Extract File ./ArcadeLicense.txt
31. Extract File ./installArcade.php
32. Extract File ./newscore.php
33. Extract Tree ./getid3
34. Create Tree ./Games
35. Execute Code package_install.php


It looks like it's skipping alot of these files.

gbsothere

That actually looks okay, Sakurachan.  Extracting those files means that it's placing them where they go on your server.  But when you click "Apply Mod", you're still getting that error?

My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

Zidane5555

#4235
Alright perfect, What fwitt posted worked :) So thanks to both fwitt and 01_Underdog

Good news is : the arcade button shows up perfectly and is not corrupted like before :)

Bad news: BUT, when I click on the Arcade button, it says "You are not allowed to access arcade. "


EDIT: Forget that, since I just went and changed the permissions and now I am able to access it :)

Thanks for the help everyone. Again I am so noob at this so NOW that I have my arcade set up and everything, how do I install games step by step?

Sakurachan

Quote from: gbsothere on December 26, 2009, 07:24:57 PM
That actually looks okay, Sakurachan.  Extracting those files means that it's placing them where they go on your server.  But when you click "Apply Mod", you're still getting that error?

It looks like this when applying the mod.

Fatal error: require_once() [function.require]: Failed opening required '/home/hmuniver/public_html/forum/Sources/ArcadeInstall.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/hmuniver/public_html/forum/Packages/temp/package_install.php on line 25

gbsothere

You may have to manually install the mod, Sakurachan, if you're sure you have your server's correct permissions on the temp file, then.  That would involve going to the mod page HERE and using the parsing instructions for 2.0.18 (you will have to use 1.1.9's instructions), manually placing the files included in the arcade zip where they go (you are told where they go at the bottom of the parsing instructions) and pointing your browser to the install file shown on the parsing page. 

If you like, I'm happy to manually install it for you, but it would be some time tomorrow before I get to it.  If you hit a snag and need some help, drop me a PM. 

There's another "wild" thing you can try, first, though.  It makes no sense, but it worked for me, once, while messing around with an installation on one of my test boards.  That file that's being referred to in your error:  package_install.php.  You can try opening the arcade zip and manually dragging that file into the temp directory.  (You may need to set permissions on that file, as well, to make it writable.) It sounds odd, I know, and I won't hazard a guess as to why it once worked for me, but it did. 

Barring that, though, if you can't work your way through a manual installation, give me a heads up with a PM.
My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

Sakurachan

I just think it's a little funny how it does this whenever the other mods I have work fine and haven't gave me any errors of that kind.


gbsothere

Quote from: Sakurachan on December 26, 2009, 09:14:55 PM
I just think it's a little funny how it does this whenever the other mods I have work fine and haven't gave me any errors of that kind.

Very odd, yes.  Barring some sort of server thing, though, I can't think why you're getting the error.  It may be that even though you're setting the permissions, they aren't literally being changed (it may require chown, instead of chmod).  You may want to give your server a call to see if you still have ownership of all those directories and files.  (Now, I'm just stabbing, being a bit bleary.  I've had a bit of Scotch.)  *grin*  Someone a bit fresher will hopefully come along and shed some light on this for you.

My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

Advertisement: