News:

Join the Facebook Fan Page.

Main Menu

SMF Arcade

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

Previous topic - Next topic

nokonium

I really like this mod, my members really like this mod, but I have to fix the crap that comes with it ....



Fiery

Hey!

The arcade is causing to many problems for me.  I want to delete it manually, but I am not sure what I have to modify in the files... I got these errors when I tried to do the auto uninstall:

Sources/ManagePermissions.php Failure

Themes/default/Display.template.php Failure

What do I need to modify to fix the permissions problem, I cant access the permissions.

THANKS

tentronik

Make a backup and reupload the file from the original release. If you have modified it for other mods you have to check the file or open the *.xml files to see which parts got added.
Also im not sure about the database tables you might delete them manually too if you want.

The mod works but has installation issues so you need to manually fix stuff.

Anihc

QuotePosted by: tentronik Posted on: Today at 03:12:07 PM  
Insert Quote
@Niko
What is the diffrence of arcade.xml and arcade2.xml?
Sorry if this got answered somewhere else already.

Correct me if I am wrong but if you you open them up they should say what board version they are intended to mod. I believe arcade2.xml is the one for 1.1b3 at least that is the one I used for it anyway.

GL,
Anihc

tentronik

#1244
Both states
<version>1.2.1</version>
I noticed i have 2 errors left both in display.php unknown i and game variable. i check now if its works with the arcade2.xml :)
Looks liek at least the Sources/Display.php need the arcade2.xml


Anihc

#1245
oops sorry, did this this morning so I forgot where I saw the info.

I saw this following code in the package info xml file and well assumed (I think I made the right assumption) that is what it was saying.

<?xml version="1.0" ?>
  <!DOCTYPE package-info (View Source for full doctype...)>
- <package-info xmlns="http://www.simplemachines.org/xml/package-info" xmlns:smf="http://www.simplemachines.org/">
  <id>Niko:Arcade</id>
  <name>SMF Arcade</name>
  <version>1.2.1</version>
  <type>modification</type>

- <install for="1.1 Beta 1 - 1.1 Beta 3 Public">
  <readme type="file">Documents/readme.txt</readme>
  <modification type="file" reverse="false" format="xml">arcade2.xml</modification>
  <require-dir name="getid3" destination="$boarddir" />
  <require-dir name="Games" destination="$boarddir" />
  <require-file name="arcade_sql.php" destination="$boarddir" />
  <require-dir name="Sources" destination="$boarddir" />
  <require-file name="Themes/default/Arcade.template.php" destination="$themedir" />
  <require-file name="Themes/default/ArcadeAdmin.template.php" destination="$themedir" />
  <require-file name="Themes/default/images/english/games.gif" destination="$themedir/images/english" />
  <require-file name="Themes/default/languages/Arcade.english.php" destination="$themedir/languages" />
  <require-file name="Themes/default/languages/Arcade.finnish.php" destination="$themedir/languages" />
  </install>

- <install>
  <readme type="file">Documents/readme.txt</readme>
  <modification type="file" reverse="false" format="xml">arcade.xml</modification>
  <require-dir name="getid3" destination="$boarddir" />
  <require-dir name="Games" destination="$boarddir" />
  <require-file name="arcade_sql.php" destination="$boarddir" />
  <require-dir name="Sources" destination="$boarddir" />
  <require-file name="Themes/default/Arcade.template.php" destination="$themedir" />
  <require-file name="Themes/default/ArcadeAdmin.template.php" destination="$themedir" />
  <require-file name="Themes/default/images/english/games.gif" destination="$themedir/images/english" />
  <require-file name="Themes/default/languages/Arcade.english.php" destination="$themedir/languages" />
  <require-file name="Themes/default/languages/Arcade.finnish.php" destination="$themedir/languages" />
  </install>


Looks like two seperate installers to me.
I really don't know xml code well enough and it is not exactly an if statment but sounded good to me lol. :)

Anihc

Fiery

Quote from: tentronik on August 13, 2005, 07:25:25 PM
Make a backup and reupload the file from the original release. If you have modified it for other mods you have to check the file or open the *.xml files to see which parts got added.
Also im not sure about the database tables you might delete them manually too if you want.

The mod works but has installation issues so you need to manually fix stuff.


Is there any other way.  Everytime I try to reupload the original file, in PHP myadmin it causes errors.

thanks

tentronik

