News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Adding a flash banner to the header in the 2.0 rc3 default/core theme

Started by Pinball Nation, July 02, 2010, 04:25:15 PM

Previous topic - Next topic

Pinball Nation

Hello,i recently upgraded from 1.1.11 to 2.0 rc3.I had the flash banner in the header in the default theme in 1.1.11.Where do i need to place the flash code in the default/core theme in 2.0?I would like to mention i have not removed the SMF logo in the header either.Just need to know what all i ineed i need to do to make this happen.Thanks

mirahalo

well basically it is the same as in 1.1.11, the banner will be added in your index.template.php file but depends on the theme you're using,  if you could attach your index.template.php, a url to your forum and the html code for the flash I'll give it a try

Mick.

I dont know much about flash scripts but i would think this may be the area to look for...

Open:
Themes/default/index.template.php

Find:
<h1 class="forumtitle">
<a href="', $scripturl, '">', empty($context['header_logo_url_html_safe']) ? $context['forum_name'] : '<img src="' . $context['header_logo_url_html_safe'] . '" alt="' . $context['forum_name'] . '" />', '</a>
</h1>';



See if you can replace:
<a href="', $scripturl, '">', empty($context['header_logo_url_html_safe']) ? $context['forum_name'] : '<img src="' . $context['header_logo_url_html_safe'] . '" alt="' . $context['forum_name'] . '" />', '</a>

for your flash code.  Test it out.

Pinball Nation

Thanks for the info.I'm trying to put the flash banner in the true default 2.0rc3 theme.Bluedevil i will give that a try when my forum is back up.Just need to know what to replace or add.130860 are you saying i can replace the same code in 2.0 default theme as in the index template php in 1.1.11 and it will work?Don't mean to be a bother just want to get it right ;D

mirahalo

nope, the code is a bit different, but the code bluedevil gave to you is a good start.

Pinball Nation


Pinball Nation

Hey guys.I tried to replace that bit of code with my flash banner code an got the white screen error of death.Anything else i can try?I am trying to apply this to the default theme 2.0rc3.

mirahalo

Quote from: 130860 on July 02, 2010, 04:28:53 PM
if you could attach your index.template.php, a url to your forum and the html code for the flash I'll give it a try

or post instructions if you want it to do it yourself

;)

Pinball Nation

Hello,Sorry for the late reply.Just sum up what i did to make sure i didn't misunderstand.I found this code. <h1 class="forumtitle"> <a href="', $scripturl, '">', empty($context['header_logo_url_html_safe']) ? $context['forum_name'] : '<img src="' . $context['header_logo_url_html_safe'] . '" alt="' . $context['forum_name'] . '" />', '</a> </h1>'; I tried to replace this part of the code <a href="', $scripturl, '">', empty($context['header_logo_url_html_safe']) ? $context['forum_name'] : '<img src="' . $context['header_logo_url_html_safe'] . '" alt="' . $context['forum_name'] . '" />', '</a> With this flash code. $width = 1230; $height = 80; $banner_url = 'http://www.mywebsite.com/directory_the_flash_is_in/flash_filename.swf'; echo '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="', $width, '" height="', $height, '" id="flashlogo">'; echo '<param name="movie" value="', $banner_url, '" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />'; echo '<embed src="', $banner_url, '" quality="high" bgcolor="#ffffff" width="', $width, '" height="', $height, '" name="flashbanner" align="" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object>'; I could have misunderstood the instuctions.Thanks

mirahalo

well yes, but it still have php errors, lets try this one:

find

<a href="', $scripturl, '">', empty($context['header_logo_url_html_safe']) ? $context['forum_name'] : '<img src="' . $context['header_logo_url_html_safe'] . '" alt="' . $context['forum_name'] . '" />', '</a>   


replace with:

'; $width = 1230; $height = 80; $banner_url = 'http://www.mywebsite.com/directory_the_flash_is_in/flash_filename.swf';
echo '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="', $width, '" height="', $height, '" id="flashlogo">';
echo '<param name="movie" value="', $banner_url, '" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />'; echo '<embed src="', $banner_url, '" quality="high" bgcolor="#ffffff" width="', $width, '" height="', $height, '" name="flashbanner" align="" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object>

Pinball Nation

Thanks but i tried replacing that peice of code with the flash code and got a php error.

mirahalo

can you plase attach your index.template  so I can check it ;)

Pinball Nation


mirahalo

what program do you use to edit that file?  it has numeration on it, its probable why you have the php error, use a code editor such as notepad++ or context

Pinball Nation

I just use that to view a file not to edit it.I go to c panel to edit files.This is the file i edit.

mirahalo

Quote from: maryjane27 on July 09, 2010, 03:41:18 AM
It has numeration on it, its probable why you have the php error, use a code editor such as notepad++ or context..I think you should try this one!! It really works!!

<a href=spamlink removed">spam removed</a>


Nice Spam there Mary Jane ;) say hello to spider-man  when you see him ok ;)


@Pinball Nation try this one ;)

Pinball Nation

Hello and thanks.I did give that a try.No php errors and i can see the white space in the header where the banner is suppose to be.The flash banner will not play.I have the flash file in the image folder also for that theme.It just won't play.Sorry to be a bother.


Pinball Nation

Yeah i did all that and all i see is the white screen where the banner should be.So i am lost.

mirahalo


Advertisement: