feat(rail-ads): Add more format options with multiple widths
- Added width options: 130px, 140px, 150px, 160px, 300px, 400px, 500px, 600px - Each width has multiple height options (300, 400, 500, 600, etc.) - Total of 31 format combinations available - Updated Schema, Renderer and FormBuilder 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -462,19 +462,49 @@ final class AdsensePlacementFormBuilder
|
||||
$html .= ' </div>';
|
||||
$html .= '</div>';
|
||||
|
||||
// Format select - Opciones de altura para anuncios verticales
|
||||
// Format select - Multiples anchos y alturas disponibles
|
||||
$railFormat = $this->renderer->getFieldValue($cid, 'behavior', 'rail_format', 'skyscraper');
|
||||
$html .= $this->buildSelect($cid . 'RailFormat', 'Formato',
|
||||
$railFormat,
|
||||
[
|
||||
'slim-small' => 'Slim Small (160x300)',
|
||||
'slim-medium' => 'Slim Medium (160x400)',
|
||||
'slim-large' => 'Slim Large (160x500)',
|
||||
'skyscraper' => 'Skyscraper (160x600)',
|
||||
'slim-xlarge' => 'Slim XLarge (160x700)',
|
||||
'wide-skyscraper' => 'Wide Skyscraper (160x800)',
|
||||
'half-page' => 'Half Page (300x600)',
|
||||
'large-skyscraper' => 'Large Skyscraper (300x1050)'
|
||||
// 130px width
|
||||
'w130-h300' => '130x300',
|
||||
'w130-h400' => '130x400',
|
||||
'w130-h500' => '130x500',
|
||||
'w130-h600' => '130x600',
|
||||
// 140px width
|
||||
'w140-h300' => '140x300',
|
||||
'w140-h400' => '140x400',
|
||||
'w140-h500' => '140x500',
|
||||
'w140-h600' => '140x600',
|
||||
// 150px width
|
||||
'w150-h300' => '150x300',
|
||||
'w150-h400' => '150x400',
|
||||
'w150-h500' => '150x500',
|
||||
'w150-h600' => '150x600',
|
||||
// 160px width
|
||||
'slim-small' => '160x300',
|
||||
'slim-medium' => '160x400',
|
||||
'slim-large' => '160x500',
|
||||
'skyscraper' => '160x600 (Skyscraper)',
|
||||
'slim-xlarge' => '160x700',
|
||||
'wide-skyscraper' => '160x800',
|
||||
// 300px width
|
||||
'w300-h250' => '300x250 (Medium Rectangle)',
|
||||
'half-page' => '300x600 (Half Page)',
|
||||
'large-skyscraper' => '300x1050 (Large Skyscraper)',
|
||||
// 400px width
|
||||
'w400-h300' => '400x300',
|
||||
'w400-h400' => '400x400',
|
||||
'w400-h600' => '400x600',
|
||||
// 500px width
|
||||
'w500-h300' => '500x300',
|
||||
'w500-h400' => '500x400',
|
||||
'w500-h600' => '500x600',
|
||||
// 600px width
|
||||
'w600-h300' => '600x300',
|
||||
'w600-h400' => '600x400',
|
||||
'w600-h600' => '600x600'
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
@@ -295,16 +295,47 @@ final class AdsensePlacementRenderer
|
||||
$delayEnabled = ($settings['forms']['delay_enabled'] ?? true) === true;
|
||||
|
||||
// Dimensiones segun formato
|
||||
// Opciones de 160px de ancho con diferentes alturas + opciones anchas
|
||||
// Soporta anchos: 130, 140, 150, 160, 300, 400, 500, 600px
|
||||
[$width, $height] = match($format) {
|
||||
// 130px width
|
||||
'w130-h300' => [130, 300],
|
||||
'w130-h400' => [130, 400],
|
||||
'w130-h500' => [130, 500],
|
||||
'w130-h600' => [130, 600],
|
||||
// 140px width
|
||||
'w140-h300' => [140, 300],
|
||||
'w140-h400' => [140, 400],
|
||||
'w140-h500' => [140, 500],
|
||||
'w140-h600' => [140, 600],
|
||||
// 150px width
|
||||
'w150-h300' => [150, 300],
|
||||
'w150-h400' => [150, 400],
|
||||
'w150-h500' => [150, 500],
|
||||
'w150-h600' => [150, 600],
|
||||
// 160px width (legacy keys)
|
||||
'slim-small' => [160, 300],
|
||||
'slim-medium' => [160, 400],
|
||||
'slim-large' => [160, 500],
|
||||
'slim-xlarge' => [160, 700],
|
||||
'wide-skyscraper' => [160, 800],
|
||||
// 300px width
|
||||
'w300-h250' => [300, 250],
|
||||
'half-page' => [300, 600],
|
||||
'large-skyscraper' => [300, 1050],
|
||||
default => [160, 600], // skyscraper
|
||||
// 400px width
|
||||
'w400-h300' => [400, 300],
|
||||
'w400-h400' => [400, 400],
|
||||
'w400-h600' => [400, 600],
|
||||
// 500px width
|
||||
'w500-h300' => [500, 300],
|
||||
'w500-h400' => [500, 400],
|
||||
'w500-h600' => [500, 600],
|
||||
// 600px width
|
||||
'w600-h300' => [600, 300],
|
||||
'w600-h400' => [600, 400],
|
||||
'w600-h600' => [600, 600],
|
||||
// Default: skyscraper 160x600
|
||||
default => [160, 600],
|
||||
};
|
||||
|
||||
$scriptType = $delayEnabled ? 'text/plain' : 'text/javascript';
|
||||
|
||||
@@ -226,14 +226,36 @@
|
||||
"default": "skyscraper",
|
||||
"editable": true,
|
||||
"options": {
|
||||
"slim-small": "Slim Small (160x300)",
|
||||
"slim-medium": "Slim Medium (160x400)",
|
||||
"slim-large": "Slim Large (160x500)",
|
||||
"skyscraper": "Skyscraper (160x600)",
|
||||
"slim-xlarge": "Slim XLarge (160x700)",
|
||||
"wide-skyscraper": "Wide Skyscraper (160x800)",
|
||||
"half-page": "Half Page (300x600)",
|
||||
"large-skyscraper": "Large Skyscraper (300x1050)"
|
||||
"w130-h300": "130x300",
|
||||
"w130-h400": "130x400",
|
||||
"w130-h500": "130x500",
|
||||
"w130-h600": "130x600",
|
||||
"w140-h300": "140x300",
|
||||
"w140-h400": "140x400",
|
||||
"w140-h500": "140x500",
|
||||
"w140-h600": "140x600",
|
||||
"w150-h300": "150x300",
|
||||
"w150-h400": "150x400",
|
||||
"w150-h500": "150x500",
|
||||
"w150-h600": "150x600",
|
||||
"slim-small": "160x300",
|
||||
"slim-medium": "160x400",
|
||||
"slim-large": "160x500",
|
||||
"skyscraper": "160x600 (Skyscraper)",
|
||||
"slim-xlarge": "160x700",
|
||||
"wide-skyscraper": "160x800",
|
||||
"w300-h250": "300x250 (Medium Rectangle)",
|
||||
"half-page": "300x600 (Half Page)",
|
||||
"large-skyscraper": "300x1050 (Large Skyscraper)",
|
||||
"w400-h300": "400x300",
|
||||
"w400-h400": "400x400",
|
||||
"w400-h600": "400x600",
|
||||
"w500-h300": "500x300",
|
||||
"w500-h400": "500x400",
|
||||
"w500-h600": "500x600",
|
||||
"w600-h300": "600x300",
|
||||
"w600-h400": "600x400",
|
||||
"w600-h600": "600x600"
|
||||
},
|
||||
"description": "Tamano del anuncio en los rails laterales"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user