#1247
HOWTO INSTALL MOD under 1.1 beta 3 p with version 1.2.3:

This information is taken from the arcade2.xml from the 1.2.3 release.
Also i suggest after install success and applying all and checking afterwards the forum error log - when then there are no errors delete the file arcade_sql.php from your forum root directory.

1.)
Download the 1.2.3 rlease from page 82 of this topic. Or check the offical mod download page here at simple machines.

2.)
GO to your forum packagmanger and click download -> then upload from your harddisc.

3.)
Now you might see a "failed file" on all default theme stuff as i encountered.

if so proceed with 3.1.)

3.1.) the manual way
3.1.1.)
Open file: forum/index.php

Hit F3 or STRG-F and search for: 'admin' => array('Admin.php', 'Admin')

After this past: 'arcade' => array('Arcade.php','Arcade'),
'arcadeadmin' => array('ArcadeAdmin.php', 'ArcadeAdmin'),

3.1.2.)
Open file: forum/Themes/YOURTHEME/index.template.php

Hit F3 or STRG-F and search for: a href="', $scripturl, '?action=calendar">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/calendar.gif" alt="' . $txt['calendar24'] . '" style="margin: 2px 0;" border="0" />' : $txt['calendar24']), '</a>', $context['menu_separator'];]]>


After this past: echo '
<a href="', $scripturl, '?action=arcade"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/games.gif" alt="' . "Arcade" . '" style="margin: 2px 0;" border="0" /></a>', $context['menu_separator'];]]>

3.1.3.)
Open file: Sources/Subs.php

Hit F3 or STRG-F and search for: 'edit_mods_settings' => '<a href="' . $scripturl . '?action=modifyModSettings">' . $txt['modSettings_title']

After this past: 'admin_arcade' => '<a href="' . $scripturl . '?action=arcadeadmin">' . $txt['admin_arcade'] . '</a>',]]>

3.1.4.)
Open file: Sources/ManagePermissions.php

Hit F3 or STRG-F and search for: 'profile' => array(
'profile_view' => true,
'profile_identity' => true,
'profile_extra' => true,
'profile_title' => true,
'profile_remove' => true,
'profile_remote_avatar' => false,
)


After this past: 'arcade' => array(
'view_arcade' => false,
'play_arcade' => false,
'submit_score' => false,
'challenge_send' => false,
'challenge_view' => false,
'admin_arcade' => false,
),

3.1.5.)
Open file: Themes/default/languages/Modifications.english.php

Hit F3 or STRG-F and search for: last line or where you prefer.

And this past: $txt['permissiongroup_arcade'] = "Arcade";
$txt['cannot_view_arcade'] = "You arent allowed to view arcade, sorry!";
$txt['permissionhelp_view_arcade'] = "Allow this if you want this group to access arcade";
$txt['permissionname_view_arcade'] = "Can view arcade (main)";
$txt['cannot_arcade_play_arcade'] = "You arent allowed to play on arcade, sorry!";
$txt['permissionhelp_play_arcade'] = "Allow this if you want this group to play in arcade";
$txt['permissionname_play_arcade'] = "Can play in arcade";
$txt['cannot_submit_score'] = "You arent allowed to submit scores on arcade, sorry!";
$txt['permissionhelp_submit_score'] = "Allow this if you want ALLOW this group to submit scores in arcade";
$txt['permissionname_submit_score'] = "Can Submit scores in arcade";
$txt['arcade_highscores_per_page'] = "Highscores per page in arcade";
$txt['admin_arcade'] = "Arcade";
$txt['admin_arcade2'] = "Arcade Admin";
$txt['cannot_admin_arcade'] = "You arent allowed to Admin Arcade!";
$txt['permissionname_admin_arcade'] = "Can Admin Arcade";
$txt['cannot_challenge_send'] = "You arent allowed to send challenges arcade, sorry!";
$txt['permissionhelp_challenge_send'] = "Allow this if you want this group to send challenges arcade";
$txt['permissionname_challenge_send'] = "Can send challenges";
$txt['cannot_challenge_view'] = "You arent allowed to view challenges arcade, sorry!";
$txt['permissionhelp_challenge_view'] = "Allow this if you want this group to view challenges arcade";
$txt['permissionname_challenge_view'] = "Can view challenges";


3.1.6)
Open file: Themes/default/Display.template.php

Hit F3 or STRG-F and search for: ', $txt[26], ': ', $message['member']['posts'], '<br />
<br />';


