News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

SMF Arcade

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

Previous topic - Next topic

cferd

Quote from: Uzbek on September 23, 2005, 06:08:41 AM
Sorry guys, is this mod compatible with SMF 1.1 RC1? As it does not say so on the mod page.

For what it's worth, I have 1.1 rc1 wrapped in Mambo 4.5.2.3, and the latest Arcade mod. and it's working almost as good as it did with 1.03.

The only part that's missing is the "Champion" bit in posts. Other than that, it's running smoothly.

foxed

Thanks redone - I've added the following but it doesn't seem to do anything ?

// Show the member's signature?
if (!empty($message['member']['signature']) && empty($options['show_no_signatures']))
echo '
<hr width="100%" size="1" class="hrcolor" />
<div class="signature">', $message['member']['signature'], '</div>';

if(@is_array($context['arcade']['champions'][ $message['member']['id'] ])){
$i = 0;

echo "SMFarcadel Champion&nbsp;";
foreach($context['arcade']['champions'][ $message['member']['id'] ] as $tmp){
//print_r($tmp);
if($tmp['thumbnail'] != ''){

// echo '
// <img src="', $tmp['thumbnail'], '" alt="" width="20">',$tmp['name'],' ', $txt['arcade_136'],'
// ';

echo '<a href="', $scripturl, '?action=arcade;do=play;game=',$tmp['id'],'" ><img border="0" src="', $tmp['thumbnail'], '" alt="', $tmp['name'] ,'" width="20" height="20"></a>&nbsp;';

}
}
}

echo '
</td>
</tr>
</table>
</td></tr>
</table>
</td></tr>';
}
echo '
<tr><td style="padding: 0 0 1px 0;"></td></tr>
</table>

redone

Okay here is the breakdown of the edit you need:

Remove in your display.template.php

// Show the member's signature?
if (!empty($message['member']['signature']) && empty($options['show_no_signatures']))
echo '
<hr width="100%" size="1" class="hrcolor" />
<div style="overflow: auto; width: 100%; padding-bottom: 3px;" class="signature">', $message['member']['signature'], '</div>';

Replace with:

// Show the member's signature?
if (!empty($message['member']['signature']) && empty($options['show_no_signatures']))
echo '
<hr width="100%" size="1" class="hrcolor" />
<div style="overflow: auto; width: 100%; padding-bottom: 3px;" class="signature">', $message['member']['signature'], '</div><hr />';
if(@is_array($context['arcade']['champions'][ $message['member']['id'] ])){
$i = 0;

echo "SmfArcade Champion&nbsp;";
foreach($context['arcade']['champions'][ $message['member']['id'] ] as $tmp){
//print_r($tmp);
if($tmp['thumbnail'] != ''){

// echo '
// <img src="', $tmp['thumbnail'], '" alt="" width="20">',$tmp['name'],' ', $txt['arcade_136'],'
';

echo '<a href="', $scripturl, '?action=arcade;do=play;game=',$tmp['id'],'" ><img border="0" src="', $tmp['thumbnail'], '" alt="', $tmp['name'] ,'" width="20" height="20"></a>&nbsp;';

}
}
}

~redone

p.s I will add this one to the faq over at snmarcade


Jay T

Redone, did you come up with any ideas on those error logs I am getting?

redone

The errors you are describing especially "undefined variable game etc" is a known bug that niko is looking to fix in the next release.

Here is a fix that johnm did that should help though:

/* Arcade thingy */
$arcade_champ = array();
$req = db_query("SELECT * FROM {$db_prefix}games_champ,{$db_prefix}games WHERE {$db_prefix}games_champ.game={$db_prefix}games.game LIMIT 0,{$modSettings['arcade_champions_in_post']}",__FILE__,__LINE__);
while ($rivi = mysql_fetch_assoc($req))
{
$ext = array('gif','GIF','png','PNG','jpg','JPG',); // Extensions to look for

$context['arcade']['games'][$i]['thumbnail'] = ""; // No thumbnail for default

foreach($ext as $ex){
if(file_exists($modSettings['arcade_games_dir']."/".$game['game'].".".$ex)){
$context['arcade']['games'][$i]['thumbnail'] = $modSettings['arcade_games_url']."/".$game['game'].".".$ex;
break;
}
}

}
loadLanguage('Arcade'); // We need strings from Arcade language file
$context['arcade']['champions'] = $arcade_champ;



~redone

foxed

Hi again,

That doesnt seem to work ...

There was a problem loading the /Themes/default/Display.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.

Parse error: parse error, unexpected T_STRING in .../Themes/default/Display.template.php on line 541

532: echo "SmfArcade Champion ";
533: foreach($context['arcade']['champions'][ $message['member']['id'] ] as $tmp){
534: //print_r($tmp);
535: if($tmp['thumbnail'] != ''){
536:
537: // echo '
538: // <img src="', $tmp['thumbnail'], '" alt="" width="20">',$tmp['name'],' ', $txt['arcade_136'],'
539: ';
540:
541: echo '<a href="', $scripturl, '?action=arcade;do=play;game=',$tmp['id'],'" ><img border="0" src="', $tmp['thumbnail'], '" alt="', $tmp['name'] ,'" width="20" height="20"></a> ';
542:
543: }
544: }
545: }

houston

I have given one of my member complete access to all option to the arcade panel, but they are unable to find the link to the Admin options I have set all permissions to allow. I am useing smf 1.0.5 and smarcade 1.2.3

Any thoughts or comments

Thanks

piers38

I think you have to be administrator before you can access the arcade admin.
I have two site's with arcades and am admin on one and global mod on the other and have the same problem with arcade admin but when sign in as admin no problem.
hxxp:askfaq.org/ [nonactive]

htmlmaster

Quote
The edits for the permissions do work.
No they don't:

