Author Topic: [MOD] - Customize Flash Settings from ACP (version, header, width & height).  (Read 25111 times)

0 Members and 1 Guest are viewing this topic.

TheOracle

  • Guest
// Introduction

Answering this topic :

http://www.4homepages.de/forum/index.php?topic=9262.new#new

// Features

This MOD is a pretty special one. Here are the following integrated features :

- Abilities to modify the header logo's - version, width and height
- 10 additional flash tables which let's you modify ' each ' of the width and height.
- Available for all languages.

// Objective

Due to a lot of discussions regarding the FLASH OBJECT ID's configuration tags (and this includes the old forum), I thought there were some changes that needed to be done regarding the stability of their configuration - also due to some users abilities which requires more attention in order to play with these types of objects.

That said, all these configurations are now available under ACP.

// Affected files

- admin/settings.php
- includes/functions.php
- lang/<your_language>/admin.php (assuming english)
- mySQL's settings table

// Preparation of steps

Backup these 4 contents before applying these modifications.

// Step 1

In your admin/settings.php file,

find :


Code: [Select]
show_table_separator($setting_group[3], 2, "#setting_group_3");
show_setting_row("image_order", "show_image_order_select");
show_setting_row("image_sort", "show_image_sort_select");
show_setting_row("new_cutoff");
show_setting_row("image_border");
show_setting_row("image_cells");
show_setting_row("default_image_rows");
show_setting_row("custom_row_steps");
show_setting_row("image_table_width");
show_setting_row("image_table_cellspacing");
show_setting_row("image_table_cellpadding");


add below :


Code: [Select]
show_table_separator($setting_group[X], 2, "#setting_group_X");
show_setting_row("flash_version");
show_setting_row("flash_header_width");
show_setting_row("flash_header_height");

show_table_separator($setting_group[X], 2, "#setting_group_X");
show_setting_row("flash_content_width");
show_setting_row("flash_content_height");

show_table_separator($setting_group[X], 2, "#setting_group_X");
show_setting_row("flash_content1_width");
show_setting_row("flash_content1_height");

show_table_separator($setting_group[X], 2, "#setting_group_X");
show_setting_row("flash_content2_width");
show_setting_row("flash_content2_height");

show_table_separator($setting_group[X], 2, "#setting_group_X");
show_setting_row("flash_content3_width");
show_setting_row("flash_content3_height");

show_table_separator($setting_group[X], 2, "#setting_group_X");
show_setting_row("flash_content4_width");
show_setting_row("flash_content4_height");

show_table_separator($setting_group[X], 2, "#setting_group_X");
show_setting_row("flash_content5_width");
show_setting_row("flash_content5_height");

show_table_separator($setting_group[X], 2, "#setting_group_X");
show_setting_row("flash_content6_width");
show_setting_row("flash_content6_height");

show_table_separator($setting_group[X], 2, "#setting_group_X");
show_setting_row("flash_content7_width");
show_setting_row("flash_content7_height");

show_table_separator($setting_group[X], 2, "#setting_group_X");
show_setting_row("flash_content8_width");
show_setting_row("flash_content8_height");

show_table_separator($setting_group[X], 2, "#setting_group_X");
show_setting_row("flash_content9_width");
show_setting_row("flash_content9_height");

Note: The [X] must be replaced by the latest number and must go by + 1 for ' each ' of the $setting_group and #setting_group. This is a very important step !

// Step 2

In your includes/functions.php file,

find :


Code: [Select]
"width" => $width,
"height" => $height,


add below :


Code: [Select]
"flash_version" => $config['flash_version'],
"flash_header_width" => $config['flash_header_width'],
"flash_header_height" => $config['flash_header_height'],
"flash_content_width" => $config['flash_content_width'],
"flash_content_height" => $config['flash_content_height'],
"flash_content1_width" => $config['flash_content1_width'],
"flash_content1_height" => $config['flash_content1_height'],
"flash_content2_width" => $config['flash_content2_width'],
"flash_content2_height" => $config['flash_content2_height'],
"flash_content3_width" => $config['flash_content3_width'],
"flash_content3_height" => $config['flash_content3_height'],
"flash_content4_width" => $config['flash_content4_width'],
"flash_content4_height" => $config['flash_content4_height'],
"flash_content5_width" => $config['flash_content5_width'],
"flash_content5_height" => $config['flash_content5_height'],
"flash_content6_width" => $config['flash_content6_width'],
"flash_content6_height" => $config['flash_content6_height'],
"flash_content7_width" => $config['flash_content7_width'],
"flash_content7_height" => $config['flash_content7_height'],
"flash_content8_width" => $config['flash_content8_width'],
"flash_content8_height" => $config['flash_content8_height'],
"flash_content9_width" => $config['flash_content9_width'],
"flash_content9_height" => $config['flash_content9_height'],