After this past: if(@is_array($context['arcade']['champions'][ $message['member']['id'] ])){
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'],'<br />';
}
else
echo '
', $tmp['name'], ' ', $txt['arcade_136'],'<br />';
}
}

3.1.7.)
Open file: Sources/Display.php

Hit F3 or STRG-F and search for: $attachments = array();

After this past: /* 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;


Ok basicly make a backup before applying this changes (without garanty i hope all is correct).
Also remember to enable the mod itself after install inside the "arcade settings" and apply the permission for this mod at the admin panel -> permission.

I hope this helps and feel free to correct me or add something. And Niko if you like to use this go ahead :)

Cheers

Anihc

DOH! Tetronik beat me to it but this may look more simple ;-) but same info really:

Mini tutorial to install this mod - Seriously dont remove it if you want it. This should work, I know because I had my own doubts :)

1. DL the file and extract it into a new folder.
2. Open the xml that relates to your board version (see my post above) This shows you what files to modify.
3. package_info.xml will show you where some files and folders belong upload those as required
4. custom game folder - I uploaded to the smf root as a folder of its own
5. under sources upload those files to smf/Sources
6. under themes upload those files to themes
7. upload the two php files in the root to the smf root folder
8 create a Games folder in the smf root
9 I uploaded the documents into a documents folder in the smf root (I dont think this is required)
10 upload getid3 folder into a getid3 folder off the smf root
11 under misc - I think these are just where the package handler looks for some info to mod? the two language files are just a partial file and the index template looks more complete but would overide any of your current mod customization so I ignored these.
12 run www.yoursite/sml/arcade_sql.php and you should then be abe to use the admin panel.
13 grab a drink and relax after that effort you deserve it :)

GL
Anihc

Fiery

Quote from: tentronik on August 13, 2005, 07:58:13 PM


After this past: 'arcade' => array(
'view_arcade' => false,
'play_arcade' => false,
'submit_score' => false,
'challenge_send' => false,
'challenge_view' => false,
'admin_arcade' => false,
),



Arent there suppose to be two ), at the end; such as:


'arcade' => array(
'view_arcade' => false,
'play_arcade' => false,
'submit_score' => false,
'challenge_send' => false,
'challenge_view' => false,
'admin_arcade' => false,
),


),

tentronik

:-p

OK!
But yours is just suitable when you have a fresh smf forum instalation done.
Otherwise you would overwrite all other modifications (mods).

Cheers  btw rightnow i have very delicious black tea :)

tetronik

@pmp6nl no its just 1 - do you encounter managepermissions errors in your forum error log?

tentronik

Ok i checked my error log again and still this error.
I tried both arcade.xml code and the arcade2.xml code.
8: Undefined variable: game
/customers/xxxxe/httpd.www/bbs/Sources/Display.php
Line: 675

8: Undefined variable: i
/customers/xxxxe/httpd.www/bbs/Sources/Display.php
Line: 672


If some1 has a fix please post, thanks.
Beside that all seems to work, but i dont like error messages.

Anihc

I think it would be ok on an allready moded board the files inside sources and themes included with this mod are arcade specific the only files that looked like they would overwite existing smf files are the ones in misc. And I did not upload those they looked like something the package handler might use to compare and update the sections from? not sure about that folder but the rest of the files seem to be mod specific and the other instructions are edits. So I think this would be a safe way to go about it.

could Niko perhaps confirm this?

Thanks and Cheers,
Anihc

Fiery

Quote from: tentronik on August 13, 2005, 08:17:34 PM

@pmp6nl no its just 1 - do you encounter managepermissions errors in your forum error log?

Yes I am getting hundreds of error messages.

Also, the manage permissions still does not work.  Can you post yours on here or something, so I can look it over?

Thanks

1stStrike

In the admin menu when I try to go to "arcade" and edit it I get the following error:

Unable to load the 'ArcadeAdmin' template.

Any idea what the problem might be?

tentronik

Quote from: pmp6nl on August 13, 2005, 09:07:36 PM
Quote from: tentronik on August 13, 2005, 08:17:34 PM

@pmp6nl no its just 1 - do you encounter managepermissions errors in your forum error log?

Yes I am getting hundreds of error messages.

Also, the manage permissions still does not work.  Can you post yours on here or something, so I can look it over?

Thanks

'arcade' => array(
'view_arcade' => false,
'play_arcade' => false,
'submit_score' => false,
'challenge_send' => false,
'challenge_view' => false,
'admin_arcade' => false,
),

Thats it what i added nothing else.
Quote from: 1stStrike on August 13, 2005, 09:23:12 PM
In the admin menu when I try to go to "arcade" and edit it I get the following error:

Unable to load the 'ArcadeAdmin' template.

Any idea what the problem might be?
Right version? And did you tried the arcade_sql.php yet to check the database.
And what does the forum error log showing?

Fiery

Quote from: tentronik on August 13, 2005, 09:27:50 PM
Quote from: pmp6nl on August 13, 2005, 09:07:36 PM
Quote from: tentronik on August 13, 2005, 08:17:34 PM

@pmp6nl no its just 1 - do you encounter managepermissions errors in your forum error log?

Yes I am getting hundreds of error messages.

Also, the manage permissions still does not work.  Can you post yours on here or something, so I can look it over?

Thanks

'arcade' => array(
'view_arcade' => false,
'play_arcade' => false,
'submit_score' => false,
'challenge_send' => false,
'challenge_view' => false,
'admin_arcade' => false,
),

Thats it what i added nothing else.
Quote from: 1stStrike on August 13, 2005, 09:23:12 PM
In the admin menu when I try to go to "arcade" and edit it I get the following error:

Unable to load the 'ArcadeAdmin' template.

Any idea what the problem might be?
Right version? And did you tried the arcade_sql.php yet to check the database.
And what does the forum error log showing?

NO, I got that and thats not the problem.  There is some other problem with my permissions file and I was just looking for a normal one so I could try to figure out my problem

tentronik

Its just the file is 48kb huge, so please try uploading a fresh one with the modifications.
If you cant make it pm me your email i sent it to you then.


Fiery

#1258
I uploaded the file, I am looking where the error shows up and comparing it to the original and there seems to be no difference in the area...what to do?

Do you see any errors in the area:

                        ),
'arcade' => array(
'view_arcade' => false,
'play_arcade' => false,
'submit_score' => false,
'challenge_send' => false,
'challenge_view' => false,
'admin_arcade' => false,
),


'visual_warn' => array(
'visual_warn_any' => false,
'visual_approve_any' => false,
),
'arcade' => array(
'view_arcade' => true,
'play_arcade' => true,
'submit_score' => true,
'challenge_send' => true,
'challenge_view' => true,
'admin_arcade' => true,
),
'board' => array(
'general_board' => array(
'moderate_board' => false,
),
'topic' => array(
'post_new' => false,
'merge_any' => false,
'split_any' => false,
'send_topic' => false,
'make_sticky' => false,
'make_gsticky' => false,
'move' => true,
'lock' => true,
'delete' => true,
'post_reply' => true,
'modify_replies' => false,
'remove_replies' => false,
'announce_topic' => false,
),
'post' => array(
'remove' => true,
'modify' => true,
'report_any' => false,
),
'poll' => array(
'poll_view' => false,
'poll_vote' => false,
'poll_post' => false,
'poll_add' => true,
'poll_edit' => true,
'poll_lock' => true,
'poll_remove' => true,
),
'notification' => array(
'mark_any_notify' => false,
'mark_notify' => false,
),
'attachment' => array(
'view_attachments' => false,
'post_attachment' => false,
)
)
);

// This is just a helpful array of permissions guests... cannot have.
$non_guest_permissions = array(
'karma_edit',
'pm_read',
'pm_send',
'profile_identity',
'profile_extra',
'profile_title',
'profile_remove',
'profile_remote_avatar',
'poll_vote',
'mark_any_notify',
'mark_notify',
);


The error is on the line with the );

the error is

Parse error: parse error, unexpected ';', expecting ')' in /home/***/public_html/forums/Sources/ManagePermissions.php on line 1100

tentronik

#1259
So please you didnt answered this yet.
Which version you using of SMF and which version of the mod you try to install?
Then just past the arcade array behind the array as i posted in the howto.
If you post parts of the script please post all relevant pasrt. This is the function before and a few lines after the script where you trieng to implement the additions.

And if you get errors please post the error message completely as found in your error log.

UPDATE:
The line 1100 is not correspondenting with mine managa permissions file.
How big in filesize is your file?

And did you checked if its right place?
Do you used the right untouched original script ?

Advertisement: