• Hi,

    I’m after some help with the simplepinkscheme template.

    In the template, there is 1 youtube video in the sidebar. I am hoping to add another 2.

    I have adjusted the sidebar.php to have the boxes. But the actually code is mixed between the sidebar.php and settings php.

    Sidebar.php:

    `<!– begin featured video –>
    <div class=”box”>
    <h2>Featured Video</h2>
    <div class=”video”>
    <script type=”text/javascript”>showVideo(‘<?php echo dp_settings(“youtube”) ?>’);</script>
    </div>
    </div>
    <!– end featured video –>`

    settings.php

    <?php
    
    $settings = array(
    	'featured' => 'Featured',
    	'youtube' => 'tJ_JZlBdsl4'
    );
    
    # Settings
    
    $themename = "SimpleScheme Magazine";
    $shortname = "simplescheme";
    $options = array (
    
    	array(	"name" => "Main Settings",
    			"type" => "header"
    	),
    
    	array(  "name" => "Featured Category",
                "id" => $shortname."_featured",
                "std" => $settings['featured'],
                "type" => "text",
    			"note" => "Category Name"),
    
    	array(  "name" => "Youtube Video ID",
                "id" => $shortname."_youtube",
                "std" => $settings['youtube'],
                "type" => "text",
    			"note" => "<strong>Example: </strong> https://www.youtube.com/watch?v=<strong style='color: #ff0000;'>tJ_JZlBdsl4</strong>")
    
    );

    For the siderbar.php I just duplicated the code 2 more times. But as for the settings.php i’m stuck as what I need to do.

    Any help would be greatly appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter el-scampio

    (@el-scampio)

    Bump

    This is the code you’re going to replace the existing code above with

    sidebar.php

    <!-- begin featured video -->
    <div class="box">
    <h2>Featured Video</h2>
    <div class="video">
    <script type="text/javascript">showVideo('<?php echo dp_settings("youtube") ?>');</script>
    </div>
    </div>
    <!-- end featured video -->
    
    <!-- begin featured video 2 -->
    <div class="box">
    <h2>Featured Video</h2>
    <div class="video">
    <script type="text/javascript">showVideo('<?php echo dp_settings("youtube2") ?>');</script>
    </div>
    </div>
    <!-- end featured video 2 -->
    
    <!-- begin featured video 3 -->
    <div class="box">
    <h2>Featured Video</h2>
    <div class="video">
    <script type="text/javascript">showVideo('<?php echo dp_settings("youtube3") ?>');</script>
    </div>
    </div>
    <!-- end featured video 3 -->

    and for settings.php

    <?php
    
    $settings = array(
    	'featured' => 'Featured',
    	'youtube' => 'tJ_JZlBdsl4'
    	'youtube2' => 'tJ_JZlBdsl4'
    	'youtube3' => 'tJ_JZlBdsl4'
    );
    
    # Settings
    
    $themename = "SimpleScheme Magazine";
    $shortname = "simplescheme";
    $options = array (
    
    	array(	"name" => "Main Settings",
    			"type" => "header"
    	),
    
    	array(  "name" => "Featured Category",
                "id" => $shortname."_featured",
                "std" => $settings['featured'],
                "type" => "text",
    			"note" => "Category Name"),
    
    	array(  "name" => "Youtube Video ID",
                "id" => $shortname."_youtube",
                "std" => $settings['youtube'],
                "type" => "text",
    			"note" => "<strong>Example: </strong> https://www.youtube.com/watch?v=<strong style='color: #ff0000;'>tJ_JZlBdsl4</strong>")
    
    	array(  "name" => "Youtube Video ID",
                "id" => $shortname."_youtube2",
                "std" => $settings['youtube2'],
                "type" => "text",
    			"note" => "<strong>Example: </strong> https://www.youtube.com/watch?v=<strong style='color: #ff0000;'>tJ_JZlBdsl4</strong>")
    
    	array(  "name" => "Youtube Video ID",
                "id" => $shortname."_youtube3",
                "std" => $settings['youtube3'],
                "type" => "text",
    			"note" => "<strong>Example: </strong> https://www.youtube.com/watch?v=<strong style='color: #ff0000;'>tJ_JZlBdsl4</strong>")
    
    );
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘simplepinkscheme, youtube videos in siderbar’ is closed to new replies.