Parse error: parse error, unexpected ',', expecting ')' in /home/b2l1483/public_html/webforum/Sources/ManagePermissions.php on line 1000

houston

Quote from: piers38 on September 23, 2005, 09:20:14 PM
I think you have to be administrator before you can access the arcade admin.
I have two site's with arcades and am admin on one and global mod on the other and have the same problem with arcade admin but when sign in as admin no problem.


What I did was to create another user group called Arcade Admin and Set all the arcade permissions to allow, and then assigned one of my members to the new user group. I would think that the link to the admin panel would show up in the arcade panel of the main arcade window but there is no link there when he goes to the arcade.

Have I confused you yet?

houston

Quote from: htmlmaster on September 23, 2005, 09:24:15 PM
Quote
The edits for the permissions do work.
No they don't:

Parse error: parse error, unexpected ',', expecting ')' in /home/b2l1483/public_html/webforum/Sources/ManagePermissions.php on line 1000


I am getting the same error  after making the changes to the code.

redone

I will need to look at the display.template code more closely. I am sure you need to edit out the comments // from the code.

For those that are having permissions issues drop me a pm and I will take look for you. Please include all relevant info so I access the site and take a look.

~redone


cferd

Quote from: htmlmaster on September 23, 2005, 09:24:15 PM
Quote
The edits for the permissions do work.
No they don't:

Parse error: parse error, unexpected ',', expecting ')' in /home/b2l1483/public_html/webforum/Sources/ManagePermissions.php on line 1000



The following code is taken from my Manage Permissions file and it works.
It worked on 1.03 and it also works on 1.1 rc1. Take notice of the extra ')' that you seem to be missing in your file.

),
'profile' => array(
'profile_view' => true,
'profile_identity' => true,
'profile_extra' => true,
'profile_title' => true,
'profile_remove' => true,
'profile_server_avatar' => false,
'profile_upload_avatar' => false,
'profile_remote_avatar' => false,
),
                                                'arcade' => array(
                                                                'view_arcade' => false,
                                                                'play_arcade' => false,
                                                                'submit_score' => false,
                                                                'challenge_send' => false,
                                                                'challenge_view' => false,
                                                                'admin_arcade' => false,
                                                       )
),
'board' => array(
'general_board' => array(
'moderate_board' => false,

ArkServer

#1493
anyone know how to add an arcade button for the neptune by bloc template?

and if you check this: http://arkserver.audiohosting.org/forum/index.php?action=arcade;sa=play;game=3
the game doesnt load. how to fix it?
(i know i could search and i did but i dont want to read 100 pages)

Jazhawk

I can't get arcade to install on RC1.1  I get major errors during the install but it worked ok before RC1.1. test bed.

1. Execute Modification ./index.php Test successful
2. Execute Modification ./Themes/default/index.template.php Test successful
3. Execute Modification ./Sources/Subs.php Test failed
4. Execute Modification ./Sources/ManagePermissions.php Test failed

5. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
6. Execute Modification ./Themes/default/Display.template.php Test successful
7. Execute Modification ./Sources/Display.php Test successful
8. Extract Tree ./getid3 
9. Extract Tree ./Games 
10. Extract File ./arcade_sql.php 
11. Extract Tree ./Sources 
12. Extract File ./Themes/default/Arcade.template.php 
13. Extract File ./Themes/default/ArcadeAdmin.template.php 
14. Extract File ./Themes/default/images/english/games.gif 
15. Extract File ./Themes/default/languages/Arcade.english.php 
16. Extract File ./Themes/default/languages/Arcade.finnish.php

I thought the latest version would install but I guess not.

-Jazhawk

htmlmaster

OK, I fixed the error, still doesn't work -PM sent.

DemonicInfluence

Quote from: Jazhawk on September 25, 2005, 11:02:05 AM
I can't get arcade to install on RC1.1  I get major errors during the install but it worked ok before RC1.1. test bed.

1. Execute Modification ./index.php Test successful
2. Execute Modification ./Themes/default/index.template.php Test successful
3. Execute Modification ./Sources/Subs.php Test failed
4. Execute Modification ./Sources/ManagePermissions.php Test failed

5. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
6. Execute Modification ./Themes/default/Display.template.php Test successful
7. Execute Modification ./Sources/Display.php Test successful
8. Extract Tree ./getid3 
9. Extract Tree ./Games 
10. Extract File ./arcade_sql.php 
11. Extract Tree ./Sources 
12. Extract File ./Themes/default/Arcade.template.php 
13. Extract File ./Themes/default/ArcadeAdmin.template.php 
14. Extract File ./Themes/default/images/english/games.gif 
15. Extract File ./Themes/default/languages/Arcade.english.php 
16. Extract File ./Themes/default/languages/Arcade.finnish.php

I thought the latest version would install but I guess not.

-Jazhawk

http://snmarcade.com/forum/index.php?topic=1537.0

Jazhawk

Thanx for the update.  I'll let it sit until the updates.

-Jazhawk

redone

I have installed the arcade on 1.1rc. The display champion icons doesn't work as yet but other than that this is the only issue.

You must understand that updating mods for new releases like 1.1rc takes a while. To be honest the odds are basically right now no mods install via the package manager!

To ArkServer I answered your question at smfgames.

~redone

Jazhawk

Quote from: redone on September 25, 2005, 06:31:48 PM
I have installed the arcade on 1.1rc. The display champion icons doesn't work as yet but other than that this is the only issue.

You must understand that updating mods for new releases like 1.1rc takes a while. To be honest the odds are basically right now no mods install via the package manager!

To ArkServer I answered your question at smfgames.

~redone

I hope it isn't too long but if it takes a month or so to do, it's cool.  It's an option, not a need.

-Jazhawk

Advertisement: