WordPress.org

Ready to get started?Download WordPress

Forums

Adding a custom flash banner (13 posts)

  1. Anonymous
    Unregistered
    Posted 9 years ago #

    I've added a flash banner to my blog. The problem is, it's too far off to the right, and i cant center it.
    The blog is at http://cynikalsam.bestcatalog.net/blog
    Here's the index.php code;
    <?php
    /* Don't remove this line. */
    require('./wp-blog-header.php');
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head profile="http://gmpg.org/xfn/1">
    <title><?php bloginfo('name'); ?><?php wp_title(); ?></title>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo('charset'); ?>" />
    <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->
    <style type="text/css" media="screen">
    @import url( <?php echo get_settings('siteurl'); ?>/style.css );
    </style>
    <link rel="stylesheet" type="text/css" media="print" href="<?php echo get_settings('siteurl'); ?>/print.css" />
    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
    <link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    <?php wp_get_archives('type=monthly&format=link'); ?>
    <?php //comments_popup_script(); // off by default ?>
    <?php wp_head(); ?>
    </head>
    <body>
    <div id="rap">
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html40/loose.dtd">
    <html><head>
    <title>blogbanner</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="author" content="Owner">
    <meta name="generator" content="SWiSHmax http://www.swishzone.com">
    <meta name="description" content="blogbanner">
    <meta name="keywords" content="about, contact, cynikalsam, forum, guestbook, home, intro, journal, tk, v0">
    <!-- text used in the movie -->
    <!-- about, contact, cynikalsam, forum, guestbook, home, intro, journal, tk, v0 -->
    <!-- Created by SWiSHmax - Flash Made Easy - www.swishzone.com -->
    </head>
    <body bgcolor="#000000">
    <center>
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
    codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,79,0"
    id="blogbanner" width="900" height="110">
    <param name="movie" value="blogbanner.swf">
    <param name="bgcolor" value="#000000">
    <param name="quality" value="high">
    <param name="allowscriptaccess" value="samedomain">
    <embed type="application/x-shockwave-flash"
    pluginspage="http://www.macromedia.com/go/getflashplayer"
    width="900" height="110"
    name="blogbanner" src="blogbanner.swf"
    bgcolor="#000000" quality="high"
    swLiveConnect="true" allowScriptAccess="samedomain"
    ></embed>
    </object>
    </center>
    </body>
    </html>
    <div id="content">
    <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
    <?php the_date('','<h2>','</h2>'); ?>
    <div class="post">
    <h3 class="storytitle" id="post-<?php the_ID(); ?>">" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></h3>
    <div class="meta"><?php _e("Filed under:"); ?> <?php the_category() ?> — <?php the_author() ?> @ <?php the_time() ?> <?php edit_post_link(); ?></div>
    <div class="storycontent">
    <?php the_content(); ?>
    </div>
    <div class="feedback">
    <?php wp_link_pages(); ?>
    <?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>
    </div>
    <!--
    <?php trackback_rdf(); ?>
    -->
    <?php include(ABSPATH . 'wp-comments.php'); ?>
    </div>
    <?php endforeach; else: ?>
    <?php _e('Sorry, no posts matched your criteria.'); ?>
    <?php endif; ?>
    </div>
    <div id="menu">

    </div>
    </div>
    <p class="credit"><!--<?php echo $wpdb->num_queries; ?> queries. <?php timer_stop(1); ?> seconds. --> <cite><?php echo sprintf(__("Powered by WordPress"), __("Powered by WordPress, state-of-the-art semantic personal publishing platform")); ?></cite>
    </body>
    </html>

    Here's the style.css code;
    `/*
    Simple and Happy
    Modified 2004-02-03 by Gregory Auld (greg@auld.com)
    based on:
    Default WordPress by Dave Shea || http://mezzoblue.com
    Modifications by Matthew Mullenweg || http://photomatt.net
    This is just a basic layout, with only the bare minimum defined.
    Please tweak this and make it your own. : )
    */
    a {
    color: #000164;
    }
    a img {
    border: none;
    }
    a:visited {
    color: #000173;
    }
    a:hover {
    color: #B2B3FF;
    }
    acronym, abbr {
    border-bottom: 1px dashed #333333;
    }
    acronym, abbr, span.caps {
    cursor: help;
    font-size: 90%;
    letter-spacing: .07em;
    }
    blockquote {
    border-left: 5px solid #CCCCCC;
    margin-left: 1.5em;
    padding-left: 5px;
    }
    body {
    background-color: #FFFFFF;
    color: #000000;
    font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif;
    margin: 0;
    padding-left: 25%;
    padding-right: 25%;
    text-align: center;
    }
    cite {
    font-size: 90%;
    font-style: normal;
    }
    h2 {
    background-color: #E2E2E2;
    border-bottom: 1px solid #000000;
    font: 80% Verdana, "Times New Roman", Times, serif;
    font-weight: bold;
    letter-spacing: 0.05em;
    margin: 15px 0 2px 0;
    padding: 5px;
    }
    h3 {
    color: #666666;
    font-family: "Lucida Sans Unicode", "Times New Roman", Times, serif;
    margin-bottom: 0;
    margin-top: 15px;
    }
    input {
    font-family: "Courier New", sans-serif;
    font-size: 12px;
    }
    ol#comments li p {
    font-size: 100%;
    }
    p, li, .feedback {
    font: 10px Verdana, 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif;
    line-height: 15px;
    }
    .credit {
    background: #FFFFFF;
    border-top: solid 3px #C0C0C0;
    color: #000000;
    font-size: 11px;
    margin: 10px 0 0 0;
    padding-bottom: 5px;
    padding-left: 10px;
    padding-right: 10px;
    padding-top: 5px;
    text-align: center;
    width: 80%;
    }
    .credit a:link, .credit a:hover {
    color: #808080;
    }
    .feedback {
    color: #CCCCCC;
    text-align: right;
    }
    .meta {
    font-family: Tahoma, Arial, sans-serif;
    font-size: .6em;
    }
    .meta li {
    display: inline;
    }
    .meta ul {
    display: inline;
    list-style: none;
    margin: 0;
    padding: 0;
    }
    .meta, .meta a {
    color: #808080;
    font-weight: normal;
    letter-spacing: 0;
    }
    .storytitle a {
    text-decoration: none;
    }
    #commentform textarea {
    width: 100%;
    }
    #content {
    text-align: left;
    }
    #header {
    background: #808080;
    border-bottom: solid 3px #000000;
    font: 230% 'Trebuchet MS', 'Times New Roman', Times, serif;
    font-variant: small-caps;
    font-weight: bold;
    letter-spacing: 1px;
    margin: 0;
    padding: 15px 15px 15px 15px;
    }
    #header a {
    border-bottom: 3px solid #808080;
    color: #FFFFFF;
    text-decoration: none;
    }
    #header a:hover {
    border-bottom: 3px solid #BCBCBC;
    color: #BCBCBC;
    }
    #menu {
    background: #FFFFFF;
    background-color: #C0C0C0;
    border-top: 3px solid #808080;
    margin-top: 25px;
    padding: 20px 30px 20px 30px;
    text-align: left;
    }
    #menu form {
    margin: 0 0 0 13px;
    }
    #menu input {
    font-family: "Courier New", sans-serif;
    margin-top: 5px;
    width: 100px;
    }
    #menu ul {
    color: #CCCCCC;
    font-weight: bold;
    list-style-type: none;
    margin: 0;
    padding-left: 3px;
    text-align: left;
    text-transform: lowercase;
    }
    #menu ul li {
    color: #7D7D7D;
    font: normal 100% 'Trebuchet MS', Verdana, 'Times New Roman', Times, serif;
    letter-spacing: 1px;
    margin-top: 10px;
    padding-bottom: 2px;
    text-transform: uppercase;
    }
    #menu ul ul {
    font-variant: normal;
    font-weight: normal;
    line-height: 100%;
    list-style-type: none;
    margin: 0;
    padding: 0;
    text-

  2. Anonymous
    Unregistered
    Posted 9 years ago #

    (code continued)
    align: left;
    text-transform: capitalize;
    }
    #menu ul ul li {
    border: 0;
    font: normal normal 70%/115% 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif;
    letter-spacing: 0;
    margin-top: 5px;
    padding: 0;
    padding-left: 12px;
    text-transform: capitalize;
    }
    #menu ul ul li a {
    color: #000000;
    text-decoration: none;
    }
    #menu ul ul li a:hover {
    border-bottom: 1px solid #809080;
    }
    #rap {
    margin: 0;
    padding: 0;
    text-align: center;
    width: 100%;
    }
    #wp-calendar, #calendar, #search, #other {
    display: none;
    }
    All i need to do is get the banner centered. If i can do that (with your help), i'll be able to finish customizing my blog.
    Thanks in advance! :)

  3. moshu
    Member
    Posted 9 years ago #

    First of all clean up your code. In the div "rap" you started another file with doctype, html, head etc. Check the validator: it says

    Line 28, column 18: "DOCTYPE" declaration not allowed in instance

    http://validator.w3.org/check?uri=http%3A%2F%2Fwww.cynikalsam.bestcatalog.net%2Fblog%2F

  4. Anonymous
    Unregistered
    Posted 9 years ago #

    OK, here's the origional index.php code before i put the banner HTML in it.
    <?php
    /* Don't remove this line. */
    require('./wp-blog-header.php');
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head profile="http://gmpg.org/xfn/1">
    <title><?php bloginfo('name'); ?><?php wp_title(); ?></title>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo('charset'); ?>" />
    <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->
    <style type="text/css" media="screen">
    @import url( <?php echo get_settings('siteurl'); ?>/style.css );
    </style>
    <link rel="stylesheet" type="text/css" media="print" href="<?php echo get_settings('siteurl'); ?>/print.css" />
    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
    <link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    <?php wp_get_archives('type=monthly&format=link'); ?>
    <?php //comments_popup_script(); // off by default ?>
    <?php wp_head(); ?>
    </head>
    <body>
    <div id="rap">
    <h1 id="header">"><?php bloginfo('name'); ?></h1>
    <div id="content">
    <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
    <?php the_date('','<h2>','</h2>'); ?>
    <div class="post">
    <h3 class="storytitle" id="post-<?php the_ID(); ?>">" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></h3>
    <div class="meta"><?php _e("Filed under:"); ?> <?php the_category() ?> — <?php the_author() ?> @ <?php the_time() ?> <?php edit_post_link(); ?></div>
    <div class="storycontent">
    <?php the_content(); ?>
    </div>
    <div class="feedback">
    <?php wp_link_pages(); ?>
    <?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>
    </div>
    <!--
    <?php trackback_rdf(); ?>
    -->
    <?php include(ABSPATH . 'wp-comments.php'); ?>
    </div>
    <?php endforeach; else: ?>
    <?php _e('Sorry, no posts matched your criteria.'); ?>
    <?php endif; ?>
    </div>
    <div id="menu">

    </div>
    </div>
    <p class="credit"><!--<?php echo $wpdb->num_queries; ?> queries. <?php timer_stop(1); ?> seconds. --> <cite><?php echo sprintf(__("Powered by WordPress"), __("Powered by WordPress, state-of-the-art semantic personal publishing platform")); ?></cite>
    </body>
    </html>
    The banner HTML Is below.
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html40/loose.dtd">
    <html><head>
    <title>blogbanner</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="author" content="Owner">
    <meta name="generator" content="SWiSHmax http://www.swishzone.com">
    <meta name="description" content="blogbanner">
    <meta name="keywords" content="about, contact, cynikalsam, forum, guestbook, home, intro, journal, tk, v0">
    <!-- text used in the movie -->
    <!-- about, contact, cynikalsam, forum, guestbook, home, intro, journal, tk, v0 -->
    <!-- Created by SWiSHmax - Flash Made Easy - www.swishzone.com -->
    </head>
    <body bgcolor="#000000">
    <center>
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
    codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,79,0"
    id="blogbanner" width="900" height="110">
    <param name="movie" value="blogbanner.swf">
    <param name="bgcolor" value="#000000">
    <param name="quality" value="high">
    <param name="allowscriptaccess" value="samedomain">
    <embed type="application/x-shockwave-flash"
    pluginspage="http://www.macromedia.com/go/getflashplayer"
    width="900" height="110"
    name="blogbanner" src="blogbanner.swf"
    bgcolor="#000000" quality="high"
    swLiveConnect="true" allowScriptAccess="samedomain"
    ></embed>
    </object>
    </center>
    </body>
    </html>

    My goal is to combine them, so i get a similar result as the banner on my forum http://cynikalsam.bestcatalog.net/forum.
    I'm a no0b, so i'm really not sure what to do..

  5. Anonymous
    Unregistered
    Posted 9 years ago #

  6. moshu
    Member
    Posted 9 years ago #

    Well, it has nothing to do with being a noobe with WP. (I also set up my WP blog a few weeks ago :)
    It's basic HTML... study this.
    Bottom line: it's not "healthy" to copy a complete html-file into the body tag of another. (As you did!)
    You can copy and paste some of the elements of another file when you want to combine two files. Try to "import" only the banner, not the whole page of it.

  7. Anonymous
    Unregistered
    Posted 9 years ago #

    Hmm.. So i have to learn HTML before getting any help? I'd love to learn it, but i doubt it's gonna happen this afternoon.
    Oh well, thanks anyways.

  8. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Please do not post long files like this into the forum.
    Change them into a .txt file and upload to your webspace.
    If nothing else, they are much easier to read that way :)

  9. Anonymous
    Unregistered
    Posted 9 years ago #

    Sorry, i thought the question was a simple one, as i had already got the banner to display, i just needed to move it over to the left a few inches..
    Again, sorry.

  10. moshu
    Member
    Posted 9 years ago #

    cynik, since you already have a website (domain, whatever) we dared to assume that you know some basic HTML, e.g. how to embed some stuff in a html file.
    And your initial question wasn't that simple, because the code in your index.php file was messed up. Now it looks better, but it seems you have to study some CSS, too :) - if not else to put your menu somewhere on the right or left.

  11. Anonymous
    Unregistered
    Posted 9 years ago #

    Nah, i really only know flash. My site is almost entirely flash, and the HTML is done automatically when i export. I can usually imbed the flash HTML into the HTML of another page (like i was able to add the banner) but for some reason, it was off to the left, and i dont know enough to know why..

  12. moshu
    Member
    Posted 9 years ago #

    I hate flash - but that's my personal taste, don't worry about it :)

    I can usually imbed the flash HTML into the HTML of another page (like i was able to add the banner)

    - No, you were not! I mean able to embed it correctly. That's where everything started.
    On the other hand one can always make a few searches with keywords like center, centering and the results will blow your mind :))

  13. Anonymous
    Unregistered
    Posted 9 years ago #

    lol The key word there was "usualy".. I searched the board here for "centering" and "centered" etc.. but the results didnt help much. Like the question on this page about centering a banner, the result was to change the css code
    h1 {
    margin: 0;
    padding: 20px;
    text-align: right
    }
    to this:
    h1 {
    margin: 0;
    padding: 20px;
    text-align: center
    }
    But my css doesnt have
    h1 {
    margin: 0;
    padding: 20px;
    text-align: right
    }
    So i tried adding it with no luck..

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.