// Step 3

In your lang/english/admin.php file, above the ?> tag,

add :


Code: [Select]
/*-- Setting-Group X --*/
$setting_group[X]="Macromedia Flash Player - Header Settings";
$setting['flash_version'] = "Which version of Macromedia Flash are you using ?<br /><span class=\"smalltext\">Example: 7,0,0,0</span>";
$setting['flash_header_width'] = "Header width<br /><span class=\"smalltext\">Example: 800</span>";
$setting['flash_header_height'] = "Header height<br /><span class=\"smalltext\">Example: 600</span>";

/*-- Setting-Group X --*/
$setting_group[X]="Personnalized flash settings - 1st content";
$setting['flash_content_width'] = "width for 1st content<br /><span class=\"smalltext\">Example: 800</span>";
$setting['flash_content_height'] = "height for 1st content<br /><span class=\"smalltext\">Example: 600</span>";

/*-- Setting-Group X --*/
$setting_group[X]="Personnalized flash settings - 2nd content";
$setting['flash_content1_width'] = "width for 2nd content<br /><span class=\"smalltext\">Example: 800</span>";
$setting['flash_content1_height'] = "height for 2nd content<br /><span class=\"smalltext\">Example: 600</span>";

/*-- Setting-Group X --*/
$setting_group[X]="Personnalized flash settings - 3nd content";
$setting['flash_content2_width'] = "width for 3nd content<br /><span class=\"smalltext\">Example: 800</span>";
$setting['flash_content2_height'] = "height for 3nd content<br /><span class=\"smalltext\">Example: 600</span>";

/*-- Setting-Group X --*/
$setting_group[X]="Personnalized flash settings - 4nd content";
$setting['flash_content3_width'] = "width for 4nd content<br /><span class=\"smalltext\">Example: 800</span>";
$setting['flash_content3_height'] = "height for 4nd content<br /><span class=\"smalltext\">Example: 600</span>";

/*-- Setting-Group X --*/
$setting_group[X]="Personnalized flash settings - 5nd content";
$setting['flash_content4_width'] = "width for 5nd content<br /><span class=\"smalltext\">Example: 800</span>";
$setting['flash_content4_height'] = "height for 5nd content<br /><span class=\"smalltext\">Example: 600</span>";

/*-- Setting-Group X --*/
$setting_group[X]="Personnalized flash settings - 6nd content";
$setting['flash_content5_width'] = "width for 6nd content<br /><span class=\"smalltext\">Example: 800</span>";
$setting['flash_content5_height'] = "height for 6nd content<br /><span class=\"smalltext\">Example: 600</span>";

/*-- Setting-Group X --*/
$setting_group[X]="Personnalized flash settings - 7nd content";
$setting['flash_content6_width'] = "width for 7nd content<br /><span class=\"smalltext\">Example: 800</span>";
$setting['flash_content6_height'] = "height for 7nd content<br /><span class=\"smalltext\">Example: 600</span>";

/*-- Setting-Group X --*/
$setting_group[X]="Personnalized flash settings - 8nd content";
$setting['flash_content7_width'] = "width for 8nd content<br /><span class=\"smalltext\">Example: 800</span>";
$setting['flash_content7_height'] = "height for 8nd content<br /><span class=\"smalltext\">Example: 600</span>";

/*-- Setting-Group X --*/
$setting_group[X]="Personnalized flash settings - 9nd content";
$setting['flash_content8_width'] = "width for 9nd content<br /><span class=\"smalltext\">Example: 800</span>";
$setting['flash_content8_height'] = "height for 9nd content<br /><span class=\"smalltext\">Example: 600</span>";

/*-- Setting-Group X --*/
$setting_group[X]="Personnalized flash settings - 10nd content";
$setting['flash_content9_width'] = "width for 10nd content<br /><span class=\"smalltext\">Example: 800</span>";
$setting['flash_content9_height'] = "height for 10nd content<br /><span class=\"smalltext\">Example: 600</span><br /><br />";

Note: Same steps applies here for the [X].

// Step 4

In your phpmyadmin,

apply :


Code: [Select]
insert  into 4images_settings values
('flash_version', ''),
('flash_header_width', ''),
('flash_header_height', ''),
('flash_content_width', ''),
('flash_content_height', ''),
('flash_content1_width', ''),
('flash_content1_height', ''),
('flash_content2_width', ''),
('flash_content2_height', ''),
('flash_content3_width', ''),
('flash_content3_height', ''),
('flash_content4_width', ''),
('flash_content4_height', ''),
('flash_content5_width', ''),
('flash_content5_height', ''),
('flash_content6_width', ''),
('flash_content6_height', ''),
('flash_content7_width', ''),
('flash_content7_height', ''),
('flash_content8_width', ''),
('flash_content8_height', ''),
('flash_content9_width', ''),
('flash_content9_height', '');

Assuming your prefix table name is : 4images_, you may execute it right away. If not, please modify it in order to match with your settings table name.


// Functionnality

Assuming you wish to add your header logo on top of your site, here's an example on how this works from your HTML templates files :


Code: [Select]
<!-- Template file for Flash Movies -->
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version={flash_version}" width="{flash_header_width}" height="{flash_header_height}" />
<param name="movie" value="{media_src}">
<param name="quality" value="high">
<param name="play" value="true">
<param name="scale" value="false">
<embed src="{media_src}" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="{flash_header_width}" height="{flash_header_height}"></embed></object></td>

As for the customized flash, let's do the first one :


Code: [Select]
<!-- Template file for Flash Movies -->
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version={flash_version}" width="{flash_content_width}" height="{flash_content_height}" />
<param name="movie" value="{media_src}">
<param name="quality" value="high">
<param name="play" value="true">
<param name="scale" value="false">
<embed src="{media_src}" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="{flash_content_width}" height="{flash_content_height}"></embed></object></td>

// Installation completed

This completes the installation of this MOD. To try it out, simply go to your ACP - > settings and you can't miss it. It is right below the image settings.

Good luck !
« Last Edit: April 07, 2006, 01:46:40 AM by V@no »

Offline Vincent

  • 4images Moderator
  • Addicted member
  • *****
  • Posts: 1.195
    • View Profile
    • www.foto-kocher.com
what is this MOD exaclty doing?
is there a demo?

vincent
Beati pauperi spiritus

4images 1.7 // My Installed Mods


TheOracle

  • Guest
No demo is available as it requires authentication in ACP. However, you will really know the difference in your ACP - > Settings page once you've added this MOD. ;)

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
No demo is available as it requires authentication in ACP. However, you will really know the difference in your ACP - > Settings page once you've added this MOD. ;)
a screenshot would work ;)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

TheOracle

  • Guest
A screenshot wouldn't be a solution neither since the fields are two big in order to fit in one single image. Secondly, if I could post an image from the forum without involving my URL in - I would consider it.

Offline Vincent

  • 4images Moderator
  • Addicted member
  • *****
  • Posts: 1.195
    • View Profile
    • www.foto-kocher.com
@the Oracle
the link is not working it redirect to http://www.angelfire.lycos.com/doc/images/rloadblock.png

vincent
Beati pauperi spiritus

4images 1.7 // My Installed Mods


Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
TheOracle, there are lots of image hosting sites like http://imageshack.us ;)
and perhaps u didnt know that, u can attach screenshots to your replys/topics :D
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

TheOracle

  • Guest
I just modified the link instantly. My apologize for this bad direction.

TheOracle

  • Guest
Ahh ! now that's what I call an alternative solution. Consideration taken then.

Offline ID25

  • Full Member
  • ***
  • Posts: 125
    • View Profile
there is only 10 :(
i think, there is need somethink like this:

ADD NEW, DELETE, MODIFY...
where you type number of image and other options

but there is need big mod, yes?
requesting this mod :)

TheOracle

  • Guest
Quote

there is only 10


How many do you need ?

Offline ID25

  • Full Member
  • ***
  • Posts: 125
    • View Profile
i want ~1000,
other peoples maybe want 10 000

idea to made with ADD NEW, DELETE, MODIFY options
not with 1,2,3...10..50
not professional :)
because everythere is ADD NEW, DEL

TheOracle

  • Guest
In that case, you're welcome to follow the instructions and to reproduce as much tables, in th settings page, you'd like. ;)

Offline ID25

  • Full Member
  • ***
  • Posts: 125
    • View Profile
In that case, you're welcome to follow the instructions and to reproduce as much tables, in th settings page, you'd like. ;)
i said, there is no professional :)
need with ADD NEW and etc...
you know that, but dont want make this, because many time this go ;)

TheOracle

  • Guest
By following the instructions, you'll understand the process along the way.